tabi/js/mermaid.min.js
2026-04-06 14:58:57 +00:00

3256 lines
2.9 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var __esbuild_esm_mermaid_nm;(__esbuild_esm_mermaid_nm||={}).mermaid=(()=>{var s,b,T,k,w,E,S,_,A=Object.create,N=Object.defineProperty,D=Object.getOwnPropertyDescriptor,M=Object.getOwnPropertyNames,O=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty,mt=(e,t)=>N(e,"name",{value:t,configurable:!0}),q=(t,r,i,n)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let e of M(r))z.call(t,e)||e===i||N(t,e,{get:()=>r[e],enumerable:!(n=D(r,e))||n.enumerable});return t},W=(e,t,r)=>(q(e,t,"default"),r&&q(r,t,"default")),U=(e,t,r)=>(r=null!=e?A(O(e)):{},q(!t&&e&&e.__esModule?r:N(r,"default",{value:e,enumerable:!0}),e)),G=e=>q(N({},"__esModule",{value:!0}),e),j=(i=(e,t)=>()=>t=e?e(e=0):t)(()=>{s=Object.freeze({left:0,top:0,width:16,height:16}),b=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),T=Object.freeze({...s,...b}),k=Object.freeze({...T,body:"",hidden:!1})}),V=i(()=>{j(),w=Object.freeze({width:null,height:null}),E=Object.freeze({...w,...b})}),Y=i(()=>{S=mt((e,t,r,i="")=>{var n,a=e.split(":");if("@"===e.slice(0,1)){if(a.length<2||3<a.length)return null;i=a.shift().slice(1)}return 3<a.length||!a.length?null:1<a.length?(e=a.pop(),n=a.pop(),n={provider:0<a.length?a[0]:i,prefix:n,name:e},t&&!_(n)?null:n):1<(n=(e=a[0]).split("-")).length?(a={provider:i,prefix:n.shift(),name:n.join("-")},t&&!_(a)?null:a):r&&""===i&&(n={provider:i,prefix:"",name:e},!t||_(n,r))?n:null},"stringToIcon"),_=mt((e,t)=>!!e&&!(!(t&&""===e.prefix||e.prefix)||!e.name),"validateIconName")});function H(e,t){var r={};return!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0),(e=((e.rotate||0)+(t.rotate||0))%4)&&(r.rotate=e),r}var re=i(()=>{mt(H,"mergeIconTransformations")});function ie(e,t){var r,i=H(e,t);for(r in k)r in b?r in e&&!(r in i)&&(i[r]=b[r]):r in t?i[r]=t[r]:r in e&&(i[r]=e[r]);return i}var ne=i(()=>{j(),re(),mt(ie,"mergeIconData")});function ae(e,t){let i=e.icons,n=e.aliases||Object.create(null),a=Object.create(null);function s(e){var t,r;return i[e]?a[e]=[]:(e in a||(a[e]=null,(r=(t=n[e]&&n[e].parent)&&s(t))&&(a[e]=[t].concat(r))),a[e])}return mt(s,"resolve"),(t||Object.keys(i).concat(Object.keys(n))).forEach(s),a}var se=i(()=>{mt(ae,"getIconsTree")});function oe(e,t,r){let i=e.icons,n=e.aliases||Object.create(null),a={};function s(e){a=ie(i[e]||n[e],a)}return mt(s,"parse"),s(t),r.forEach(s),ie(e,a)}function le(e,t){var r;return e.icons[t]?oe(e,t,[]):(r=ae(e,[t])[t])?oe(e,t,r):null}var he=i(()=>{ne(),se(),mt(oe,"internalGetIconData"),mt(le,"getIconData")});function ue(e,t,r){if(1===t)return e;if(r=r||100,"number"==typeof e)return Math.ceil(e*t*r)/r;if("string"!=typeof e)return e;var i,n=e.split(de);if(null===n||!n.length)return e;let a=[],s=n.shift(),o=pe.test(s);for(;;){if(!o||(i=parseFloat(s),isNaN(i))?a.push(s):a.push(Math.ceil(i*t*r)/r),void 0===(s=n.shift()))return a.join("");o=!o}}var de,pe,ge=i(()=>{de=/(-?[0-9.]*[0-9]+[0-9.]*)/g,pe=/^-?[0-9.]*[0-9]+[0-9.]*$/g,mt(ue,"calculateSize")});function fe(e,t="defs"){let r="",i=e.indexOf("<"+t);for(;0<=i;){var n=e.indexOf(">",i),a=e.indexOf("</"+t);if(-1===n||-1===a)break;var s=e.indexOf(">",a);if(-1===s)break;r+=e.slice(n+1,a).trim(),e=e.slice(0,i).trim()+e.slice(s+1)}return{defs:r,content:e}}function me(e,t){return e?"<defs>"+e+"</defs>"+t:t}function ye(e,t,r){return me((e=fe(e)).defs,t+e.content+r)}var ve=i(()=>{mt(fe,"splitSVGDefs"),mt(me,"mergeDefsAndContent"),mt(ye,"wrapSVGContent")});function xe(e,t){let r={...T,...e},i={...E,...t},s={left:r.left,top:r.top,width:r.width,height:r.height},o=r.body,n=([r,i].forEach(e=>{let t=[],r=e.hFlip,i=e.vFlip,n=e.rotate;r?i?n+=2:(t.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),t.push("scale(-1 1)"),s.top=s.left=0):i&&(t.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),t.push("scale(1 -1)"),s.top=s.left=0);let a;switch(n<0&&(n-=4*Math.floor(n/4)),n%=4){case 1:a=s.height/2+s.top,t.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:t.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:a=s.width/2+s.left,t.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}n%2==1&&(s.left!==s.top&&(a=s.left,s.left=s.top,s.top=a),s.width!==s.height)&&(a=s.width,s.width=s.height,s.height=a),t.length&&(o=ye(o,'<g transform="'+t.join(" ")+'">',"</g>"))}),i.width),a=i.height,l=s.width,h=s.height,c,u,d=(null===n?(u=null===a?"1em":"auto"===a?h:a,c=ue(u,l/h)):(c="auto"===n?l:n,u=null===a?ue(c,h/l):"auto"===a?h:a),{}),p=mt((e,t)=>{be(t)||(d[e]=t.toString())},"setAttr");return p("width",c),p("height",u),e=[s.left,s.top,l,h],d.viewBox=e.join(" "),{attributes:d,viewBox:e,body:o}}var be,Te=i(()=>{j(),V(),ge(),ve(),be=mt(e=>"unset"===e||"undefined"===e||"none"===e,"isUnsetKeyword"),mt(xe,"iconToSVG")});function ke(i,n=Ce){for(var e,t=[];e=we.exec(i);)t.push(e[1]);if(t.length){let r="suffix"+(16777216*Math.random()|Date.now()).toString(16);t.forEach(e=>{var t="function"==typeof n?n(e):n+(Ee++).toString(),e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");i=i.replace(new RegExp('([#;"])('+e+')([")]|\\.[a-z])',"g"),"$1"+t+r+"$3")}),i=i.replace(new RegExp(r,"g"),"")}return i}var we,Ce,Ee,Se=i(()=>{we=/\sid="(\S+)"/g,Ce="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),Ee=0,mt(ke,"replaceIDs")});function _e(e,t){let r=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(var i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}var Ae,Le,Re,Ie,B,Ne,De,Me,Oe,Be,Pe,$e,Fe,ze,qe,We,Ue,Ge,je,Ve,Ye,He,Xe,Ke,Ze,Qe,Je,et,tt,rt,it,nt,at,st,ot,lt,ht,ct,ut,dt,pt,gt,ft,vt,xt,bt,Tt,L,kt,R,wt,Ct,Et,n,St,_t,At,a,Lt,Rt,It,Nt,Dt,Mt,Ot,Bt,Pt,$t,Ft,zt,qt,Wt,Ut,Gt,jt,Vt,Yt,Ht,Xt,Kt,Zt,Qt,Jt,er,tr,rr,ir,nr,ar,sr,or,lr,hr,cr,ur,dr,pr,gr,fr,mr,yr,vr,xr,br,Tr,kr,wr,Cr,Er,Sr,_r,Ar,Lr,Rr=i(()=>{mt(_e,"iconToHTML")}),Ir=i(()=>{Y(),he(),Te(),Se(),Rr()}),Nr=i(()=>{Ae=mt((t,r,{depth:i=2,clobber:n=!1}={})=>{let a={depth:i,clobber:n};return Array.isArray(r)&&!Array.isArray(t)?(r.forEach(e=>Ae(t,e,a)),t):Array.isArray(r)&&Array.isArray(t)?(r.forEach(e=>{t.includes(e)||t.push(e)}),t):void 0===t||i<=0?null!=t&&"object"==typeof t&&"object"==typeof r?Object.assign(t,r):r:(void 0!==r&&"object"==typeof t&&"object"==typeof r&&Object.keys(r).forEach(e=>{"object"!=typeof r[e]||null===r[e]||void 0!==t[e]&&"object"!=typeof t[e]?(n||"object"!=typeof t[e]&&"object"!=typeof r[e])&&(t[e]=r[e]):(void 0===t[e]&&(t[e]=Array.isArray(r[e])?[]:{}),t[e]=Ae(t[e],r[e],{depth:i-1,clobber:n}))}),t)},"assignWithDepth"),Le=Ae}),Dr=(tYe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports))((e,t)=>{function r(){var n="millisecond",u="second",d="minute",p="hour",g="day",f="week",m="month",y="year",v="date",t="Invalid Date",s=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,e={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:mt(function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"},"ordinal")},i=mt(function(e,t,r){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(r)+e},"m"),r={s:i,z:mt(function(e){var e=-e.utcOffset(),t=Math.abs(e),r=Math.floor(t/60),t=t%60;return(e<=0?"+":"-")+i(r,2,"0")+":"+i(t,2,"0")},"z"),m:mt(function e(t,r){var i,n,a;return t.date()<r.date()?-e(r,t):(i=12*(r.year()-t.year())+(r.month()-t.month()),a=r-(n=t.clone().add(i,m))<0,t=t.clone().add(i+(a?-1:1),m),+(-(i+(r-n)/(a?n-t:t-n))||0))},"t"),a:mt(function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},"a"),p:mt(function(e){return{M:m,y:y,w:f,d:g,D:v,h:p,m:d,s:u,ms:n,Q:"quarter"}[e]||String(e||"").toLowerCase().replace(/s$/,"")},"p"),u:mt(function(e){return void 0===e},"u")},o="en",l={},a=(l[o]=e,"$isDayjsObject"),h=mt(function(e){return e instanceof k||!(!e||!e[a])},"S"),c=mt(function e(t,r,i){var n;if(!t)return o;if("string"==typeof t){var a=t.toLowerCase(),r=(l[a]&&(n=a),r&&(l[a]=r,n=a),t.split("-"));if(!n&&1<r.length)return e(r[0])}else a=t.name,l[a]=t,n=a;return!i&&n&&(o=n),n||!i&&o},"t"),b=mt(function(e,t){return h(e)?e.clone():((t="object"==typeof t?t:{}).date=e,t.args=arguments,new k(t))},"O"),T=r,k=(T.l=c,T.i=h,T.w=function(e,t){return b(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})},mt(C,"M"),(e=C.prototype).parse=function(a){this.$d=(()=>{var e=a.date,t=a.utc;if(null===e)return new Date(NaN);if(T.u(e))return new Date;if(!(e instanceof Date||"string"!=typeof e||/Z$/i.test(e))){var r,i,n=e.match(s);if(n)return r=n[2]-1||0,i=(n[7]||"0").substring(0,3),t?new Date(Date.UTC(n[1],r,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],r,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}return new Date(e)})(),this.init()},e.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},e.$utils=function(){return T},e.isValid=function(){return this.$d.toString()!==t},e.isSame=function(e,t){return e=b(e),this.startOf(t)<=e&&e<=this.endOf(t)},e.isAfter=function(e,t){return b(e)<this.startOf(t)},e.isBefore=function(e,t){return this.endOf(t)<b(e)},e.$g=function(e,t,r){return T.u(e)?this[t]:this.set(r,e)},e.unix=function(){return Math.floor(this.valueOf()/1e3)},e.valueOf=function(){return this.$d.getTime()},e.startOf=function(e,t){var r=this,i=!!T.u(t)||t,t=T.p(e),n=mt(function(e,t){return t=T.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r),i?t:t.endOf(g)},"l"),a=mt(function(e,t){return T.w(r.toDate()[e].apply(r.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},"$"),s=this.$W,o=this.$M,l=this.$D,h="set"+(this.$u?"UTC":"");switch(t){case y:return i?n(1,0):n(31,11);case m:return i?n(1,o):n(0,o+1);case f:var c=(s<(c=this.$locale().weekStart||0)?s+7:s)-c;return n(i?l-c:l+(6-c),o);case g:case v:return a(h+"Hours",0);case p:return a(h+"Minutes",1);case d:return a(h+"Seconds",2);case u:return a(h+"Milliseconds",3);default:return this.clone()}},e.endOf=function(e){return this.startOf(e,!1)},e.$set=function(e,t){var e=T.p(e),r="set"+(this.$u?"UTC":""),r=((i={}).day=r+"Date",i.date=r+"Date",i[m]=r+"Month",i.year=r+"FullYear",i.hour=r+"Hours",i[d]=r+"Minutes",i[u]=r+"Seconds",i[n]=r+"Milliseconds",i[e]),i=e===g?this.$D+(t-this.$W):t;return e===m||e===y?((t=this.clone().set(v,1)).$d[r](i),t.init(),this.$d=t.set(v,Math.min(this.$D,t.daysInMonth())).$d):r&&this.$d[r](i),this.init(),this},e.set=function(e,t){return this.clone().$set(e,t)},e.get=function(e){return this[T.p(e)]()},e.add=function(r,e){var i=this,e=(r=Number(r),T.p(e)),t=mt(function(e){var t=b(i);return T.w(t.date(t.date()+Math.round(e*r)),i)},"y");return e===m?this.set(m,this.$M+r):e===y?this.set(y,this.$y+r):e===g?t(1):e===f?t(7):(t={minute:6e4,hour:36e5,second:1e3}[e]||1,e=this.$d.getTime()+r*t,T.w(e,this))},e.subtract=function(e,t){return this.add(-1*e,t)},e.format=function(e){var n,r,i,a,s,o,l,h,c,u,d=this,p=this.$locale();return this.isValid()?(n=e||"YYYY-MM-DDTHH:mm:ssZ",r=T.z(this),i=this.$H,a=this.$m,s=this.$M,o=p.weekdays,l=p.months,e=p.meridiem,h=mt(function(e,t,r,i){return e&&(e[t]||e(d,n))||r[t].slice(0,i)},"h"),c=mt(function(e){return T.s(i%12||12,e,"0")},"d"),u=e||function(e,t,r){return e=e<12?"AM":"PM",r?e.toLowerCase():e},n.replace(x,function(e,t){return t||(()=>{switch(e){case"YY":return String(d.$y).slice(-2);case"YYYY":return T.s(d.$y,4,"0");case"M":return s+1;case"MM":return T.s(s+1,2,"0");case"MMM":return h(p.monthsShort,s,l,3);case"MMMM":return h(l,s);case"D":return d.$D;case"DD":return T.s(d.$D,2,"0");case"d":return String(d.$W);case"dd":return h(p.weekdaysMin,d.$W,o,2);case"ddd":return h(p.weekdaysShort,d.$W,o,3);case"dddd":return o[d.$W];case"H":return String(i);case"HH":return T.s(i,2,"0");case"h":return c(1);case"hh":return c(2);case"a":return u(i,a,!0);case"A":return u(i,a,!1);case"m":return String(a);case"mm":return T.s(a,2,"0");case"s":return String(d.$s);case"ss":return T.s(d.$s,2,"0");case"SSS":return T.s(d.$ms,3,"0");case"Z":return r}return null})()||r.replace(":","")})):p.invalidDate||t},e.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},e.diff=function(e,t,r){var i,n=this,t=T.p(t),a=b(e),s=6e4*(a.utcOffset()-this.utcOffset()),o=this-a,l=mt(function(){return T.m(n,a)},"D");switch(t){case y:i=l()/12;break;case m:i=l();break;case"quarter":i=l()/3;break;case f:i=(o-s)/6048e5;break;case g:i=(o-s)/864e5;break;case p:i=o/36e5;break;case d:i=o/6e4;break;case u:i=o/1e3;break;default:i=o}return r?i:T.a(i)},e.daysInMonth=function(){return this.endOf(m).$D},e.$locale=function(){return l[this.$L]},e.locale=function(e,t){var r;return e?(r=this.clone(),(e=c(e,t,!0))&&(r.$L=e),r):this.$L},e.clone=function(){return T.w(this.$d,this)},e.toDate=function(){return new Date(this.valueOf())},e.toJSON=function(){return this.isValid()?this.toISOString():null},e.toISOString=function(){return this.$d.toISOString()},e.toString=function(){return this.$d.toUTCString()},C),w=k.prototype;function C(e){this.$L=c(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[a]=!0}return b.prototype=w,[["$ms",n],["$s",u],["$m",d],["$H",p],["$W",g],["$M",m],["$y",y],["$D",v]].forEach(function(t){w[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),b.extend=function(e,t){return e.$i||(e(t,k,b),e.$i=!0),b},b.locale=c,b.isDayjs=h,b.unix=function(e){return b(1e3*e)},b.en=l[o],b.Ls=l,b.p={},b}"object"==typeof e&&typeof t<"u"?t.exports=r():"function"==typeof define&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=r()}),e=i(()=>{Re=U(Dr(),1),Ie={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},B={trace:mt(()=>{},"trace"),debug:mt(()=>{},"debug"),info:mt(()=>{},"info"),warn:mt(()=>{},"warn"),error:mt(()=>{},"error"),fatal:mt(()=>{},"fatal")},Ne=mt(function(e="fatal"){let t=Ie.fatal;"string"==typeof e?e.toLowerCase()in Ie&&(t=Ie[e]):"number"==typeof e&&(t=e),B.trace=()=>{},B.debug=()=>{},B.info=()=>{},B.warn=()=>{},B.error=()=>{},B.fatal=()=>{},t<=Ie.fatal&&(B.fatal=console.error?console.error.bind(console,De("FATAL"),"color: orange"):console.log.bind(console,"",De("FATAL"))),t<=Ie.error&&(B.error=console.error?console.error.bind(console,De("ERROR"),"color: orange"):console.log.bind(console,"",De("ERROR"))),t<=Ie.warn&&(B.warn=console.warn?console.warn.bind(console,De("WARN"),"color: orange"):console.log.bind(console,"",De("WARN"))),t<=Ie.info&&(B.info=console.info?console.info.bind(console,De("INFO"),"color: lightblue"):console.log.bind(console,"",De("INFO"))),t<=Ie.debug&&(B.debug=console.debug?console.debug.bind(console,De("DEBUG"),"color: lightgreen"):console.log.bind(console,"",De("DEBUG"))),t<=Ie.trace&&(B.trace=console.debug?console.debug.bind(console,De("TRACE"),"color: lightgreen"):console.log.bind(console,"",De("TRACE")))},"setLogLevel"),De=mt(e=>`%c${(0,Re.default)().format("ss.SSS")} : ${e} : `,"format")}),Mr=i(()=>{Me={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:mt(e=>255<=e?255:e<0?0:e,"r"),g:mt(e=>255<=e?255:e<0?0:e,"g"),b:mt(e=>255<=e?255:e<0?0:e,"b"),h:mt(e=>e%360,"h"),s:mt(e=>100<=e?100:e<0?0:e,"s"),l:mt(e=>100<=e?100:e<0?0:e,"l"),a:mt(e=>1<=e?1:e<0?0:e,"a")},toLinear:mt(e=>{var t=e/255;return.03928<e?Math.pow((.055+t)/1.055,2.4):t/12.92},"toLinear"),hue2rgb:mt((e,t,r)=>(r<0&&(r+=1),1<r&&--r,r<.16666666666666666?e+6*(t-e)*r:r<.5?t:r<.6666666666666666?e+(t-e)*(.6666666666666666-r)*6:e),"hue2rgb"),hsl2rgb:mt(({h:e,s:t,l:r},i)=>{if(!t)return 2.55*r;e/=360,t/=100;var n=(r/=100)<.5?r*(1+t):r+t-r*t,a=2*r-n;switch(i){case"r":return 255*Me.hue2rgb(a,n,e+.3333333333333333);case"g":return 255*Me.hue2rgb(a,n,e);case"b":return 255*Me.hue2rgb(a,n,e-.3333333333333333)}},"hsl2rgb"),rgb2hsl:mt(({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;var n=Math.max(e,t,r),a=Math.min(e,t,r),s=(n+a)/2;if("l"===i)return 100*s;if(n===a)return 0;var o=n-a;if("s"===i)return 100*(.5<s?o/(2-n-a):o/(n+a));switch(n){case e:return 60*((t-r)/o+(t<r?6:0));case t:return 60*((r-e)/o+2);case r:return 60*((e-t)/o+4);default:return-1}},"rgb2hsl")},Oe=Me}),Or=i(()=>{Be={clamp:mt((e,t,r)=>r<t?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),"clamp"),round:mt(e=>Math.round(1e10*e)/1e10,"round")},Pe=Be}),Br=i(()=>{$e={dec2hex:mt(e=>1<(e=Math.round(e).toString(16)).length?e:"0"+e,"dec2hex")},Fe=$e}),Pr=i(()=>{Mr(),Or(),Br(),ze={channel:Oe,lang:Pe,unit:Fe}}),$r=i(()=>{Pr(),qe={};for(let e=0;e<=255;e++)qe[e]=ze.unit.dec2hex(e);We={ALL:0,RGB:1,HSL:2}}),Fr=i(()=>{$r(),Ue=class{static{mt(this,"Type")}constructor(){this.type=We.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=We.ALL}is(e){return this.type===e}},Ge=Ue}),zr=i(()=>{Pr(),Fr(),$r(),je=class{static{mt(this,"Channels")}constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new Ge}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=We.ALL,this}_ensureHSL(){var e=this.data,{h:t,s:r,l:i}=e;void 0===t&&(e.h=ze.channel.rgb2hsl(e,"h")),void 0===r&&(e.s=ze.channel.rgb2hsl(e,"s")),void 0===i&&(e.l=ze.channel.rgb2hsl(e,"l"))}_ensureRGB(){var e=this.data,{r:t,g:r,b:i}=e;void 0===t&&(e.r=ze.channel.hsl2rgb(e,"r")),void 0===r&&(e.g=ze.channel.hsl2rgb(e,"g")),void 0===i&&(e.b=ze.channel.hsl2rgb(e,"b"))}get r(){var e=this.data,t=e.r;return this.type.is(We.HSL)||void 0===t?(this._ensureHSL(),ze.channel.hsl2rgb(e,"r")):t}get g(){var e=this.data,t=e.g;return this.type.is(We.HSL)||void 0===t?(this._ensureHSL(),ze.channel.hsl2rgb(e,"g")):t}get b(){var e=this.data,t=e.b;return this.type.is(We.HSL)||void 0===t?(this._ensureHSL(),ze.channel.hsl2rgb(e,"b")):t}get h(){var e=this.data,t=e.h;return this.type.is(We.RGB)||void 0===t?(this._ensureRGB(),ze.channel.rgb2hsl(e,"h")):t}get s(){var e=this.data,t=e.s;return this.type.is(We.RGB)||void 0===t?(this._ensureRGB(),ze.channel.rgb2hsl(e,"s")):t}get l(){var e=this.data,t=e.l;return this.type.is(We.RGB)||void 0===t?(this._ensureRGB(),ze.channel.rgb2hsl(e,"l")):t}get a(){return this.data.a}set r(e){this.type.set(We.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(We.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(We.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(We.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(We.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(We.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}},Ve=je}),qr=i(()=>{zr(),Ye=new Ve({r:0,g:0,b:0,a:0},"transparent"),He=Ye}),Wr=i(()=>{qr(),$r(),Xe={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:mt(e=>{if(35===e.charCodeAt(0)){var t,r,i,n,a,s=e.match(Xe.re);if(s)return s=s[1],t=parseInt(s,16),s=s.length,He.set({r:(t>>(i=(r=4<s)?8:4)*(3+(n=(s=s%4==0)?0:-1))&(a=r?255:15))*(r=r?1:17),g:(t>>i*(2+n)&a)*r,b:(t>>i*(1+n)&a)*r,a:s?(t&a)*r/255:1},e)}},"parse"),stringify:mt(e=>{var{r:e,g:t,b:r,a:i}=e;return i<1?"#"+qe[Math.round(e)]+qe[Math.round(t)]+qe[Math.round(r)]+qe[Math.round(255*i)]:"#"+qe[Math.round(e)]+qe[Math.round(t)]+qe[Math.round(r)]},"stringify")},Ke=Xe}),Ur=i(()=>{Pr(),qr(),Ze={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:mt(e=>{if(r=e.match(Ze.hueRe)){var[,t,r]=r;switch(r){case"grad":return ze.channel.clamp.h(.9*parseFloat(t));case"rad":return ze.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return ze.channel.clamp.h(360*parseFloat(t))}}return ze.channel.clamp.h(parseFloat(e))},"_hue2deg"),parse:mt(e=>{var t,r,i,n,a=e.charCodeAt(0);if((104===a||72===a)&&(a=e.match(Ze.re)))return[,a,t,r,i,n]=a,He.set({h:Ze._hue2deg(a),s:ze.channel.clamp.s(parseFloat(t)),l:ze.channel.clamp.l(parseFloat(r)),a:i?ze.channel.clamp.a(n?parseFloat(i)/100:parseFloat(i)):1},e)},"parse"),stringify:mt(e=>{var{h:e,s:t,l:r,a:i}=e;return i<1?`hsla(${ze.lang.round(e)}, ${ze.lang.round(t)}%, ${ze.lang.round(r)}%, ${i})`:`hsl(${ze.lang.round(e)}, ${ze.lang.round(t)}%, ${ze.lang.round(r)}%)`},"stringify")},Qe=Ze}),Gr=i(()=>{Wr(),Je={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:mt(e=>{if(e=e.toLowerCase(),e=Je.colors[e])return Ke.parse(e)},"parse"),stringify:mt(e=>{var t,r=Ke.stringify(e);for(t in Je.colors)if(Je.colors[t]===r)return t},"stringify")},et=Je}),jr=i(()=>{Pr(),qr(),tt={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:mt(e=>{var t,r,i,n,a,s,o,l=e.charCodeAt(0);if((114===l||82===l)&&(l=e.match(tt.re)))return[,l,t,r,i,n,a,s,o]=l,He.set({r:ze.channel.clamp.r(t?2.55*parseFloat(l):parseFloat(l)),g:ze.channel.clamp.g(i?2.55*parseFloat(r):parseFloat(r)),b:ze.channel.clamp.b(a?2.55*parseFloat(n):parseFloat(n)),a:s?ze.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},e)},"parse"),stringify:mt(e=>{var{r:e,g:t,b:r,a:i}=e;return i<1?`rgba(${ze.lang.round(e)}, ${ze.lang.round(t)}, ${ze.lang.round(r)}, ${ze.lang.round(i)})`:`rgb(${ze.lang.round(e)}, ${ze.lang.round(t)}, ${ze.lang.round(r)})`},"stringify")},rt=tt}),Vr=i(()=>{Wr(),Ur(),Gr(),jr(),$r(),it={format:{keyword:et,hex:Ke,rgb:rt,rgba:rt,hsl:Qe,hsla:Qe},parse:mt(e=>{if("string"!=typeof e)return e;var t=Ke.parse(e)||rt.parse(e)||Qe.parse(e)||et.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},"parse"),stringify:mt(e=>!e.changed&&e.color?e.color:(e.type.is(We.HSL)||void 0===e.data.r?Qe:e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?rt:Ke).stringify(e),"stringify")},nt=it}),Yr=i(()=>{Pr(),Vr(),at=mt((e,t)=>{var r,i=nt.parse(e);for(r in t)i[r]=ze.channel.clamp[r](t[r]);return nt.stringify(i)},"change"),st=at}),Hr=i(()=>{Pr(),qr(),Vr(),Yr(),ot=mt((e,t,r=0,i=1)=>"number"!=typeof e?st(e,{a:t}):(e=He.set({r:ze.channel.clamp.r(e),g:ze.channel.clamp.g(t),b:ze.channel.clamp.b(r),a:ze.channel.clamp.a(i)}),nt.stringify(e)),"rgba"),lt=ot}),Xr=i(()=>{Pr(),Vr(),ht=mt((e,t)=>ze.lang.round(nt.parse(e)[t]),"channel"),ct=ht}),Kr=i(()=>{Pr(),Vr(),ut=mt(e=>{var{r:e,g:t,b:r}=nt.parse(e),e=.2126*ze.channel.toLinear(e)+.7152*ze.channel.toLinear(t)+.0722*ze.channel.toLinear(r);return ze.lang.round(e)},"luminance"),dt=ut}),Zr=i(()=>{Kr(),pt=mt(e=>.5<=dt(e),"isLight"),gt=pt}),Qr=i(()=>{Zr(),ft=mt(e=>!gt(e),"isDark"),vt=ft}),Jr=i(()=>{Pr(),Vr(),xt=mt((e,t,r)=>{var i=(e=nt.parse(e))[t];return i!==(r=ze.channel.clamp[t](i+r))&&(e[t]=r),nt.stringify(e)},"adjustChannel"),bt=xt}),ei=i(()=>{Jr(),Tt=mt((e,t)=>bt(e,"l",t),"lighten"),L=Tt}),ti=i(()=>{Jr(),kt=mt((e,t)=>bt(e,"l",-t),"darken"),R=kt}),ri=i(()=>{Jr(),wt=mt((e,t)=>bt(e,"a",-t),"transparentize"),Ct=wt}),ii=i(()=>{Vr(),Yr(),Et=mt((e,t)=>{var r,i=nt.parse(e),n={};for(r in t)t[r]&&(n[r]=i[r]+t[r]);return st(e,n)},"adjust"),n=Et}),ni=i(()=>{Vr(),Hr(),St=mt((e,t,r=50)=>{var{r:e,g:i,b:n,a}=nt.parse(e),{r:t,g:s,b:o,a:l}=nt.parse(t),h=2*(r/=100)-1,c=a-l;return lt(e*(h=(1+(h*c==-1?h:(h+c)/(1+h*c)))/2)+t*(c=1-h),i*h+s*c,n*h+o*c,a*r+l*(1-r))},"mix"),_t=St}),ai=i(()=>{Vr(),ni(),At=mt((e,t=100)=>{var r=nt.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,_t(r,e,t)},"invert"),a=At}),si=i(()=>{Hr(),Xr(),Qr(),ei(),ti(),ri(),ii(),ai()}),oi=i(()=>{si()}),li=i(()=>{Lt="#ffffff",Rt="#f2f2f2"}),hi=i(()=>{oi(),It=mt((e,t)=>n(e,t?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder")}),ci=i(()=>{oi(),li(),hi(),Nt=class{static{mt(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||n(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||n(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||It(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||It(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||It(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||L(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||R(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,10)):(this.rowOdd=this.rowOdd||L(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||L(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||n(this.primaryColor,{h:30}),this.cScale4=this.cScale4||n(this.primaryColor,{h:60}),this.cScale5=this.cScale5||n(this.primaryColor,{h:90}),this.cScale6=this.cScale6||n(this.primaryColor,{h:120}),this.cScale7=this.cScale7||n(this.primaryColor,{h:150}),this.cScale8=this.cScale8||n(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||n(this.primaryColor,{h:270}),this.cScale10=this.cScale10||n(this.primaryColor,{h:300}),this.cScale11=this.cScale11||n(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=R(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=R(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||a(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||L(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||R(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;var t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||n(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||n(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||n(this.primaryColor,{h:64}),this.fillType3=this.fillType3||n(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||n(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||n(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||n(this.primaryColor,{h:128}),this.fillType7=this.fillType7||n(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||n(this.primaryColor,{l:-10}),this.pie5=this.pie5||n(this.secondaryColor,{l:-10}),this.pie6=this.pie6||n(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||n(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||n(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||n(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||n(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||n(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||n(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??n(this.primaryColor,{l:-30}),this.venn2=this.venn2??n(this.secondaryColor,{l:-30}),this.venn3=this.venn3??n(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??n(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??n(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??n(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??n(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??n(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||n(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||n(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||n(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||n(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||n(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||n(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||vt(this.quadrant1Fill)?L:R)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||n(this.primaryColor,{h:-30}),this.git4=this.git4||n(this.primaryColor,{h:-60}),this.git5=this.git5||n(this.primaryColor,{h:-90}),this.git6=this.git6||n(this.primaryColor,{h:60}),this.git7=this.git7||n(this.primaryColor,{h:120}),this.darkMode?(this.git0=L(this.git0,25),this.git1=L(this.git1,25),this.git2=L(this.git2,25),this.git3=L(this.git3,25),this.git4=L(this.git4,25),this.git5=L(this.git5,25),this.git6=L(this.git6,25),this.git7=L(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||a(this.git0),this.gitInv1=this.gitInv1||a(this.git1),this.gitInv2=this.gitInv2||a(this.git2),this.gitInv3=this.gitInv3||a(this.git3),this.gitInv4=this.gitInv4||a(this.git4),this.gitInv5=this.gitInv5||a(this.git5),this.gitInv6=this.gitInv6||a(this.git6),this.gitInv7=this.gitInv7||a(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Lt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Rt,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Dt=mt(e=>{var t=new Nt;return t.calculate(e),t},"getThemeVariables")}),ui=i(()=>{oi(),hi(),Mt=class{static{mt(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=L(this.primaryColor,16),this.tertiaryColor=n(this.primaryColor,{h:-160}),this.primaryBorderColor=a(this.background),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.tertiaryColor),this.lineColor=a(this.background),this.textColor=a(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=L(a("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=lt(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=R("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=R(this.sectionBkgColor,10),this.taskBorderColor=lt(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=lt(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||L(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||R(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=L(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=L(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=L(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=a(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=n(this.primaryColor,{h:64}),this.fillType3=n(this.secondaryColor,{h:64}),this.fillType4=n(this.primaryColor,{h:-64}),this.fillType5=n(this.secondaryColor,{h:-64}),this.fillType6=n(this.primaryColor,{h:128}),this.fillType7=n(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||n(this.primaryColor,{h:30}),this.cScale4=this.cScale4||n(this.primaryColor,{h:60}),this.cScale5=this.cScale5||n(this.primaryColor,{h:90}),this.cScale6=this.cScale6||n(this.primaryColor,{h:120}),this.cScale7=this.cScale7||n(this.primaryColor,{h:150}),this.cScale8=this.cScale8||n(this.primaryColor,{h:210}),this.cScale9=this.cScale9||n(this.primaryColor,{h:270}),this.cScale10=this.cScale10||n(this.primaryColor,{h:300}),this.cScale11=this.cScale11||n(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||a(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||L(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||n(this.mainBkg,{h:30,s:-30,l:-(4*e-10)}),this["surfacePeer"+e]=this["surfacePeer"+e]||n(this.mainBkg,{h:30,s:-30,l:-(4*e-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let e=0;e<8;e++)this["venn"+(e+1)]=this["venn"+(e+1)]??L(this["cScale"+e],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||n(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||n(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||n(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||n(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||n(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||n(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||vt(this.quadrant1Fill)?L:R)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=L(this.secondaryColor,20),this.git1=L(this.pie2||this.secondaryColor,20),this.git2=L(this.pie3||this.tertiaryColor,20),this.git3=L(this.pie4||n(this.primaryColor,{h:-30}),20),this.git4=L(this.pie5||n(this.primaryColor,{h:-60}),20),this.git5=L(this.pie6||n(this.primaryColor,{h:-90}),10),this.git6=L(this.pie7||n(this.primaryColor,{h:60}),10),this.git7=L(this.pie8||n(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||a(this.git0),this.gitInv1=this.gitInv1||a(this.git1),this.gitInv2=this.gitInv2||a(this.git2),this.gitInv3=this.gitInv3||a(this.git3),this.gitInv4=this.gitInv4||a(this.git4),this.gitInv5=this.gitInv5||a(this.git5),this.gitInv6=this.gitInv6||a(this.git6),this.gitInv7=this.gitInv7||a(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||a(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||a(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||L(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||L(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Ot=mt(e=>{var t=new Mt;return t.calculate(e),t},"getThemeVariables")}),di=i(()=>{oi(),hi(),li(),Bt=class{static{mt(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=n(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=n(this.primaryColor,{h:-160}),this.primaryBorderColor=It(this.primaryColor,this.darkMode),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.tertiaryColor),this.lineColor=a(this.background),this.textColor=a(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=It(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=lt(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||n(this.primaryColor,{h:30}),this.cScale4=this.cScale4||n(this.primaryColor,{h:60}),this.cScale5=this.cScale5||n(this.primaryColor,{h:90}),this.cScale6=this.cScale6||n(this.primaryColor,{h:120}),this.cScale7=this.cScale7||n(this.primaryColor,{h:150}),this.cScale8=this.cScale8||n(this.primaryColor,{h:210}),this.cScale9=this.cScale9||n(this.primaryColor,{h:270}),this.cScale10=this.cScale10||n(this.primaryColor,{h:300}),this.cScale11=this.cScale11||n(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||R(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||R(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=R(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||R(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||n(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||n(this.mainBkg,{h:30,l:-(5+5*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||n(this.mainBkg,{h:30,l:-(7+5*e)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||a(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||a(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||L(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||L(this.primaryColor,1),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.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=n(this.primaryColor,{h:64}),this.fillType3=n(this.secondaryColor,{h:64}),this.fillType4=n(this.primaryColor,{h:-64}),this.fillType5=n(this.secondaryColor,{h:-64}),this.fillType6=n(this.primaryColor,{h:128}),this.fillType7=n(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||n(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||n(this.primaryColor,{l:-10}),this.pie5=this.pie5||n(this.secondaryColor,{l:-30}),this.pie6=this.pie6||n(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||n(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||n(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||n(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||n(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||n(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||n(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??n(this.primaryColor,{l:-30}),this.venn2=this.venn2??n(this.secondaryColor,{l:-30}),this.venn3=this.venn3??n(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??n(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??n(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??n(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??n(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??n(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||n(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||n(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||n(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||n(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||n(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||n(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||vt(this.quadrant1Fill)?L:R)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||n(this.primaryColor,{h:-30}),this.git4=this.git4||n(this.primaryColor,{h:-60}),this.git5=this.git5||n(this.primaryColor,{h:-90}),this.git6=this.git6||n(this.primaryColor,{h:60}),this.git7=this.git7||n(this.primaryColor,{h:120}),this.darkMode?(this.git0=L(this.git0,25),this.git1=L(this.git1,25),this.git2=L(this.git2,25),this.git3=L(this.git3,25),this.git4=L(this.git4,25),this.git5=L(this.git5,25),this.git6=L(this.git6,25),this.git7=L(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||R(a(this.git0),25),this.gitInv1=this.gitInv1||a(this.git1),this.gitInv2=this.gitInv2||a(this.git2),this.gitInv3=this.gitInv3||a(this.git3),this.gitInv4=this.gitInv4||a(this.git4),this.gitInv5=this.gitInv5||a(this.git5),this.gitInv6=this.gitInv6||a(this.git6),this.gitInv7=this.gitInv7||a(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||a(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||a(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Lt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Rt}calculate(t){var e;Object.keys(this).forEach(e=>{"calculated"===this[e]&&(this[e]=void 0)}),"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Pt=mt(e=>{var t=new Bt;return t.calculate(e),t},"getThemeVariables")}),pi=i(()=>{oi(),li(),hi(),$t=class{static{mt(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=L("#cde498",10),this.primaryBorderColor=It(this.primaryColor,this.darkMode),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.primaryColor),this.lineColor=a(this.background),this.textColor=a(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=R(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||n(this.primaryColor,{h:30}),this.cScale4=this.cScale4||n(this.primaryColor,{h:60}),this.cScale5=this.cScale5||n(this.primaryColor,{h:90}),this.cScale6=this.cScale6||n(this.primaryColor,{h:120}),this.cScale7=this.cScale7||n(this.primaryColor,{h:150}),this.cScale8=this.cScale8||n(this.primaryColor,{h:210}),this.cScale9=this.cScale9||n(this.primaryColor,{h:270}),this.cScale10=this.cScale10||n(this.primaryColor,{h:300}),this.cScale11=this.cScale11||n(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||R(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||R(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=R(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||R(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||n(this["cScale"+e],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||n(this.mainBkg,{h:30,s:-30,l:-(5+5*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||n(this.mainBkg,{h:30,s:-30,l:-(8+5*e)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||L(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||L(this.mainBkg,20),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.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=n(this.primaryColor,{h:64}),this.fillType3=n(this.secondaryColor,{h:64}),this.fillType4=n(this.primaryColor,{h:-64}),this.fillType5=n(this.secondaryColor,{h:-64}),this.fillType6=n(this.primaryColor,{h:128}),this.fillType7=n(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||n(this.primaryColor,{l:-30}),this.pie5=this.pie5||n(this.secondaryColor,{l:-30}),this.pie6=this.pie6||n(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||n(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||n(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||n(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||n(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||n(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||n(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??n(this.primaryColor,{l:-30}),this.venn2=this.venn2??n(this.secondaryColor,{l:-30}),this.venn3=this.venn3??n(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??n(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??n(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??n(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??n(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??n(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||n(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||n(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||n(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||n(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||n(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||n(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||vt(this.quadrant1Fill)?L:R)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||n(this.primaryColor,{h:-30}),this.git4=this.git4||n(this.primaryColor,{h:-60}),this.git5=this.git5||n(this.primaryColor,{h:-90}),this.git6=this.git6||n(this.primaryColor,{h:60}),this.git7=this.git7||n(this.primaryColor,{h:120}),this.darkMode?(this.git0=L(this.git0,25),this.git1=L(this.git1,25),this.git2=L(this.git2,25),this.git3=L(this.git3,25),this.git4=L(this.git4,25),this.git5=L(this.git5,25),this.git6=L(this.git6,25),this.git7=L(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||a(this.git0),this.gitInv1=this.gitInv1||a(this.git1),this.gitInv2=this.gitInv2||a(this.git2),this.gitInv3=this.gitInv3||a(this.git3),this.gitInv4=this.gitInv4||a(this.git4),this.gitInv5=this.gitInv5||a(this.git5),this.gitInv6=this.gitInv6||a(this.git6),this.gitInv7=this.gitInv7||a(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||a(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||a(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Lt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Rt}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Ft=mt(e=>{var t=new $t;return t.calculate(e),t},"getThemeVariables")}),gi=i(()=>{oi(),hi(),li(),zt=class{static{mt(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=L(this.contrast,55),this.background="#ffffff",this.tertiaryColor=n(this.primaryColor,{h:-160}),this.primaryBorderColor=It(this.primaryColor,this.darkMode),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.tertiaryColor),this.lineColor=a(this.background),this.textColor=a(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||L(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=L(this.contrast,55),this.border2=this.contrast,this.actorBorder=L(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||a(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||L(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||R(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||n(this.mainBkg,{l:-(5+5*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||n(this.mainBkg,{l:-(8+5*e)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=L(this.contrast,30),this.sectionBkgColor2=L(this.contrast,30),this.taskBorderColor=R(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=L(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=R(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",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||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=n(this.primaryColor,{h:64}),this.fillType3=n(this.secondaryColor,{h:64}),this.fillType4=n(this.primaryColor,{h:-64}),this.fillType5=n(this.secondaryColor,{h:-64}),this.fillType6=n(this.primaryColor,{h:128}),this.fillType7=n(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let e=0;e<8;e++)this["venn"+(e+1)]=this["venn"+(e+1)]??this["cScale"+e];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||n(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||n(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||n(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||n(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||n(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||n(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||vt(this.quadrant1Fill)?L:R)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=R(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||n(this.primaryColor,{h:-30}),this.git4=this.pie5||n(this.primaryColor,{h:-60}),this.git5=this.pie6||n(this.primaryColor,{h:-90}),this.git6=this.pie7||n(this.primaryColor,{h:60}),this.git7=this.pie8||n(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||a(this.git0),this.gitInv1=this.gitInv1||a(this.git1),this.gitInv2=this.gitInv2||a(this.git2),this.gitInv3=this.gitInv3||a(this.git3),this.gitInv4=this.gitInv4||a(this.git4),this.gitInv5=this.gitInv5||a(this.git5),this.gitInv6=this.gitInv6||a(this.git6),this.gitInv7=this.gitInv7||a(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Lt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Rt}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},qt=mt(e=>{var t=new zt;return t.calculate(e),t},"getThemeVariables")}),fi=i(()=>{oi(),hi(),li(),Wt=class{static{mt(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=It(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||n(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||n(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||It(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||It(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||It(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor);var e="#ECECFE",t="#E9E9F1",r=n(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||L(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||n(e,{h:30}),this.cScale4=this.cScale4||n(e,{h:60}),this.cScale5=this.cScale5||n(e,{h:90}),this.cScale6=this.cScale6||n(e,{h:120}),this.cScale7=this.cScale7||n(e,{h:150}),this.cScale8=this.cScale8||n(e,{h:210,l:150}),this.cScale9=this.cScale9||n(e,{h:270}),this.cScale10=this.cScale10||n(e,{h:300}),this.cScale11=this.cScale11||n(e,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=R(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=R(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||a(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||L(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||R(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;var i=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||n(this.mainBkg,{h:180,s:-15,l:i*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||n(this.mainBkg,{h:180,s:-15,l:i*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||n(e,{h:64}),this.fillType3=this.fillType3||n(t,{h:64}),this.fillType4=this.fillType4||n(e,{h:-64}),this.fillType5=this.fillType5||n(t,{h:-64}),this.fillType6=this.fillType6||n(e,{h:128}),this.fillType7=this.fillType7||n(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||r,this.pie4=this.pie4||n(e,{l:-10}),this.pie5=this.pie5||n(t,{l:-10}),this.pie6=this.pie6||n(r,{l:-10}),this.pie7=this.pie7||n(e,{h:60,l:-10}),this.pie8=this.pie8||n(e,{h:-60,l:-10}),this.pie9=this.pie9||n(e,{h:120,l:0}),this.pie10=this.pie10||n(e,{h:60,l:-20}),this.pie11=this.pie11||n(e,{h:-60,l:-20}),this.pie12=this.pie12||n(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||n(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||n(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||n(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||n(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||n(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||n(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||vt(this.quadrant1Fill)?L:R)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||r,this.git3=this.git3||n(e,{h:-30}),this.git4=this.git4||n(e,{h:-60}),this.git5=this.git5||n(e,{h:-90}),this.git6=this.git6||n(e,{h:60}),this.git7=this.git7||n(e,{h:120}),this.darkMode?(this.git0=L(this.git0,25),this.git1=L(this.git1,25),this.git2=L(this.git2,25),this.git3=L(this.git3,25),this.git4=L(this.git4,25),this.git5=L(this.git5,25),this.git6=L(this.git6,25),this.git7=L(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||a(this.git0),this.gitInv1=this.gitInv1||a(this.git1),this.gitInv2=this.gitInv2||a(this.git2),this.gitInv3=this.gitInv3||a(this.git3),this.gitInv4=this.gitInv4||a(this.git4),this.gitInv5=this.gitInv5||a(this.git5),this.gitInv6=this.gitInv6||a(this.git6),this.gitInv7=this.gitInv7||a(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Lt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Rt}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Ut=mt(e=>{var t=new Wt;return t.calculate(e),t},"getThemeVariables")}),mi=i(()=>{oi(),hi(),li(),Gt=class{static{mt(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=L(this.primaryColor,16),this.tertiaryColor=n(this.primaryColor,{h:-160}),this.primaryBorderColor=a(this.background),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=L(a("#323D47"),10),this.border1="#ccc",this.border2=lt(255,255,255,.25),this.arrowheadColor=a(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||n(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||n(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||It(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||It(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||It(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||L(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||n(this.primaryColor,{h:30}),this.cScale4=this.cScale4||n(this.primaryColor,{h:60}),this.cScale5=this.cScale5||n(this.primaryColor,{h:90}),this.cScale6=this.cScale6||n(this.primaryColor,{h:120}),this.cScale7=this.cScale7||n(this.primaryColor,{h:150}),this.cScale8=this.cScale8||n(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||n(this.primaryColor,{h:270}),this.cScale10=this.cScale10||n(this.primaryColor,{h:300}),this.cScale11=this.cScale11||n(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=R(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=R(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||a(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||L(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||R(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;var t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||n(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||n(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||n(this.primaryColor,{h:64}),this.fillType3=this.fillType3||n(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||n(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||n(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||n(this.primaryColor,{h:128}),this.fillType7=this.fillType7||n(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||n(this.primaryColor,{l:-10}),this.pie5=this.pie5||n(this.secondaryColor,{l:-10}),this.pie6=this.pie6||n(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||n(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||n(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||n(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||n(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||n(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||n(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||n(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||n(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||n(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||n(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||n(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||n(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||vt(this.quadrant1Fill)?L:R)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=L(this.git0,25),this.git1=L(this.git1,25),this.git2=L(this.git2,25),this.git3=L(this.git3,25),this.git4=L(this.git4,25),this.git5=L(this.git5,25),this.git6=L(this.git6,25),this.git7=L(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||a(this.git0),this.gitInv1=this.gitInv1||a(this.git1),this.gitInv2=this.gitInv2||a(this.git2),this.gitInv3=this.gitInv3||a(this.git3),this.gitInv4=this.gitInv4||a(this.git4),this.gitInv5=this.gitInv5||a(this.git5),this.gitInv6=this.gitInv6||a(this.git6),this.gitInv7=this.gitInv7||a(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Lt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Rt}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},jt=mt(e=>{var t=new Gt;return t.calculate(e),t},"getThemeVariables")}),yi=i(()=>{oi(),hi(),li(),Vt=class{static{mt(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=It("#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||n(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||n(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||It(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||It(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||It(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor);var e="#ECECFE",t="#E9E9F1",r=n(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||L(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 e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=this.mainBkg;if(this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=R(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=R(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||a(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||L(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||R(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;var i=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||n(this.mainBkg,{h:180,s:-15,l:i*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||n(this.mainBkg,{h:180,s:-15,l:i*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||n(e,{h:64}),this.fillType3=this.fillType3||n(t,{h:64}),this.fillType4=this.fillType4||n(e,{h:-64}),this.fillType5=this.fillType5||n(t,{h:-64}),this.fillType6=this.fillType6||n(e,{h:128}),this.fillType7=this.fillType7||n(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||r,this.pie4=this.pie4||n(e,{l:-10}),this.pie5=this.pie5||n(t,{l:-10}),this.pie6=this.pie6||n(r,{l:-10}),this.pie7=this.pie7||n(e,{h:60,l:-10}),this.pie8=this.pie8||n(e,{h:-60,l:-10}),this.pie9=this.pie9||n(e,{h:120,l:0}),this.pie10=this.pie10||n(e,{h:60,l:-20}),this.pie11=this.pie11||n(e,{h:-60,l:-20}),this.pie12=this.pie12||n(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||n(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||n(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||n(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||n(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||n(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||n(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||vt(this.quadrant1Fill)?L:R)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||r,this.git3=this.git3||n(e,{h:-30}),this.git4=this.git4||n(e,{h:-60}),this.git5=this.git5||n(e,{h:-90}),this.git6=this.git6||n(e,{h:60}),this.git7=this.git7||n(e,{h:120}),this.darkMode?(this.git0=L(this.git0,25),this.git1=L(this.git1,25),this.git2=L(this.git2,25),this.git3=L(this.git3,25),this.git4=L(this.git4,25),this.git5=L(this.git5,25),this.git6=L(this.git6,25),this.git7=L(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||a(this.git0),this.gitInv1=this.gitInv1||a(this.git1),this.gitInv2=this.gitInv2||a(this.git2),this.gitInv3=this.gitInv3||a(this.git3),this.gitInv4=this.gitInv4||a(this.git4),this.gitInv5=this.gitInv5||a(this.git5),this.gitInv6=this.gitInv6||a(this.git6),this.gitInv7=this.gitInv7||a(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Lt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Rt}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Yt=mt(e=>{var t=new Vt;return t.calculate(e),t},"getThemeVariables")}),vi=i(()=>{oi(),hi(),li(),Ht=class{static{mt(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=L(this.primaryColor,16),this.tertiaryColor=n(this.primaryColor,{h:-160}),this.primaryBorderColor=a(this.background),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=L(a("#323D47"),10),this.border1="#ccc",this.border2=lt(255,255,255,.25),this.arrowheadColor=a(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||n(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||n(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||It(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||It(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||It(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||L(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||n(this.primaryColor,{h:30}),this.cScale4=this.cScale4||n(this.primaryColor,{h:60}),this.cScale5=this.cScale5||n(this.primaryColor,{h:90}),this.cScale6=this.cScale6||n(this.primaryColor,{h:120}),this.cScale7=this.cScale7||n(this.primaryColor,{h:150}),this.cScale8=this.cScale8||n(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||n(this.primaryColor,{h:270}),this.cScale10=this.cScale10||n(this.primaryColor,{h:300}),this.cScale11=this.cScale11||n(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=R(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=R(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||a(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||L(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||R(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;var t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||n(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||n(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||n(this.primaryColor,{h:64}),this.fillType3=this.fillType3||n(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||n(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||n(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||n(this.primaryColor,{h:128}),this.fillType7=this.fillType7||n(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||n(this.primaryColor,{l:-10}),this.pie5=this.pie5||n(this.secondaryColor,{l:-10}),this.pie6=this.pie6||n(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||n(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||n(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||n(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||n(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||n(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||n(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||n(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||n(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||n(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||n(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||n(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||n(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||vt(this.quadrant1Fill)?L:R)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||n(this.primaryColor,{h:-30}),this.git4=this.git4||n(this.primaryColor,{h:-60}),this.git5=this.git5||n(this.primaryColor,{h:-90}),this.git6=this.git6||n(this.primaryColor,{h:60}),this.git7=this.git7||n(this.primaryColor,{h:120}),this.darkMode?(this.git0=L(this.git0,25),this.git1=L(this.git1,25),this.git2=L(this.git2,25),this.git3=L(this.git3,25),this.git4=L(this.git4,25),this.git5=L(this.git5,25),this.git6=L(this.git6,25),this.git7=L(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||a(this.git0),this.gitInv1=this.gitInv1||a(this.git1),this.gitInv2=this.gitInv2||a(this.git2),this.gitInv3=this.gitInv3||a(this.git3),this.gitInv4=this.gitInv4||a(this.git4),this.gitInv5=this.gitInv5||a(this.git5),this.gitInv6=this.gitInv6||a(this.git6),this.gitInv7=this.gitInv7||a(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Lt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Rt}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Xt=mt(e=>{var t=new Ht;return t.calculate(e),t},"getThemeVariables")}),xi=i(()=>{oi(),hi(),li(),Kt=class{static{mt(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=It(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||n(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||n(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||It(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||It(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||It(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor);var e="#ECECFE",t="#E9E9F1",r=n(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||L(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 e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||a(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||L(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||R(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;var i=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||n(this.mainBkg,{h:180,s:-15,l:i*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||n(this.mainBkg,{h:180,s:-15,l:i*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||n(e,{h:64}),this.fillType3=this.fillType3||n(t,{h:64}),this.fillType4=this.fillType4||n(e,{h:-64}),this.fillType5=this.fillType5||n(t,{h:-64}),this.fillType6=this.fillType6||n(e,{h:128}),this.fillType7=this.fillType7||n(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||r,this.pie4=this.pie4||n(e,{l:-10}),this.pie5=this.pie5||n(t,{l:-10}),this.pie6=this.pie6||n(r,{l:-10}),this.pie7=this.pie7||n(e,{h:60,l:-10}),this.pie8=this.pie8||n(e,{h:-60,l:-10}),this.pie9=this.pie9||n(e,{h:120,l:0}),this.pie10=this.pie10||n(e,{h:60,l:-20}),this.pie11=this.pie11||n(e,{h:-60,l:-20}),this.pie12=this.pie12||n(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||n(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||n(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||n(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||n(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||n(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||n(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||vt(this.quadrant1Fill)?L:R)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||r,this.git3=this.git3||n(e,{h:-30}),this.git4=this.git4||n(e,{h:-60}),this.git5=this.git5||n(e,{h:-90}),this.git6=this.git6||n(e,{h:60}),this.git7=this.git7||n(e,{h:120}),this.darkMode?(this.git0=L(this.git0,25),this.git1=L(this.git1,25),this.git2=L(this.git2,25),this.git3=L(this.git3,25),this.git4=L(this.git4,25),this.git5=L(this.git5,25),this.git6=L(this.git6,25),this.git7=L(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||a(this.git0),this.gitInv1=this.gitInv1||a(this.git1),this.gitInv2=this.gitInv2||a(this.git2),this.gitInv3=this.gitInv3||a(this.git3),this.gitInv4=this.gitInv4||a(this.git4),this.gitInv5=this.gitInv5||a(this.git5),this.gitInv6=this.gitInv6||a(this.git6),this.gitInv7=this.gitInv7||a(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Lt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Rt}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Zt=mt(e=>{var t=new Kt;return t.calculate(e),t},"getThemeVariables")}),bi=i(()=>{oi(),hi(),li(),Qt=class{static{mt(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=L(this.primaryColor,16),this.tertiaryColor=n(this.primaryColor,{h:-160}),this.primaryBorderColor=a(this.background),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=L(a("#323D47"),10),this.border1="#ccc",this.border2=lt(255,255,255,.25),this.arrowheadColor=a(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||n(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||n(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||It(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||It(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||It(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor),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||L(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 e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||a(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||L(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||R(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=R(this["cScale"+e],75);var t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||n(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||n(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||n(this.primaryColor,{h:64}),this.fillType3=this.fillType3||n(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||n(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||n(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||n(this.primaryColor,{h:128}),this.fillType7=this.fillType7||n(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||n(this.primaryColor,{l:-10}),this.pie5=this.pie5||n(this.secondaryColor,{l:-10}),this.pie6=this.pie6||n(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||n(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||n(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||n(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||n(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||n(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||n(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||n(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||n(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||n(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||n(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||n(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||n(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||vt(this.quadrant1Fill)?L:R)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||n(this.primaryColor,{h:-30}),this.git4=this.git4||n(this.primaryColor,{h:-60}),this.git5=this.git5||n(this.primaryColor,{h:-90}),this.git6=this.git6||n(this.primaryColor,{h:60}),this.git7=this.git7||n(this.primaryColor,{h:120}),this.darkMode?(this.git0=L(this.git0,25),this.git1=L(this.git1,25),this.git2=L(this.git2,25),this.git3=L(this.git3,25),this.git4=L(this.git4,25),this.git5=L(this.git5,25),this.git6=L(this.git6,25),this.git7=L(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||a(this.git0),this.gitInv1=this.gitInv1||a(this.git1),this.gitInv2=this.gitInv2||a(this.git2),this.gitInv3=this.gitInv3||a(this.git3),this.gitInv4=this.gitInv4||a(this.git4),this.gitInv5=this.gitInv5||a(this.git5),this.gitInv6=this.gitInv6||a(this.git6),this.gitInv7=this.gitInv7||a(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Lt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Rt}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Jt=mt(e=>{var t=new Qt;return t.calculate(e),t},"getThemeVariables")}),Ti=i(()=>{ci(),ui(),di(),pi(),gi(),fi(),mi(),yi(),vi(),xi(),bi(),er={base:{getThemeVariables:Dt},dark:{getThemeVariables:Ot},default:{getThemeVariables:Pt},forest:{getThemeVariables:Ft},neutral:{getThemeVariables:qt},neo:{getThemeVariables:Ut},"neo-dark":{getThemeVariables:jt},redux:{getThemeVariables:Yt},"redux-dark":{getThemeVariables:Xt},"redux-color":{getThemeVariables:Zt},"redux-dark-color":{getThemeVariables:Jt}}}),ki=i(()=>{tr={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},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,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},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},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:""},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},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1},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},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}}),wi=i(()=>{Ti(),ki(),rr={...tr,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:er.default.getThemeVariables(),sequence:{...tr.sequence,messageFont:mt(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:mt(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:mt(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...tr.gantt,tickInterval:void 0,useWidth:void 0},c4:{...tr.c4,useWidth:void 0,personFont:mt(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...tr.flowchart,inheritDir:!1},external_personFont:mt(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:mt(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:mt(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:mt(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:mt(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:mt(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:mt(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:mt(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:mt(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:mt(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:mt(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:mt(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:mt(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:mt(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:mt(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:mt(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:mt(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:mt(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:mt(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:mt(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:mt(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...tr.pie,useWidth:984},xyChart:{...tr.xyChart,useWidth:void 0},requirement:{...tr.requirement,useWidth:void 0},packet:{...tr.packet},treeView:{...tr.treeView,useWidth:void 0},radar:{...tr.radar},ishikawa:{...tr.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...tr.venn}},ir=mt((r,i="")=>Object.keys(r).reduce((e,t)=>Array.isArray(r[t])?e:"object"==typeof r[t]&&null!==r[t]?[...e,i+t,...ir(r[t],"")]:[...e,i+t],[]),"keyify"),nr=new Set(ir(rr,"")),ar=rr}),Ci=i(()=>{wi(),e(),sr=mt(e=>{if(B.debug("sanitizeDirective called with",e),"object"==typeof e&&null!=e)if(Array.isArray(e))e.forEach(e=>sr(e));else{for(var t of Object.keys(e)){var r;if(B.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!nr.has(t)||null==e[t])B.debug("sanitize deleting key: ",t),delete e[t];else if("object"==typeof e[t])B.debug("sanitizing object",t),sr(e[t]);else for(r of["themeCSS","fontFamily","altFontFamily"])t.includes(r)&&(B.debug("sanitizing css option",t),e[t]=or(e[t]))}if(e.themeVariables)for(var i of Object.keys(e.themeVariables)){var n=e.themeVariables[i];n?.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[i]="")}B.debug("After sanitization",e)}},"sanitizeDirective"),or=mt(e=>{let t=0,r=0;for(var i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";"{"===i?t++:"}"===i&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss")}),Ei=i(()=>{Nr(),e(),Ti(),wi(),Ci(),lr=Object.freeze(ar),hr=mt(e=>!(!1===e||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),cr=Le({},lr),dr=[],pr=Le({},lr),gr=mt((e,t)=>{let r=Le({},e),i={};for(var n of t)Tr(n),i=Le(i,n);return r=Le(r,i),i.theme&&i.theme in er&&(e=Le({},ur),t=Le(e.themeVariables||{},i.themeVariables),r.theme)&&r.theme in er&&(r.themeVariables=er[r.theme].getThemeVariables(t)),_r(pr=r),pr},"updateCurrentConfig"),fr=mt(e=>(cr=Le({},lr),cr=Le(cr,e),e.theme&&er[e.theme]&&(cr.themeVariables=er[e.theme].getThemeVariables(e.themeVariables)),gr(cr,dr),cr),"setSiteConfig"),mr=mt(e=>{ur=Le({},e)},"saveConfigFromInitialize"),yr=mt(e=>(cr=Le(cr,e),gr(cr,dr),cr),"updateSiteConfig"),vr=mt(()=>Le({},cr),"getSiteConfig"),xr=mt(e=>(_r(e),Le(pr,e),br()),"setConfig"),br=mt(()=>Le({},pr),"getConfig"),Tr=mt(t=>{t&&(["secure",...cr.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(B.debug("Denied attempt to modify a secure key "+e,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&Tr(t[e])}))},"sanitize"),kr=mt(e=>{sr(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),dr.push(e),gr(cr,dr)},"addDirective"),wr=mt((e=cr)=>{gr(e,dr=[])},"reset"),Cr={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."},Er={},Sr=mt(e=>{Er[e]||(B.warn(Cr[e]),Er[e]=!0)},"issueWarning"),_r=mt(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Sr("LAZY_LOAD_DEPRECATED")},"checkConfig"),Ar=mt(()=>{let e={};ur&&(e=Le(e,ur));for(var t of dr)e=Le(e,t);return e},"getUserDefinedConfig"),Lr=mt(e=>(null!=e.flowchart?.htmlLabels&&Sr("FLOWCHART_HTML_LABELS_DEPRECATED"),hr(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels")});function Si(n){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,r=new Array(1<t?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return zi(n,e,r)}}function _i(i){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return qi(i,t)}}function Ai(t,r){var i,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:Yi;Mi&&Mi(t,null);let a=r.length;for(;a--;){let e=r[a];"string"==typeof e&&(i=n(e))!==e&&(Oi(r)||(r[a]=i),e=i),t[e]=!0}return t}function Li(t){for(let e=0;e<t.length;e++)Ji(t,e)||(t[e]=null);return t}function Ri(e){var t,r,i=Fi(null);for([t,r]of Di(e))Ji(e,t)&&(Array.isArray(r)?i[t]=Li(r):r&&"object"==typeof r&&r.constructor===Object?i[t]=Ri(r):i[t]=r);return i}function Ii(e,t){for(;null!==e;){var r=Pi(e,t);if(r){if(r.get)return Si(r.get);if("function"==typeof r.value)return Si(r.value)}e=Bi(e)}function i(){return null}return mt(i,"fallbackValue"),i}function Ni(){let e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Sn(),d=mt(e=>Ni(e),"DOMPurify");if(d.version="3.3.1",d.removed=[],!e||!e.document||e.document.nodeType!==En.document||!e.Element)return d.isSupported=!1,d;let n=e.document,B=n,P=B.currentScript,{DocumentFragment:$,HTMLTemplateElement:F,Node:z,Element:q,NodeFilter:t,NamedNodeMap:W=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:U,DOMParser:G,trustedTypes:p}=e,r=q.prototype,j=Ii(r,"cloneNode"),V=Ii(r,"remove"),Y=Ii(r,"nextSibling"),H=Ii(r,"childNodes"),s=Ii(r,"parentNode");var X;"function"==typeof F&&(X=n.createElement("template")).content&&X.content.ownerDocument&&(n=X.content.ownerDocument);let g,h="",{implementation:K,createNodeIterator:Z,createDocumentFragment:Q,getElementsByTagName:J}=n,ee=B.importNode,f=An(),{MUSTACHE_EXPR:te,ERB_EXPR:re,TMPLIT_EXPR:ie,DATA_ATTR:ne,ARIA_ATTR:ae,IS_SCRIPT_OR_DATA:se,ATTR_WHITESPACE:oe,CUSTOM_ELEMENT:le}=(d.isSupported="function"==typeof Di&&"function"==typeof s&&K&&void 0!==K.createHTMLDocument,Cn),he=Cn.IS_ALLOWED_URI,c=null,ce=Ai({},[...rn,...nn,...an,...on,...hn]),m=null,ue=Ai({},[...cn,...un,...dn,...pn]),o=Object.seal(Fi(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}})),u=null,de=null,l=Object.seal(Fi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),pe=!0,ge=!0,fe=!1,me=!0,y=!1,v=!0,x=!1,ye=!1,ve=!1,b=!1,T=!1,k=!1,xe=!0,be=!1,Te=!0,w=!1,i,C=null,ke=Ai({},["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"]),we=null,Ce=Ai({},["audio","video","img","source","image","track"]),Ee=null,Se=Ai({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),a="http://www.w3.org/1998/Math/MathML",E="http://www.w3.org/2000/svg",S="http://www.w3.org/1999/xhtml",_=S,_e=!1,Ae=null,Le=Ai({},[a,E,S],Hi),A=Ai({},["mi","mo","mn","ms","mtext"]),L=Ai({},["annotation-xml"]),Re=Ai({},["title","style","font","a","script"]),R=null,Ie=["application/xhtml+xml","text/html"],I=null,N=null,Ne=n.createElement("form"),De=mt(function(e){return e instanceof RegExp||e instanceof Function},"isRegexOrFunction"),Me=mt(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(!N||N!==e){if(e=Ri(e&&"object"==typeof e?e:{}),R=-1===Ie.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,I="application/xhtml+xml"===R?Hi:Yi,c=Ji(e,"ALLOWED_TAGS")?Ai({},e.ALLOWED_TAGS,I):ce,m=Ji(e,"ALLOWED_ATTR")?Ai({},e.ALLOWED_ATTR,I):ue,Ae=Ji(e,"ALLOWED_NAMESPACES")?Ai({},e.ALLOWED_NAMESPACES,Hi):Le,Ee=Ji(e,"ADD_URI_SAFE_ATTR")?Ai(Ri(Se),e.ADD_URI_SAFE_ATTR,I):Se,we=Ji(e,"ADD_DATA_URI_TAGS")?Ai(Ri(Ce),e.ADD_DATA_URI_TAGS,I):Ce,C=Ji(e,"FORBID_CONTENTS")?Ai({},e.FORBID_CONTENTS,I):ke,u=Ji(e,"FORBID_TAGS")?Ai({},e.FORBID_TAGS,I):Ri({}),de=Ji(e,"FORBID_ATTR")?Ai({},e.FORBID_ATTR,I):Ri({}),i=!!Ji(e,"USE_PROFILES")&&e.USE_PROFILES,pe=!1!==e.ALLOW_ARIA_ATTR,ge=!1!==e.ALLOW_DATA_ATTR,fe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,me=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,y=e.SAFE_FOR_TEMPLATES||!1,v=!1!==e.SAFE_FOR_XML,x=e.WHOLE_DOCUMENT||!1,b=e.RETURN_DOM||!1,T=e.RETURN_DOM_FRAGMENT||!1,k=e.RETURN_TRUSTED_TYPE||!1,ve=e.FORCE_BODY||!1,xe=!1!==e.SANITIZE_DOM,be=e.SANITIZE_NAMED_PROPS||!1,Te=!1!==e.KEEP_CONTENT,w=e.IN_PLACE||!1,he=e.ALLOWED_URI_REGEXP||xn,_=e.NAMESPACE||S,A=e.MATHML_TEXT_INTEGRATION_POINTS||A,L=e.HTML_INTEGRATION_POINTS||L,o=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&De(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(o.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&De(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(o.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(o.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),y&&(ge=!1),T&&(b=!0),i&&(c=Ai({},hn),m=[],!0===i.html&&(Ai(c,rn),Ai(m,cn)),!0===i.svg&&(Ai(c,nn),Ai(m,un),Ai(m,pn)),!0===i.svgFilters&&(Ai(c,an),Ai(m,un),Ai(m,pn)),!0===i.mathMl)&&(Ai(c,on),Ai(m,dn),Ai(m,pn)),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?l.tagCheck=e.ADD_TAGS:Ai(c=c===ce?Ri(c):c,e.ADD_TAGS,I)),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?l.attributeCheck=e.ADD_ATTR:Ai(m=m===ue?Ri(m):m,e.ADD_ATTR,I)),e.ADD_URI_SAFE_ATTR&&Ai(Ee,e.ADD_URI_SAFE_ATTR,I),e.FORBID_CONTENTS&&Ai(C=C===ke?Ri(C):C,e.FORBID_CONTENTS,I),e.ADD_FORBID_CONTENTS&&Ai(C=C===ke?Ri(C):C,e.ADD_FORBID_CONTENTS,I),Te&&(c["#text"]=!0),x&&Ai(c,["html","head","body"]),c.table&&(Ai(c,["tbody"]),delete u.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw tn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw tn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=e.TRUSTED_TYPES_POLICY,h=g.createHTML("")}else null!==(g=void 0===g?_n(p,P):g)&&"string"==typeof h&&(h=g.createHTML(""));$i&&$i(e),N=e}},"_parseConfig"),Oe=Ai({},[...nn,...an,...sn]),Be=Ai({},[...on,...ln]),Pe=mt(function(e){let t=s(e);t&&t.tagName||(t={namespaceURI:_,tagName:"template"});var r=Yi(e.tagName),i=Yi(t.tagName);return!!Ae[e.namespaceURI]&&(e.namespaceURI===E?t.namespaceURI===S?"svg"===r:t.namespaceURI===a?"svg"===r&&("annotation-xml"===i||A[i]):!!Oe[r]:e.namespaceURI===a?t.namespaceURI===S?"math"===r:t.namespaceURI===E?"math"===r&&L[i]:!!Be[r]:e.namespaceURI===S?!(t.namespaceURI===E&&!L[i]||t.namespaceURI===a&&!A[i]||Be[r])&&(Re[r]||!Oe[r]):!("application/xhtml+xml"!==R||!Ae[e.namespaceURI]))},"_checkValidNamespace"),D=mt(function(e){ji(d.removed,{element:e});try{s(e).removeChild(e)}catch{V(e)}},"_forceRemove"),M=mt(function(e,t){try{ji(d.removed,{attribute:t.getAttributeNode(e),from:t})}catch{ji(d.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(b||T)try{D(t)}catch{}else try{t.setAttribute(e,"")}catch{}},"_removeAttribute"),$e=mt(function(e){let t=null,r=null;ve?e="<remove></remove>"+e:(i=Xi(e,/^[\r\n\t ]+/),r=i&&i[0]),"application/xhtml+xml"===R&&_===S&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var i=g?g.createHTML(e):e;if(_===S)try{t=(new G).parseFromString(i,R)}catch{}if(!t||!t.documentElement){t=K.createDocument(_,"template",null);try{t.documentElement.innerHTML=_e?h:i}catch{}}return i=t.body||t.documentElement,e&&r&&i.insertBefore(n.createTextNode(r),i.childNodes[0]||null),_===S?J.call(t,x?"html":"body")[0]:x?t.documentElement:i},"_initDocument"),Fe=mt(function(e){return Z.call(e.ownerDocument||e,e,t.SHOW_ELEMENT|t.SHOW_COMMENT|t.SHOW_TEXT|t.SHOW_PROCESSING_INSTRUCTION|t.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),ze=mt(function(e){return e instanceof U&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof W)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},"_isClobbered"),qe=mt(function(e){return"function"==typeof z&&e instanceof z},"_isNode");function O(e,t,r){Wi(e,e=>{e.call(d,t,r,N)})}mt(O,"_executeHooks");let We=mt(function(t){let r=null;if(O(f.beforeSanitizeElements,t,null),!ze(t)){var e=I(t.nodeName);if(O(f.uponSanitizeElement,t,{tagName:e,allowedTags:c}),!(v&&t.hasChildNodes()&&!qe(t.firstElementChild)&&en(/<[/\w!]/g,t.innerHTML)&&en(/<[/\w!]/g,t.textContent)||t.nodeType===En.progressingInstruction||v&&t.nodeType===En.comment&&en(/<[/\w]/g,t.data))){if(l.tagCheck instanceof Function&&l.tagCheck(e)||c[e]&&!u[e])return t instanceof q&&!Pe(t)||("noscript"===e||"noembed"===e||"noframes"===e)&&en(/<\/no(script|embed|frames)/i,t.innerHTML)?(D(t),!0):(y&&t.nodeType===En.text&&(r=t.textContent,Wi([te,re,ie],e=>{r=Ki(r,e," ")}),t.textContent!==r)&&(ji(d.removed,{element:t.cloneNode()}),t.textContent=r),O(f.afterSanitizeElements,t,null),!1);if(!u[e]&&Ge(e)&&(o.tagNameCheck instanceof RegExp&&en(o.tagNameCheck,e)||o.tagNameCheck instanceof Function&&o.tagNameCheck(e)))return!1;if(Te&&!C[e]){var i=s(t)||t.parentNode,n=H(t)||t.childNodes;if(n&&i)for(let e=n.length-1;0<=e;--e){var a=j(n[e],!0);a.__removalCount=(t.__removalCount||0)+1,i.insertBefore(a,Y(t))}}}}return D(t),!0},"_sanitizeElements"),Ue=mt(function(e,t,r){if(xe&&("id"===t||"name"===t)&&(r in n||r in Ne))return!1;if((!ge||de[t]||!en(ne,t))&&!(pe&&en(ae,t)||l.attributeCheck instanceof Function&&l.attributeCheck(t,e)))if(!m[t]||de[t]){if(!(Ge(e)&&(o.tagNameCheck instanceof RegExp&&en(o.tagNameCheck,e)||o.tagNameCheck instanceof Function&&o.tagNameCheck(e))&&(o.attributeNameCheck instanceof RegExp&&en(o.attributeNameCheck,t)||o.attributeNameCheck instanceof Function&&o.attributeNameCheck(t,e))||"is"===t&&o.allowCustomizedBuiltInElements&&(o.tagNameCheck instanceof RegExp&&en(o.tagNameCheck,r)||o.tagNameCheck instanceof Function&&o.tagNameCheck(r))))return!1}else if(!Ee[t]&&!en(he,Ki(r,oe,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Zi(r,"data:")||!we[e])&&(!fe||en(se,Ki(r,oe,"")))&&r)return!1;return!0},"_isValidAttribute"),Ge=mt(function(e){return"annotation-xml"!==e&&Xi(e,le)},"_isBasicCustomElement"),je=mt(function(h){O(f.beforeSanitizeAttributes,h,null);var c=h.attributes;if(c&&!ze(h)){let o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:m,forceKeepAttr:void 0},l=c.length;for(;l--;){let e=c[l],{name:t,namespaceURI:r,value:i}=e,n=I(t),a=i,s="value"===t?a:Qi(a);if(o.attrName=n,o.attrValue=s,o.keepAttr=!0,o.forceKeepAttr=void 0,O(f.uponSanitizeAttribute,h,o),s=o.attrValue,!be||"id"!==n&&"name"!==n||(M(t,h),s="user-content-"+s),v&&en(/((--!?|])>)|<\/(style|title|textarea)/i,s))M(t,h);else if("attributename"===n&&Xi(s,"href"))M(t,h);else if(!o.forceKeepAttr)if(o.keepAttr)if(!me&&en(/\/>/i,s))M(t,h);else{y&&Wi([te,re,ie],e=>{s=Ki(s,e," ")});var u=I(h.nodeName);if(Ue(u,n,s)){if(g&&"object"==typeof p&&"function"==typeof p.getAttributeType&&!r)switch(p.getAttributeType(u,n)){case"TrustedHTML":s=g.createHTML(s);break;case"TrustedScriptURL":s=g.createScriptURL(s)}if(s!==a)try{r?h.setAttributeNS(r,t,s):h.setAttribute(t,s),ze(h)?D(h):Gi(d.removed)}catch{M(t,h)}}else M(t,h)}else M(t,h)}O(f.afterSanitizeAttributes,h,null)}},"_sanitizeAttributes"),Ve=mt(function e(t){var r,i=Fe(t);for(O(f.beforeSanitizeShadowDOM,t,null);r=i.nextNode();)O(f.uponSanitizeShadowNode,r,null),We(r),je(r),r.content instanceof $&&e(r.content);O(f.afterSanitizeShadowDOM,t,null)},"_sanitizeShadowDOM");return d.sanitize=function(e){let t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=null,i,n,a=null;if("string"!=typeof(e=(_e=!e)?"\x3c!--\x3e":e)&&!qe(e)){if("function"!=typeof e.toString)throw tn("toString is not a function");if("string"!=typeof(e=e.toString()))throw tn("dirty is not a string, aborting")}if(!d.isSupported)return e;if(ye||Me(t),d.removed=[],w="string"!=typeof e&&w){if(e.nodeName){var s=I(e.nodeName);if(!c[s]||u[s])throw tn("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof z)(i=(r=$e("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType===En.element&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!b&&!y&&!x&&-1===e.indexOf("<"))return g&&k?g.createHTML(e):e;if(!(r=$e(e)))return b?null:k?h:""}r&&ve&&D(r.firstChild);for(var o=Fe(w?e:r);n=o.nextNode();)We(n),je(n),n.content instanceof $&&Ve(n.content);if(w)return e;if(b){if(T)for(a=Q.call(r.ownerDocument);r.firstChild;)a.appendChild(r.firstChild);else a=r;return a=m.shadowroot||m.shadowrootmode?ee.call(B,a,!0):a}let l=x?r.outerHTML:r.innerHTML;return x&&c["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&en(kn,r.ownerDocument.doctype.name)&&(l="<!DOCTYPE "+r.ownerDocument.doctype.name+`>
`+l),y&&Wi([te,re,ie],e=>{l=Ki(l,e," ")}),g&&k?g.createHTML(l):l},d.setConfig=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};Me(e),ye=!0},d.clearConfig=function(){N=null,ye=!1},d.isValidAttribute=function(e,t,r){return N||Me({}),e=I(e),t=I(t),Ue(e,t,r)},d.addHook=function(e,t){"function"==typeof t&&ji(f[e],t)},d.removeHook=function(e,t){return void 0!==t?-1===(t=Ui(f[e],t))?void 0:Vi(f[e],t,1)[0]:Gi(f[e])},d.removeHooks=function(e){f[e]=[]},d.removeAllHooks=function(){f=An()},d}var Di,Mi,Oi,Bi,Pi,$i,Fi,zi,qi,Wi,Ui,Gi,ji,Vi,Yi,Hi,Xi,Ki,Zi,Qi,Ji,en,tn,rn,nn,an,sn,on,ln,hn,cn,un,dn,pn,gn,fn,mn,yn,vn,xn,bn,Tn,kn,wn,Cn,En,Sn,_n,An,Ln,Rn=i(()=>{({entries:Di,setPrototypeOf:Mi,isFrozen:Oi,getPrototypeOf:Bi,getOwnPropertyDescriptor:Pi}=Object),{freeze:$i,seal:wn,create:Fi}=Object,{apply:zi,construct:qi}=typeof Reflect<"u"&&Reflect,$i=$i||mt(function(e){return e},"freeze"),wn=wn||mt(function(e){return e},"seal"),zi=zi||mt(function(e,t){for(var r=arguments.length,i=new Array(2<r?r-2:0),n=2;n<r;n++)i[n-2]=arguments[n];return e.apply(t,i)},"apply"),qi=qi||mt(function(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return new e(...r)},"construct"),Wi=Si(Array.prototype.forEach),Ui=Si(Array.prototype.lastIndexOf),Gi=Si(Array.prototype.pop),ji=Si(Array.prototype.push),Vi=Si(Array.prototype.splice),Yi=Si(String.prototype.toLowerCase),Hi=Si(String.prototype.toString),Xi=Si(String.prototype.match),Ki=Si(String.prototype.replace),Zi=Si(String.prototype.indexOf),Qi=Si(String.prototype.trim),Ji=Si(Object.prototype.hasOwnProperty),en=Si(RegExp.prototype.test),tn=_i(TypeError),mt(Si,"unapply"),mt(_i,"unconstruct"),mt(Ai,"addToSet"),mt(Li,"cleanArray"),mt(Ri,"clone"),mt(Ii,"lookupGetter"),rn=$i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),nn=$i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),an=$i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),sn=$i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),on=$i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),ln=$i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),hn=$i(["#text"]),cn=$i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),un=$i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),dn=$i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),pn=$i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),gn=wn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),fn=wn(/<%[\w\W]*|[\w\W]*%>/gm),mn=wn(/\$\{[\w\W]*/gm),yn=wn(/^data-[\-\w.\u00B7-\uFFFF]+$/),vn=wn(/^aria-[\-\w]+$/),xn=wn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),bn=wn(/^(?:\w+script|data):/i),Tn=wn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),kn=wn(/^html$/i),wn=wn(/^[a-z][.\w]*(-[.\w]+)+$/i),Cn=Object.freeze({__proto__:null,ARIA_ATTR:vn,ATTR_WHITESPACE:Tn,CUSTOM_ELEMENT:wn,DATA_ATTR:yn,DOCTYPE_NAME:kn,ERB_EXPR:fn,IS_ALLOWED_URI:xn,IS_SCRIPT_OR_DATA:bn,MUSTACHE_EXPR:gn,TMPLIT_EXPR:mn}),En={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Sn=mt(function(){return"u"<typeof window?null:window},"getGlobal"),_n=mt(function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;var r="data-tt-policy-suffix";t="dompurify"+((r=t&&t.hasAttribute(r)?t.getAttribute(r):null)?"#"+r:"");try{return e.createPolicy(t,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn("TrustedTypes policy "+t+" could not be created."),null}},"_createTrustedTypesPolicy"),An=mt(function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},"_createHooksMap"),mt(Ni,"createDOMPurify"),Ln=Ni()}),In={};function Nn(e){return String(e).replace(da,e=>ua[e])}function Dn(e){if(e.default)return e.default;if(e=e.type,"string"!=typeof(e=Array.isArray(e)?e[0]:e))return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}function Mn(e){for(var t=0;t<Sa.length;t++)for(var r=Sa[t],i=0;i<r.blocks.length;i++){var n=r.blocks[i];if(e>=n[0]&&e<=n[1])return r.name}return null}function On(e){for(var t=0;t<_a.length;t+=2)if(_a[t]<=e&&e<=_a[t+1])return!0;return!1}function Bn(e,t){za[e]=t}function Pn(e,t,r){if(!za[t])throw new Error("Font metrics not found for font: "+t+".");var i=e.charCodeAt(0),n=za[t][i];if(!n&&e[0]in Wa&&(i=Wa[e[0]].charCodeAt(0),n=za[t][i]),n=!n&&"text"===r&&On(i)?za[t][77]:n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}function $n(e){var t=5<=e?0:3<=e?1:2;if(!Ua[t]){var r,i=Ua[t]={cssEmPerMu:qa.quad[t]/18};for(r in qa)qa.hasOwnProperty(r)&&(i[r]=qa[r][t])}return Ua[t]}function Fn(e){if(e instanceof os)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function zn(e){if(e instanceof is)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}function t(e,t,r,i,n,a){ps[e][n]={font:t,group:r,replace:i},a&&i&&(ps[e][i]=ps[e][n])}function o(e){for(var{type:e,names:t,props:r,handler:i,htmlBuilder:n,mathmlBuilder:a}=e,s={type:e,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},o=0;o<t.length;++o)Ks[t[o]]=s;e&&(n&&(Zs[e]=n),a)&&(Qs[e]=a)}function qn(e){var{type:e,htmlBuilder:t,mathmlBuilder:r}=e;o({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:t,mathmlBuilder:r})}function Wn(e,t){return e=to(["base"],e,t),(t=to(["strut"])).style.height=K(e.height+e.depth),e.depth&&(t.style.verticalAlign=K(-e.depth)),e.children.unshift(t),e}function Un(e,t){var r,i=null,n=(1===e.length&&"tag"===e[0].type&&(i=e[0].tag,e=e[0].body),so(e,t,"root"));2===n.length&&n[1].hasClass("tag")&&(r=n.pop());for(var a,s=[],o=[],l=0;l<n.length;l++)if(o.push(n[l]),n[l].hasClass("mbin")||n[l].hasClass("mrel")||n[l].hasClass("allowbreak")){for(var h=!1;l<n.length-1&&n[l+1].hasClass("mspace")&&!n[l+1].hasClass("newline");)l++,o.push(n[l]),n[l].hasClass("nobreak")&&(h=!0);h||(s.push(Wn(o,t)),o=[])}else n[l].hasClass("newline")&&(o.pop(),0<o.length&&(s.push(Wn(o,t)),o=[]),s.push(n[l]));return 0<o.length&&s.push(Wn(o,t)),i?((a=Wn(so(i,t,!0))).classes=["tag"],s.push(a)):r&&s.push(r),(e=to(["katex-html"],s)).setAttribute("aria-hidden","true"),a&&((i=a.children[0]).style.height=K(e.height+e.depth),e.depth)&&(i.style.verticalAlign=K(-e.depth)),e}function Gn(e){return new Fa(e)}function jn(e){var t;return!!e&&("mi"===e.type&&1===e.children.length?(t=e.children[0])instanceof fo&&"."===t.text:"mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")&&(t=e.children[0])instanceof fo&&","===t.text)}function Vn(e,t,r,i,n){return r=1===(e=xo(e,r)).length&&e[0]instanceof go&&["mrow","mtable"].includes(e[0].type)?e[0]:new C.MathNode("mrow",e),(e=new C.MathNode("annotation",[new C.TextNode(t)])).setAttribute("encoding","application/x-tex"),t=new C.MathNode("semantics",[r,e]),(r=new C.MathNode("math",[t])).setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),i&&r.setAttribute("display","block"),Z.makeSpan([n?"katex":"katex-mathml"],[r])}function Yn(e,t){if(e&&e.type===t)return e;throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)))}function Hn(e){var t=Xn(e);if(t)return t;throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)))}function Xn(e){return e&&("atom"===e.type||ds.hasOwnProperty(e.type))?e:null}function Kn(e,t){var r=so(e.body,t,!0);return Do([e.mclass],r,t)}function Zn(e,t){var r,t=xo(e.body,t);return"minner"===e.mclass?r=new C.MathNode("mpadded",t):"mord"===e.mclass?e.isCharacterBox?(r=t[0]).type="mi":r=new C.MathNode("mi",t):(e.isCharacterBox?(r=t[0]).type="mo":r=new C.MathNode("mo",t),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}function Qn(e,t,r){var i=Oo[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=r.callFunction("\\Big",[{type:"atom",text:i,mode:"math",family:"rel"}],[]),s=r.callFunction("\\\\cdright",[t[1]],[]);return r.callFunction("\\\\cdparent",[{type:"ordgroup",mode:"math",body:[n,a,s]}],[]);case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return r.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}function Jn(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){if("\\end"!==r)throw new X("Expected \\\\ or \\cr or \\end",e.nextToken);0===t[t.length-1].length&&t.pop();break}e.consume()}for(var i=[],n=[i],a=0;a<t.length;a++){for(var s=t[a],o=Bo(),l=0;l<s.length;l++)if(Po(s[l])){i.push(o);var h=Hn(s[l+=1]).text,c=new Array(2);if(c[0]={type:"ordgroup",mode:"math",body:[]},c[1]={type:"ordgroup",mode:"math",body:[]},!(-1<"=|.".indexOf(h))){if(!(-1<"<>AV".indexOf(h)))throw new X('Expected one of "<>AV=|." after @',s[l]);for(var u=0;u<2;u++){for(var d=!0,p=l+1;p<s.length;p++){if($o(s[p],h)){d=!1,l=p;break}if(Po(s[p]))throw new X("Missing a "+h+" character to complete a CD arrow.",s[p]);c[u].body.push(s[p])}if(d)throw new X("Missing a "+h+" character to complete a CD arrow.",s[l])}}var g=Qn(h,c,e);i.push({type:"styling",body:[g],mode:"math",style:"display"}),o=Bo()}else o.body.push(s[l]);a%2==0?i.push(o):i.shift(),n.push(i=[])}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:n,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(n[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(n.length+1).fill([])}}function ea(e,t){var r=Xn(e);if(r&&gl.includes(r.text))return r;throw new X(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function ta(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}function ra(e){for(var{type:e,names:t,props:r,handler:i,htmlBuilder:n,mathmlBuilder:a}=e,s={type:e,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},o=0;o<t.length;++o)fl[t[o]]=s;n&&(Zs[e]=n),a&&(Qs[e]=a)}function l(e,t){ml[e]=t}function ia(e){var t=[],r=(e.consumeSpaces(),e.fetch().text);for("\\relax"===r&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);"\\hline"===r||"\\hdashline"===r;)e.consume(),t.push("\\hdashline"===r),e.consumeSpaces(),r=e.fetch().text;return t}function na(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function aa(e,t,r){var{hskipBeforeAndAfter:t,addJot:i,cols:n,arraystretch:a,colSeparationType:s,autoTag:o,singleRow:l,emptySingleRow:h,maxNumCols:c,leqno:u}=t;if(e.gullet.beginGroup(),l||e.gullet.macros.set("\\cr","\\\\\\relax"),!a){var d=e.gullet.expandMacroAsText("\\arraystretch");if(null==d)a=1;else if(!(a=parseFloat(d))||a<0)throw new X("Invalid \\arraystretch: "+d)}e.gullet.beginGroup();var p=[],g=[p],f=[],m=[],y=null!=o?[]:void 0;function v(){o&&e.gullet.macros.set("\\@eqnsw","1",!0)}function x(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new ha("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(!!o&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(mt(v,"beginRow"),mt(x,"endRow"),v(),m.push(ia(e));;){var b=e.parseExpression(!1,l?"\\end":"\\\\"),T=(e.gullet.endGroup(),e.gullet.beginGroup(),b={type:"ordgroup",mode:e.mode,body:b},r&&(b={type:"styling",mode:e.mode,style:r,body:[b]}),p.push(b),e.fetch().text);if("&"===T){if(c&&p.length===c){if(l||s)throw new X("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===T){x(),1===p.length&&"styling"===b.type&&0===b.body[0].body.length&&(1<g.length||!h)&&g.pop(),m.length<g.length+1&&m.push([]);break}if("\\\\"!==T)throw new X("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume(),b=void 0," "!==e.gullet.future().text&&(b=e.parseSizeGroup(!0)),f.push(b?b.value:null),x(),m.push(ia(e)),g.push(p=[]),v()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:i,arraystretch:a,body:g,cols:n,rowGaps:f,hskipBeforeAndAfter:t,hLinesBeforeRow:m,colSeparationType:s,tags:y,leqno:u}}function sa(e){return"d"===e.slice(0,1)?"display":"text"}function oa(e,t,r){for(var i=so(e,t,!1),n=t.sizeMultiplier/r.sizeMultiplier,a=0;a<i.length;a++){var s=i[a].classes.indexOf("sizing");s<0?Array.prototype.push.apply(i[a].classes,t.sizingClasses(r)):i[a].classes[s+1]==="reset-size"+t.size&&(i[a].classes[s+1]="reset-size"+r.size),i[a].height*=n,i[a].depth*=n}return Z.makeFragment(i)}(sYe=(e,t)=>{for(var r in t)N(e,r,{get:t[r],enumerable:!0})})(In,{ParseError:()=>X,SETTINGS_SCHEMA:()=>ma,__defineFunction:()=>o,__defineMacro:()=>l,__defineSymbol:()=>t,__domTree:()=>kh,__parse:()=>yh,__renderToDomTree:()=>xh,__renderToHTMLTree:()=>bh,__setFontMetrics:()=>Bn,default:()=>wh,render:()=>fh,renderToString:()=>mh,version:()=>Th});var la,ha,X,ca,ua,da,pa,ga,fa,ma,ya,va,xa,ba,Ta,ka,wa,Ca,Ea,Sa,_a,Aa,La,Ra,Ia,Na,Da,Ma,Oa,Ba,Pa,$a,Fa,za,qa,Wa,Ua,Ga,ja,Va,Ya,Ha,Xa,Ka,Za,K,Qa,Ja,es,ts,rs,is,ns,as,ss,os,ls,hs,cs,us,ds,ps,h,u,d,gs,p,fs,ms,ys,vs,xs,bs,Ts,ks,ws,Cs,Es,Ss,_s,As,Ls,Rs,Is,Ns,Ds,Ms,Os,Bs,Ps,$s,Fs,zs,qs,Ws,Us,Gs,js,Vs,Ys,Z,Hs,Xs,Ks,Zs,Qs,Js,eo,to,ro,io,no,ao,so,oo,lo,ho,co,uo,po,go,fo,C,mo,yo,vo,xo,bo,To,ko,wo,Co,Eo,So,_o,Ao,Lo,Ro,Io,No,Do,Mo,Oo,Bo,Po,$o,Fo,zo,qo,Wo,Uo,Go,jo,Vo,Yo,Ho,Xo,Ko,Zo,Qo,Jo,el,tl,rl,il,nl,al,sl,ol,ll,hl,cl,ul,dl,pl,gl,fl,ml,yl,vl,xl,g,bl,Tl,kl,wl,Cl,El,Sl,f,_l,Al,Ll,Rl,Il,Nl,Dl,Ml,Ol,Bl,Pl,$l,Fl,zl,ql,Wl,Ul,Gl,jl,Vl,Yl,Hl,Xl,Kl,m,Zl,Ql,Jl,eh,th,rh,ih,nh,ah,sh,oh,lh,hh,ch,uh,dh,ph,gh,fh,mh,yh,vh,xh,bh,Th,kh,wh,Ch=i(()=>{for(la=class r{static{mt(this,"SourceLocation")}constructor(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new r(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}},ha=class i{static{mt(this,"Token")}constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new i(t,la.range(this,e))}},(X=class s{static{mt(this,"ParseError")}constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r,i,n,a="KaTeX parse error: "+e;return(t=t&&t.loc)&&t.start<=t.end&&(r=t.lexer.input,i=t.start,n=t.end,i===r.length?a+=" at end of input: ":a+=" at position "+(i+1)+": ",t=r.slice(i,n).replace(/[^]/g,"$&̲"),a+=(15<i?"…"+r.slice(i-15,i):r.slice(0,i))+t+(n+15<r.length?r.slice(n,n+15)+"…":r.slice(n))),(t=new Error(a)).name="ParseError",t.__proto__=s.prototype,null!=(t.position=i)&&null!=n&&(t.length=n-i),t.rawMessage=e,t}}).prototype.__proto__=Error.prototype,Nl=mt(function(e,t){return void 0===e?t:e},"deflt"),ca=/([A-Z])/g,f=mt(function(e){return e.replace(ca,"-$1").toLowerCase()},"hyphenate"),ua={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},da=/[&><"']/g,mt(Nn,"escape"),pa=mt(function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},"getBaseElem"),sh=mt(function(e){return"mathord"===(e=pa(e)).type||"textord"===e.type||"atom"===e.type},"isCharacterBox"),ga=mt(function(e){if(e)return e;throw new Error("Expected non-null, but got "+String(e))},"assert"),g=mt(function(e){return(e=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e))?":"===e[2]&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?e[1].toLowerCase():null:"_relative"},"protocolFromUrl"),fa={deflt:Nl,escape:Nn,hyphenate:f,getBaseElem:pa,isCharacterBox:sh,protocolFromUrl:g},ma={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 <type>"},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 <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:mt(e=>"#"+e,"cliProcessor")},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:mt((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:mt(e=>Math.max(0,e),"processor"),cli:"--min-rule-thickness <size>",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:mt(e=>Math.max(0,e),"processor"),cli:"-s, --max-size <n>",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:mt(e=>Math.max(0,e),"processor"),cli:"-e, --max-expand <n>",cliProcessor:mt(e=>"Infinity"===e?1/0:parseInt(e),"cliProcessor")},globalGroup:{type:"boolean",cli:!1}},mt(Dn,"getDefaultValue"),ya=class{static{mt(this,"Settings")}constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},ma){var r;ma.hasOwnProperty(t)&&(r=ma[t],this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:Dn(r))}}reportNonstrict(e,t,r){var i=this.strict;if((i="function"==typeof i?i(e,t,r):i)&&"ignore"!==i){if(!0===i||"error"===i)throw new X("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===i?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("function"==typeof i)try{i=i(e,t,r)}catch{i="error"}return!(!i||"ignore"===i||!0!==i&&"error"!==i&&("warn"===i?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+"]"),1))}isTrusted(e){if(e.url&&!e.protocol){var t=fa.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}return!!("function"==typeof this.trust?this.trust(e):this.trust)}},Nl=class{static{mt(this,"Style")}constructor(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}sup(){return va[xa[this.id]]}sub(){return va[ba[this.id]]}fracNum(){return va[Ta[this.id]]}fracDen(){return va[ka[this.id]]}cramp(){return va[wa[this.id]]}text(){return va[Ca[this.id]]}isTight(){return 2<=this.size}},va=[new Nl(0,0,!1),new Nl(1,0,!0),new Nl(2,1,!1),new Nl(3,1,!0),new Nl(4,2,!1),new Nl(5,2,!0),new Nl(6,3,!1),new Nl(7,3,!0)],xa=[4,5,4,5,6,7,6,7],ba=[5,5,5,5,7,7,7,7],Ta=[2,3,4,5,6,7,6,7],ka=[3,3,5,5,7,7,7,7],wa=[1,1,3,3,5,5,7,7],Ca=[0,1,2,3,2,3,2,3],Ea={DISPLAY:va[0],TEXT:va[2],SCRIPT:va[4],SCRIPTSCRIPT:va[6]},Sa=[{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]]}],mt(Mn,"scriptFromCodepoint"),_a=[],Sa.forEach(e=>e.blocks.forEach(e=>_a.push(...e))),mt(On,"supportedCodepoint"),Aa=mt(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"),La=mt(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"),Ra=mt(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"),Ia=mt(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"),Na=mt(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"),Da=mt(function(e){return"M400000 "+e+" H0 L"+e/2+" 0 l65 45 L145 "+(e-80)+" H400000z"},"phasePath"),Ma=mt(function(e,t,r){return"M702 "+(e+t)+"H400000"+(40+e)+`
H742v`+(r-54-t-e)+`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"),Oa=mt(function(e,t,r){t*=1e3;var i="";switch(e){case"sqrtMain":i=Aa(t,80);break;case"sqrtSize1":i=La(t,80);break;case"sqrtSize2":i=Ra(t,80);break;case"sqrtSize3":i=Ia(t,80);break;case"sqrtSize4":i=Na(t,80);break;case"sqrtTall":i=Ma(t,80,r)}return i},"sqrtPath"),Ba=mt(function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}},"innerPath"),Pa={doubleleftarrow:`M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
435 0h399565z`,leftgroupunder:`M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},$a=mt(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"),Fa=class{static{mt(this,"DocumentFragment")}constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){var e=mt(e=>e.toText(),"toText");return this.children.map(e).join("")}},za={"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]}},qa={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]},Wa={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"},mt(Bn,"setFontMetrics"),mt(Pn,"getCharacterMetrics"),Ua={},mt($n,"getGlobalMetrics"),Ga=[[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]],ja=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Va=mt(function(e,t){return t.size<2?e:Ga[e-1][t.size-1]},"sizeAtStyle"),(Ya=class n{static{mt(this,"Options")}constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||n.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=ja[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t,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};for(t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return new n(r)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Va(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:ja[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Va(n.BASESIZE,e);return this.size===t&&this.textSize===n.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==n.BASESIZE?["sizing","reset-size"+this.size,"size"+n.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=$n(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}).BASESIZE=6,Ha={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},Xa={ex:!0,em:!0,mu:!0},Ka=mt(function(e){return(e="string"!=typeof e?e.unit:e)in Ha||e in Xa||"ex"===e},"validUnit"),Za=mt(function(e,t){var r;if(e.unit in Ha)r=Ha[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var i=t.style.isTight()?t.havingStyle(t.style.text()):t;if("ex"===e.unit)r=i.fontMetrics().xHeight;else{if("em"!==e.unit)throw new X("Invalid unit: '"+e.unit+"'");r=i.fontMetrics().quad}i!==t&&(r*=i.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},"calculateSize"),K=mt(function(e){return+e.toFixed(4)+"em"},"makeEm"),Qa=mt(function(e){return e.filter(e=>e).join(" ")},"createClass"),Ja=mt(function(e,t,r){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"),e=t.getColor())&&(this.style.color=e)},"initNode"),es=mt(function(e){var t,r,i=document.createElement(e);for(t in i.className=Qa(this.classes),this.style)this.style.hasOwnProperty(t)&&(i.style[t]=this.style[t]);for(r in this.attributes)this.attributes.hasOwnProperty(r)&&i.setAttribute(r,this.attributes[r]);for(var n=0;n<this.children.length;n++)i.appendChild(this.children[n].toNode());return i},"toNode"),ts=/[\s"'>/=\x00-\x1f]/,rs=mt(function(e){var t,r,i="<"+e,n=(this.classes.length&&(i+=' class="'+fa.escape(Qa(this.classes))+'"'),"");for(t in this.style)this.style.hasOwnProperty(t)&&(n+=fa.hyphenate(t)+":"+this.style[t]+";");for(r in n&&(i+=' style="'+fa.escape(n)+'"'),this.attributes)if(this.attributes.hasOwnProperty(r)){if(ts.test(r))throw new X("Invalid attribute name '"+r+"'");i+=" "+r+'="'+fa.escape(this.attributes[r])+'"'}i+=">";for(var a=0;a<this.children.length;a++)i+=this.children[a].toMarkup();return i+"</"+e+">"},"toMarkup"),is=class{static{mt(this,"Span")}constructor(e,t,r,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,Ja.call(this,e,r,i),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return es.call(this,"span")}toMarkup(){return rs.call(this,"span")}},ns=class{static{mt(this,"Anchor")}constructor(e,t,r,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Ja.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 es.call(this,"a")}toMarkup(){return rs.call(this,"a")}},as=class{static{mt(this,"Img")}constructor(e,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=r}hasClass(e){return this.classes.includes(e)}toNode(){var e,t=document.createElement("img");for(e in t.src=this.src,t.alt=this.alt,t.className="mord",this.style)this.style.hasOwnProperty(e)&&(t.style[e]=this.style[e]);return t}toMarkup(){var e,t='<img src="'+fa.escape(this.src)+'" alt="'+fa.escape(this.alt)+'"',r="";for(e in this.style)this.style.hasOwnProperty(e)&&(r+=fa.hyphenate(e)+":"+this.style[e]+";");return r&&(t+=' style="'+fa.escape(r)+'"'),t+"'/>"}},ss={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"},os=class{static{mt(this,"SymbolNode")}constructor(e,t,r,i,n,a,s,o){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=r||0,this.italic=i||0,this.skew=n||0,this.width=a||0,this.classes=s||[],this.style=o||{},this.maxFontSize=0,(e=Mn(this.text.charCodeAt(0)))&&this.classes.push(e+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=ss[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e,t=document.createTextNode(this.text),r=null;for(e in 0<this.italic&&((r=document.createElement("span")).style.marginRight=K(this.italic)),0<this.classes.length&&((r=r||document.createElement("span")).className=Qa(this.classes)),this.style)this.style.hasOwnProperty(e)&&(r=r||document.createElement("span"),r.style[e]=this.style[e]);return r?(r.appendChild(t),r):t}toMarkup(){var e,t=!1,r="<span",i=(this.classes.length&&(t=!0,r=(r+=' class="')+fa.escape(Qa(this.classes))+'"'),"");for(e in 0<this.italic&&(i+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(e)&&(i+=fa.hyphenate(e)+":"+this.style[e]+";");i&&(t=!0,r+=' style="'+fa.escape(i)+'"');var n=fa.escape(this.text);return t?(r+=">")+n+"</span>":n}},ls=class{static{mt(this,"SvgNode")}constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e,t=document.createElementNS("http://www.w3.org/2000/svg","svg");for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t}toMarkup(){var e,t='<svg xmlns="http://www.w3.org/2000/svg"';for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=" "+e+'="'+fa.escape(this.attributes[e])+'"');t+=">";for(var r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t+"</svg>"}},hs=class{static{mt(this,"PathNode")}constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",Pa[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+fa.escape(this.alternate)+'"/>':'<path d="'+fa.escape(Pa[this.pathName])+'"/>'}},cs=class{static{mt(this,"LineNode")}constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e,t=document.createElementNS("http://www.w3.org/2000/svg","line");for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);return t}toMarkup(){var e,t="<line";for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=" "+e+'="'+fa.escape(this.attributes[e])+'"');return t+"/>"}},mt(Fn,"assertSymbolDomNode"),mt(zn,"assertSpan"),us={bin:1,close:1,inner:1,open:1,punct:1,rel:1},ds={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ps={math:{},text:{}},mt(t,"defineSymbol"),u="text",f="ams",sh="accent-token",g="bin",Nl="close",$l="inner",gs="mathord",ah="op-token",wl="open",Bl="punct",kl="spacing",p="textord",t(h="math",d="main",m="rel","≡","\\equiv",!0),t(h,d,m,"≺","\\prec",!0),t(h,d,m,"≻","\\succ",!0),t(h,d,m,"","\\sim",!0),t(h,d,m,"⊥","\\perp"),t(h,d,m,"⪯","\\preceq",!0),t(h,d,m,"⪰","\\succeq",!0),t(h,d,m,"≃","\\simeq",!0),t(h,d,m,"","\\mid",!0),t(h,d,m,"≪","\\ll",!0),t(h,d,m,"≫","\\gg",!0),t(h,d,m,"≍","\\asymp",!0),t(h,d,m,"∥","\\parallel"),t(h,d,m,"⋈","\\bowtie",!0),t(h,d,m,"⌣","\\smile",!0),t(h,d,m,"⊑","\\sqsubseteq",!0),t(h,d,m,"⊒","\\sqsupseteq",!0),t(h,d,m,"≐","\\doteq",!0),t(h,d,m,"⌢","\\frown",!0),t(h,d,m,"∋","\\ni",!0),t(h,d,m,"∝","\\propto",!0),t(h,d,m,"⊢","\\vdash",!0),t(h,d,m,"⊣","\\dashv",!0),t(h,d,m,"∋","\\owns"),t(h,d,Bl,".","\\ldotp"),t(h,d,Bl,"⋅","\\cdotp"),t(h,d,p,"#","\\#"),t(u,d,p,"#","\\#"),t(h,d,p,"&","\\&"),t(u,d,p,"&","\\&"),t(h,d,p,"ℵ","\\aleph",!0),t(h,d,p,"∀","\\forall",!0),t(h,d,p,"ℏ","\\hbar",!0),t(h,d,p,"∃","\\exists",!0),t(h,d,p,"∇","\\nabla",!0),t(h,d,p,"♭","\\flat",!0),t(h,d,p,"","\\ell",!0),t(h,d,p,"♮","\\natural",!0),t(h,d,p,"♣","\\clubsuit",!0),t(h,d,p,"℘","\\wp",!0),t(h,d,p,"♯","\\sharp",!0),t(h,d,p,"♢","\\diamondsuit",!0),t(h,d,p,"","\\Re",!0),t(h,d,p,"♡","\\heartsuit",!0),t(h,d,p,"","\\Im",!0),t(h,d,p,"♠","\\spadesuit",!0),t(h,d,p,"§","\\S",!0),t(u,d,p,"§","\\S"),t(h,d,p,"¶","\\P",!0),t(u,d,p,"¶","\\P"),t(h,d,p,"†","\\dag"),t(u,d,p,"†","\\dag"),t(u,d,p,"†","\\textdagger"),t(h,d,p,"‡","\\ddag"),t(u,d,p,"‡","\\ddag"),t(u,d,p,"‡","\\textdaggerdbl"),t(h,d,Nl,"⎱","\\rmoustache",!0),t(h,d,wl,"⎰","\\lmoustache",!0),t(h,d,Nl,"⟯","\\rgroup",!0),t(h,d,wl,"⟮","\\lgroup",!0),t(h,d,g,"∓","\\mp",!0),t(h,d,g,"⊖","\\ominus",!0),t(h,d,g,"⊎","\\uplus",!0),t(h,d,g,"⊓","\\sqcap",!0),t(h,d,g,"","\\ast"),t(h,d,g,"⊔","\\sqcup",!0),t(h,d,g,"◯","\\bigcirc",!0),t(h,d,g,"∙","\\bullet",!0),t(h,d,g,"‡","\\ddagger"),t(h,d,g,"≀","\\wr",!0),t(h,d,g,"⨿","\\amalg"),t(h,d,g,"&","\\And"),t(h,d,m,"⟵","\\longleftarrow",!0),t(h,d,m,"⇐","\\Leftarrow",!0),t(h,d,m,"⟸","\\Longleftarrow",!0),t(h,d,m,"⟶","\\longrightarrow",!0),t(h,d,m,"⇒","\\Rightarrow",!0),t(h,d,m,"⟹","\\Longrightarrow",!0),t(h,d,m,"↔","\\leftrightarrow",!0),t(h,d,m,"⟷","\\longleftrightarrow",!0),t(h,d,m,"⇔","\\Leftrightarrow",!0),t(h,d,m,"⟺","\\Longleftrightarrow",!0),t(h,d,m,"↦","\\mapsto",!0),t(h,d,m,"⟼","\\longmapsto",!0),t(h,d,m,"↗","\\nearrow",!0),t(h,d,m,"↩","\\hookleftarrow",!0),t(h,d,m,"↪","\\hookrightarrow",!0),t(h,d,m,"↘","\\searrow",!0),t(h,d,m,"↼","\\leftharpoonup",!0),t(h,d,m,"⇀","\\rightharpoonup",!0),t(h,d,m,"↙","\\swarrow",!0),t(h,d,m,"↽","\\leftharpoondown",!0),t(h,d,m,"⇁","\\rightharpoondown",!0),t(h,d,m,"↖","\\nwarrow",!0),t(h,d,m,"⇌","\\rightleftharpoons",!0),t(h,f,m,"≮","\\nless",!0),t(h,f,m,"","\\@nleqslant"),t(h,f,m,"","\\@nleqq"),t(h,f,m,"⪇","\\lneq",!0),t(h,f,m,"≨","\\lneqq",!0),t(h,f,m,"","\\@lvertneqq"),t(h,f,m,"⋦","\\lnsim",!0),t(h,f,m,"⪉","\\lnapprox",!0),t(h,f,m,"⊀","\\nprec",!0),t(h,f,m,"⋠","\\npreceq",!0),t(h,f,m,"⋨","\\precnsim",!0),t(h,f,m,"⪹","\\precnapprox",!0),t(h,f,m,"≁","\\nsim",!0),t(h,f,m,"","\\@nshortmid"),t(h,f,m,"∤","\\nmid",!0),t(h,f,m,"⊬","\\nvdash",!0),t(h,f,m,"⊭","\\nvDash",!0),t(h,f,m,"⋪","\\ntriangleleft"),t(h,f,m,"⋬","\\ntrianglelefteq",!0),t(h,f,m,"⊊","\\subsetneq",!0),t(h,f,m,"","\\@varsubsetneq"),t(h,f,m,"⫋","\\subsetneqq",!0),t(h,f,m,"","\\@varsubsetneqq"),t(h,f,m,"≯","\\ngtr",!0),t(h,f,m,"","\\@ngeqslant"),t(h,f,m,"","\\@ngeqq"),t(h,f,m,"⪈","\\gneq",!0),t(h,f,m,"≩","\\gneqq",!0),t(h,f,m,"","\\@gvertneqq"),t(h,f,m,"⋧","\\gnsim",!0),t(h,f,m,"⪊","\\gnapprox",!0),t(h,f,m,"⊁","\\nsucc",!0),t(h,f,m,"⋡","\\nsucceq",!0),t(h,f,m,"⋩","\\succnsim",!0),t(h,f,m,"⪺","\\succnapprox",!0),t(h,f,m,"≆","\\ncong",!0),t(h,f,m,"","\\@nshortparallel"),t(h,f,m,"∦","\\nparallel",!0),t(h,f,m,"⊯","\\nVDash",!0),t(h,f,m,"⋫","\\ntriangleright"),t(h,f,m,"⋭","\\ntrianglerighteq",!0),t(h,f,m,"","\\@nsupseteqq"),t(h,f,m,"⊋","\\supsetneq",!0),t(h,f,m,"","\\@varsupsetneq"),t(h,f,m,"⫌","\\supsetneqq",!0),t(h,f,m,"","\\@varsupsetneqq"),t(h,f,m,"⊮","\\nVdash",!0),t(h,f,m,"⪵","\\precneqq",!0),t(h,f,m,"⪶","\\succneqq",!0),t(h,f,m,"","\\@nsubseteqq"),t(h,f,g,"⊴","\\unlhd"),t(h,f,g,"⊵","\\unrhd"),t(h,f,m,"↚","\\nleftarrow",!0),t(h,f,m,"↛","\\nrightarrow",!0),t(h,f,m,"⇍","\\nLeftarrow",!0),t(h,f,m,"⇏","\\nRightarrow",!0),t(h,f,m,"↮","\\nleftrightarrow",!0),t(h,f,m,"⇎","\\nLeftrightarrow",!0),t(h,f,m,"△","\\vartriangle"),t(h,f,p,"ℏ","\\hslash"),t(h,f,p,"▽","\\triangledown"),t(h,f,p,"◊","\\lozenge"),t(h,f,p,"Ⓢ","\\circledS"),t(h,f,p,"®","\\circledR"),t(u,f,p,"®","\\circledR"),t(h,f,p,"∡","\\measuredangle",!0),t(h,f,p,"∄","\\nexists"),t(h,f,p,"℧","\\mho"),t(h,f,p,"Ⅎ","\\Finv",!0),t(h,f,p,"⅁","\\Game",!0),t(h,f,p,"","\\backprime"),t(h,f,p,"▲","\\blacktriangle"),t(h,f,p,"▼","\\blacktriangledown"),t(h,f,p,"■","\\blacksquare"),t(h,f,p,"⧫","\\blacklozenge"),t(h,f,p,"★","\\bigstar"),t(h,f,p,"∢","\\sphericalangle",!0),t(h,f,p,"∁","\\complement",!0),t(h,f,p,"ð","\\eth",!0),t(u,d,p,"ð","ð"),t(h,f,p,"","\\diagup"),t(h,f,p,"╲","\\diagdown"),t(h,f,p,"□","\\square"),t(h,f,p,"□","\\Box"),t(h,f,p,"◊","\\Diamond"),t(h,f,p,"¥","\\yen",!0),t(u,f,p,"¥","\\yen",!0),t(h,f,p,"✓","\\checkmark",!0),t(u,f,p,"✓","\\checkmark"),t(h,f,p,"ℶ","\\beth",!0),t(h,f,p,"ℸ","\\daleth",!0),t(h,f,p,"ℷ","\\gimel",!0),t(h,f,p,"ϝ","\\digamma",!0),t(h,f,p,"ϰ","\\varkappa"),t(h,f,wl,"┌","\\@ulcorner",!0),t(h,f,Nl,"┐","\\@urcorner",!0),t(h,f,wl,"└","\\@llcorner",!0),t(h,f,Nl,"┘","\\@lrcorner",!0),t(h,f,m,"≦","\\leqq",!0),t(h,f,m,"⩽","\\leqslant",!0),t(h,f,m,"⪕","\\eqslantless",!0),t(h,f,m,"≲","\\lesssim",!0),t(h,f,m,"⪅","\\lessapprox",!0),t(h,f,m,"≊","\\approxeq",!0),t(h,f,g,"⋖","\\lessdot"),t(h,f,m,"⋘","\\lll",!0),t(h,f,m,"≶","\\lessgtr",!0),t(h,f,m,"⋚","\\lesseqgtr",!0),t(h,f,m,"⪋","\\lesseqqgtr",!0),t(h,f,m,"≑","\\doteqdot"),t(h,f,m,"≓","\\risingdotseq",!0),t(h,f,m,"≒","\\fallingdotseq",!0),t(h,f,m,"∽","\\backsim",!0),t(h,f,m,"⋍","\\backsimeq",!0),t(h,f,m,"⫅","\\subseteqq",!0),t(h,f,m,"⋐","\\Subset",!0),t(h,f,m,"⊏","\\sqsubset",!0),t(h,f,m,"≼","\\preccurlyeq",!0),t(h,f,m,"⋞","\\curlyeqprec",!0),t(h,f,m,"≾","\\precsim",!0),t(h,f,m,"⪷","\\precapprox",!0),t(h,f,m,"⊲","\\vartriangleleft"),t(h,f,m,"⊴","\\trianglelefteq"),t(h,f,m,"⊨","\\vDash",!0),t(h,f,m,"⊪","\\Vvdash",!0),t(h,f,m,"⌣","\\smallsmile"),t(h,f,m,"⌢","\\smallfrown"),t(h,f,m,"≏","\\bumpeq",!0),t(h,f,m,"≎","\\Bumpeq",!0),t(h,f,m,"≧","\\geqq",!0),t(h,f,m,"⩾","\\geqslant",!0),t(h,f,m,"⪖","\\eqslantgtr",!0),t(h,f,m,"≳","\\gtrsim",!0),t(h,f,m,"⪆","\\gtrapprox",!0),t(h,f,g,"⋗","\\gtrdot"),t(h,f,m,"⋙","\\ggg",!0),t(h,f,m,"≷","\\gtrless",!0),t(h,f,m,"⋛","\\gtreqless",!0),t(h,f,m,"⪌","\\gtreqqless",!0),t(h,f,m,"≖","\\eqcirc",!0),t(h,f,m,"≗","\\circeq",!0),t(h,f,m,"≜","\\triangleq",!0),t(h,f,m,"","\\thicksim"),t(h,f,m,"≈","\\thickapprox"),t(h,f,m,"⫆","\\supseteqq",!0),t(h,f,m,"⋑","\\Supset",!0),t(h,f,m,"⊐","\\sqsupset",!0),t(h,f,m,"≽","\\succcurlyeq",!0),t(h,f,m,"⋟","\\curlyeqsucc",!0),t(h,f,m,"≿","\\succsim",!0),t(h,f,m,"⪸","\\succapprox",!0),t(h,f,m,"⊳","\\vartriangleright"),t(h,f,m,"⊵","\\trianglerighteq"),t(h,f,m,"⊩","\\Vdash",!0),t(h,f,m,"","\\shortmid"),t(h,f,m,"∥","\\shortparallel"),t(h,f,m,"≬","\\between",!0),t(h,f,m,"⋔","\\pitchfork",!0),t(h,f,m,"∝","\\varpropto"),t(h,f,m,"◀","\\blacktriangleleft"),t(h,f,m,"∴","\\therefore",!0),t(h,f,m,"∍","\\backepsilon"),t(h,f,m,"▶","\\blacktriangleright"),t(h,f,m,"∵","\\because",!0),t(h,f,m,"⋘","\\llless"),t(h,f,m,"⋙","\\gggtr"),t(h,f,g,"⊲","\\lhd"),t(h,f,g,"⊳","\\rhd"),t(h,f,m,"≂","\\eqsim",!0),t(h,d,m,"⋈","\\Join"),t(h,f,m,"≑","\\Doteq",!0),t(h,f,g,"∔","\\dotplus",!0),t(h,f,g,"","\\smallsetminus"),t(h,f,g,"⋒","\\Cap",!0),t(h,f,g,"⋓","\\Cup",!0),t(h,f,g,"⩞","\\doublebarwedge",!0),t(h,f,g,"⊟","\\boxminus",!0),t(h,f,g,"⊞","\\boxplus",!0),t(h,f,g,"⋇","\\divideontimes",!0),t(h,f,g,"⋉","\\ltimes",!0),t(h,f,g,"⋊","\\rtimes",!0),t(h,f,g,"⋋","\\leftthreetimes",!0),t(h,f,g,"⋌","\\rightthreetimes",!0),t(h,f,g,"⋏","\\curlywedge",!0),t(h,f,g,"⋎","\\curlyvee",!0),t(h,f,g,"⊝","\\circleddash",!0),t(h,f,g,"⊛","\\circledast",!0),t(h,f,g,"⋅","\\centerdot"),t(h,f,g,"⊺","\\intercal",!0),t(h,f,g,"⋒","\\doublecap"),t(h,f,g,"⋓","\\doublecup"),t(h,f,g,"⊠","\\boxtimes",!0),t(h,f,m,"⇢","\\dashrightarrow",!0),t(h,f,m,"⇠","\\dashleftarrow",!0),t(h,f,m,"⇇","\\leftleftarrows",!0),t(h,f,m,"⇆","\\leftrightarrows",!0),t(h,f,m,"⇚","\\Lleftarrow",!0),t(h,f,m,"↞","\\twoheadleftarrow",!0),t(h,f,m,"↢","\\leftarrowtail",!0),t(h,f,m,"↫","\\looparrowleft",!0),t(h,f,m,"⇋","\\leftrightharpoons",!0),t(h,f,m,"↶","\\curvearrowleft",!0),t(h,f,m,"↺","\\circlearrowleft",!0),t(h,f,m,"↰","\\Lsh",!0),t(h,f,m,"⇈","\\upuparrows",!0),t(h,f,m,"↿","\\upharpoonleft",!0),t(h,f,m,"⇃","\\downharpoonleft",!0),t(h,d,m,"⊶","\\origof",!0),t(h,d,m,"⊷","\\imageof",!0),t(h,f,m,"⊸","\\multimap",!0),t(h,f,m,"↭","\\leftrightsquigarrow",!0),t(h,f,m,"⇉","\\rightrightarrows",!0),t(h,f,m,"⇄","\\rightleftarrows",!0),t(h,f,m,"↠","\\twoheadrightarrow",!0),t(h,f,m,"↣","\\rightarrowtail",!0),t(h,f,m,"↬","\\looparrowright",!0),t(h,f,m,"↷","\\curvearrowright",!0),t(h,f,m,"↻","\\circlearrowright",!0),t(h,f,m,"↱","\\Rsh",!0),t(h,f,m,"⇊","\\downdownarrows",!0),t(h,f,m,"↾","\\upharpoonright",!0),t(h,f,m,"⇂","\\downharpoonright",!0),t(h,f,m,"⇝","\\rightsquigarrow",!0),t(h,f,m,"⇝","\\leadsto"),t(h,f,m,"⇛","\\Rrightarrow",!0),t(h,f,m,"↾","\\restriction"),t(h,d,p,"","`"),t(h,d,p,"$","\\$"),t(u,d,p,"$","\\$"),t(u,d,p,"$","\\textdollar"),t(h,d,p,"%","\\%"),t(u,d,p,"%","\\%"),t(h,d,p,"_","\\_"),t(u,d,p,"_","\\_"),t(u,d,p,"_","\\textunderscore"),t(h,d,p,"∠","\\angle",!0),t(h,d,p,"∞","\\infty",!0),t(h,d,p,"","\\prime"),t(h,d,p,"△","\\triangle"),t(h,d,p,"Γ","\\Gamma",!0),t(h,d,p,"Δ","\\Delta",!0),t(h,d,p,"Θ","\\Theta",!0),t(h,d,p,"Λ","\\Lambda",!0),t(h,d,p,"Ξ","\\Xi",!0),t(h,d,p,"Π","\\Pi",!0),t(h,d,p,"Σ","\\Sigma",!0),t(h,d,p,"Υ","\\Upsilon",!0),t(h,d,p,"Φ","\\Phi",!0),t(h,d,p,"Ψ","\\Psi",!0),t(h,d,p,"Ω","\\Omega",!0),t(h,d,p,"A","Α"),t(h,d,p,"B","Β"),t(h,d,p,"E","Ε"),t(h,d,p,"Z","Ζ"),t(h,d,p,"H","Η"),t(h,d,p,"I","Ι"),t(h,d,p,"K","Κ"),t(h,d,p,"M","Μ"),t(h,d,p,"N","Ν"),t(h,d,p,"O","Ο"),t(h,d,p,"P","Ρ"),t(h,d,p,"T","Τ"),t(h,d,p,"X","Χ"),t(h,d,p,"¬","\\neg",!0),t(h,d,p,"¬","\\lnot"),t(h,d,p,"","\\top"),t(h,d,p,"⊥","\\bot"),t(h,d,p,"∅","\\emptyset"),t(h,f,p,"∅","\\varnothing"),t(h,d,gs,"α","\\alpha",!0),t(h,d,gs,"β","\\beta",!0),t(h,d,gs,"γ","\\gamma",!0),t(h,d,gs,"δ","\\delta",!0),t(h,d,gs,"ϵ","\\epsilon",!0),t(h,d,gs,"ζ","\\zeta",!0),t(h,d,gs,"η","\\eta",!0),t(h,d,gs,"θ","\\theta",!0),t(h,d,gs,"ι","\\iota",!0),t(h,d,gs,"κ","\\kappa",!0),t(h,d,gs,"λ","\\lambda",!0),t(h,d,gs,"μ","\\mu",!0),t(h,d,gs,"ν","\\nu",!0),t(h,d,gs,"ξ","\\xi",!0),t(h,d,gs,"ο","\\omicron",!0),t(h,d,gs,"π","\\pi",!0),t(h,d,gs,"ρ","\\rho",!0),t(h,d,gs,"σ","\\sigma",!0),t(h,d,gs,"τ","\\tau",!0),t(h,d,gs,"υ","\\upsilon",!0),t(h,d,gs,"ϕ","\\phi",!0),t(h,d,gs,"χ","\\chi",!0),t(h,d,gs,"ψ","\\psi",!0),t(h,d,gs,"ω","\\omega",!0),t(h,d,gs,"ε","\\varepsilon",!0),t(h,d,gs,"ϑ","\\vartheta",!0),t(h,d,gs,"ϖ","\\varpi",!0),t(h,d,gs,"ϱ","\\varrho",!0),t(h,d,gs,"ς","\\varsigma",!0),t(h,d,gs,"φ","\\varphi",!0),t(h,d,g,"","*",!0),t(h,d,g,"+","+"),t(h,d,g,"","-",!0),t(h,d,g,"⋅","\\cdot",!0),t(h,d,g,"∘","\\circ",!0),t(h,d,g,"÷","\\div",!0),t(h,d,g,"±","\\pm",!0),t(h,d,g,"×","\\times",!0),t(h,d,g,"∩","\\cap",!0),t(h,d,g,"","\\cup",!0),t(h,d,g,"","\\setminus",!0),t(h,d,g,"∧","\\land"),t(h,d,g,"","\\lor"),t(h,d,g,"∧","\\wedge",!0),t(h,d,g,"","\\vee",!0),t(h,d,p,"√","\\surd"),t(h,d,wl,"⟨","\\langle",!0),t(h,d,wl,"","\\lvert"),t(h,d,wl,"∥","\\lVert"),t(h,d,Nl,"?","?"),t(h,d,Nl,"!","!"),t(h,d,Nl,"⟩","\\rangle",!0),t(h,d,Nl,"","\\rvert"),t(h,d,Nl,"∥","\\rVert"),t(h,d,m,"=","="),t(h,d,m,":",":"),t(h,d,m,"≈","\\approx",!0),t(h,d,m,"≅","\\cong",!0),t(h,d,m,"≥","\\ge"),t(h,d,m,"≥","\\geq",!0),t(h,d,m,"←","\\gets"),t(h,d,m,">","\\gt",!0),t(h,d,m,"∈","\\in",!0),t(h,d,m,"","\\@not"),t(h,d,m,"⊂","\\subset",!0),t(h,d,m,"⊃","\\supset",!0),t(h,d,m,"⊆","\\subseteq",!0),t(h,d,m,"⊇","\\supseteq",!0),t(h,f,m,"⊈","\\nsubseteq",!0),t(h,f,m,"⊉","\\nsupseteq",!0),t(h,d,m,"⊨","\\models"),t(h,d,m,"←","\\leftarrow",!0),t(h,d,m,"≤","\\le"),t(h,d,m,"≤","\\leq",!0),t(h,d,m,"<","\\lt",!0),t(h,d,m,"→","\\rightarrow",!0),t(h,d,m,"→","\\to"),t(h,f,m,"≱","\\ngeq",!0),t(h,f,m,"≰","\\nleq",!0),t(h,d,kl," ","\\ "),t(h,d,kl," ","\\space"),t(h,d,kl," ","\\nobreakspace"),t(u,d,kl," ","\\ "),t(u,d,kl," "," "),t(u,d,kl," ","\\space"),t(u,d,kl," ","\\nobreakspace"),t(h,d,kl,null,"\\nobreak"),t(h,d,kl,null,"\\allowbreak"),t(h,d,Bl,",",","),t(h,d,Bl,";",";"),t(h,f,g,"⊼","\\barwedge",!0),t(h,f,g,"⊻","\\veebar",!0),t(h,d,g,"⊙","\\odot",!0),t(h,d,g,"⊕","\\oplus",!0),t(h,d,g,"⊗","\\otimes",!0),t(h,d,p,"∂","\\partial",!0),t(h,d,g,"⊘","\\oslash",!0),t(h,f,g,"⊚","\\circledcirc",!0),t(h,f,g,"⊡","\\boxdot",!0),t(h,d,g,"△","\\bigtriangleup"),t(h,d,g,"▽","\\bigtriangledown"),t(h,d,g,"†","\\dagger"),t(h,d,g,"⋄","\\diamond"),t(h,d,g,"⋆","\\star"),t(h,d,g,"◃","\\triangleleft"),t(h,d,g,"▹","\\triangleright"),t(h,d,wl,"{","\\{"),t(u,d,p,"{","\\{"),t(u,d,p,"{","\\textbraceleft"),t(h,d,Nl,"}","\\}"),t(u,d,p,"}","\\}"),t(u,d,p,"}","\\textbraceright"),t(h,d,wl,"{","\\lbrace"),t(h,d,Nl,"}","\\rbrace"),t(h,d,wl,"[","\\lbrack",!0),t(u,d,p,"[","\\lbrack",!0),t(h,d,Nl,"]","\\rbrack",!0),t(u,d,p,"]","\\rbrack",!0),t(h,d,wl,"(","\\lparen",!0),t(h,d,Nl,")","\\rparen",!0),t(u,d,p,"<","\\textless",!0),t(u,d,p,">","\\textgreater",!0),t(h,d,wl,"⌊","\\lfloor",!0),t(h,d,Nl,"⌋","\\rfloor",!0),t(h,d,wl,"⌈","\\lceil",!0),t(h,d,Nl,"⌉","\\rceil",!0),t(h,d,p,"\\","\\backslash"),t(h,d,p,"","|"),t(h,d,p,"","\\vert"),t(u,d,p,"|","\\textbar",!0),t(h,d,p,"∥","\\|"),t(h,d,p,"∥","\\Vert"),t(u,d,p,"∥","\\textbardbl"),t(u,d,p,"~","\\textasciitilde"),t(u,d,p,"\\","\\textbackslash"),t(u,d,p,"^","\\textasciicircum"),t(h,d,m,"↑","\\uparrow",!0),t(h,d,m,"⇑","\\Uparrow",!0),t(h,d,m,"↓","\\downarrow",!0),t(h,d,m,"⇓","\\Downarrow",!0),t(h,d,m,"↕","\\updownarrow",!0),t(h,d,m,"⇕","\\Updownarrow",!0),t(h,d,ah,"∐","\\coprod"),t(h,d,ah,"","\\bigvee"),t(h,d,ah,"⋀","\\bigwedge"),t(h,d,ah,"⨄","\\biguplus"),t(h,d,ah,"⋂","\\bigcap"),t(h,d,ah,"","\\bigcup"),t(h,d,ah,"∫","\\int"),t(h,d,ah,"∫","\\intop"),t(h,d,ah,"∬","\\iint"),t(h,d,ah,"∭","\\iiint"),t(h,d,ah,"∏","\\prod"),t(h,d,ah,"∑","\\sum"),t(h,d,ah,"⨂","\\bigotimes"),t(h,d,ah,"⨁","\\bigoplus"),t(h,d,ah,"⨀","\\bigodot"),t(h,d,ah,"∮","\\oint"),t(h,d,ah,"∯","\\oiint"),t(h,d,ah,"∰","\\oiiint"),t(h,d,ah,"⨆","\\bigsqcup"),t(h,d,ah,"∫","\\smallint"),t(u,d,$l,"…","\\textellipsis"),t(h,d,$l,"…","\\mathellipsis"),t(u,d,$l,"…","\\ldots",!0),t(h,d,$l,"…","\\ldots",!0),t(h,d,$l,"⋯","\\@cdots",!0),t(h,d,$l,"⋱","\\ddots",!0),t(h,d,p,"⋮","\\varvdots"),t(u,d,p,"⋮","\\varvdots"),t(h,d,sh,"ˊ","\\acute"),t(h,d,sh,"ˋ","\\grave"),t(h,d,sh,"¨","\\ddot"),t(h,d,sh,"~","\\tilde"),t(h,d,sh,"ˉ","\\bar"),t(h,d,sh,"˘","\\breve"),t(h,d,sh,"ˇ","\\check"),t(h,d,sh,"^","\\hat"),t(h,d,sh,"⃗","\\vec"),t(h,d,sh,"˙","\\dot"),t(h,d,sh,"˚","\\mathring"),t(h,d,gs,"","\\@imath"),t(h,d,gs,"","\\@jmath"),t(h,d,p,"ı","ı"),t(h,d,p,"ȷ","ȷ"),t(u,d,p,"ı","\\i",!0),t(u,d,p,"ȷ","\\j",!0),t(u,d,p,"ß","\\ss",!0),t(u,d,p,"æ","\\ae",!0),t(u,d,p,"œ","\\oe",!0),t(u,d,p,"ø","\\o",!0),t(u,d,p,"Æ","\\AE",!0),t(u,d,p,"Œ","\\OE",!0),t(u,d,p,"Ø","\\O",!0),t(u,d,sh,"ˊ","\\'"),t(u,d,sh,"ˋ","\\`"),t(u,d,sh,"ˆ","\\^"),t(u,d,sh,"˜","\\~"),t(u,d,sh,"ˉ","\\="),t(u,d,sh,"˘","\\u"),t(u,d,sh,"˙","\\."),t(u,d,sh,"¸","\\c"),t(u,d,sh,"˚","\\r"),t(u,d,sh,"ˇ","\\v"),t(u,d,sh,"¨",'\\"'),t(u,d,sh,"˝","\\H"),t(u,d,sh,"◯","\\textcircled"),fs={"--":!0,"---":!0,"``":!0,"''":!0},t(u,d,p,"","--",!0),t(u,d,p,"","\\textendash"),t(u,d,p,"—","---",!0),t(u,d,p,"—","\\textemdash"),t(u,d,p,"","`",!0),t(u,d,p,"","\\textquoteleft"),t(u,d,p,"","'",!0),t(u,d,p,"","\\textquoteright"),t(u,d,p,"“","``",!0),t(u,d,p,"“","\\textquotedblleft"),t(u,d,p,"”","''",!0),t(u,d,p,"”","\\textquotedblright"),t(h,d,p,"°","\\degree",!0),t(u,d,p,"°","\\degree"),t(u,d,p,"°","\\textdegree",!0),t(h,d,p,"£","\\pounds"),t(h,d,p,"£","\\mathsterling",!0),t(u,d,p,"£","\\pounds"),t(u,d,p,"£","\\textsterling",!0),t(h,f,p,"✠","\\maltese"),t(u,f,p,"✠","\\maltese"),ms='0123456789/@."',vs=0;vs<ms.length;vs++)ys=ms.charAt(vs),t(h,d,p,ys,ys);for(xs='0123456789!@*()-=+";:?/.,',Ts=0;Ts<xs.length;Ts++)bs=xs.charAt(Ts),t(u,d,p,bs,bs);for(ks="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Cs=0;Cs<ks.length;Cs++)ws=ks.charAt(Cs),t(h,d,gs,ws,ws),t(u,d,p,ws,ws);for(t(h,f,p,"C",""),t(u,f,p,"C",""),t(h,f,p,"H",""),t(u,f,p,"H",""),t(h,f,p,"N",""),t(u,f,p,"N",""),t(h,f,p,"P",""),t(u,f,p,"P",""),t(h,f,p,"Q",""),t(u,f,p,"Q",""),t(h,f,p,"R",""),t(u,f,p,"R",""),t(h,f,p,"Z",""),t(u,f,p,"Z",""),t(h,d,gs,"h",""),t(u,d,gs,"h",""),Es="",_s=0;_s<ks.length;_s++)Ss=ks.charAt(_s),Es=String.fromCharCode(55349,56320+_s),t(h,d,gs,Ss,Es),t(u,d,p,Ss,Es),Es=String.fromCharCode(55349,56372+_s),t(h,d,gs,Ss,Es),t(u,d,p,Ss,Es),Es=String.fromCharCode(55349,56424+_s),t(h,d,gs,Ss,Es),t(u,d,p,Ss,Es),Es=String.fromCharCode(55349,56580+_s),t(h,d,gs,Ss,Es),t(u,d,p,Ss,Es),Es=String.fromCharCode(55349,56684+_s),t(h,d,gs,Ss,Es),t(u,d,p,Ss,Es),Es=String.fromCharCode(55349,56736+_s),t(h,d,gs,Ss,Es),t(u,d,p,Ss,Es),Es=String.fromCharCode(55349,56788+_s),t(h,d,gs,Ss,Es),t(u,d,p,Ss,Es),Es=String.fromCharCode(55349,56840+_s),t(h,d,gs,Ss,Es),t(u,d,p,Ss,Es),Es=String.fromCharCode(55349,56944+_s),t(h,d,gs,Ss,Es),t(u,d,p,Ss,Es),_s<26&&(Es=String.fromCharCode(55349,56632+_s),t(h,d,gs,Ss,Es),t(u,d,p,Ss,Es),Es=String.fromCharCode(55349,56476+_s),t(h,d,gs,Ss,Es),t(u,d,p,Ss,Es));for(t(h,d,gs,"k",Es="𝕜"),t(u,d,p,"k",Es),Ls=0;Ls<10;Ls++)As=Ls.toString(),Es=String.fromCharCode(55349,57294+Ls),t(h,d,gs,As,Es),t(u,d,p,As,Es),Es=String.fromCharCode(55349,57314+Ls),t(h,d,gs,As,Es),t(u,d,p,As,Es),Es=String.fromCharCode(55349,57324+Ls),t(h,d,gs,As,Es),t(u,d,p,As,Es),Es=String.fromCharCode(55349,57334+Ls),t(h,d,gs,As,Es),t(u,d,p,As,Es);for(Rs="ÐÞþ",Ns=0;Ns<Rs.length;Ns++)Is=Rs.charAt(Ns),t(h,d,gs,Is,Is),t(u,d,p,Is,Is);Ds=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Ms=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Os=mt(function(e,t){var r,i=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,t="math"===t?0:1;if(119808<=i&&i<120484)return r=Math.floor((i-119808)/26),[Ds[r][2],Ds[r][t]];if(120782<=i&&i<=120831)return r=Math.floor((i-120782)/10),[Ms[r][2],Ms[r][t]];if(120485==i||120486==i)return[Ds[0][2],Ds[0][t]];if(120486<i&&i<120782)return["",""];throw new X("Unsupported character: "+e)},"wideCharacterFont"),Bs=mt(function(e,t,r){return{value:e=ps[r][e]&&ps[r][e].replace?ps[r][e].replace:e,metrics:Pn(e,t,r)}},"lookupSymbol"),Ps=mt(function(e,t,r,i,n){var a=Bs(e,t,r),s=a.metrics;return e=a.value,a=s?(a=s.italic,("text"===r||i&&"mathit"===i.font)&&(a=0),new os(e,s.height,s.depth,a,s.skew,s.width,n)):(typeof console<"u"&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+r+"'"),new os(e,0,0,0,0,0,n)),i&&(a.maxFontSize=i.sizeMultiplier,i.style.isTight()&&a.classes.push("mtight"),s=i.getColor())&&(a.style.color=s),a},"makeSymbol"),kl=mt(function(e,t,r,i){return void 0===i&&(i=[]),"boldsymbol"===r.font&&Bs(e,"Main-Bold",t).metrics?Ps(e,"Main-Bold",t,r,i.concat(["mathbf"])):"\\"===e||"main"===ps[t][e].font?Ps(e,"Main-Regular",t,r,i):Ps(e,"AMS-Regular",t,r,i.concat(["amsrm"]))},"mathsym"),$s=mt(function(e,t,r,i,n){return"textord"!==n&&Bs(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},"boldsymbol"),Bl=mt(function(e,t,r){var i,n,a=e.mode,s=e.text,o=["mord"],l=(e="math"===a||"text"===a&&t.font)?t.font:t.fontFamily,h="",c="";if(55349===s.charCodeAt(0)&&([h,c]=Os(s,a)),0<h.length)return Ps(s,h,a,t,o.concat(c));if(l){if(n="boldsymbol"===l?(i=(h=$s(s,a,t,o,r)).fontName,[h.fontClass]):e?(i=Vs[l].fontName,[l]):(i=js(l,t.fontWeight,t.fontShape),[l,t.fontWeight,t.fontShape]),Bs(s,i,a).metrics)return Ps(s,i,a,t,o.concat(n));if(fs.hasOwnProperty(s)&&"Typewriter"===i.slice(0,10)){for(var u=[],d=0;d<s.length;d++)u.push(Ps(s[d],i,a,t,o.concat(n)));return Us(u)}}if("mathord"===r)return Ps(s,"Math-Italic",a,t,o.concat(["mathnormal"]));if("textord"===r)return"ams"===(c=ps[a][s]&&ps[a][s].font)?(h=js("amsrm",t.fontWeight,t.fontShape),Ps(s,h,a,t,o.concat("amsrm",t.fontWeight,t.fontShape))):"main"!==c&&c?(e=js(c,t.fontWeight,t.fontShape),Ps(s,e,a,t,o.concat(e,t.fontWeight,t.fontShape))):(l=js("textrm",t.fontWeight,t.fontShape),Ps(s,l,a,t,o.concat(t.fontWeight,t.fontShape)));throw new Error("unexpected type: "+r+" in makeOrd")},"makeOrd"),Fs=mt((e,t)=>{if(Qa(e.classes)!==Qa(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var r=e.classes[0];if("mbin"===r||"mord"===r)return!1}for(var i in e.style)if(e.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;for(var n in t.style)if(t.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;return!0},"canCombine"),g=mt(e=>{for(var t=0;t<e.length-1;t++){var r=e[t],i=e[t+1];r instanceof os&&i instanceof os&&Fs(r,i)&&(r.text+=i.text,r.height=Math.max(r.height,i.height),r.depth=Math.max(r.depth,i.depth),r.italic=i.italic,e.splice(t+1,1),t--)}return e},"tryCombineChars"),zs=mt(function(e){for(var t=0,r=0,i=0,n=0;n<e.children.length;n++){var a=e.children[n];a.height>t&&(t=a.height),r<a.depth&&(r=a.depth),i<a.maxFontSize&&(i=a.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=i},"sizeElementFromChildren"),qs=mt(function(e,t,r,i){return e=new is(e,t,r,i),zs(e),e},"makeSpan"),Ws=mt((e,t,r,i)=>new is(e,t,r,i),"makeSvgSpan"),wl=mt(function(e,t,r){return(e=qs([e],[],t)).height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),e.style.borderBottomWidth=K(e.height),e.maxFontSize=1,e},"makeLineSpan"),Nl=mt(function(e,t,r,i){return e=new ns(e,t,r,i),zs(e),e},"makeAnchor"),Us=mt(function(e){return e=new Fa(e),zs(e),e},"makeFragment"),m=mt(function(e,t){return e instanceof Fa?qs([],[e],t):e},"wrapFragment"),Gs=mt(function(e){if("individualShift"===e.positionType){for(var t=e.children,r=[t[0]],i=-t[0].shift-t[0].elem.depth,n=i,a=1;a<t.length;a++){var s=-t[a].shift-n-t[a].elem.depth,o=s-(t[a-1].elem.height+t[a-1].elem.depth);n+=s,r.push({type:"kern",size:o}),r.push(t[a])}return{children:r,depth:i}}var l;if("top"===e.positionType){for(var h=e.positionData,c=0;c<e.children.length;c++){var u=e.children[c];h-="kern"===u.type?u.size:u.elem.height+u.elem.depth}l=h}else if("bottom"===e.positionType)l=-e.positionData;else{if("elem"!==(i=e.children[0]).type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)l=-i.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");l=-i.elem.depth}}return{children:e.children,depth:l}},"getVListChildrenAndDepth"),ah=mt(function(e,t){for(var{children:r,depth:e}=Gs(e),i=0,n=0;n<r.length;n++){var a=r[n];"elem"===a.type&&(a=a.elem,i=Math.max(i,a.maxFontSize,a.height))}i+=2;var s=qs(["pstrut"],[]);s.style.height=K(i);for(var o=[],l=e,h=e,c=e,u=0;u<r.length;u++){var d,p,g,f=r[u];"kern"===f.type?c+=f.size:(d=f.elem,g=f.wrapperClasses||[],p=f.wrapperStyle||{},(g=qs(g,[s,d],void 0,p)).style.top=K(-i-c-d.depth),f.marginLeft&&(g.style.marginLeft=f.marginLeft),f.marginRight&&(g.style.marginRight=f.marginRight),o.push(g),c+=d.height+d.depth),l=Math.min(l,c),h=Math.max(h,c)}(e=qs(["vlist"],o)).style.height=K(h);var m=l<0?(y=qs([],[]),(y=qs(["vlist"],[y])).style.height=K(-l),m=qs(["vlist-s"],[new os("")]),[qs(["vlist-r"],[e,m]),qs(["vlist-r"],[y])]):[qs(["vlist-r"],[e])],y=qs(["vlist-t"],m);return 2===m.length&&y.classes.push("vlist-t2"),y.height=h,y.depth=-l,y},"makeVList"),$l=mt((e,t)=>{var r=qs(["mspace"],[],t),e=Za(e,t);return r.style.marginRight=K(e),r},"makeGlue"),js=mt(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}return i+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},"retrieveTextFontName"),Vs={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"}},Ys={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},sh=mt(function(e,t){var[e,r,i]=Ys[e],e=new hs(e),e=new ls([e],{width:K(r),height:K(i),style:"width:"+K(r),viewBox:"0 0 "+1e3*r+" "+1e3*i,preserveAspectRatio:"xMinYMin"});return(e=Ws(["overlay"],[e],t)).height=i,e.style.height=K(i),e.style.width=K(r),e},"staticSvg"),Z={fontMap:Vs,makeSymbol:Ps,mathsym:kl,makeSpan:qs,makeSvgSpan:Ws,makeLineSpan:wl,makeAnchor:Nl,makeFragment:Us,wrapFragment:m,makeVList:ah,makeOrd:Bl,makeGlue:$l,staticSvg:sh,svgData:Ys,tryCombineChars:g},Hs={mord:{mop:f={number:3,unit:"mu"},mbin:kl={number:4,unit:"mu"},mrel:wl={number:5,unit:"mu"},minner:f},mop:{mord:f,mop:f,mrel:wl,minner:f},mbin:{mord:kl,mop:kl,mopen:kl,minner:kl},mrel:{mord:wl,mop:wl,mopen:wl,minner:wl},mopen:{},mclose:{mop:f,mbin:kl,mrel:wl,minner:f},mpunct:{mord:f,mop:f,mrel:wl,mopen:f,mclose:f,mpunct:f,minner:f},minner:{mord:f,mop:f,mbin:kl,mrel:wl,mopen:f,mpunct:f,minner:f}},Xs={mord:{mop:f},mop:{mord:f,mop:f},mbin:{},mrel:{},mopen:{},mclose:{mop:f},mpunct:{},minner:{mop:f}},Ks={},Zs={},Qs={},mt(o,"defineFunction"),mt(qn,"defineFunctionBuilders"),Js=mt(function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},"normalizeArgument"),eo=mt(function(e){return"ordgroup"===e.type?e.body:[e]},"ordargument"),to=Z.makeSpan,ro=["leftmost","mbin","mopen","mrel","mop","mpunct"],io=["rightmost","mrel","mclose","mpunct"],no={display:Ea.DISPLAY,text:Ea.TEXT,script:Ea.SCRIPT,scriptscript:Ea.SCRIPTSCRIPT},ao={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},so=mt(function(e,t,r,i){void 0===i&&(i=[null,null]);for(var n,a,s=[],o=0;o<e.length;o++){var l,h=po(e[o],t);h instanceof Fa?(l=h.children,s.push(...l)):s.push(h)}return Z.tryCombineChars(s),r&&(n=t,1===e.length&&("sizing"===(a=e[0]).type?n=t.havingSize(a.size):"styling"===a.type&&(n=t.havingStyle(no[a.style]))),a=to([i[0]||"leftmost"],[],t),i=to([i[1]||"rightmost"],[],t),oo(s,(e,t)=>{var r=t.classes[0],i=e.classes[0];"mbin"===r&&io.includes(i)?t.classes[0]="mord":"mbin"===i&&ro.includes(r)&&(e.classes[0]="mord")},{node:a},i,r="root"===r),oo(s,(e,t)=>{var t=co(t),r=co(e);if(e=t&&r?(e.hasClass("mtight")?Xs:Hs)[t][r]:null)return Z.makeGlue(e,n)},{node:a},i,r)),s},"buildExpression"),oo=mt(function e(r,t,i,n,a){n&&r.push(n);for(var s=0;s<r.length;s++){var o,l=r[s],h=lo(l);h?e(h.children,t,i,null,a):((h=!l.hasClass("mspace"))&&(o=t(l,i.node))&&(i.insertAfter?i.insertAfter(o):(r.unshift(o),s++)),h?i.node=l:a&&l.hasClass("newline")&&(i.node=to(["leftmost"])),i.insertAfter=(t=>e=>{r.splice(t+1,0,e),s++})(s))}n&&r.pop()},"traverseNonSpaceNodes"),lo=mt(function(e){return e instanceof Fa||e instanceof ns||e instanceof is&&e.hasClass("enclosing")?e:null},"checkPartialGroup"),ho=mt(function e(t,r){var i=lo(t);if(i&&(i=i.children).length){if("right"===r)return e(i[i.length-1],"right");if("left"===r)return e(i[0],"left")}return t},"getOutermostNode"),co=mt(function(e,t){return e&&(t&&(e=ho(e,t)),ao[e.classes[0]])||null},"getTypeOfDomTree"),uo=mt(function(e,t){return e=["nulldelimiter"].concat(e.baseSizingClasses()),to(t.concat(e))},"makeNullDelimiter"),po=mt(function(e,t,r){if(!e)return to();var i;if(Zs[e.type])return i=Zs[e.type](e,t),r&&t.size!==r.size&&(i=to(t.sizingClasses(r),[i],t),t=t.sizeMultiplier/r.sizeMultiplier,i.height*=t,i.depth*=t),i;throw new X("Got group of unknown type: '"+e.type+"'")},"buildGroup"),mt(Wn,"buildHTMLUnbreakable"),mt(Un,"buildHTML"),mt(Gn,"newDocumentFragment"),go=class{static{mt(this,"MathNode")}constructor(e,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e,t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);0<this.classes.length&&(t.className=Qa(this.classes));for(var r=0;r<this.children.length;r++)if(this.children[r]instanceof fo&&this.children[r+1]instanceof fo){for(var i=this.children[r].toText()+this.children[++r].toText();this.children[r+1]instanceof fo;)i+=this.children[++r].toText();t.appendChild(new fo(i).toNode())}else t.appendChild(this.children[r].toNode());return t}toMarkup(){var e,t="<"+this.type;for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=" "+e+'="',t+=fa.escape(this.attributes[e]),t+='"');0<this.classes.length&&(t+=' class ="'+fa.escape(Qa(this.classes))+'"'),t+=">";for(var r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t+("</"+this.type)+">"}toText(){return this.children.map(e=>e.toText()).join("")}},fo=class{static{mt(this,"TextNode")}constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return fa.escape(this.toText())}toText(){return this.text}},Nl=class{static{mt(this,"SpaceNode")}constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=.05555<=e&&e<=.05556?"":.1666<=e&&e<=.1667?"":.2222<=e&&e<=.2223?"":.2777<=e&&e<=.2778?"":-.05556<=e&&e<=-.05555?"":-.1667<=e&&e<=-.1666?"":-.2223<=e&&e<=-.2222?"":-.2778<=e&&e<=-.2777?"":null}toNode(){var e;return this.character?document.createTextNode(this.character):((e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace")).setAttribute("width",K(this.width)),e)}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+K(this.width)+'"/>'}toText(){return this.character||" "}},C={MathNode:go,TextNode:fo,SpaceNode:Nl,newDocumentFragment:Gn},mo=mt(function(e,t,r){return!ps[t][e]||!ps[t][e].replace||55349===e.charCodeAt(0)||fs.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=ps[t][e].replace),new C.TextNode(e)},"makeText"),yo=mt(function(e){return 1===e.length?e[0]:new C.MathNode("mrow",e)},"makeRow"),vo=mt(function(e,t){var r;return"texttt"===t.fontFamily?"monospace":"textsf"===t.fontFamily?"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif":"textit"===t.fontShape&&"textbf"===t.fontWeight?"bold-italic":"textit"===t.fontShape?"italic":"textbf"===t.fontWeight?"bold":(t=t.font)&&"mathnormal"!==t?(r=e.mode,"mathit"===t?"italic":"boldsymbol"===t?"textord"===e.type?"bold":"bold-italic":"mathbf"===t?"bold":"mathbb"===t?"double-struck":"mathsfit"===t?"sans-serif-italic":"mathfrak"===t?"fraktur":"mathscr"===t||"mathcal"===t?"script":"mathsf"===t?"sans-serif":"mathtt"===t?"monospace":!["\\imath","\\jmath"].includes(e=e.text)&&Pn(e=ps[r][e]&&ps[r][e].replace?ps[r][e].replace:e,Z.fontMap[t].fontName,r)?Z.fontMap[t].variant:null):null},"getVariant"),mt(jn,"isNumberPunctuation"),xo=mt(function(e,t,r){var i;if(1===e.length)return i=To(e[0],t),r&&i instanceof go&&"mo"===i.type&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i];for(var n,a=[],s=0;s<e.length;s++){var o,l,h=To(e[s],t);if(h instanceof go&&n instanceof go){if("mtext"===h.type&&"mtext"===n.type&&h.getAttribute("mathvariant")===n.getAttribute("mathvariant")){n.children.push(...h.children);continue}if("mn"===h.type&&"mn"===n.type){n.children.push(...h.children);continue}if(jn(h)&&"mn"===n.type){n.children.push(...h.children);continue}"mn"===h.type&&jn(n)?(h.children=[...n.children,...h.children],a.pop()):("msup"===h.type||"msub"===h.type)&&1<=h.children.length&&("mn"===n.type||jn(n))?(o=h.children[0])instanceof go&&"mn"===o.type&&(o.children=[...n.children,...o.children],a.pop()):"mi"===n.type&&1===n.children.length&&(o=n.children[0])instanceof fo&&"̸"===o.text&&("mo"===h.type||"mi"===h.type||"mn"===h.type)&&(l=h.children[0])instanceof fo&&0<l.text.length&&(l.text=l.text.slice(0,1)+"̸"+l.text.slice(1),a.pop())}a.push(h),n=h}return a},"buildExpression"),bo=mt(function(e,t,r){return yo(xo(e,t,r))},"buildExpressionRow"),To=mt(function(e,t){if(!e)return new C.MathNode("mrow");if(Qs[e.type])return Qs[e.type](e,t);throw new X("Got group of unknown type: '"+e.type+"'")},"buildGroup"),mt(Vn,"buildMathML"),ko=mt(function(e){return new Ya({style:e.displayMode?Ea.DISPLAY:Ea.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},"optionsFromSettings"),wo=mt(function(e,t){var r;return t.displayMode&&(r=["katex-display"],t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=Z.makeSpan(r,[e])),e},"displayWrap"),Co=mt(function(e,t,r){var i,n=ko(r);return"mathml"===r.output?Vn(e,t,n,r.displayMode,!0):(e="html"===r.output?(i=Un(e,n),Z.makeSpan(["katex"],[i])):(i=Vn(e,t,n,r.displayMode,!1),t=Un(e,n),Z.makeSpan(["katex"],[i,t])),wo(e,r))},"buildTree"),Eo=mt(function(e,t,r){return e=Un(e,ko(r)),e=Z.makeSpan(["katex"],[e]),wo(e,r)},"buildHTMLTree"),So={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},m=mt(function(e){return(e=new C.MathNode("mo",[new C.TextNode(So[e.replace(/^\\/,"")])])).setAttribute("stretchy","true"),e},"mathMLnode"),_o={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Ao=mt(function(e){return"ordgroup"===e.type?e.body.length:1},"groupLength"),ah=mt(function(f,m){function e(){var e,t,r=4e5,i=f.label.slice(1);if(["widehat","widecheck","widetilde","utilde"].includes(i))return t=5<(t=Ao(f.base))?"widehat"===i||"widecheck"===i?(a=420,r=2364,e=.42,i+"4"):(a=312,r=2340,e=.34,"tilde4"):(t=[1,1,2,2,3,3][t],"widehat"===i||"widecheck"===i?(r=[0,1062,2364,2364,2364][t],a=[0,239,300,360,420][t],e=[0,.24,.3,.3,.36,.42][t],i+t):(r=[0,600,1033,2339,2340][t],a=[0,260,286,306,312][t],e=[0,.26,.286,.3,.306,.34][t],"tilde"+t)),t=new hs(t),t=new ls([t],{width:"100%",height:K(e),viewBox:"0 0 "+r+" "+a,preserveAspectRatio:"none"}),{span:Z.makeSvgSpan([],[t],m),minWidth:0,height:e};var n=[],a=_o[i],[s,o,l]=a,h=l/1e3,c=s.length;if(1===c)var u=["hide-tail"],d=[a[3]];else if(2===c)u=["halfarrow-left","halfarrow-right"],d=["xMinYMin","xMaxYMin"];else{if(3!==c)throw new Error(`Correct katexImagesData or update code here to support
`+c+" children.");u=["brace-left","brace-center","brace-right"],d=["xMinYMin","xMidYMin","xMaxYMin"]}for(var p=0;p<c;p++){var g=new hs(s[p]),g=new ls([g],{width:"400em",height:K(h),viewBox:"0 0 "+r+" "+l,preserveAspectRatio:d[p]+" slice"}),g=Z.makeSvgSpan([u[p]],[g],m);if(1===c)return{span:g,minWidth:o,height:h};g.style.height=K(h),n.push(g)}return{span:Z.makeSpan(["stretchy"],n,m),minWidth:o,height:h}}mt(e,"buildSvgSpan_");var{span:t,minWidth:r,height:i}=e();return t.height=i,t.style.height=K(i),0<r&&(t.style.minWidth=K(r)),t},"svgSpan"),Bl=mt(function(e,t,r,i,n){var a,e=e.height+e.depth+r+i;return/fbox|color|angl/.test(t)?(a=Z.makeSpan(["stretchy",t],[],n),"fbox"===t&&(r=n.color&&n.getColor())&&(a.style.borderColor=r)):(i=[],/^[bx]cancel$/.test(t)&&i.push(new cs({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&i.push(new cs({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"})),r=new ls(i,{width:"100%",height:K(e)}),a=Z.makeSvgSpan([],[r],n)),a.height=e,a.style.height=K(e),a},"encloseSpan"),Lo={encloseSpan:Bl,mathMLnode:m,svgSpan:ah},mt(Yn,"assertNodeType"),mt(Hn,"assertSymbolNodeType"),mt(Xn,"checkSymbolNodeType"),Ro=mt((e,t)=>{e&&"supsub"===e.type?(o=(r=Yn(e.base,"accent")).base,e.base=o,i=zn(po(e,t)),e.base=r):o=(r=Yn(e,"accent")).base;var r,i,n,a,e=po(o,t.havingCrampedStyle()),s=0,o=(r.isShifty&&fa.isCharacterBox(o)&&(o=fa.getBaseElem(o),s=Fn(po(o,t.havingCrampedStyle())).skew),"\\c"===r.label),l=o?e.height+e.depth:Math.min(e.height,t.fontMetrics().xHeight),h=r.isStretchy?(h=Lo.svgSpan(r,t),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:0<s?{width:"calc(100% - "+K(2*s)+")",marginLeft:K(2*s)}:void 0}]},t)):("\\vec"===r.label?(a=Z.staticSvg("vec",t),n=Z.svgData.vec[1]):((a=Fn(a=Z.makeOrd({mode:r.mode,text:r.label},t,"textord"))).italic=0,n=a.width,o&&(l+=a.depth)),h=Z.makeSpan(["accent-body"],[a]),(o="\\textcircled"===r.label)&&(h.classes.push("accent-full"),l=e.height),a=s,o||(a-=n/2),h.style.left=K(a),"\\textcircled"===r.label&&(h.style.top=".2em"),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:-l},{type:"elem",elem:h}]},t)),s=Z.makeSpan(["mord","accent"],[h],t);return i?(i.children[0]=s,i.height=Math.max(s.height,i.height),i.classes[0]="mord",i):s},"htmlBuilder$a"),$l=mt((e,t)=>{var r=e.isStretchy?Lo.mathMLnode(e.label):new C.MathNode("mo",[mo(e.label,e.mode)]);return(e=new C.MathNode("mover",[To(e.base,t),r])).setAttribute("accent","true"),e},"mathmlBuilder$9"),Io=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|")),o({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:mt((e,t)=>{var t=Js(t[0]),r=!Io.test(e.funcName),i=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:t}},"handler"),htmlBuilder:Ro,mathmlBuilder:$l}),o({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:mt((e,t)=>{var t=t[0],r=e.parser.mode;return"math"===r&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:t}},"handler"),htmlBuilder:Ro,mathmlBuilder:$l}),o({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:mt((e,t)=>{var{parser:e,funcName:r}=e,t=t[0];return{type:"accentUnder",mode:e.mode,label:r,base:t}},"handler"),htmlBuilder:mt((e,t)=>{var r=po(e.base,t),i=Lo.svgSpan(e,t),e="\\utilde"===e.label?.12:0,i=Z.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:i,wrapperClasses:["svg-align"]},{type:"kern",size:e},{type:"elem",elem:r}]},t);return Z.makeSpan(["mord","accentunder"],[i],t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>{var r=Lo.mathMLnode(e.label);return(e=new C.MathNode("munder",[To(e.base,t),r])).setAttribute("accentunder","true"),e},"mathmlBuilder")}),No=mt(e=>((e=new C.MathNode("mpadded",e?[e]:[])).setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e),"paddedNode"),o({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:e,funcName:i}=e;return{type:"xArrow",mode:e.mode,label:i,body:t[0],below:r[0]}},htmlBuilder(e,t){var r,i=t.style,n=t.havingStyle(i.sup()),a=Z.wrapFragment(po(e.body,n,t),t),s="\\x"===e.label.slice(0,2)?"x":"cd",i=(a.classes.push(s+"-arrow-pad"),e.below&&(n=t.havingStyle(i.sub()),(r=Z.wrapFragment(po(e.below,n,t),t)).classes.push(s+"-arrow-pad")),Lo.svgSpan(e,t)),n=-t.fontMetrics().axisHeight+.5*i.height,s=-t.fontMetrics().axisHeight-.5*i.height-.111;return(.25<a.depth||"\\xleftequilibrium"===e.label)&&(s-=a.depth),(r=r?(e=-t.fontMetrics().axisHeight+r.height+.5*i.height+.111,Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:i,shift:n},{type:"elem",elem:r,shift:e}]},t)):Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:i,shift:n}]},t)).children[0].children[0].children[1].classes.push("svg-align"),Z.makeSpan(["mrel","x-arrow"],[r],t)},mathmlBuilder(e,t){var r,i,n=Lo.mathMLnode(e.label);return n.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body?(r=No(To(e.body,t)),e.below?(i=No(To(e.below,t)),new C.MathNode("munderover",[n,i,r])):new C.MathNode("mover",[n,r])):e.below?(i=No(To(e.below,t)),new C.MathNode("munder",[n,i])):(r=No(),new C.MathNode("mover",[n,r]))}}),Do=Z.makeSpan,mt(Kn,"htmlBuilder$9"),mt(Zn,"mathmlBuilder$8"),o({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:e,funcName:r}=e,t=t[0];return{type:"mclass",mode:e.mode,mclass:"m"+r.slice(5),body:eo(t),isCharacterBox:fa.isCharacterBox(t)}},htmlBuilder:Kn,mathmlBuilder:Zn}),Mo=mt(e=>"atom"!==(e="ordgroup"===e.type&&e.body.length?e.body[0]:e).type||"bin"!==e.family&&"rel"!==e.family?"mord":"m"+e.family,"binrelClass"),o({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){return{type:"mclass",mode:(e=e.parser).mode,mclass:Mo(t[0]),body:eo(t[1]),isCharacterBox:fa.isCharacterBox(t[1])}}}),o({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:e,funcName:r}=e,i=t[1],t=t[0],n="\\stackrel"!==r?Mo(i):"mrel",i={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==r,body:eo(i)},i={type:"supsub",mode:t.mode,base:i,sup:"\\underset"===r?null:t,sub:"\\underset"===r?t:null};return{type:"mclass",mode:e.mode,mclass:n,body:[i],isCharacterBox:fa.isCharacterBox(i)}},htmlBuilder:Kn,mathmlBuilder:Zn}),o({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){return{type:"pmb",mode:(e=e.parser).mode,mclass:Mo(t[0]),body:eo(t[0])}},htmlBuilder(e,t){var r=so(e.body,t,!0);return(e=Z.makeSpan([e.mclass],r,t)).style.textShadow="0.02em 0.01em 0.04px",e},mathmlBuilder(e,t){return e=xo(e.body,t),(t=new C.MathNode("mstyle",e)).setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),t}}),Oo={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Bo=mt(()=>({type:"styling",body:[],mode:"math",style:"display"}),"newCell"),Po=mt(e=>"textord"===e.type&&"@"===e.text,"isStartOfArrow"),$o=mt((e,t)=>("mathord"===e.type||"atom"===e.type)&&e.text===t,"isLabelEnd"),mt(Qn,"cdArrow"),mt(Jn,"parseCD"),o({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:r}=e;return{type:"cdlabel",mode:e.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup());return(r=Z.wrapFragment(po(e.label,r,t),t)).classes.push("cd-label-"+e.side),r.style.bottom=K(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){return t=new C.MathNode("mrow",[To(e.label,t)]),(t=new C.MathNode("mpadded",[t])).setAttribute("width","0"),"left"===e.side&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),(t=new C.MathNode("mstyle",[t])).setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}}),o({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){return{type:"cdlabelparent",mode:(e=e.parser).mode,fragment:t[0]}},htmlBuilder(e,t){return(e=Z.wrapFragment(po(e.fragment,t),t)).classes.push("cd-vert-arrow"),e},mathmlBuilder(e,t){return new C.MathNode("mrow",[To(e.fragment,t)])}}),o({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var e=e.parser,r=Yn(t[0],"ordgroup").body,i="",n=0;n<r.length;n++)i+=Yn(r[n],"textord").text;if(t=parseInt(i),isNaN(t))throw new X("\\@char has non-numeric argument "+i);if(t<0||1114111<=t)throw new X("\\@char with invalid code point "+i);return t=t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))),{type:"textord",mode:e.mode,text:t}}}),sh=mt((e,t)=>(t=so(e.body,t.withColor(e.color),!1),Z.makeFragment(t)),"htmlBuilder$8"),g=mt((e,t)=>(t=xo(e.body,t.withColor(e.color)),(t=new C.MathNode("mstyle",t)).setAttribute("mathcolor",e.color),t),"mathmlBuilder$7"),o({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var e=e.parser,r=Yn(t[0],"color-token").color;return{type:"color",mode:e.mode,color:r,body:eo(t[1])}},htmlBuilder:sh,mathmlBuilder:g}),o({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:e,breakOnTokenText:r}=e,t=Yn(t[0],"color-token").color,r=(e.gullet.macros.set("\\current@color",t),e.parseExpression(!0,r));return{type:"color",mode:e.mode,color:t,body:r}},htmlBuilder:sh,mathmlBuilder:g}),o({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var i="["===(e=e.parser).gullet.future().text?e.parseSizeGroup(!0):null,n=!e.settings.displayMode||!e.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:e.mode,newLine:n,size:i&&Yn(i,"size").value}},htmlBuilder(e,t){var r=Z.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size)&&(r.style.marginTop=K(Za(e.size,t))),r},mathmlBuilder(e,t){var r=new C.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size)&&r.setAttribute("height",K(Za(e.size,t))),r}}),Fo={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},zo=mt(e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new X("Expected a control sequence",e);return t},"checkControlSequence"),qo=mt(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text?e.gullet.popToken():t},"getRHS"),Wo=mt((e,t,r,i)=>{var n=e.gullet.macros.get(r.text);null==n&&(r.noexpand=!0,n={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,n,i)},"letCommand"),o({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:e,funcName:t}=e,r=(e.consumeSpaces(),e.fetch());if(Fo[r.text])return"\\global"!==t&&"\\\\globallong"!==t||(r.text=Fo[r.text]),Yn(e.parseFunction(),"internal");throw new X("Invalid token after macro prefix",r)}}),o({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:e}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new X("Expected a control sequence",r);for(var n,a=0,s=[[]];"{"!==t.gullet.future().text;)if("#"===(r=t.gullet.popToken()).text){if("{"===t.gullet.future().text){n=t.gullet.future(),s[a].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new X('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==a+1)throw new X('Argument number "'+r.text+'" out of order');a++,s.push([])}else{if("EOF"===r.text)throw new X("Expected a macro definition");s[a].push(r.text)}var o=t.gullet.consumeArg().tokens;return n&&o.unshift(n),"\\edef"!==e&&"\\xdef"!==e||(o=t.gullet.expandTokens(o)).reverse(),t.gullet.macros.set(i,{tokens:o,numArgs:a,delimiters:s},e===Fo[e]),{type:"internal",mode:t.mode}}}),o({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,r=zo(e.gullet.popToken()),i=(e.gullet.consumeSpaces(),qo(e));return Wo(e,r,i,"\\\\globallet"===t),{type:"internal",mode:e.mode}}}),o({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,r=zo(e.gullet.popToken()),i=e.gullet.popToken(),n=e.gullet.popToken();return Wo(e,r,n,"\\\\globalfuture"===t),e.gullet.pushToken(n),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}}),Uo=mt(function(e,t,r){if(r=Pn(ps.math[e]&&ps.math[e].replace||e,t,r))return r;throw new Error("Unsupported symbol "+e+" and font size "+t+".")},"getMetrics"),Go=mt(function(e,t,r,i){return t=r.havingBaseStyle(t),i=Z.makeSpan(i.concat(t.sizingClasses(r)),[e],r),e=t.sizeMultiplier/r.sizeMultiplier,i.height*=e,i.depth*=e,i.maxFontSize=t.sizeMultiplier,i},"styleWrap"),jo=mt(function(e,t,r){r=t.havingBaseStyle(r),r=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight,e.classes.push("delimcenter"),e.style.top=K(r),e.height-=r,e.depth+=r},"centerSpan"),Vo=mt(function(e,t,r,i,n,a){return e=Z.makeSymbol(e,"Main-Regular",n,i),n=Go(e,t,i,a),r&&jo(n,i,t),n},"makeSmallDelim"),Yo=mt(function(e,t,r,i){return Z.makeSymbol(e,"Size"+t+"-Regular",r,i)},"mathrmSize"),Ho=mt(function(e,t,r,i,n,a){return e=Yo(e,t,n,i),n=Go(Z.makeSpan(["delimsizing","size"+t],[e],i),Ea.TEXT,i,a),r&&jo(n,i,Ea.TEXT),n},"makeLargeDelim"),Xo=mt(function(e,t,r){return{type:"elem",elem:Z.makeSpan(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[Z.makeSpan([],[Z.makeSymbol(e,t,r)])])}},"makeGlyphSpan"),Ko=mt(function(e,t,r){var i=(za["Size4-Regular"][e.charCodeAt(0)]?za["Size4-Regular"]:za["Size1-Regular"])[e.charCodeAt(0)][4],e=new hs("inner",Ba(e,Math.round(1e3*t))),e=new ls([e],{width:K(i),height:K(t),style:"width:"+K(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"});return(e=Z.makeSvgSpan([],[e],r)).height=t,e.style.height=K(t),e.style.width=K(i),{type:"elem",elem:e}},"makeInner"),Zo={type:"kern",size:-.008},Qo=["|","\\lvert","\\rvert","\\vert"],Jo=["\\|","\\lVert","\\rVert","\\Vert"],el=mt(function(e,t,r,i,n,a){var s,o,l,h="",c=0,u=s=o=e,d=null,p="Size1-Regular",e=("\\uparrow"===e?s=o="⏐":"\\Uparrow"===e?s=o="‖":"\\downarrow"===e?u=s="⏐":"\\Downarrow"===e?u=s="‖":"\\updownarrow"===e?(u="\\uparrow",s="⏐",o="\\downarrow"):"\\Updownarrow"===e?(u="\\Uparrow",s="‖",o="\\Downarrow"):Qo.includes(e)?(s="",h="vert",c=333):Jo.includes(e)?(s="∥",h="doublevert",c=556):"["===e||"\\lbrack"===e?(u="⎡",s="⎢",o="⎣",p="Size4-Regular",h="lbrack",c=667):"]"===e||"\\rbrack"===e?(u="⎤",s="⎥",o="⎦",p="Size4-Regular",h="rbrack",c=667):"\\lfloor"===e||"⌊"===e?(s=u="⎢",o="⎣",p="Size4-Regular",h="lfloor",c=667):"\\lceil"===e||"⌈"===e?(u="⎡",s=o="⎢",p="Size4-Regular",h="lceil",c=667):"\\rfloor"===e||"⌋"===e?(s=u="⎥",o="⎦",p="Size4-Regular",h="rfloor",c=667):"\\rceil"===e||"⌉"===e?(u="⎤",s=o="⎥",p="Size4-Regular",h="rceil",c=667):"("===e||"\\lparen"===e?(u="⎛",s="⎜",o="⎝",p="Size4-Regular",h="lparen",c=875):")"===e||"\\rparen"===e?(u="⎞",s="⎟",o="⎠",p="Size4-Regular",h="rparen",c=875):"\\{"===e||"\\lbrace"===e?(u="⎧",d="⎨",o="⎩",s="⎪",p="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(u="⎫",d="⎬",o="⎭",s="⎪",p="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(u="⎧",o="⎩",s="⎪",p="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(u="⎫",o="⎭",s="⎪",p="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(u="⎧",o="⎭",s="⎪",p="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(u="⎫",o="⎩",s="⎪",p="Size4-Regular"),(e=Uo(u,p,n)).height+e.depth),g=(g=Uo(s,p,n)).height+g.depth,f=(f=Uo(o,p,n)).height+f.depth,m=0,y=1,t=(null!==d&&(m=(v=Uo(d,p,n)).height+v.depth,y=2),(v=e+f+m)+Math.max(0,Math.ceil((t-v)/(y*g)))*y*g),v=i.fontMetrics().axisHeight,y=(r&&(v*=i.sizeMultiplier),t/2-v),g=[],v=(0<h.length?(r=t-e-f,v=Math.round(1e3*t),r=$a(h,Math.round(1e3*r)),h=new hs(h,r),r=(c/1e3).toFixed(3)+"em",l=(v/1e3).toFixed(3)+"em",h=new ls([h],{width:r,height:l,viewBox:"0 0 "+c+" "+v}),(c=Z.makeSvgSpan([],[h],i)).height=v/1e3,c.style.width=r,c.style.height=l,g.push({type:"elem",elem:c})):(g.push(Xo(o,p,n)),g.push(Zo),null===d?g.push(Ko(s,t-e-f+.016,i)):(g.push(Ko(s,h=(t-e-f-m)/2+.016,i)),g.push(Zo),g.push(Xo(d,p,n)),g.push(Zo),g.push(Ko(s,h,i))),g.push(Zo),g.push(Xo(u,p,n))),i.havingBaseStyle(Ea.TEXT)),r=Z.makeVList({positionType:"bottom",positionData:y,children:g},v);return Go(Z.makeSpan(["delimsizing","mult"],[r],v),Ea.TEXT,i,a)},"makeStackedDelim"),tl=mt(function(e,t,r,i,n){return i=Oa(e,i,r),e=new hs(e,i),i=new ls([e],{width:"400em",height:K(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"}),Z.makeSvgSpan(["hide-tail"],[i],n)},"sqrtSvg"),kl=mt(function(e,t){var r,i=t.havingBaseSizing(),n=cl("\\surd",e*i.sizeMultiplier,ll,i),i=i.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),s=0,o=0,l=0,n="small"===n.type?(e<1?i=1:e<1.4&&(i=.7),o=(1+a)/i,(r=tl("sqrtMain",s=(1+a+.08)/i,l=1e3+1e3*a+80,a,t)).style.minWidth="0.853em",.833/i):"large"===n.type?(l=1080*al[n.size],o=(al[n.size]+a)/i,s=(al[n.size]+a+.08)/i,(r=tl("sqrtSize"+n.size,s,l,a,t)).style.minWidth="1.02em",1/i):(s=e+a+.08,o=e+a,l=Math.floor(1e3*e+a)+80,(r=tl("sqrtTall",s,l,a,t)).style.minWidth="0.742em",1.056);return r.height=o,r.style.height=K(s),{span:r,advanceWidth:n,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},"makeSqrtImage"),rl=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],il=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],nl=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],al=[0,1.2,1.8,2.4,3],wl=mt(function(e,t,r,i,n){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),rl.includes(e)||nl.includes(e))return Ho(e,t,!1,r,i,n);if(il.includes(e))return el(e,al[t],!1,r,i,n);throw new X("Illegal delimiter: '"+e+"'")},"makeSizedDelim"),sl=[{type:"small",style:Ea.SCRIPTSCRIPT},{type:"small",style:Ea.SCRIPT},{type:"small",style:Ea.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],ol=[{type:"small",style:Ea.SCRIPTSCRIPT},{type:"small",style:Ea.SCRIPT},{type:"small",style:Ea.TEXT},{type:"stack"}],ll=[{type:"small",style:Ea.SCRIPTSCRIPT},{type:"small",style:Ea.SCRIPT},{type:"small",style:Ea.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],hl=mt(function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},"delimTypeToFont"),cl=mt(function(e,t,r,i){for(var n=Math.min(2,3-i.style.size);n<r.length&&"stack"!==r[n].type;n++){var a=(a=Uo(e,hl(r[n]),"math")).height+a.depth;if("small"===r[n].type&&(a*=i.havingBaseStyle(r[n].style).sizeMultiplier),t<a)return r[n]}return r[r.length-1]},"traverseSequence"),ul=mt(function(e,t,r,i,n,a){"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle");var s=nl.includes(e)?sl:rl.includes(e)?ll:ol;return"small"===(s=cl(e,t,s,i)).type?Vo(e,s.style,r,i,n,a):"large"===s.type?Ho(e,s.size,r,i,n,a):el(e,t,r,i,n,a)},"makeCustomSizedDelim"),f=mt(function(e,t,r,i,n,a){var s=i.fontMetrics().axisHeight*i.sizeMultiplier,o=5/i.fontMetrics().ptPerEm,t=Math.max(t-s,r+s),r=Math.max(t/500*901,2*t-o);return ul(e,r,!0,i,n,a)},"makeLeftRightDelim"),dl={sqrtImage:kl,sizedDelim:wl,sizeToMaxHeight:al,customSizedDelim:ul,leftRightDelim:f},pl={"\\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}},gl=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."],mt(ea,"checkDelimiter"),o({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:mt((e,t)=>(t=ea(t[0],e),{type:"delimsizing",mode:e.parser.mode,size:pl[e.funcName].size,mclass:pl[e.funcName].mclass,delim:t.text}),"handler"),htmlBuilder:mt((e,t)=>"."===e.delim?Z.makeSpan([e.mclass]):dl.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),"htmlBuilder"),mathmlBuilder:mt(e=>{var t=[],t=("."!==e.delim&&t.push(mo(e.delim,e.mode)),new C.MathNode("mo",t)),e=("mopen"===e.mclass||"mclose"===e.mclass?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true"),K(dl.sizeToMaxHeight[e.size]));return t.setAttribute("minsize",e),t.setAttribute("maxsize",e),t},"mathmlBuilder")}),mt(ta,"assertParsed"),o({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:mt((e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new X("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:ea(t[0],e).text,color:r}},"handler")}),o({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:mt((e,t)=>{var t=ea(t[0],e),r=(++(e=e.parser).leftrightDepth,e.parseExpression(!1)),i=(--e.leftrightDepth,e.expect("\\right",!1),Yn(e.parseFunction(),"leftright-right"));return{type:"leftright",mode:e.mode,body:r,left:t.text,right:i.delim,rightColor:i.color}},"handler"),htmlBuilder:mt((e,t)=>{ta(e);for(var r,i=so(e.body,t,!0,["mopen","mclose"]),n=0,a=0,s=!1,o=0;o<i.length;o++)i[o].isMiddle?s=!0:(n=Math.max(i[o].height,n),a=Math.max(i[o].depth,a));if(n*=t.sizeMultiplier,a*=t.sizeMultiplier,r="."===e.left?uo(t,["mopen"]):dl.leftRightDelim(e.left,n,a,t,e.mode,["mopen"]),i.unshift(r),s)for(var l=1;l<i.length;l++){var h=i[l].isMiddle;h&&(i[l]=dl.leftRightDelim(h.delim,n,a,h.options,e.mode,[]))}return r="."===e.right?uo(t,["mclose"]):(r=e.rightColor?t.withColor(e.rightColor):t,dl.leftRightDelim(e.right,n,a,r,e.mode,["mclose"])),i.push(r),Z.makeSpan(["minner"],i,t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>{ta(e);var r,t=xo(e.body,t);return"."!==e.left&&((r=new C.MathNode("mo",[mo(e.left,e.mode)])).setAttribute("fence","true"),t.unshift(r)),"."!==e.right&&((r=new C.MathNode("mo",[mo(e.right,e.mode)])).setAttribute("fence","true"),e.rightColor&&r.setAttribute("mathcolor",e.rightColor),t.push(r)),yo(t)},"mathmlBuilder")}),o({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:mt((e,t)=>{if(t=ea(t[0],e),e.parser.leftrightDepth)return{type:"middle",mode:e.parser.mode,delim:t.text};throw new X("\\middle without preceding \\left",t)},"handler"),htmlBuilder:mt((e,t)=>{var r;return"."===e.delim?r=uo(t,[]):(r=dl.sizedDelim(e.delim,1,t,e.mode,[]),e={delim:e.delim,options:t},r.isMiddle=e),r},"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e="\\vert"===e.delim||"|"===e.delim?mo("|","text"):mo(e.delim,e.mode),(e=new C.MathNode("mo",[e])).setAttribute("fence","true"),e.setAttribute("lspace","0.05em"),e.setAttribute("rspace","0.05em"),e),"mathmlBuilder")}),Nl=mt((e,t)=>{var r,i,n,a,s,o=Z.wrapFragment(po(e.body,t),t),l=e.label.slice(1),h=t.sizeMultiplier,c=0,u=fa.isCharacterBox(e.body);return"sout"===l?((r=Z.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/h,c=-.5*t.fontMetrics().xHeight):"phase"===l?(a=Za({number:.6,unit:"pt"},t),s=Za({number:.35,unit:"ex"},t),h/=t.havingBaseSizing().sizeMultiplier,i=o.height+o.depth+a+s,o.style.paddingLeft=K(i/2+a),h=Math.floor(1e3*i*h),n=Da(h),n=new ls([new hs("phase",n)],{width:"400em",height:K(h/1e3),viewBox:"0 0 400000 "+h,preserveAspectRatio:"xMinYMin slice"}),(r=Z.makeSvgSpan(["hide-tail"],[n],t)).style.height=K(i),c=o.depth+a+s):(/cancel/.test(l)?u||o.classes.push("cancel-pad"):"angl"===l?o.classes.push("anglpad"):o.classes.push("boxpad"),i=n=h=0,n=/box/.test(l)?(i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),h=t.fontMetrics().fboxsep+("colorbox"===l?0:i)):"angl"===l?(h=4*(i=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),Math.max(0,.25-o.depth)):h=u?.2:0,r=Lo.encloseSpan(o,l,h,n,t),/fbox|boxed|fcolorbox/.test(l)?(r.style.borderStyle="solid",r.style.borderWidth=K(i)):"angl"===l&&.049!==i&&(r.style.borderTopWidth=K(i),r.style.borderRightWidth=K(i)),c=o.depth+n,e.backgroundColor&&(r.style.backgroundColor=e.backgroundColor,e.borderColor)&&(r.style.borderColor=e.borderColor)),s=e.backgroundColor?Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:c},{type:"elem",elem:o,shift:0}]},t):(a=/cancel|phase/.test(l)?["svg-align"]:[],Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:r,shift:c,wrapperClasses:a}]},t)),/cancel/.test(l)&&(s.height=o.height,s.depth=o.depth),/cancel/.test(l)&&!u?Z.makeSpan(["mord","cancel-lap"],[s],t):Z.makeSpan(["mord"],[s],t)},"htmlBuilder$7"),Bl=mt((e,t)=>{var r=new C.MathNode(-1<e.label.indexOf("colorbox")?"mpadded":"menclose",[To(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":var i=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm;r.setAttribute("width","+"+2*i+"pt"),r.setAttribute("height","+"+2*i+"pt"),r.setAttribute("lspace",i+"pt"),r.setAttribute("voffset",i+"pt"),"\\fcolorbox"===e.label&&(i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),r.setAttribute("style","border: "+i+"em solid "+String(e.borderColor)));break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r},"mathmlBuilder$6"),o({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:e,funcName:i}=e,n=Yn(t[0],"color-token").color;return{type:"enclose",mode:e.mode,label:i,backgroundColor:n,body:t[1]}},htmlBuilder:Nl,mathmlBuilder:Bl}),o({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:e,funcName:i}=e,n=Yn(t[0],"color-token").color,a=Yn(t[1],"color-token").color;return{type:"enclose",mode:e.mode,label:i,backgroundColor:a,borderColor:n,body:t[2]}},htmlBuilder:Nl,mathmlBuilder:Bl}),o({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){return{type:"enclose",mode:(e=e.parser).mode,label:"\\fbox",body:t[0]}}}),o({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:r}=e,t=t[0];return{type:"enclose",mode:e.mode,label:r,body:t}},htmlBuilder:Nl,mathmlBuilder:Bl}),o({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){return{type:"enclose",mode:(e=e.parser).mode,label:"\\angl",body:t[0]}}}),fl={},mt(ra,"defineEnvironment"),ml={},mt(l,"defineMacro"),mt(ia,"getHLines"),yl=mt(e=>{if(!e.parser.settings.displayMode)throw new X("{"+e.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext"),mt(na,"getAutoTag"),mt(aa,"parseArray"),mt(sa,"dCellStyle"),m=mt(function(e,t){var r=e.body.length,B=e.hLinesBeforeRow,i=0,n=new Array(r),a=[],s=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),o=1/t.fontMetrics().ptPerEm,l=5*o,h=(e.colSeparationType&&"small"===e.colSeparationType&&(l=t.havingStyle(Ea.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778),"CD"===e.colSeparationType?Za({number:3,unit:"ex"},t):12*o),P=3*o,$=.7*(o=e.arraystretch*h),F=.3*o,c=0;function u(e){for(var t=0;t<e.length;++t)0<t&&(c+=.25),a.push({pos:c,isDashed:e[t]})}for(mt(u,"setHLinePos"),u(B[0]),D=0;D<e.body.length;++D){for(var d=e.body[D],p=$,g=F,f=(i<d.length&&(i=d.length),new Array(d.length)),m=0;m<d.length;++m){var y=po(d[m],t);g<y.depth&&(g=y.depth),p<y.height&&(p=y.height),f[m]=y}var z=e.rowGaps[D],v=0;z&&0<(v=Za(z,t))&&(g<(v+=F)&&(g=v),v=0),e.addJot&&(g+=P),f.height=p,f.depth=g,c+=p,f.pos=c,c+=g+v,n[D]=f,u(B[D+1])}var x,b,T=c/2+t.fontMetrics().axisHeight,k=e.cols||[],w=[],C=[];if(e.tags&&e.tags.some(e=>e))for(D=0;D<r;++D){var E=n[D],q=E.pos-T,S=e.tags[D],_=void 0;(_=!0===S?Z.makeSpan(["eqn-num"],[],t):!1===S?Z.makeSpan([],[],t):Z.makeSpan([],so(S,t,!0),t)).depth=E.depth,_.height=E.height,C.push({type:"elem",elem:_,shift:q})}for(b=m=0;m<i||b<k.length;++m,++b){for(var A=k[b]||{},W=!0;"separator"===A.type;){if(W||((x=Z.makeSpan(["arraycolsep"],[])).style.width=K(t.fontMetrics().doubleRuleSep),w.push(x)),"|"!==A.separator&&":"!==A.separator)throw new X("Invalid separator type: "+A.separator);var L="|"===A.separator?"solid":"dashed",R=Z.makeSpan(["vertical-separator"],[],t);R.style.height=K(c),R.style.borderRightWidth=K(s),R.style.borderRightStyle=L,R.style.margin="0 "+K(-s/2),(L=c-T)&&(R.style.verticalAlign=K(-L)),w.push(R),A=k[++b]||{},W=!1}if(!(i<=m)){for(var I=void 0,N=((0<m||e.hskipBeforeAndAfter)&&0!==(I=fa.deflt(A.pregap,l))&&((x=Z.makeSpan(["arraycolsep"],[])).style.width=K(I),w.push(x)),[]),D=0;D<r;++D){var U,M=n[D],O=M[m];O&&(U=M.pos-T,O.depth=M.depth,O.height=M.height,N.push({type:"elem",elem:O,shift:U}))}N=Z.makeVList({positionType:"individualShift",children:N},t),N=Z.makeSpan(["col-align-"+(A.align||"c")],[N]),w.push(N),(m<i-1||e.hskipBeforeAndAfter)&&0!==(I=fa.deflt(A.postgap,l))&&((x=Z.makeSpan(["arraycolsep"],[])).style.width=K(I),w.push(x))}}if(n=Z.makeSpan(["mtable"],w),0<a.length){for(var G=Z.makeLineSpan("hline",t,s),j=Z.makeLineSpan("hdashline",t,s),V=[{type:"elem",elem:n,shift:0}];0<a.length;){var Y=a.pop(),H=Y.pos-T;V.push(Y.isDashed?{type:"elem",elem:j,shift:H}:{type:"elem",elem:G,shift:H})}n=Z.makeVList({positionType:"individualShift",children:V},t)}return 0===C.length?Z.makeSpan(["mord"],[n],t):(h=Z.makeVList({positionType:"individualShift",children:C},t),h=Z.makeSpan(["tag"],[h],t),Z.makeFragment([n,h]))},"htmlBuilder"),vl={c:"center ",l:"left ",r:"right "},ah=mt(function(e,t){for(var r=[],i=new C.MathNode("mtd",[],["mtr-glue"]),n=new C.MathNode("mtd",[],["mml-eqn-num"]),a=0;a<e.body.length;a++){for(var s=e.body[a],o=[],l=0;l<s.length;l++)o.push(new C.MathNode("mtd",[To(s[l],t)]));e.tags&&e.tags[a]&&(o.unshift(i),o.push(i),e.leqno?o.unshift(n):o.push(n)),r.push(new C.MathNode("mtr",o))}var h=new C.MathNode("mtable",r),c=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0),c=(h.setAttribute("rowspacing",K(c)),""),u="";if(e.cols&&0<e.cols.length){var d=e.cols,p="",g=!1,f=0,m=d.length;"separator"===d[0].type&&(c+="top ",f=1),"separator"===d[d.length-1].type&&(c+="bottom ",--m);for(var y=f;y<m;y++)"align"===d[y].type?(u+=vl[d[y].align],g&&(p+="none "),g=!0):"separator"===d[y].type&&g&&(p+="|"===d[y].separator?"solid ":"dashed ",g=!1);h.setAttribute("columnalign",u.trim()),/[sd]/.test(p)&&h.setAttribute("columnlines",p.trim())}if("align"===e.colSeparationType){for(var v=e.cols||[],x="",b=1;b<v.length;b++)x+=b%2?"0em ":"1em ";h.setAttribute("columnspacing",x.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?h.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?h.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?h.setAttribute("columnspacing","0.5em"):h.setAttribute("columnspacing","1em");for(var T="",k=e.hLinesBeforeRow,c=(c+=0<k[0].length?"left ":"")+(0<k[k.length-1].length?"right ":""),w=1;w<k.length-1;w++)T+=0===k[w].length?"none ":k[w][0]?"dashed ":"solid ";return/[sd]/.test(T)&&h.setAttribute("rowlines",T.trim()),""!==c&&(h=new C.MathNode("menclose",[h])).setAttribute("notation",c.trim()),e.arraystretch&&e.arraystretch<1&&(h=new C.MathNode("mstyle",[h])).setAttribute("scriptlevel","1"),h},"mathmlBuilder"),$l=mt(function(e,t){-1===e.envName.indexOf("ed")&&yl(e);var n,r=[],i=-1<e.envName.indexOf("at")?"alignat":"align",a="split"===e.envName,i=aa(e.parser,{cols:r,addJot:!0,autoTag:a?void 0:na(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:e.parser.settings.leqno},"display"),s=0,o={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var l="",h=0;h<t[0].body.length;h++)l+=Yn(t[0].body[h],"textord").text;n=Number(l),s=2*n}var c=!s;i.body.forEach(function(e){for(var t=1;t<e.length;t+=2){var r=Yn(e[t],"styling");Yn(r.body[0],"ordgroup").body.unshift(o)}if(c)s<e.length&&(s=e.length);else{var i=e.length/2;if(n<i)throw new X("Too many math in a row: expected "+n+", but got "+i,e[0])}});for(var u=0;u<s;++u){var d="r",p=0;u%2==1?d="l":0<u&&c&&(p=1),r[u]={type:"align",align:d,pregap:p,postgap:0}}return i.colSeparationType=c?"align":"alignat",i},"alignedHandler"),ra({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){return t={cols:t=(Xn(t[0])?[t[0]]:Yn(t[0],"ordgroup").body).map(function(e){var t=Hn(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new X("Unknown column alignment: "+t,e)}),hskipBeforeAndAfter:!0,maxNumCols:t.length},aa(e.parser,t,sa(e.envName))},htmlBuilder:m,mathmlBuilder:ah}),ra({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,-1==="lcr".indexOf(r))throw new X("Expected l or c or r",n.nextToken);n.consume(),n.consumeSpaces(),n.expect("]"),n.consume(),i.cols=[{type:"align",align:r}]}}return n=aa(e.parser,i,sa(e.envName)),i=Math.max(0,...n.body.map(e=>e.length)),n.cols=new Array(i).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[n],left:t[0],right:t[1],rightColor:void 0}:n},htmlBuilder:m,mathmlBuilder:ah}),ra({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){return(e=aa(e.parser,{arraystretch:.5},"script")).colSeparationType="small",e},htmlBuilder:m,mathmlBuilder:ah}),ra({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){if(1<(t=(Xn(t[0])?[t[0]]:Yn(t[0],"ordgroup").body).map(function(e){var t=Hn(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new X("Unknown column alignment: "+t,e)})).length)throw new X("{subarray} can contain only one column");if(0<(e=aa(e.parser,{cols:t,hskipBeforeAndAfter:!1,arraystretch:.5},"script")).body.length&&1<e.body[0].length)throw new X("{subarray} can contain only one column");return e},htmlBuilder:m,mathmlBuilder:ah}),ra({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=aa(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},sa(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:-1<e.envName.indexOf("r")?".":"\\{",right:-1<e.envName.indexOf("r")?"\\}":".",rightColor:void 0}},htmlBuilder:m,mathmlBuilder:ah}),ra({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:$l,htmlBuilder:m,mathmlBuilder:ah}),ra({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){["gather","gather*"].includes(e.envName)&&yl(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:na(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return aa(e.parser,t,"display")},htmlBuilder:m,mathmlBuilder:ah}),ra({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:$l,htmlBuilder:m,mathmlBuilder:ah}),ra({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){yl(e);var t={autoTag:na(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return aa(e.parser,t,"display")},htmlBuilder:m,mathmlBuilder:ah}),ra({type:"array",names:["CD"],props:{numArgs:0},handler(e){return yl(e),Jn(e.parser)},htmlBuilder:m,mathmlBuilder:ah}),l("\\nonumber","\\gdef\\@eqnsw{0}"),l("\\notag","\\nonumber"),o({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new X(e.funcName+" valid only within array environment")}}),xl=fl,o({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:e,funcName:r}=e,i=t[0];if("ordgroup"!==i.type)throw new X("Invalid environment name",i);for(var n="",a=0;a<i.body.length;++a)n+=Yn(i.body[a],"textord").text;if("\\begin"!==r)return{type:"environment",mode:e.mode,name:n,nameGroup:i};if(!xl.hasOwnProperty(n))throw new X("No such environment: "+n,i);var t=xl[n],{args:r,optArgs:s}=e.parseArguments("\\begin{"+n+"}",t),o={mode:e.mode,envName:n,parser:e},t=t.handler(o,r,s),o=(e.expect("\\end",!1),e.nextToken);if((r=Yn(e.parseFunction(),"environment")).name!==n)throw new X("Mismatch: \\begin{"+n+"} matched by \\end{"+r.name+"}",o);return t}}),sh=mt((e,t)=>{var r=e.font,t=t.withFont(r);return po(e.body,t)},"htmlBuilder$5"),g=mt((e,t)=>{var r=e.font,t=t.withFont(r);return To(e.body,t)},"mathmlBuilder$4"),bl={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"},o({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:mt((e,t)=>{var{parser:e,funcName:r}=e,t=Js(t[0]);return{type:"font",mode:e.mode,font:(r=r in bl?bl[r]:r).slice(1),body:t}},"handler"),htmlBuilder:sh,mathmlBuilder:g}),o({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:mt((e,t)=>{var e=e.parser,t=t[0],r=fa.isCharacterBox(t);return{type:"mclass",mode:e.mode,mclass:Mo(t),body:[{type:"font",mode:e.mode,font:"boldsymbol",body:t}],isCharacterBox:r}},"handler")}),o({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:mt((e,t)=>{var{parser:e,funcName:r,breakOnTokenText:i}=e,n=e.mode,i=e.parseExpression(!0,i);return{type:"font",mode:n,font:"math"+r.slice(1),body:{type:"ordgroup",mode:e.mode,body:i}}},"handler"),htmlBuilder:sh,mathmlBuilder:g}),Tl=mt((e,t)=>("display"===e?t=t.id>=Ea.SCRIPT.id?t.text():Ea.DISPLAY:"text"===e&&t.size===Ea.DISPLAY.size?t=Ea.TEXT:"script"===e?t=Ea.SCRIPT:"scriptscript"===e&&(t=Ea.SCRIPTSCRIPT),t),"adjustStyle"),kl=mt((e,t)=>{var r,i,n,a,s=Tl(e.size,t.style),o=s.fracNum(),l=s.fracDen(),o=t.havingStyle(o),h=po(e.numer,o,t),c=(e.continued&&(c=8.5/t.fontMetrics().ptPerEm,u=3.5/t.fontMetrics().ptPerEm,h.height=h.height<c?c:h.height,h.depth=h.depth<u?u:h.depth),o=t.havingStyle(l),po(e.denom,o,t)),u=e.hasBarLine?(i=(a=e.barSize?(i=Za(e.barSize,t),Z.makeLineSpan("frac-line",t,i)):Z.makeLineSpan("frac-line",t)).height,a.height):(a=null,i=0,t.fontMetrics().defaultRuleThickness),l=s.size===Ea.DISPLAY.size||"display"===e.size?(r=t.fontMetrics().num1,n=0<i?3*u:7*u,t.fontMetrics().denom1):(n=0<i?(r=t.fontMetrics().num2,u):(r=t.fontMetrics().num3,3*u),t.fontMetrics().denom2),u=a?(u=t.fontMetrics().axisHeight,r-h.depth-(u+.5*i)<n&&(r+=n-(r-h.depth-(u+.5*i))),u-.5*i-(c.height-l)<n&&(l+=n-(u-.5*i-(c.height-l))),Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:l},{type:"elem",elem:a,shift:-(u-.5*i)},{type:"elem",elem:h,shift:-r}]},t)):((a=r-h.depth-(c.height-l))<n&&(r+=.5*(n-a),l+=.5*(n-a)),Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:l},{type:"elem",elem:h,shift:-r}]},t));return o=t.havingStyle(s),u.height*=o.sizeMultiplier/t.sizeMultiplier,u.depth*=o.sizeMultiplier/t.sizeMultiplier,i=s.size===Ea.DISPLAY.size?t.fontMetrics().delim1:(s.size===Ea.SCRIPTSCRIPT.size?t.havingStyle(Ea.SCRIPT):t).fontMetrics().delim2,n=null==e.leftDelim?uo(t,["mopen"]):dl.customSizedDelim(e.leftDelim,i,!0,t.havingStyle(s),e.mode,["mopen"]),a=e.continued?Z.makeSpan([]):null==e.rightDelim?uo(t,["mclose"]):dl.customSizedDelim(e.rightDelim,i,!0,t.havingStyle(s),e.mode,["mclose"]),Z.makeSpan(["mord"].concat(o.sizingClasses(t)),[n,Z.makeSpan(["mfrac"],[u]),a],t)},"htmlBuilder$4"),wl=mt((e,t)=>{var r=new C.MathNode("mfrac",[To(e.numer,t),To(e.denom,t)]),i=(e.hasBarLine?e.barSize&&(i=Za(e.barSize,t),r.setAttribute("linethickness",K(i))):r.setAttribute("linethickness","0px"),Tl(e.size,t.style));return i.size!==t.style.size&&(r=new C.MathNode("mstyle",[r]),t=i.size===Ea.DISPLAY.size?"true":"false",r.setAttribute("displaystyle",t),r.setAttribute("scriptlevel","0")),null!=e.leftDelim||null!=e.rightDelim?(i=[],null!=e.leftDelim&&((t=new C.MathNode("mo",[new C.TextNode(e.leftDelim.replace("\\",""))])).setAttribute("fence","true"),i.push(t)),i.push(r),null!=e.rightDelim&&((t=new C.MathNode("mo",[new C.TextNode(e.rightDelim.replace("\\",""))])).setAttribute("fence","true"),i.push(t)),yo(i)):r},"mathmlBuilder$3"),o({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:mt((e,t)=>{var r,{parser:e,funcName:i}=e,n=t[0],t=t[1],a=null,s=null,o="auto";switch(i){case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,a="(",s=")";break;case"\\\\bracefrac":r=!1,a="\\{",s="\\}";break;case"\\\\brackfrac":r=!1,a="[",s="]";break;default:throw new Error("Unrecognized genfrac command")}switch(i){case"\\dfrac":case"\\dbinom":o="display";break;case"\\tfrac":case"\\tbinom":o="text"}return{type:"genfrac",mode:e.mode,continued:!1,numer:n,denom:t,hasBarLine:r,leftDelim:a,rightDelim:s,size:o,barSize:null}},"handler"),htmlBuilder:kl,mathmlBuilder:wl}),o({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:mt((e,t)=>{var e=e.parser,r=t[0];return{type:"genfrac",mode:e.mode,continued:!0,numer:r,denom:t[1],hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}},"handler")}),o({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:e,funcName:r,token:i}=e;switch(r){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:t,token:i}}}),Cl=["display","text","script","scriptscript"],El=mt(function(e){var t=null;return 0<e.length?"."===(t=e)?null:e:t},"delimFromValue"),o({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var r,e=e.parser,i=t[4],n=t[5],a="atom"===(a=Js(t[0])).type&&"open"===a.family?El(a.text):null,s="atom"===(s=Js(t[1])).type&&"close"===s.family?El(s.text):null,o=null,l=!!(l=Yn(t[2],"size")).isBlank||0<(o=l.value).number,h="auto";return"ordgroup"===(t=t[3]).type?0<t.body.length&&(r=Yn(t.body[0],"textord"),h=Cl[Number(r.text)]):(t=Yn(t,"textord"),h=Cl[Number(t.text)]),{type:"genfrac",mode:e.mode,numer:i,denom:n,continued:!1,hasBarLine:l,barSize:o,leftDelim:a,rightDelim:s,size:h}},htmlBuilder:kl,mathmlBuilder:wl}),o({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:e,token:r}=e;return{type:"infix",mode:e.mode,replaceWith:"\\\\abovefrac",size:Yn(t[0],"size").value,token:r}}}),o({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:mt((e,t)=>{var e=e.parser,r=t[0],i=ga(Yn(t[1],"infix").size),t=t[2],n=0<i.number;return{type:"genfrac",mode:e.mode,numer:r,denom:t,continued:!1,hasBarLine:n,barSize:i,leftDelim:null,rightDelim:null,size:"auto"}},"handler"),htmlBuilder:kl,mathmlBuilder:wl}),Sl=mt((e,t)=>{var r,i,n=t.style,n="supsub"===e.type?(r=e.sup?po(e.sup,t.havingStyle(n.sup()),t):po(e.sub,t.havingStyle(n.sub()),t),Yn(e.base,"horizBrace")):Yn(e,"horizBrace"),e=po(n.base,t.havingBaseStyle(Ea.DISPLAY)),a=Lo.svgSpan(n,t);return(n.isOver?(i=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:.1},{type:"elem",elem:a}]},t)).children[0].children[0].children[1]:(i=Z.makeVList({positionType:"bottom",positionData:e.depth+.1+a.height,children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:e}]},t)).children[0].children[0].children[0]).classes.push("svg-align"),r&&(a=Z.makeSpan(["mord",n.isOver?"mover":"munder"],[i],t),i=n.isOver?Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:r}]},t):Z.makeVList({positionType:"bottom",positionData:a.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:a}]},t)),Z.makeSpan(["mord",n.isOver?"mover":"munder"],[i],t)},"htmlBuilder$3"),f=mt((e,t)=>{var r=Lo.mathMLnode(e.label);return new C.MathNode(e.isOver?"mover":"munder",[To(e.base,t),r])},"mathmlBuilder$2"),o({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:r}=e;return{type:"horizBrace",mode:e.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:Sl,mathmlBuilder:f}),o({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:mt((e,t)=>{var e=e.parser,r=t[1],t=Yn(t[0],"url").url;return e.settings.isTrusted({command:"\\href",url:t})?{type:"href",mode:e.mode,href:t,body:eo(r)}:e.formatUnsupportedCmd("\\href")},"handler"),htmlBuilder:mt((e,t)=>{var r=so(e.body,t,!1);return Z.makeAnchor(e.href,[],r,t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>((t=(t=bo(e.body,t))instanceof go?t:new go("mrow",[t])).setAttribute("href",e.href),t),"mathmlBuilder")}),o({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:mt((e,t)=>{var e=e.parser,r=Yn(t[0],"url").url;if(!e.settings.isTrusted({command:"\\url",url:r}))return e.formatUnsupportedCmd("\\url");for(var i=[],n=0;n<r.length;n++){var a=r[n];i.push({type:"textord",mode:"text",text:"~"===a?"\\textasciitilde":a})}return t={type:"text",mode:e.mode,font:"\\texttt",body:i},{type:"href",mode:e.mode,href:r,body:eo(t)}},"handler")}),o({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){return{type:"hbox",mode:(e=e.parser).mode,body:eo(t[0])}},htmlBuilder(e,t){return e=so(e.body,t,!1),Z.makeFragment(e)},mathmlBuilder(e,t){return new C.MathNode("mrow",xo(e.body,t))}}),o({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:mt((e,t)=>{var{parser:e,funcName:r}=e,i=Yn(t[0],"raw").string,t=t[1];e.settings.strict&&e.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var n,a={};switch(r){case"\\htmlClass":n={command:"\\htmlClass",class:a.class=i};break;case"\\htmlId":n={command:"\\htmlId",id:a.id=i};break;case"\\htmlStyle":n={command:"\\htmlStyle",style:a.style=i};break;case"\\htmlData":for(var s=i.split(","),o=0;o<s.length;o++){var l=s[o].split("=");if(2!==l.length)throw new X("Error parsing key-value for \\htmlData");a["data-"+l[0].trim()]=l[1].trim()}n={command:"\\htmlData",attributes:a};break;default:throw new Error("Unrecognized html command")}return e.settings.isTrusted(n)?{type:"html",mode:e.mode,attributes:a,body:eo(t)}:e.formatUnsupportedCmd(r)},"handler"),htmlBuilder:mt((e,t)=>{var r,i=so(e.body,t,!1),n=["enclosing"],a=(e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/)),Z.makeSpan(n,i,t));for(r in e.attributes)"class"!==r&&e.attributes.hasOwnProperty(r)&&a.setAttribute(r,e.attributes[r]);return a},"htmlBuilder"),mathmlBuilder:mt((e,t)=>bo(e.body,t),"mathmlBuilder")}),o({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:mt((e,t)=>({type:"htmlmathml",mode:(e=e.parser).mode,html:eo(t[0]),mathml:eo(t[1])}),"handler"),htmlBuilder:mt((e,t)=>(e=so(e.html,t,!1),Z.makeFragment(e)),"htmlBuilder"),mathmlBuilder:mt((e,t)=>bo(e.mathml,t),"mathmlBuilder")}),_l=mt(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 X("Invalid size: '"+e+"' in \\includegraphics");if(e={number:+(t[1]+t[2]),unit:t[3]},Ka(e))return e;throw new X("Invalid unit: '"+e.unit+"' in \\includegraphics.")},"sizeData"),o({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:mt((e,t,r)=>{var e=e.parser,i={number:0,unit:"em"},n={number:.9,unit:"em"},a={number:0,unit:"em"},s="";if(r[0])for(var o=Yn(r[0],"raw").string.split(","),l=0;l<o.length;l++){var h=o[l].split("=");if(2===h.length){var c=h[1].trim();switch(h[0].trim()){case"alt":s=c;break;case"width":i=_l(c);break;case"height":n=_l(c);break;case"totalheight":a=_l(c);break;default:throw new X("Invalid key: '"+h[0]+"' in \\includegraphics.")}}}return r=Yn(t[0],"url").url,""===s&&(s=(s=(s=r).replace(/^.*[\\/]/,"")).substring(0,s.lastIndexOf("."))),e.settings.isTrusted({command:"\\includegraphics",url:r})?{type:"includegraphics",mode:e.mode,alt:s,width:i,height:n,totalheight:a,src:r}:e.formatUnsupportedCmd("\\includegraphics")},"handler"),htmlBuilder:mt((e,t)=>{var r=Za(e.height,t),i=0,n=(0<e.totalheight.number&&(i=Za(e.totalheight,t)-r),0),t=(0<e.width.number&&(n=Za(e.width,t)),{height:K(r+i)});return 0<n&&(t.width=K(n)),0<i&&(t.verticalAlign=K(-i)),(n=new as(e.src,e.alt,t)).height=r,n.depth=i,n},"htmlBuilder"),mathmlBuilder:mt((e,t)=>{var r=new C.MathNode("mglyph",[]),i=(r.setAttribute("alt",e.alt),Za(e.height,t)),n=0;return 0<e.totalheight.number&&(n=Za(e.totalheight,t)-i,r.setAttribute("valign",K(-n))),r.setAttribute("height",K(i+n)),0<e.width.number&&(i=Za(e.width,t),r.setAttribute("width",K(i))),r.setAttribute("src",e.src),r},"mathmlBuilder")}),o({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var r,i,{parser:e,funcName:n}=e,t=Yn(t[0],"size");return e.settings.strict&&(r="m"===n[1],i="mu"===t.value.unit,r?(i||e.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+t.value.unit+" units"),"math"!==e.mode&&e.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):i&&e.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")),{type:"kern",mode:e.mode,dimension:t.value}},htmlBuilder(e,t){return Z.makeGlue(e.dimension,t)},mathmlBuilder(e,t){return e=Za(e.dimension,t),new C.SpaceNode(e)}}),o({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:mt((e,t)=>{var{parser:e,funcName:r}=e,t=t[0];return{type:"lap",mode:e.mode,alignment:r.slice(5),body:t}},"handler"),htmlBuilder:mt((e,t)=>{var r="clap"===e.alignment?(r=Z.makeSpan([],[po(e.body,t)]),Z.makeSpan(["inner"],[r],t)):Z.makeSpan(["inner"],[po(e.body,t)]),i=Z.makeSpan(["fix"],[]),e=Z.makeSpan([e.alignment],[r,i],t);return(r=Z.makeSpan(["strut"])).style.height=K(e.height+e.depth),e.depth&&(r.style.verticalAlign=K(-e.depth)),e.children.unshift(r),e=Z.makeSpan(["thinbox"],[e],t),Z.makeSpan(["mord","vbox"],[e],t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>(t=new C.MathNode("mpadded",[To(e.body,t)]),"rlap"!==e.alignment&&(e="llap"===e.alignment?"-1":"-0.5",t.setAttribute("lspace",e+"width")),t.setAttribute("width","0px"),t),"mathmlBuilder")}),o({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:e,parser:r}=e,i=r.mode,e=(r.switchMode("math"),"\\("===e?"\\)":"$"),n=r.parseExpression(!1,e);return r.expect(e),r.switchMode(i),{type:"styling",mode:r.mode,style:"text",body:n}}}),o({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new X("Mismatched "+e.funcName)}}),Al=mt((e,t)=>{switch(t.style.size){case Ea.DISPLAY.size:return e.display;case Ea.TEXT.size:return e.text;case Ea.SCRIPT.size:return e.script;case Ea.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}},"chooseMathStyle"),o({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:mt((e,t)=>({type:"mathchoice",mode:(e=e.parser).mode,display:eo(t[0]),text:eo(t[1]),script:eo(t[2]),scriptscript:eo(t[3])}),"handler"),htmlBuilder:mt((e,t)=>(e=Al(e,t),e=so(e,t,!1),Z.makeFragment(e)),"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=Al(e,t),bo(e,t)),"mathmlBuilder")}),Ll=mt((e,t,r,i,n,a,s)=>{e=Z.makeSpan([],[e]);var o,l,h=r&&fa.isCharacterBox(r);if(t&&(o={elem:t=po(t,i.havingStyle(n.sup()),i),kern:Math.max(i.fontMetrics().bigOpSpacing1,i.fontMetrics().bigOpSpacing3-t.depth)}),r&&(l={elem:t=po(r,i.havingStyle(n.sub()),i),kern:Math.max(i.fontMetrics().bigOpSpacing2,i.fontMetrics().bigOpSpacing4-t.height)}),o&&l)var r=i.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+s,c=Z.makeVList({positionType:"bottom",positionData:r,children:[{type:"kern",size:i.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:K(-a)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:o.kern},{type:"elem",elem:o.elem,marginLeft:K(a)},{type:"kern",size:i.fontMetrics().bigOpSpacing5}]},i);else if(l)n=e.height-s,c=Z.makeVList({positionType:"top",positionData:n,children:[{type:"kern",size:i.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:K(-a)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},i);else{if(!o)return e;t=e.depth+s,c=Z.makeVList({positionType:"bottom",positionData:t,children:[{type:"elem",elem:e},{type:"kern",size:o.kern},{type:"elem",elem:o.elem,marginLeft:K(a)},{type:"kern",size:i.fontMetrics().bigOpSpacing5}]},i)}return r=[c],l&&0!==a&&!h&&((n=Z.makeSpan(["mspace"],[],i)).style.marginRight=K(a),r.unshift(n)),Z.makeSpan(["mop","op-limits"],r,i)},"assembleSupSub"),Rl=["\\smallint"],Il=mt((e,t)=>{var r,i,n,a=!1,s=("supsub"===e.type?(r=e.sup,i=e.sub,n=Yn(e.base,"op"),a=!0):n=Yn(e,"op"),!1);if((e=t.style).size===Ea.DISPLAY.size&&n.symbol&&!Rl.includes(n.name)&&(s=!0),n.symbol){var o,l=s?"Size2-Regular":"Size1-Regular",h="";"\\oiint"!==n.name&&"\\oiiint"!==n.name||(h=n.name.slice(1),n.name="oiint"===h?"\\iint":"\\iiint"),l=Z.makeSymbol(n.name,l,"math",t,["mop","op-symbol",s?"large-op":"small-op"]),0<h.length&&(o=l.italic,c=Z.staticSvg(h+"Size"+(s?"2":"1"),t),l=Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:c,shift:s?.08:0}]},t),n.name="\\"+h,l.classes.unshift("mop"),l.italic=o)}else if(n.body){var c=so(n.body,t,!0);1===c.length&&c[0]instanceof os?(l=c[0]).classes[0]="mop":l=Z.makeSpan(["mop"],c,t)}else{for(var u=[],d=1;d<n.name.length;d++)u.push(Z.mathsym(n.name[d],n.mode,t));l=Z.makeSpan(["mop"],u,t)}return h=s=0,(l instanceof os||"\\oiint"===n.name||"\\oiiint"===n.name)&&!n.suppressBaseShift&&(s=(l.height-l.depth)/2-t.fontMetrics().axisHeight,h=l.italic),a?Ll(l,r,i,t,e,h,s):(s&&(l.style.position="relative",l.style.top=K(s)),l)},"htmlBuilder$2"),Nl=mt((e,t)=>{var r;return e.symbol?(r=new go("mo",[mo(e.name,e.mode)]),Rl.includes(e.name)&&r.setAttribute("largeop","false")):r=e.body?new go("mo",xo(e.body,t)):(r=new go("mi",[new fo(e.name.slice(1))]),t=new go("mo",[mo("","text")]),e.parentIsSupSub?new go("mrow",[r,t]):Gn([r,t])),r},"mathmlBuilder$1"),Dl={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","":"\\bigvee","⋂":"\\bigcap","":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"},o({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","","⋂","","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:mt((e,t)=>{var{parser:e,funcName:r}=e;return 1===r.length&&(r=Dl[r]),{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},"handler"),htmlBuilder:Il,mathmlBuilder:Nl}),o({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:mt((e,t)=>(e=e.parser,t=t[0],{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:eo(t)}),"handler"),htmlBuilder:Il,mathmlBuilder:Nl}),Ml={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"},o({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:e,funcName:t}=e;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Il,mathmlBuilder:Nl}),o({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:e,funcName:t}=e;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Il,mathmlBuilder:Nl}),o({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:e,funcName:t}=e;return 1===t.length&&(t=Ml[t]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:t}},htmlBuilder:Il,mathmlBuilder:Nl}),Ol=mt((e,t)=>{var r,i,n,a,s=!1;if("supsub"===e.type?(r=e.sup,i=e.sub,n=Yn(e.base,"operatorname"),s=!0):n=Yn(e,"operatorname"),0<n.body.length){for(var e=n.body.map(e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),o=so(e,t.withFont("mathrm"),!0),l=0;l<o.length;l++){var h=o[l];h instanceof os&&(h.text=h.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}a=Z.makeSpan(["mop"],o,t)}else a=Z.makeSpan(["mop"],[],t);return s?Ll(a,r,i,t,t.style,0,0):a},"htmlBuilder$1"),Bl=mt((e,t)=>{for(var r=xo(e.body,t.withFont("mathrm")),i=!0,n=0;n<r.length;n++){var a=r[n];if(!(a instanceof C.SpaceNode))if(a instanceof C.MathNode)switch(a.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var s=a.children[0];1===a.children.length&&s instanceof C.TextNode?s.text=s.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):i=!1;break;default:i=!1}else i=!1}i&&(t=r.map(e=>e.toText()).join(""),r=[new C.TextNode(t)]),(t=new C.MathNode("mi",r)).setAttribute("mathvariant","normal");var o=new C.MathNode("mo",[mo("","text")]);return e.parentIsSupSub?new C.MathNode("mrow",[t,o]):C.newDocumentFragment([t,o])},"mathmlBuilder"),o({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:mt((e,t)=>{var{parser:e,funcName:r}=e,t=t[0];return{type:"operatorname",mode:e.mode,body:eo(t),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},"handler"),htmlBuilder:Ol,mathmlBuilder:Bl}),l("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),qn({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Z.makeFragment(so(e.body,t,!1)):Z.makeSpan(["mord"],so(e.body,t,!0),t)},mathmlBuilder(e,t){return bo(e.body,t,!0)}}),o({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){return e=e.parser,t=t[0],{type:"overline",mode:e.mode,body:t}},htmlBuilder(e,t){var e=po(e.body,t.havingCrampedStyle()),r=Z.makeLineSpan("overline-line",t),i=t.fontMetrics().defaultRuleThickness,e=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:3*i},{type:"elem",elem:r},{type:"kern",size:i}]},t);return Z.makeSpan(["mord","overline"],[e],t)},mathmlBuilder(e,t){var r=new C.MathNode("mo",[new C.TextNode("‾")]);return r.setAttribute("stretchy","true"),(e=new C.MathNode("mover",[To(e.body,t),r])).setAttribute("accent","true"),e}}),o({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:mt((e,t)=>(e=e.parser,t=t[0],{type:"phantom",mode:e.mode,body:eo(t)}),"handler"),htmlBuilder:mt((e,t)=>(e=so(e.body,t.withPhantom(),!1),Z.makeFragment(e)),"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=xo(e.body,t),new C.MathNode("mphantom",e)),"mathmlBuilder")}),o({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:mt((e,t)=>(e=e.parser,t=t[0],{type:"hphantom",mode:e.mode,body:t}),"handler"),htmlBuilder:mt((e,t)=>{var r=Z.makeSpan([],[po(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var i=0;i<r.children.length;i++)r.children[i].height=0,r.children[i].depth=0;return r=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t),Z.makeSpan(["mord"],[r],t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=xo(eo(e.body),t),t=new C.MathNode("mphantom",e),(e=new C.MathNode("mpadded",[t])).setAttribute("height","0px"),e.setAttribute("depth","0px"),e),"mathmlBuilder")}),o({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:mt((e,t)=>(e=e.parser,t=t[0],{type:"vphantom",mode:e.mode,body:t}),"handler"),htmlBuilder:mt((e,t)=>{var e=Z.makeSpan(["inner"],[po(e.body,t.withPhantom())]),r=Z.makeSpan(["fix"],[]);return Z.makeSpan(["mord","rlap"],[e,r],t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=xo(eo(e.body),t),t=new C.MathNode("mphantom",e),(e=new C.MathNode("mpadded",[t])).setAttribute("width","0px"),e),"mathmlBuilder")}),o({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var e=e.parser,r=Yn(t[0],"size").value;return{type:"raisebox",mode:e.mode,dy:r,body:t[1]}},htmlBuilder(e,t){var r=po(e.body,t),e=Za(e.dy,t);return Z.makeVList({positionType:"shift",positionData:-e,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){return t=new C.MathNode("mpadded",[To(e.body,t)]),e=e.dy.number+e.dy.unit,t.setAttribute("voffset",e),t}}),o({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){return{type:"internal",mode:(e=e.parser).mode}}}),o({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var e=e.parser,r=r[0],i=Yn(t[0],"size"),t=Yn(t[1],"size");return{type:"rule",mode:e.mode,shift:r&&Yn(r,"size").value,width:i.value,height:t.value}},htmlBuilder(e,t){var r=Z.makeSpan(["mord","rule"],[],t),i=Za(e.width,t),n=Za(e.height,t),e=e.shift?Za(e.shift,t):0;return r.style.borderRightWidth=K(i),r.style.borderTopWidth=K(n),r.style.bottom=K(e),r.width=i,r.height=n+e,r.depth=-e,r.maxFontSize=1.125*n*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=Za(e.width,t),i=Za(e.height,t),e=e.shift?Za(e.shift,t):0,t=t.color&&t.getColor()||"black",n=new C.MathNode("mspace"),t=(n.setAttribute("mathbackground",t),n.setAttribute("width",K(r)),n.setAttribute("height",K(i)),new C.MathNode("mpadded",[n]));return 0<=e?t.setAttribute("height",K(e)):(t.setAttribute("height",K(e)),t.setAttribute("depth",K(-e))),t.setAttribute("voffset",K(e)),t}}),mt(oa,"sizingGroup"),Pl=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],$l=mt((e,t)=>{var r=t.havingSize(e.size);return oa(e.body,r,t)},"htmlBuilder"),o({type:"sizing",names:Pl,props:{numArgs:0,allowedInText:!0},handler:mt((e,t)=>{var{breakOnTokenText:e,funcName:r,parser:i}=e,e=i.parseExpression(!1,e);return{type:"sizing",mode:i.mode,size:Pl.indexOf(r)+1,body:e}},"handler"),htmlBuilder:$l,mathmlBuilder:mt((e,t)=>(t=t.havingSize(e.size),e=xo(e.body,t),(e=new C.MathNode("mstyle",e)).setAttribute("mathsize",K(t.sizeMultiplier)),e),"mathmlBuilder")}),o({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:mt((e,t,r)=>{var e=e.parser,i=!1,n=!1,a=r[0]&&Yn(r[0],"ordgroup");if(a)for(var s,o=0;o<a.body.length;++o)if("t"===(s=a.body[o].text))i=!0;else{if("b"!==s){n=i=!1;break}n=!0}else n=i=!0;return r=t[0],{type:"smash",mode:e.mode,body:r,smashHeight:i,smashDepth:n}},"handler"),htmlBuilder:mt((e,t)=>{var r=Z.makeSpan([],[po(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(var i=0;i<r.children.length;i++)r.children[i].height=0;if(e.smashDepth&&(r.depth=0,r.children))for(var n=0;n<r.children.length;n++)r.children[n].depth=0;return e=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t),Z.makeSpan(["mord"],[e],t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>(t=new C.MathNode("mpadded",[To(e.body,t)]),e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t),"mathmlBuilder")}),o({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){return e=e.parser,r=r[0],t=t[0],{type:"sqrt",mode:e.mode,body:t,index:r}},htmlBuilder(e,t){0===(r=po(e.body,t.havingCrampedStyle())).height&&(r.height=t.fontMetrics().xHeight);var r=Z.wrapFragment(r,t),i=n=t.fontMetrics().defaultRuleThickness,i=n+(t.style.id<Ea.TEXT.id?t.fontMetrics().xHeight:i)/4,n=r.height+r.depth+i+n,{span:n,ruleWidth:a,advanceWidth:s}=dl.sqrtImage(n,t),o=((o=n.height-a)>r.height+r.depth+i&&(i=(i+o-r.height-r.depth)/2),n.height-r.height-i-a),i=(r.style.paddingLeft=K(s),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+o)},{type:"elem",elem:n},{type:"kern",size:a}]},t));return e.index?(s=t.havingStyle(Ea.SCRIPTSCRIPT),r=po(e.index,s,t),o=.6*(i.height-i.depth),n=Z.makeVList({positionType:"shift",positionData:-o,children:[{type:"elem",elem:r}]},t),a=Z.makeSpan(["root"],[n]),Z.makeSpan(["mord","sqrt"],[a,i],t)):Z.makeSpan(["mord","sqrt"],[i],t)},mathmlBuilder(e,t){var{body:e,index:r}=e;return r?new C.MathNode("mroot",[To(e,t),To(r,t)]):new C.MathNode("msqrt",[To(e,t)])}}),Fl={display:Ea.DISPLAY,text:Ea.TEXT,script:Ea.SCRIPT,scriptscript:Ea.SCRIPTSCRIPT},o({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:e,funcName:r,parser:i}=e,e=i.parseExpression(!0,e),r=r.slice(1,r.length-5);return{type:"styling",mode:i.mode,style:r,body:e}},htmlBuilder(e,t){var r=Fl[e.style],r=t.havingStyle(r).withFont("");return oa(e.body,r,t)},mathmlBuilder(e,t){var r=Fl[e.style],t=t.havingStyle(r),r=xo(e.body,t),t=new C.MathNode("mstyle",r),r={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return t.setAttribute("scriptlevel",r[0]),t.setAttribute("displaystyle",r[1]),t}}),zl=mt(function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===Ea.DISPLAY.size||r.alwaysHandleSupSub)?Il:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===Ea.DISPLAY.size||r.limits)?Ol:null:"accent"===r.type?fa.isCharacterBox(r.base)?Ro:null:"horizBrace"===r.type&&!e.sub===r.isOver?Sl:null:null},"htmlBuilderDelegate"),qn({type:"supsub",htmlBuilder(e,t){if(a=zl(e,t))return a(e,t);var r,i,n,{base:a,sup:s,sub:o}=e,l=po(a,t),h=t.fontMetrics(),c=0,u=0,a=a&&fa.isCharacterBox(a),o=(s&&(n=t.havingStyle(t.style.sup()),r=po(s,n,t),a||(c=l.height-n.fontMetrics().supDrop*n.sizeMultiplier/t.sizeMultiplier)),o&&(s=t.havingStyle(t.style.sub()),i=po(o,s,t),a||(u=l.depth+s.fontMetrics().subDrop*s.sizeMultiplier/t.sizeMultiplier)),n=t.style===Ea.DISPLAY?h.sup1:t.style.cramped?h.sup3:h.sup2,t.sizeMultiplier),a=K(.5/h.ptPerEm/o),s=null;if(i&&(o=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name),l instanceof os||o)&&(s=K(-l.italic)),r&&i){c=Math.max(c,n,r.depth+.25*h.xHeight),u=Math.max(u,h.sub2),e=4*h.defaultRuleThickness,c-r.depth-(i.height-u)<e&&(u=e-(c-r.depth)+i.height,0<(o=.8*h.xHeight-(c-r.depth)))&&(c+=o,u-=o);var d=Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u,marginRight:a,marginLeft:s},{type:"elem",elem:r,shift:-c,marginRight:a}]},t)}else if(i)u=Math.max(u,h.sub1,i.height-.8*h.xHeight),d=Z.makeVList({positionType:"shift",positionData:u,children:[{type:"elem",elem:i,marginLeft:s,marginRight:a}]},t);else{if(!r)throw new Error("supsub must have either sup or sub.");c=Math.max(c,n,r.depth+.25*h.xHeight),d=Z.makeVList({positionType:"shift",positionData:-c,children:[{type:"elem",elem:r,marginRight:a}]},t)}return e=co(l,"right")||"mord",Z.makeSpan([e],[l,Z.makeSpan(["msupsub"],[d])],t)},mathmlBuilder(e,t){var r,i=!1,n=(e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(i=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0),[To(e.base,t)]);return e.sub&&n.push(To(e.sub,t)),e.sup&&n.push(To(e.sup,t)),r=i?r?"mover":"munder":e.sub?e.sup?(i=e.base)&&"op"===i.type&&i.limits&&t.style===Ea.DISPLAY||i&&"operatorname"===i.type&&i.alwaysHandleSupSub&&(t.style===Ea.DISPLAY||i.limits)?"munderover":"msubsup":(r=e.base)&&"op"===r.type&&r.limits&&(t.style===Ea.DISPLAY||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(r.limits||t.style===Ea.DISPLAY)?"munder":"msub":(i=e.base)&&"op"===i.type&&i.limits&&(t.style===Ea.DISPLAY||i.alwaysHandleSupSub)||i&&"operatorname"===i.type&&i.alwaysHandleSupSub&&(i.limits||t.style===Ea.DISPLAY)?"mover":"msup",new C.MathNode(r,n)}}),qn({type:"atom",htmlBuilder(e,t){return Z.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var r=new C.MathNode("mo",[mo(e.text,e.mode)]);return"bin"===e.family?"bold-italic"===(t=vo(e,t))&&r.setAttribute("mathvariant",t):"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false"),r}}),ql={mi:"italic",mn:"normal",mtext:"normal"},qn({type:"mathord",htmlBuilder(e,t){return Z.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var r=new C.MathNode("mi",[mo(e.text,e.mode,t)]);return(e=vo(e,t)||"italic")!==ql[r.type]&&r.setAttribute("mathvariant",e),r}}),qn({type:"textord",htmlBuilder(e,t){return Z.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var r=mo(e.text,e.mode,t),t=vo(e,t)||"normal",e="text"===e.mode?new C.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new C.MathNode("mn",[r]):"\\prime"===e.text?new C.MathNode("mo",[r]):new C.MathNode("mi",[r]);return t!==ql[e.type]&&e.setAttribute("mathvariant",t),e}}),Wl={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Ul={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}},qn({type:"spacing",htmlBuilder(e,t){var r,i;if(Ul.hasOwnProperty(e.text))return r=Ul[e.text].className||"","text"===e.mode?((i=Z.makeOrd(e,t,"textord")).classes.push(r),i):Z.makeSpan(["mspace",r],[Z.mathsym(e.text,e.mode,t)],t);if(Wl.hasOwnProperty(e.text))return Z.makeSpan(["mspace",Wl[e.text]],[],t);throw new X('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(Ul.hasOwnProperty(e.text))return new C.MathNode("mtext",[new C.TextNode(" ")]);if(Wl.hasOwnProperty(e.text))return new C.MathNode("mspace");throw new X('Unknown type of space "'+e.text+'"')}}),Gl=mt(()=>{var e=new C.MathNode("mtd",[]);return e.setAttribute("width","50%"),e},"pad"),qn({type:"tag",mathmlBuilder(e,t){return(e=new C.MathNode("mtable",[new C.MathNode("mtr",[Gl(),new C.MathNode("mtd",[bo(e.body,t)]),Gl(),new C.MathNode("mtd",[bo(e.tag,t)])])])).setAttribute("width","100%"),e}}),jl={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Vl={"\\textbf":"textbf","\\textmd":"textmd"},Yl={"\\textit":"textit","\\textup":"textup"},Hl=mt((e,t)=>(e=e.font)?jl[e]?t.withTextFontFamily(jl[e]):Vl[e]?t.withTextFontWeight(Vl[e]):"\\emph"===e?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(Yl[e]):t,"optionsWithFont"),o({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:e,funcName:r}=e,t=t[0];return{type:"text",mode:e.mode,body:eo(t),font:r}},htmlBuilder(e,t){return t=Hl(e,t),e=so(e.body,t,!0),Z.makeSpan(["mord","text"],e,t)},mathmlBuilder(e,t){return t=Hl(e,t),bo(e.body,t)}}),o({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){return{type:"underline",mode:(e=e.parser).mode,body:t[0]}},htmlBuilder(e,t){var e=po(e.body,t),r=Z.makeLineSpan("underline-line",t),i=t.fontMetrics().defaultRuleThickness,r=Z.makeVList({positionType:"top",positionData:e.height,children:[{type:"kern",size:i},{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:e}]},t);return Z.makeSpan(["mord","underline"],[r],t)},mathmlBuilder(e,t){var r=new C.MathNode("mo",[new C.TextNode("‾")]);return r.setAttribute("stretchy","true"),(e=new C.MathNode("munder",[To(e.body,t),r])).setAttribute("accentunder","true"),e}}),o({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){return{type:"vcenter",mode:(e=e.parser).mode,body:t[0]}},htmlBuilder(e,t){var e=po(e.body,t),r=t.fontMetrics().axisHeight,r=.5*(e.height-r-(e.depth+r));return Z.makeVList({positionType:"shift",positionData:r,children:[{type:"elem",elem:e}]},t)},mathmlBuilder(e,t){return new C.MathNode("mpadded",[To(e.body,t)],["vcenter"])}}),o({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new X("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=Xl(e),i=[],n=t.havingStyle(t.style.text()),a=0;a<r.length;a++){var s=r[a];"~"===s&&(s="\\textasciitilde"),i.push(Z.makeSymbol(s,"Typewriter-Regular",e.mode,n,["mord","texttt"]))}return Z.makeSpan(["mord","text"].concat(n.sizingClasses(t)),Z.tryCombineChars(i),n)},mathmlBuilder(e,t){return e=new C.TextNode(Xl(e)),(e=new C.MathNode("mtext",[e])).setAttribute("mathvariant","monospace"),e}}),Xl=mt(e=>e.body.replace(/ /g,e.star?"␣":" "),"makeVerb"),Kl=Ks,Zl=new RegExp("[̀-ͯ]+$"),Ql=class{static{mt(this,"Lexer")}constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp("([ \r\n\t]+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿][̀-ͯ]*|[\ud800-\udbff][\udc00-\udfff][̀-ͯ]*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|(\\\\[a-zA-Z@]+)[ \r\n\t]*|\\\\[^\ud800-\udfff])","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 ha("EOF",new la(this,t,t));if(null===(i=this.tokenRegex.exec(e))||i.index!==t)throw new X("Unexpected character: '"+e[t]+"'",new ha(e[t],new la(this,t,t+1)));var r,i=i[6]||i[3]||(i[2]?"\\ ":" ");return 14===this.catcodes[i]?(-1===(r=e.indexOf(`
`,this.tokenRegex.lastIndex))?(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=r+1,this.lex()):new ha(i,new la(this,t,this.tokenRegex.lastIndex))}},Jl=class{static{mt(this,"Namespace")}constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new X("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e,t=this.undefStack.pop();for(e in t)t.hasOwnProperty(e)&&(null==t[e]?delete this.current[e]:this.current[e]=t[e])}endGroups(){for(;0<this.undefStack.length;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return(this.current.hasOwnProperty(e)?this.current:this.builtins)[e]}set(e,t,r){if(r=void 0!==r&&r){for(var i=0;i<this.undefStack.length;i++)delete this.undefStack[i][e];0<this.undefStack.length&&(this.undefStack[this.undefStack.length-1][e]=t)}else(r=this.undefStack[this.undefStack.length-1])&&!r.hasOwnProperty(e)&&(r[e]=this.current[e]);null==t?delete this.current[e]:this.current[e]=t}},eh=ml,l("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),l("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),l("\\@firstoftwo",function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),l("\\@secondoftwo",function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),l("\\@ifnextchar",function(e){var t=e.consumeArgs(3),e=(e.consumeSpaces(),e.future());return 1===t[0].length&&t[0][0].text===e.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),l("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),l("\\TextOrMath",function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}),th={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},l("\\char",function(e){var t,r,i=e.popToken(),n="";if("'"===i.text)t=8,i=e.popToken();else if('"'===i.text)t=16,i=e.popToken();else if("`"===i.text)if("\\"===(i=e.popToken()).text[0])n=i.text.charCodeAt(1);else{if("EOF"===i.text)throw new X("\\char` missing argument");n=i.text.charCodeAt(0)}else t=10;if(t){if(null==(n=th[i.text])||t<=n)throw new X("Invalid base-"+t+" digit "+i.text);for(;null!=(r=th[e.future().text])&&r<t;)n=n*t+r,e.popToken()}return"\\@char{"+n+"}"}),rh=mt((e,t,r,i)=>{var n=e.consumeArg().tokens;if(1!==n.length)throw new X("\\newcommand's first argument must be a macro name");var a=n[0].text,s=e.isDefined(a);if(s&&!t)throw new X("\\newcommand{"+a+"} attempting to redefine "+a+"; use \\renewcommand");if(!s&&!r)throw new X("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");if(t=0,1===(n=e.consumeArg().tokens).length&&"["===n[0].text){for(var o="",l=e.expandNextToken();"]"!==l.text&&"EOF"!==l.text;)o+=l.text,l=e.expandNextToken();if(!o.match(/^\s*[0-9]+\s*$/))throw new X("Invalid number of arguments: "+o);t=parseInt(o),n=e.consumeArg().tokens}return s&&i||e.macros.set(a,{tokens:n,numArgs:t}),""},"newcommand"),l("\\newcommand",e=>rh(e,!1,!0,!1)),l("\\renewcommand",e=>rh(e,!0,!1,!1)),l("\\providecommand",e=>rh(e,!0,!0,!0)),l("\\message",e=>(e=e.consumeArgs(1)[0],console.log(e.reverse().map(e=>e.text).join("")),"")),l("\\errmessage",e=>(e=e.consumeArgs(1)[0],console.error(e.reverse().map(e=>e.text).join("")),"")),l("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),Kl[r],ps.math[r],ps.text[r]),""}),l("\\bgroup","{"),l("\\egroup","}"),l("~","\\nobreakspace"),l("\\lq","`"),l("\\rq","'"),l("\\aa","\\r a"),l("\\AA","\\r A"),l("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),l("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),l("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),l("","\\mathscr{B}"),l("","\\mathscr{E}"),l("","\\mathscr{F}"),l("","\\mathscr{H}"),l("","\\mathscr{I}"),l("","\\mathscr{L}"),l("","\\mathscr{M}"),l("","\\mathscr{R}"),l("","\\mathfrak{C}"),l("","\\mathfrak{H}"),l("","\\mathfrak{Z}"),l("\\Bbbk","\\Bbb{k}"),l("·","\\cdotp"),l("\\llap","\\mathllap{\\textrm{#1}}"),l("\\rlap","\\mathrlap{\\textrm{#1}}"),l("\\clap","\\mathclap{\\textrm{#1}}"),l("\\mathstrut","\\vphantom{(}"),l("\\underbar","\\underline{\\text{#1}}"),l("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),l("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),l("\\ne","\\neq"),l("≠","\\neq"),l("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),l("∉","\\notin"),l("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),l("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),l("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),l("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),l("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),l("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),l("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),l("⟂","\\perp"),l("‼","\\mathclose{!\\mkern-0.8mu!}"),l("∌","\\notni"),l("⌜","\\ulcorner"),l("⌝","\\urcorner"),l("⌞","\\llcorner"),l("⌟","\\lrcorner"),l("©","\\copyright"),l("®","\\textregistered"),l("","\\textregistered"),l("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),l("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),l("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),l("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),l("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),l("⋮","\\vdots"),l("\\varGamma","\\mathit{\\Gamma}"),l("\\varDelta","\\mathit{\\Delta}"),l("\\varTheta","\\mathit{\\Theta}"),l("\\varLambda","\\mathit{\\Lambda}"),l("\\varXi","\\mathit{\\Xi}"),l("\\varPi","\\mathit{\\Pi}"),l("\\varSigma","\\mathit{\\Sigma}"),l("\\varUpsilon","\\mathit{\\Upsilon}"),l("\\varPhi","\\mathit{\\Phi}"),l("\\varPsi","\\mathit{\\Psi}"),l("\\varOmega","\\mathit{\\Omega}"),l("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),l("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),l("\\boxed","\\fbox{$\\displaystyle{#1}$}"),l("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),l("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),l("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),l("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),l("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}"),ih={",":"\\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"},l("\\dots",function(e){var t="\\dotso";return(e=e.expandAfterFuture().text)in ih?t=ih[e]:("\\not"===e.slice(0,4)||e in ps.math&&["bin","rel"].includes(ps.math[e].group))&&(t="\\dotsb"),t}),nh={")":!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},l("\\dotso",function(e){return e.future().text in nh?"\\ldots\\,":"\\ldots"}),l("\\dotsc",function(e){return(e=e.future().text)in nh&&","!==e?"\\ldots\\,":"\\ldots"}),l("\\cdots",function(e){return e.future().text in nh?"\\@cdots\\,":"\\@cdots"}),l("\\dotsb","\\cdots"),l("\\dotsm","\\cdots"),l("\\dotsi","\\!\\cdots"),l("\\dotsx","\\ldots\\,"),l("\\DOTSI","\\relax"),l("\\DOTSB","\\relax"),l("\\DOTSX","\\relax"),l("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),l("\\,","\\tmspace+{3mu}{.1667em}"),l("\\thinspace","\\,"),l("\\>","\\mskip{4mu}"),l("\\:","\\tmspace+{4mu}{.2222em}"),l("\\medspace","\\:"),l("\\;","\\tmspace+{5mu}{.2777em}"),l("\\thickspace","\\;"),l("\\!","\\tmspace-{3mu}{.1667em}"),l("\\negthinspace","\\!"),l("\\negmedspace","\\tmspace-{4mu}{.2222em}"),l("\\negthickspace","\\tmspace-{5mu}{.277em}"),l("\\enspace","\\kern.5em "),l("\\enskip","\\hskip.5em\\relax"),l("\\quad","\\hskip1em\\relax"),l("\\qquad","\\hskip2em\\relax"),l("\\tag","\\@ifstar\\tag@literal\\tag@paren"),l("\\tag@paren","\\tag@literal{({#1})}"),l("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new X("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),l("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),l("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),l("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),l("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),l("\\newline","\\\\\\relax"),l("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}"),l("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+(ah=K(za["Main-Regular"][84][1]-.7*za["Main-Regular"][65][1]))+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),l("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+ah+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),l("\\hspace","\\@ifstar\\@hspacer\\@hspace"),l("\\@hspace","\\hskip #1\\relax"),l("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),l("\\ordinarycolon",":"),l("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),l("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),l("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),l("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),l("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),l("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),l("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),l("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),l("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),l("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),l("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),l("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),l("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),l("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),l("∷","\\dblcolon"),l("∹","\\eqcolon"),l("≔","\\coloneqq"),l("≕","\\eqqcolon"),l("⩴","\\Coloneqq"),l("\\ratio","\\vcentcolon"),l("\\coloncolon","\\dblcolon"),l("\\colonequals","\\coloneqq"),l("\\coloncolonequals","\\Coloneqq"),l("\\equalscolon","\\eqqcolon"),l("\\equalscoloncolon","\\Eqqcolon"),l("\\colonminus","\\coloneq"),l("\\coloncolonminus","\\Coloneq"),l("\\minuscolon","\\eqcolon"),l("\\minuscoloncolon","\\Eqcolon"),l("\\coloncolonapprox","\\Colonapprox"),l("\\coloncolonsim","\\Colonsim"),l("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),l("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),l("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),l("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),l("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),l("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),l("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),l("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),l("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),l("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),l("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),l("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),l("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),l("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),l("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),l("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),l("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),l("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),l("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),l("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),l("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),l("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),l("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),l("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),l("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),l("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),l("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),l("\\imath","\\html@mathml{\\@imath}{ı}"),l("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),l("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),l("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),l("⟦","\\llbracket"),l("⟧","\\rrbracket"),l("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),l("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),l("⦃","\\lBrace"),l("⦄","\\rBrace"),l("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),l("⦵","\\minuso"),l("\\darr","\\downarrow"),l("\\dArr","\\Downarrow"),l("\\Darr","\\Downarrow"),l("\\lang","\\langle"),l("\\rang","\\rangle"),l("\\uarr","\\uparrow"),l("\\uArr","\\Uparrow"),l("\\Uarr","\\Uparrow"),l("\\N","\\mathbb{N}"),l("\\R","\\mathbb{R}"),l("\\Z","\\mathbb{Z}"),l("\\alef","\\aleph"),l("\\alefsym","\\aleph"),l("\\Alpha","\\mathrm{A}"),l("\\Beta","\\mathrm{B}"),l("\\bull","\\bullet"),l("\\Chi","\\mathrm{X}"),l("\\clubs","\\clubsuit"),l("\\cnums","\\mathbb{C}"),l("\\Complex","\\mathbb{C}"),l("\\Dagger","\\ddagger"),l("\\diamonds","\\diamondsuit"),l("\\empty","\\emptyset"),l("\\Epsilon","\\mathrm{E}"),l("\\Eta","\\mathrm{H}"),l("\\exist","\\exists"),l("\\harr","\\leftrightarrow"),l("\\hArr","\\Leftrightarrow"),l("\\Harr","\\Leftrightarrow"),l("\\hearts","\\heartsuit"),l("\\image","\\Im"),l("\\infin","\\infty"),l("\\Iota","\\mathrm{I}"),l("\\isin","\\in"),l("\\Kappa","\\mathrm{K}"),l("\\larr","\\leftarrow"),l("\\lArr","\\Leftarrow"),l("\\Larr","\\Leftarrow"),l("\\lrarr","\\leftrightarrow"),l("\\lrArr","\\Leftrightarrow"),l("\\Lrarr","\\Leftrightarrow"),l("\\Mu","\\mathrm{M}"),l("\\natnums","\\mathbb{N}"),l("\\Nu","\\mathrm{N}"),l("\\Omicron","\\mathrm{O}"),l("\\plusmn","\\pm"),l("\\rarr","\\rightarrow"),l("\\rArr","\\Rightarrow"),l("\\Rarr","\\Rightarrow"),l("\\real","\\Re"),l("\\reals","\\mathbb{R}"),l("\\Reals","\\mathbb{R}"),l("\\Rho","\\mathrm{P}"),l("\\sdot","\\cdot"),l("\\sect","\\S"),l("\\spades","\\spadesuit"),l("\\sub","\\subset"),l("\\sube","\\subseteq"),l("\\supe","\\supseteq"),l("\\Tau","\\mathrm{T}"),l("\\thetasym","\\vartheta"),l("\\weierp","\\wp"),l("\\Zeta","\\mathrm{Z}"),l("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),l("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),l("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),l("\\bra","\\mathinner{\\langle{#1}|}"),l("\\ket","\\mathinner{|{#1}\\rangle}"),l("\\braket","\\mathinner{\\langle{#1}\\rangle}"),l("\\Bra","\\left\\langle#1\\right|"),l("\\Ket","\\left|#1\\right\\rangle"),l("\\bra@ket",(sh=mt(l=>e=>{var t=e.consumeArg().tokens,i=e.consumeArg().tokens,n=e.consumeArg().tokens,r=e.consumeArg().tokens,a=e.macros.get("|"),s=e.macros.get("\\|"),o=(e.macros.beginGroup(),mt(r=>e=>{l&&(e.macros.set("|",a),n.length)&&e.macros.set("\\|",s);var t=r;return!r&&n.length&&"|"===e.future().text&&(e.popToken(),t=!0),{tokens:t?n:i,numArgs:0}},"midMacro")),o=(e.macros.set("|",o(!1)),n.length&&e.macros.set("\\|",o(!0)),e.consumeArg().tokens),r=e.expandTokens([...r,...o,...t]);return e.macros.endGroup(),{tokens:r.reverse(),numArgs:0}},"braketHelper"))(!1)),l("\\bra@set",sh(!0)),l("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),l("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),l("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),l("\\angln","{\\angl n}"),l("\\blue","\\textcolor{##6495ed}{#1}"),l("\\orange","\\textcolor{##ffa500}{#1}"),l("\\pink","\\textcolor{##ff00af}{#1}"),l("\\red","\\textcolor{##df0030}{#1}"),l("\\green","\\textcolor{##28ae7b}{#1}"),l("\\gray","\\textcolor{gray}{#1}"),l("\\purple","\\textcolor{##9d38bd}{#1}"),l("\\blueA","\\textcolor{##ccfaff}{#1}"),l("\\blueB","\\textcolor{##80f6ff}{#1}"),l("\\blueC","\\textcolor{##63d9ea}{#1}"),l("\\blueD","\\textcolor{##11accd}{#1}"),l("\\blueE","\\textcolor{##0c7f99}{#1}"),l("\\tealA","\\textcolor{##94fff5}{#1}"),l("\\tealB","\\textcolor{##26edd5}{#1}"),l("\\tealC","\\textcolor{##01d1c1}{#1}"),l("\\tealD","\\textcolor{##01a995}{#1}"),l("\\tealE","\\textcolor{##208170}{#1}"),l("\\greenA","\\textcolor{##b6ffb0}{#1}"),l("\\greenB","\\textcolor{##8af281}{#1}"),l("\\greenC","\\textcolor{##74cf70}{#1}"),l("\\greenD","\\textcolor{##1fab54}{#1}"),l("\\greenE","\\textcolor{##0d923f}{#1}"),l("\\goldA","\\textcolor{##ffd0a9}{#1}"),l("\\goldB","\\textcolor{##ffbb71}{#1}"),l("\\goldC","\\textcolor{##ff9c39}{#1}"),l("\\goldD","\\textcolor{##e07d10}{#1}"),l("\\goldE","\\textcolor{##a75a05}{#1}"),l("\\redA","\\textcolor{##fca9a9}{#1}"),l("\\redB","\\textcolor{##ff8482}{#1}"),l("\\redC","\\textcolor{##f9685d}{#1}"),l("\\redD","\\textcolor{##e84d39}{#1}"),l("\\redE","\\textcolor{##bc2612}{#1}"),l("\\maroonA","\\textcolor{##ffbde0}{#1}"),l("\\maroonB","\\textcolor{##ff92c6}{#1}"),l("\\maroonC","\\textcolor{##ed5fa6}{#1}"),l("\\maroonD","\\textcolor{##ca337c}{#1}"),l("\\maroonE","\\textcolor{##9e034e}{#1}"),l("\\purpleA","\\textcolor{##ddd7ff}{#1}"),l("\\purpleB","\\textcolor{##c6b9fc}{#1}"),l("\\purpleC","\\textcolor{##aa87ff}{#1}"),l("\\purpleD","\\textcolor{##7854ab}{#1}"),l("\\purpleE","\\textcolor{##543b78}{#1}"),l("\\mintA","\\textcolor{##f5f9e8}{#1}"),l("\\mintB","\\textcolor{##edf2df}{#1}"),l("\\mintC","\\textcolor{##e0e5cc}{#1}"),l("\\grayA","\\textcolor{##f6f7f7}{#1}"),l("\\grayB","\\textcolor{##f0f1f2}{#1}"),l("\\grayC","\\textcolor{##e3e5e6}{#1}"),l("\\grayD","\\textcolor{##d6d8da}{#1}"),l("\\grayE","\\textcolor{##babec2}{#1}"),l("\\grayF","\\textcolor{##888d93}{#1}"),l("\\grayG","\\textcolor{##626569}{#1}"),l("\\grayH","\\textcolor{##3b3e40}{#1}"),l("\\grayI","\\textcolor{##21242c}{#1}"),l("\\kaBlue","\\textcolor{##314453}{#1}"),l("\\kaGreen","\\textcolor{##71B307}{#1}"),oh={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},lh=class{static{mt(this,"MacroExpander")}constructor(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Jl(eh,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Ql(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&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 ha("EOF",r.loc)),this.pushTokens(i),new ha("",la.range(t,r))}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(e){var t,r=[],i=e&&0<e.length,n=(i||this.consumeSpaces(),this.future()),a=0,s=0;do{if(t=this.popToken(),r.push(t),"{"===t.text)++a;else if("}"===t.text){if(-1==--a)throw new X("Extra }",t)}else if("EOF"===t.text)throw new X("Unexpected end of input in a macro argument, expected '"+(e&&i?e[s]:"}")+"'",t);if(e&&i)if((0===a||1===a&&"{"===e[s])&&t.text===e[s]){if(++s===e.length){r.splice(-s,s);break}}else s=0}while(0!==a||i);return"{"===n.text&&"}"===r[r.length-1].text&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:n,end:t}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new X("The length of delimiters doesn't match the number of args!");for(var r=t[0],i=0;i<r.length;i++){var n=this.popToken();if(r[i]!==n.text)throw new X("Use of the macro doesn't match its definition",n)}}for(var a=[],s=0;s<e;s++)a.push(this.consumeArg(t&&t[s+1]).tokens);return a}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new X("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(null==i||e&&i.unexpandable){if(e&&null==i&&"\\"===r[0]&&!this.isDefined(r))throw new X("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)for(var s=(n=n.slice()).length-1;0<=s;--s){var o=n[s];if("#"===o.text){if(0===s)throw new X("Incomplete placeholder at end of macro body",o);if("#"===(o=n[--s]).text)n.splice(s+1,1);else{if(!/^[1-9]$/.test(o.text))throw new X("Not a valid argument number",o);n.splice(s,2,...a[+o.text-1])}}}return this.pushTokens(n),n.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;){var e;if(!1===this.expandOnce())return(e=this.stack.pop()).treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new ha(e)]):void 0}expandTokens(e){var t,r=[],i=this.stack.length;for(this.pushTokens(e);this.stack.length>i;)!1===this.expandOnce(!0)&&((t=this.stack.pop()).treatAsRelax&&(t.noexpand=!1,t.treatAsRelax=!1),r.push(t));return this.countExpansion(r.length),r}expandMacroAsText(e){return(e=this.expandMacro(e))&&e.map(e=>e.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1!==e.length||null==(e=this.lexer.catcodes[e])||13===e){if("string"!=typeof(e="function"==typeof t?t(this):t))return e;var r=0;if(-1!==e.indexOf("#"))for(var i=e.replace(/##/g,"");-1!==i.indexOf("#"+(r+1));)++r;for(var n=new Ql(e,this.settings),a=[],s=n.lex();"EOF"!==s.text;)a.push(s),s=n.lex();return a.reverse(),{tokens:a,numArgs:r}}}isDefined(e){return this.macros.has(e)||Kl.hasOwnProperty(e)||ps.math.hasOwnProperty(e)||ps.text.hasOwnProperty(e)||oh.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Kl.hasOwnProperty(e)&&!Kl[e].primitive}},hh=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,ch=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),uh={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},dh={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},(ph=class a{static{mt(this,"Parser")}constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new lh(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new X("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken,e=(this.consume(),this.gullet.pushToken(new ha("}")),this.gullet.pushTokens(e),this.parseExpression(!1));return this.expect("}"),this.nextToken=t,e}parseExpression(e,t){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var i=this.fetch();if(-1!==a.endOfExpression.indexOf(i.text)||t&&i.text===t||e&&Kl[i.text]&&Kl[i.text].infix)break;if(!(i=this.parseAtom(t)))break;"internal"!==i.type&&r.push(i)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t,r,i,n=-1,a=0;a<e.length;a++)if("infix"===e[a].type){if(-1!==n)throw new X("only one infix operator per group",e[a].token);t=e[n=a].replaceWith}return-1!==n&&t?(r=e.slice(0,n),i=e.slice(n+1),r=1===r.length&&"ordgroup"===r[0].type?r[0]:{type:"ordgroup",mode:this.mode,body:r},i=1===i.length&&"ordgroup"===i[0].type?i[0]:{type:"ordgroup",mode:this.mode,body:i},["\\\\abovefrac"===t?this.callFunction(t,[r,e[n],i],[]):this.callFunction(t,[r,i],[])]):e}handleSupSubscript(e){var t=this.fetch(),r=t.text;this.consume(),this.consumeSpaces();do{var i=this.parseGroup(e)}while("internal"===(null==i?void 0:i.type));if(i)return i;throw new X("Expected group after '"+r+"'",t)}formatUnsupportedCmd(e){for(var t=[],r=0;r<e.length;r++)t.push({type:"textord",mode:"text",text:e[r]});var i={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[i]}}parseAtom(e){var t,r,i=this.parseGroup("atom",e);if("internal"===i?.type||"text"===this.mode)return i;for(;;){this.consumeSpaces();var n=this.fetch();if("\\limits"===n.text||"\\nolimits"===n.text){if(i&&"op"===i.type){var a="\\limits"===n.text;i.limits=a,i.alwaysHandleSupSub=!0}else{if(!i||"operatorname"!==i.type)throw new X("Limit controls must follow a math operator",n);i.alwaysHandleSupSub&&(i.limits="\\limits"===n.text)}this.consume()}else if("^"===n.text){if(t)throw new X("Double superscript",n);t=this.handleSupSubscript("superscript")}else if("_"===n.text){if(r)throw new X("Double subscript",n);r=this.handleSupSubscript("subscript")}else if("'"===n.text){if(t)throw new X("Double superscript",n);var s={type:"textord",mode:this.mode,text:"\\prime"},o=[s];for(this.consume();"'"===this.fetch().text;)o.push(s),this.consume();"^"===this.fetch().text&&o.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:o}}else{if(!ch[n.text])break;var l=hh.test(n.text),h=[];for(h.push(new ha(ch[n.text])),this.consume();;){var c=this.fetch().text;if(!ch[c]||hh.test(c)!==l)break;h.unshift(new ha(ch[c])),this.consume()}a=this.subparse(h),l?r={type:"ordgroup",mode:"math",body:a}:t={type:"ordgroup",mode:"math",body:a}}}return t||r?{type:"supsub",mode:this.mode,base:i,sup:t,sub:r}:i}parseFunction(e,t){var r=this.fetch(),i=r.text;if(!(n=Kl[i]))return null;if(this.consume(),t&&"atom"!==t&&!n.allowedInArgument)throw new X("Got function '"+i+"' with no arguments"+(t?" as "+t:""),r);if("text"===this.mode&&!n.allowedInText)throw new X("Can't use function '"+i+"' in text mode",r);if("math"===this.mode&&!1===n.allowedInMath)throw new X("Can't use function '"+i+"' in math mode",r);var{args:t,optArgs:n}=this.parseArguments(i,n);return this.callFunction(i,t,n,r,e)}callFunction(e,t,r,i,n){var a=Kl[e];if(a&&a.handler)return a.handler({funcName:e,parser:this,token:i,breakOnTokenText:n},t,r);throw new X("No function handler for "+e)}parseArguments(e,t){var r=t.numArgs+t.numOptionalArgs;if(0===r)return{args:[],optArgs:[]};for(var i=[],n=[],a=0;a<r;a++){var s=t.argTypes&&t.argTypes[a],o=a<t.numOptionalArgs,s=((t.primitive&&null==s||"sqrt"===t.type&&1===a&&null==n[0])&&(s="primitive"),this.parseGroupOfType("argument to '"+e+"'",s,o));if(o)n.push(s);else{if(null==s)throw new X("Null argument, please report this as a bug");i.push(s)}}return{args:i,optArgs:n}}parseGroupOfType(e,t,r){switch(t){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,t);case"hbox":var i=this.parseArgumentGroup(r,"text");return null!=i?{type:"styling",mode:i.mode,body:[i],style:"text"}:null;case"raw":return null!=(i=this.parseStringGroup("raw",r))?{type:"raw",mode:"text",string:i.text}:null;case"primitive":if(r)throw new X("A primitive argument cannot be optional");if(null==(i=this.parseGroup(e)))throw new X("Expected group as "+e,this.fetch());return i;case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new X("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){if(null==(t=this.gullet.scanArgument(t)))return null;for(var r,i="";"EOF"!==(r=this.fetch()).text;)i+=r.text,this.consume();return this.consume(),t.text=i,t}parseRegexGroup(e,t){for(var r,i=this.fetch(),n=i,a="";"EOF"!==(r=this.fetch()).text&&e.test(a+r.text);)a+=(n=r).text,this.consume();if(""===a)throw new X("Invalid "+t+": '"+i.text+"'",i);return i.range(n,a)}parseColorGroup(e){if(null==(e=this.parseStringGroup("color",e)))return null;var t=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(e.text);if(t)return t=t[0],/^[0-9a-f]{6}$/i.test(t)&&(t="#"+t),{type:"color-token",mode:this.mode,color:t};throw new X("Invalid color: '"+e.text+"'",e)}parseSizeGroup(e){var t,r=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;if(e||0!==t.text.length||(t.text="0pt",r=!0),!(e=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text)))throw new X("Invalid size: '"+t.text+"'",t);if(e={number:+(e[1]+e[2]),unit:e[3]},Ka(e))return{type:"size",mode:this.mode,value:e,isBlank:r};throw new X("Invalid unit: '"+e.unit+"'",t)}parseUrlGroup(e){return this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12),e=this.parseStringGroup("url",e),this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==e?null:(e=e.text.replace(/\\([#$%&~_^{}])/g,"$1"),{type:"url",mode:this.mode,url:e})}parseArgumentGroup(e,t){var r,i;return null==(e=this.gullet.scanArgument(e))?null:(r=this.mode,t&&this.switchMode(t),this.gullet.beginGroup(),i=this.parseExpression(!1,"EOF"),this.expect("EOF"),this.gullet.endGroup(),e={type:"ordgroup",mode:this.mode,loc:e.loc,body:i},t&&this.switchMode(r),e)}parseGroup(e,t){var r=this.fetch(),i=r.text;if("{"===i||"\\begingroup"===i){this.consume();var n="{"===i?"}":"\\endgroup",a=(this.gullet.beginGroup(),this.parseExpression(!1,n)),s=this.fetch();this.expect(n),this.gullet.endGroup(),n={type:"ordgroup",mode:this.mode,loc:la.range(r,s),body:a,semisimple:"\\begingroup"===i||void 0}}else if(null==(n=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===i[0]&&!oh.hasOwnProperty(i)){if(this.settings.throwOnError)throw new X("Undefined control sequence: "+i,r);n=this.formatUnsupportedCmd(i),this.consume()}return n}formLigatures(e){for(var t=e.length-1,r=0;r<t;++r){var i=e[r],n=i.text;"-"===n&&"-"===e[r+1].text&&(r+1<t&&"-"===e[r+2].text?(e.splice(r,3,{type:"textord",mode:"text",loc:la.range(i,e[r+2]),text:"---"}),t-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:la.range(i,e[r+1]),text:"--"}),--t)),"'"!==n&&"`"!==n||e[r+1].text!==n||(e.splice(r,2,{type:"textord",mode:"text",loc:la.range(i,e[r+1]),text:n+n}),--t)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){if(this.consume(),(i=(n="*"===(i=t.slice(5)).charAt(0))?i.slice(1):i).length<2||i.charAt(0)!==i.slice(-1))throw new X(`\\verb assertion failed --
please report what input caused this bug`);return{type:"verb",mode:"text",body:i=i.slice(1,-1),star:n}}dh.hasOwnProperty(t[0])&&!ps[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=dh[t[0]]+t.slice(1));var r=Zl.exec(t);if(r&&("i"===(t=t.substring(0,r.index))?t="ı":"j"===t&&(t="ȷ")),ps[this.mode][t]){this.settings.strict&&"math"===this.mode&&0<=Rs.indexOf(t)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var i=ps[this.mode][t].group,n=la.range(e),a=us.hasOwnProperty(i)?{type:"atom",mode:this.mode,family:i,loc:n,text:t}:{type:i,mode:this.mode,loc:n,text:t}}else{if(!(128<=t.charCodeAt(0)))return null;this.settings.strict&&(On(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),a={type:"textord",mode:"text",loc:la.range(e),text:t}}if(this.consume(),r)for(var s=0;s<r[0].length;s++){var o=r[0][s];if(!uh[o])throw new X("Unknown accent ' "+o+"'",e);var l=uh[o][this.mode]||uh[o].text;if(!l)throw new X("Accent "+o+" unsupported in "+this.mode+" mode",e);a={type:"accent",mode:this.mode,loc:la.range(e),label:l,isStretchy:!1,isShifty:!0,base:a}}return a}}).endOfExpression=["}","\\endgroup","\\end","\\right","&"],gh=mt(function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");delete(e=new ph(e,t)).gullet.macros.current["\\df@tag"];var r=e.parse();if(delete e.gullet.macros.current["\\current@color"],delete e.gullet.macros.current["\\color"],e.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new X("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:e.subparse([new ha("\\df@tag")])}]}return r},"parseTree"),fh=mt(function(e,t,r){t.textContent="",e=xh(e,r).toNode(),t.appendChild(e)},"render"),typeof document<"u"&&"CSS1Compat"!==document.compatMode&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),fh=mt(function(){throw new X("KaTeX doesn't work in quirks mode.")},"render")),mh=mt(function(e,t){return xh(e,t).toMarkup()},"renderToString"),yh=mt(function(e,t){return t=new ya(t),gh(e,t)},"generateParseTree"),vh=mt(function(e,t,r){if(!r.throwOnError&&e instanceof X)return(t=Z.makeSpan(["katex-error"],[new os(t)])).setAttribute("title",e.toString()),t.setAttribute("style","color:"+r.errorColor),t;throw e},"renderError"),xh=mt(function(e,t){t=new ya(t);try{var r=gh(e,t);return Co(r,e,t)}catch(r){return vh(r,e,t)}},"renderToDomTree"),bh=mt(function(e,t){t=new ya(t);try{var r=gh(e,t);return Eo(r,e,t)}catch(r){return vh(r,e,t)}},"renderToHTMLTree"),wh={version:Th="0.16.25",render:fh,renderToString:mh,ParseError:X,SETTINGS_SCHEMA:ma,__parse:yh,__renderToDomTree:xh,__renderToHTMLTree:bh,__setFontMetrics:Bn,__defineSymbol:t,__defineFunction:o,__defineMacro:l,__domTree:kh={Span:is,Anchor:ns,SymbolNode:os,SvgNode:ls,PathNode:hs,LineNode:cs}}});function Eh(){let t="data-temp-href-target";Ln.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),Ln.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target"))&&e.setAttribute("rel","noopener")})}var Sh,_h,Ah,Lh,Rh,Ih,Nh,Dh,Mh,Oh,Bh,Ph,$h,Fh,zh,qh,Wh,Uh,Gh,jh,Vh,Yh,Hh,Xh,I,Kh,Zh,Qh,Jh,ec,tc,rc,ic=i(()=>{Rn(),Ei(),Sh=/<br\s*\/?>/gi,_h=mt(e=>e?Bh(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Ah=(()=>{let e=!1;return()=>{e||(Eh(),e=!0)}})(),mt(Eh,"setupDompurifyHooks"),Lh=mt(e=>(Ah(),Ln.sanitize(e)),"removeScript"),Rh=mt((e,t)=>(Lr(t)&&("antiscript"===(t=t.securityLevel)||"strict"===t||"sandbox"===t?e=Lh(e):"loose"!==t&&(e=(e=(e=Bh(e)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),e=Oh(e))),e),"sanitizeMore"),Ih=mt((e,t)=>e&&(t.dompurifyConfig?Ln.sanitize(Rh(e,t),t.dompurifyConfig):Ln.sanitize(Rh(e,t),{FORBID_TAGS:["style"]})).toString(),"sanitizeText"),Nh=mt((e,t)=>"string"==typeof e?Ih(e,t):e.flat().map(e=>Ih(e,t)),"sanitizeTextOrArray"),Dh=mt(e=>Sh.test(e),"hasBreaks"),Mh=mt(e=>e.split(Sh),"splitBreaks"),Oh=mt(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Bh=mt(e=>e.replace(Sh,"#br#"),"breakToPlaceholder"),Ph=mt(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),$h=mt(function(...e){return e=e.filter(e=>!isNaN(e)),Math.max(...e)},"getMax"),Fh=mt(function(...e){return e=e.filter(e=>!isNaN(e)),Math.min(...e)},"getMin"),zh=mt(function(e){var r,i,n=e.split(/(,)/),a=[];for(let t=0;t<n.length;t++){let e=n[t];","===e&&0<t&&t+1<n.length&&(r=n[t-1],i=n[t+1],Wh(r,i))&&(e=r+","+i,t++,a.pop()),a.push(Uh(e))}return a.join("")},"parseGenericTypes"),qh=mt((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Wh=mt((e,t)=>(e=qh(e,"~"),t=qh(t,"~"),1===e&&1===t),"shouldCombineSets"),Uh=mt(e=>{let t=qh(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(;-1!==n&&-1!==a&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Gh=mt(()=>void 0!==window.MathMLElement,"isMathMLSupported"),jh=/\$\$(.*)\$\$/g,Vh=mt(e=>0<(e.match(jh)?.length??0),"hasKatex"),Yh=mt(async(e,t)=>{var r=document.createElement("div"),e=(r.innerHTML=await Xh(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r),{width:r.clientWidth,height:r.clientHeight});return r.remove(),e},"calculateMathMLDimensions"),Hh=mt(async(e,t)=>{if(!Vh(e))return e;if(!(Gh()||t.legacyMathML||t.forceLegacyMathML))return e.replace(jh,"MathML is unsupported in this environment.");{let r=(await Promise.resolve().then(()=>(Ch(),In))).default,i=t.forceLegacyMathML||!Gh()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Sh).map(e=>Vh(e)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${e}</div>`:`<div>${e}</div>`).join("").replace(jh,(e,t)=>r.renderToString(t,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Xh=mt(async(e,t)=>Ih(await Hh(e,t),t),"renderKatexSanitized"),I={getRows:_h,sanitizeText:Ih,sanitizeTextOrArray:Nh,hasBreaks:Dh,splitBreaks:Mh,lineBreakRegex:Sh,removeScript:Lh,getUrl:Ph,evaluate:hr,getMax:$h,getMin:Fh}}),nc=i(()=>{Ir(),Ei(),ic(),e(),Kh={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},Zh=new Map,Qh=new Map,Jh=mt(e=>{for(var t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(B.debug("Registering icon pack:",t.name),"loader"in t)Qh.set(t.name,t.loader);else{if(!("icons"in t))throw B.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Zh.set(t.name,t.icons)}}},"registerIconPacks"),ec=mt(async(e,t)=>{var r=S(e,!0,void 0!==t);if(!r)throw new Error("Invalid icon name: "+e);if(!(t=r.prefix||t))throw new Error("Icon name must contain a prefix: "+e);let i=Zh.get(t);if(!i){var n=Qh.get(t);if(!n)throw new Error("Icon set not found: "+r.prefix);try{i={...await n(),prefix:t},Zh.set(t,i)}catch(e){throw B.error(e),new Error("Failed to load icon set: "+r.prefix)}}if(n=le(i,r.name))return n;throw new Error("Icon not found: "+e)},"getRegisteredIconData"),tc=mt(async e=>{try{return await ec(e),!0}catch{return!1}},"isIconAvailable"),rc=mt(async(e,t,r)=>{let i;try{i=await ec(e,t?.fallbackPrefix)}catch(e){B.error(e),i=Kh}return t=_e(ke((e=xe(i,t)).body),{...e.attributes,...r}),Ih(t,br())},"getIconSVG")});function ac(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i,n=Array.from("string"==typeof e?[e]:e),e=(n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,""),n.reduce(function(e,t){return(t=t.match(/\n([\t ]+|(?!\s).)/g))?e.concat(t.map(function(e){return null!=(e=null==(e=e.match(/[\t ]/g))?void 0:e.length)?e:0})):e},[])),a=(e.length&&(i=new RegExp(`
[ ]{`+Math.min.apply(Math,e)+"}","g"),n=n.map(function(e){return e.replace(i,`
`)})),n[0]=n[0].replace(/^\r?\n/,""),n[0]);return t.forEach(function(e,t){var r=(i=a.match(/(?:^|\n)( *)$/))?i[1]:"",i=e;"string"==typeof e&&e.includes(`
`)&&(i=String(e).split(`
`).map(function(e,t){return 0===t?e:""+r+e}).join(`
`)),a+=i+n[t+1]}),a}var sc,oc,lc,hc,cc,uc,dc,pc,gc,fc,mc,yc,vc,xc,bc,Tc,kc,wc,Cc,Ec=i(()=>{mt(ac,"dedent")}),Sc=i(()=>{sc=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,oc=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,lc=/\s*%%.*\n/gm}),_c=i(()=>{hc=class extends Error{static{mt(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}}}),Ac=i(()=>{e(),Sc(),_c(),cc={},uc=mt(function(e,t){e=e.replace(sc,"").replace(oc,"").replace(lc,`
`);for(var[r,{detector:i}]of Object.entries(cc))if(i(e,t))return r;throw new hc("No diagram type detected matching given configuration for text: "+e)},"detectType"),dc=mt((...e)=>{for(var{id:t,detector:r,loader:i}of e)pc(t,r,i)},"registerLazyLoadedDiagrams"),pc=mt((e,t,r)=>{cc[e]&&B.warn(`Detector with key ${e} already exists. Overwriting.`),cc[e]={detector:t,loader:r},B.debug(`Detector with key ${e} added`+(r?" with loader":""))},"addDetector"),gc=mt(e=>cc[e].loader,"getDiagramLoader")}),Lc=i(()=>{function P(){this.yy={}}var e=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),t=[1,24],r=[1,25],$=[1,26],F=[1,27],z=[1,28],i=[1,63],n=[1,64],a=[1,65],s=[1,66],o=[1,67],l=[1,68],h=[1,69],u=[1,29],d=[1,30],p=[1,31],g=[1,32],f=[1,33],m=[1,34],y=[1,35],v=[1,36],x=[1,37],b=[1,38],T=[1,39],k=[1,40],w=[1,41],C=[1,42],E=[1,43],S=[1,44],_=[1,45],A=[1,46],L=[1,47],R=[1,48],I=[1,50],q=[1,51],W=[1,52],U=[1,53],G=[1,54],j=[1,55],V=[1,56],Y=[1,57],H=[1,58],X=[1,59],K=[1,60],Z=[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],J=[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],N=[1,82],D=[1,83],M=[1,84],O=[1,85],B=[12,14,42],ee=[12,14,33,42],te=[12,14,33,42,76,77,79,80],re=[12,33],ie=[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],t={trace:mt(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:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 3:i.setDirection("TB");break;case 4:i.setDirection("BT");break;case 5:i.setDirection("RL");break;case 6:i.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:i.setC4Type(a[o-3]);break;case 19:i.setTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 20:i.setAccDescription(a[o].substring(15)),this.$=a[o].substring(15);break;case 21:this.$=a[o].trim(),i.setTitle(this.$);break;case 22:case 23:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 28:a[o].splice(2,0,"ENTERPRISE"),i.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 29:a[o].splice(2,0,"SYSTEM"),i.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 30:i.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 31:a[o].splice(2,0,"CONTAINER"),i.addContainerBoundary(...a[o]),this.$=a[o];break;case 32:i.addDeploymentNode("node",...a[o]),this.$=a[o];break;case 33:i.addDeploymentNode("nodeL",...a[o]),this.$=a[o];break;case 34:i.addDeploymentNode("nodeR",...a[o]),this.$=a[o];break;case 35:i.popBoundaryParseStack();break;case 39:i.addPersonOrSystem("person",...a[o]),this.$=a[o];break;case 40:i.addPersonOrSystem("external_person",...a[o]),this.$=a[o];break;case 41:i.addPersonOrSystem("system",...a[o]),this.$=a[o];break;case 42:i.addPersonOrSystem("system_db",...a[o]),this.$=a[o];break;case 43:i.addPersonOrSystem("system_queue",...a[o]),this.$=a[o];break;case 44:i.addPersonOrSystem("external_system",...a[o]),this.$=a[o];break;case 45:i.addPersonOrSystem("external_system_db",...a[o]),this.$=a[o];break;case 46:i.addPersonOrSystem("external_system_queue",...a[o]),this.$=a[o];break;case 47:i.addContainer("container",...a[o]),this.$=a[o];break;case 48:i.addContainer("container_db",...a[o]),this.$=a[o];break;case 49:i.addContainer("container_queue",...a[o]),this.$=a[o];break;case 50:i.addContainer("external_container",...a[o]),this.$=a[o];break;case 51:i.addContainer("external_container_db",...a[o]),this.$=a[o];break;case 52:i.addContainer("external_container_queue",...a[o]),this.$=a[o];break;case 53:i.addComponent("component",...a[o]),this.$=a[o];break;case 54:i.addComponent("component_db",...a[o]),this.$=a[o];break;case 55:i.addComponent("component_queue",...a[o]),this.$=a[o];break;case 56:i.addComponent("external_component",...a[o]),this.$=a[o];break;case 57:i.addComponent("external_component_db",...a[o]),this.$=a[o];break;case 58:i.addComponent("external_component_queue",...a[o]),this.$=a[o];break;case 60:i.addRel("rel",...a[o]),this.$=a[o];break;case 61:i.addRel("birel",...a[o]),this.$=a[o];break;case 62:i.addRel("rel_u",...a[o]),this.$=a[o];break;case 63:i.addRel("rel_d",...a[o]),this.$=a[o];break;case 64:i.addRel("rel_l",...a[o]),this.$=a[o];break;case 65:i.addRel("rel_r",...a[o]),this.$=a[o];break;case 66:i.addRel("rel_b",...a[o]),this.$=a[o];break;case 67:a[o].splice(0,1),i.addRel("rel",...a[o]),this.$=a[o];break;case 68:i.updateElStyle("update_el_style",...a[o]),this.$=a[o];break;case 69:i.updateRelStyle("update_rel_style",...a[o]),this.$=a[o];break;case 70:i.updateLayoutConfig("update_layout_config",...a[o]),this.$=a[o];break;case 71:this.$=[a[o]];break;case 72:a[o].unshift(a[o-1]),this.$=a[o];break;case 73:case 75:this.$=a[o].trim();break;case 74:var l={};l[a[o-1].trim()]=a[o].trim(),this.$=l;break;case 76:this.$=""}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:r,24:$,26:F,28:z,29:49,30:61,32:62,34:i,36:n,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:T,55:k,56:w,57:C,58:E,59:S,60:_,61:A,62:L,63:R,64:I,65:q,66:W,67:U,68:G,69:j,70:V,71:Y,72:H,73:X,74:K},{13:70,19:20,20:21,21:22,22:t,23:r,24:$,26:F,28:z,29:49,30:61,32:62,34:i,36:n,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:T,55:k,56:w,57:C,58:E,59:S,60:_,61:A,62:L,63:R,64:I,65:q,66:W,67:U,68:G,69:j,70:V,71:Y,72:H,73:X,74:K},{13:71,19:20,20:21,21:22,22:t,23:r,24:$,26:F,28:z,29:49,30:61,32:62,34:i,36:n,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:T,55:k,56:w,57:C,58:E,59:S,60:_,61:A,62:L,63:R,64:I,65:q,66:W,67:U,68:G,69:j,70:V,71:Y,72:H,73:X,74:K},{13:72,19:20,20:21,21:22,22:t,23:r,24:$,26:F,28:z,29:49,30:61,32:62,34:i,36:n,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:T,55:k,56:w,57:C,58:E,59:S,60:_,61:A,62:L,63:R,64:I,65:q,66:W,67:U,68:G,69:j,70:V,71:Y,72:H,73:X,74:K},{13:73,19:20,20:21,21:22,22:t,23:r,24:$,26:F,28:z,29:49,30:61,32:62,34:i,36:n,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:T,55:k,56:w,57:C,58:E,59:S,60:_,61:A,62:L,63:R,64:I,65:q,66:W,67:U,68:G,69:j,70:V,71:Y,72:H,73:X,74:K},{14:[1,74]},e(Z,[2,13],{43:23,29:49,30:61,32:62,20:75,34:i,36:n,37:a,38:s,39:o,40:l,41:h,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:T,55:k,56:w,57:C,58:E,59:S,60:_,61:A,62:L,63:R,64:I,65:q,66:W,67:U,68:G,69:j,70:V,71:Y,72:H,73:X,74:K}),e(Z,[2,14]),e(Q,[2,16],{12:[1,76]}),e(Z,[2,36],{12:[1,77]}),e(J,[2,19]),e(J,[2,20]),{25:[1,78]},{27:[1,79]},e(J,[2,23]),{35:80,75:81,76:N,77:D,79:M,80:O},{35:86,75:81,76:N,77:D,79:M,80:O},{35:87,75:81,76:N,77:D,79:M,80:O},{35:88,75:81,76:N,77:D,79:M,80:O},{35:89,75:81,76:N,77:D,79:M,80:O},{35:90,75:81,76:N,77:D,79:M,80:O},{35:91,75:81,76:N,77:D,79:M,80:O},{35:92,75:81,76:N,77:D,79:M,80:O},{35:93,75:81,76:N,77:D,79:M,80:O},{35:94,75:81,76:N,77:D,79:M,80:O},{35:95,75:81,76:N,77:D,79:M,80:O},{35:96,75:81,76:N,77:D,79:M,80:O},{35:97,75:81,76:N,77:D,79:M,80:O},{35:98,75:81,76:N,77:D,79:M,80:O},{35:99,75:81,76:N,77:D,79:M,80:O},{35:100,75:81,76:N,77:D,79:M,80:O},{35:101,75:81,76:N,77:D,79:M,80:O},{35:102,75:81,76:N,77:D,79:M,80:O},{35:103,75:81,76:N,77:D,79:M,80:O},{35:104,75:81,76:N,77:D,79:M,80:O},e(B,[2,59]),{35:105,75:81,76:N,77:D,79:M,80:O},{35:106,75:81,76:N,77:D,79:M,80:O},{35:107,75:81,76:N,77:D,79:M,80:O},{35:108,75:81,76:N,77:D,79:M,80:O},{35:109,75:81,76:N,77:D,79:M,80:O},{35:110,75:81,76:N,77:D,79:M,80:O},{35:111,75:81,76:N,77:D,79:M,80:O},{35:112,75:81,76:N,77:D,79:M,80:O},{35:113,75:81,76:N,77:D,79:M,80:O},{35:114,75:81,76:N,77:D,79:M,80:O},{35:115,75:81,76:N,77:D,79:M,80:O},{20:116,29:49,30:61,32:62,34:i,36:n,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:T,55:k,56:w,57:C,58:E,59:S,60:_,61:A,62:L,63:R,64:I,65:q,66:W,67:U,68:G,69:j,70:V,71:Y,72:H,73:X,74:K},{12:[1,118],33:[1,117]},{35:119,75:81,76:N,77:D,79:M,80:O},{35:120,75:81,76:N,77:D,79:M,80:O},{35:121,75:81,76:N,77:D,79:M,80:O},{35:122,75:81,76:N,77:D,79:M,80:O},{35:123,75:81,76:N,77:D,79:M,80:O},{35:124,75:81,76:N,77:D,79:M,80:O},{35:125,75:81,76:N,77:D,79:M,80:O},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Z,[2,15]),e(Q,[2,17],{21:22,19:130,22:t,23:r,24:$,26:F,28:z}),e(Z,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:r,24:$,26:F,28:z,34:i,36:n,37:a,38:s,39:o,40:l,41:h,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:T,55:k,56:w,57:C,58:E,59:S,60:_,61:A,62:L,63:R,64:I,65:q,66:W,67:U,68:G,69:j,70:V,71:Y,72:H,73:X,74:K}),e(J,[2,21]),e(J,[2,22]),e(B,[2,39]),e(ee,[2,71],{75:81,35:132,76:N,77:D,79:M,80:O}),e(te,[2,73]),{78:[1,133]},e(te,[2,75]),e(te,[2,76]),e(B,[2,40]),e(B,[2,41]),e(B,[2,42]),e(B,[2,43]),e(B,[2,44]),e(B,[2,45]),e(B,[2,46]),e(B,[2,47]),e(B,[2,48]),e(B,[2,49]),e(B,[2,50]),e(B,[2,51]),e(B,[2,52]),e(B,[2,53]),e(B,[2,54]),e(B,[2,55]),e(B,[2,56]),e(B,[2,57]),e(B,[2,58]),e(B,[2,60]),e(B,[2,61]),e(B,[2,62]),e(B,[2,63]),e(B,[2,64]),e(B,[2,65]),e(B,[2,66]),e(B,[2,67]),e(B,[2,68]),e(B,[2,69]),e(B,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(re,[2,28]),e(re,[2,29]),e(re,[2,30]),e(re,[2,31]),e(re,[2,32]),e(re,[2,33]),e(re,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Q,[2,18]),e(Z,[2,38]),e(ee,[2,72]),e(te,[2,74]),e(B,[2,24]),e(B,[2,35]),e(ie,[2,25]),e(ie,[2,26],{12:[1,138]}),e(ie,[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:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",h=0,c=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,T,k,w,C,E,S={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===x||"u"<typeof x)&&(x=v()),o[T]&&o[T][x]))||!k.length||!k[0]){var _,A=[];for(w in o[T])this.terminals_[w]&&2<w&&A.push("'"+this.terminals_[w]+"'");_=g.showPosition?"Parse error on line "+(h+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(c=g.yyleng,l=g.yytext,h=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],S.$=a[a.length-C],S._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(E=this.performAction.apply(S,[l,c,h,f.yy,k[1],a,s].concat(p)))<"u")return E;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),E=o[i[i.length-2]][i[i.length-1]],i.push(E);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:mt(function(e,t,r,i){switch(r){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:case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:case 53:return this.begin("rel_u"),66;case 54:case 55:return this.begin("rel_d"),67;case 56:case 57:return this.begin("rel_l"),68;case 58:case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68: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}}};t.lexer=r,mt(P,"Parser"),(fc=new((P.prototype=t).Parser=P)).parser=fc,mc=fc}),Rc=i(()=>{e(),yc=mt(function(e,t){for(var r of t)e.attr(r[0],r[1])},"d3Attrs"),vc=mt(function(e,t,r){var 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"),xc=mt(function(e,t,r,i){t=vc(t,r,i),yc(e,t)},"configureSvgSize"),bc=mt(function(e,t,r,i){var n=t.node().getBBox(),a=n.width,s=(B.info(`SVG bounds: ${a}x`+(s=n.height),n),B.info("Graph bounds: 0x0",e),B.info(`Calculated bounds: ${e=a+2*r}x`+(a=s+2*r)),xc(t,a,e,i),`${n.x-r} ${n.y-r} ${n.width+2*r} `+(n.height+2*r));t.attr("viewBox",s)},"setupGraphViewbox")}),Ic=i(()=>{e(),Tc={},kc=mt((e,t,r,i)=>{let n="";return e in Tc&&Tc[e]?n=Tc[e]({...r,svgId:i}):B.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"].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"),wc=mt((e,t)=>{void 0!==t&&(Tc[e]=t)},"addStylesForDiagram"),Cc=kc}),Nc={};sYe(Nc,{clear:()=>Pc,getAccDescription:()=>qc,getAccTitle:()=>Fc,getDiagramTitle:()=>Uc,setAccDescription:()=>zc,setAccTitle:()=>$c,setDiagramTitle:()=>Wc});var Dc,Mc,Oc,Bc,Pc,$c,Fc,zc,qc,Wc,Uc,Gc,jc,P,Vc,Yc,Hc,Xc,Kc,Zc,Qc,Jc,eu,tu,ru,iu,nu,au,su,ou,lu,hu,cu,uu,du,pu,gu,fu,mu,yu,vu,xu,bu,Tu,ku,wu,Cu,Eu,Su,_u,Au,Lu,Ru,Iu,Nu,Du,Mu,Ou,Bu,Pu,$u,Fu,zu,qu,Wu,Uu,Gu=i(()=>{ic(),Ei(),Oc=Mc=Dc="",Bc=mt(e=>Ih(e,br()),"sanitizeText"),Pc=mt(()=>{Mc=Oc=Dc=""},"clear"),$c=mt(e=>{Dc=Bc(e).replace(/^\s+/g,"")},"setAccTitle"),Fc=mt(()=>Dc,"getAccTitle"),zc=mt(e=>{Oc=Bc(e).replace(/\n\s+/g,`
`)},"setAccDescription"),qc=mt(()=>Oc,"getAccDescription"),Wc=mt(e=>{Mc=Bc(e)},"setDiagramTitle"),Uc=mt(()=>Mc,"getDiagramTitle")}),ju=i(()=>{Ac(),e(),Ei(),ic(),Rc(),Ic(),Gu(),Gc=B,jc=Ne,P=br,Vc=xr,Yc=lr,Hc=mt(e=>Ih(e,P()),"sanitizeText"),Xc=bc,Kc=mt(()=>Nc,"getCommonDb"),Zc={},Qc=mt((e,t,r)=>{Zc[e]&&Gc.warn(`Diagram with id ${e} already registered. Overwriting.`),Zc[e]=t,r&&pc(e,r),wc(e,t.styles),t.injectUtils?.(Gc,jc,P,Hc,Xc,Kc(),()=>{})},"registerDiagram"),Jc=mt(e=>{if(e in Zc)return Zc[e];throw new eu(e)},"getDiagram"),eu=class extends Error{static{mt(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}}}),Vu=i(()=>{ju(),ic(),Gu(),tu=[],ru=[""],au=[{alias:iu="global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:nu=""}],ou="",lu=!(su=[]),hu=4,cu=2,du=mt(function(){return uu},"getC4Type"),pu=mt(function(e){uu=Ih(e,P())},"setC4Type"),gu=mt(function(r,i,n,a,s,o,l,h,c){if(null!=r&&null!=i&&null!=n&&null!=a){let e={},t=su.find(e=>e.from===i&&e.to===n);t?e=t:su.push(e),e.type=r,e.from=i,e.to=n,e.label={text:a},null==s?e.techn={text:""}:"object"==typeof s?([r,a]=Object.entries(s)[0],e[r]={text:a}):e.techn={text:s},null==o?e.descr={text:""}:"object"==typeof o?([r,a]=Object.entries(o)[0],e[r]={text:a}):e.descr={text:o},"object"==typeof l?([s,r]=Object.entries(l)[0],e[s]=r):e.sprite=l,"object"==typeof h?([a,o]=Object.entries(h)[0],e[a]=o):e.tags=h,"object"==typeof c?([s,r]=Object.entries(c)[0],e[s]=r):e.link=c,e.wrap=Pu()}},"addRel"),fu=mt(function(r,i,n,a,s,o,l){if(null!==i&&null!==n){let e={},t=tu.find(e=>e.alias===i);var h;t&&i===t.alias?e=t:(e.alias=i,tu.push(e)),e.label=null==n?{text:""}:{text:n},null==a?e.descr={text:""}:"object"==typeof a?([n,h]=Object.entries(a)[0],e[n]={text:h}):e.descr={text:a},"object"==typeof s?([n,h]=Object.entries(s)[0],e[n]=h):e.sprite=s,"object"==typeof o?([a,n]=Object.entries(o)[0],e[a]=n):e.tags=o,"object"==typeof l?([h,s]=Object.entries(l)[0],e[h]=s):e.link=l,e.typeC4Shape={text:r},e.parentBoundary=iu,e.wrap=Pu()}},"addPersonOrSystem"),mu=mt(function(r,i,n,a,s,o,l,h){if(null!==i&&null!==n){let e={},t=tu.find(e=>e.alias===i);var c;t&&i===t.alias?e=t:(e.alias=i,tu.push(e)),e.label=null==n?{text:""}:{text:n},null==a?e.techn={text:""}:"object"==typeof a?([n,c]=Object.entries(a)[0],e[n]={text:c}):e.techn={text:a},null==s?e.descr={text:""}:"object"==typeof s?([n,c]=Object.entries(s)[0],e[n]={text:c}):e.descr={text:s},"object"==typeof o?([a,n]=Object.entries(o)[0],e[a]=n):e.sprite=o,"object"==typeof l?([c,s]=Object.entries(l)[0],e[c]=s):e.tags=l,"object"==typeof h?([a,n]=Object.entries(h)[0],e[a]=n):e.link=h,e.wrap=Pu(),e.typeC4Shape={text:r},e.parentBoundary=iu}},"addContainer"),yu=mt(function(r,i,n,a,s,o,l,h){if(null!==i&&null!==n){let e={},t=tu.find(e=>e.alias===i);var c;t&&i===t.alias?e=t:(e.alias=i,tu.push(e)),e.label=null==n?{text:""}:{text:n},null==a?e.techn={text:""}:"object"==typeof a?([n,c]=Object.entries(a)[0],e[n]={text:c}):e.techn={text:a},null==s?e.descr={text:""}:"object"==typeof s?([n,c]=Object.entries(s)[0],e[n]={text:c}):e.descr={text:s},"object"==typeof o?([a,n]=Object.entries(o)[0],e[a]=n):e.sprite=o,"object"==typeof l?([c,s]=Object.entries(l)[0],e[c]=s):e.tags=l,"object"==typeof h?([a,n]=Object.entries(h)[0],e[a]=n):e.link=h,e.wrap=Pu(),e.typeC4Shape={text:r},e.parentBoundary=iu}},"addComponent"),vu=mt(function(r,i,n,a,s){if(null!==r&&null!==i){let e={},t=au.find(e=>e.alias===r);var o;t&&r===t.alias?e=t:(e.alias=r,au.push(e)),e.label=null==i?{text:""}:{text:i},null==n?e.type={text:"system"}:"object"==typeof n?([i,o]=Object.entries(n)[0],e[i]={text:o}):e.type={text:n},"object"==typeof a?([i,o]=Object.entries(a)[0],e[i]=o):e.tags=a,"object"==typeof s?([n,i]=Object.entries(s)[0],e[n]=i):e.link=s,e.parentBoundary=iu,e.wrap=Pu(),nu=iu,iu=r,ru.push(nu)}},"addPersonOrSystemBoundary"),xu=mt(function(r,i,n,a,s){if(null!==r&&null!==i){let e={},t=au.find(e=>e.alias===r);var o;t&&r===t.alias?e=t:(e.alias=r,au.push(e)),e.label=null==i?{text:""}:{text:i},null==n?e.type={text:"container"}:"object"==typeof n?([i,o]=Object.entries(n)[0],e[i]={text:o}):e.type={text:n},"object"==typeof a?([i,o]=Object.entries(a)[0],e[i]=o):e.tags=a,"object"==typeof s?([n,i]=Object.entries(s)[0],e[n]=i):e.link=s,e.parentBoundary=iu,e.wrap=Pu(),nu=iu,iu=r,ru.push(nu)}},"addContainerBoundary"),bu=mt(function(r,i,n,a,s,e,o,l){if(null!==i&&null!==n){let e={},t=au.find(e=>e.alias===i);var h;t&&i===t.alias?e=t:(e.alias=i,au.push(e)),e.label=null==n?{text:""}:{text:n},null==a?e.type={text:"node"}:"object"==typeof a?([n,h]=Object.entries(a)[0],e[n]={text:h}):e.type={text:a},null==s?e.descr={text:""}:"object"==typeof s?([n,h]=Object.entries(s)[0],e[n]={text:h}):e.descr={text:s},"object"==typeof o?([a,n]=Object.entries(o)[0],e[a]=n):e.tags=o,"object"==typeof l?([h,s]=Object.entries(l)[0],e[h]=s):e.link=l,e.nodeType=r,e.parentBoundary=iu,e.wrap=Pu(),nu=iu,iu=i,ru.push(nu)}},"addDeploymentNode"),Tu=mt(function(){iu=nu,ru.pop(),nu=ru.pop(),ru.push(nu)},"popBoundaryParseStack"),ku=mt(function(e,t,r,i,n,a,s,o,l,h,c){let u=tu.find(e=>e.alias===t);var d,p;void 0===u&&void 0===(u=au.find(e=>e.alias===t))||(null!=r&&("object"==typeof r?([p,d]=Object.entries(r)[0],u[p]=d):u.bgColor=r),null!=i&&("object"==typeof i?([p,d]=Object.entries(i)[0],u[p]=d):u.fontColor=i),null!=n&&("object"==typeof n?([r,p]=Object.entries(n)[0],u[r]=p):u.borderColor=n),null!=a&&("object"==typeof a?([d,i]=Object.entries(a)[0],u[d]=i):u.shadowing=a),null!=s&&("object"==typeof s?([r,p]=Object.entries(s)[0],u[r]=p):u.shape=s),null!=o&&("object"==typeof o?([n,d]=Object.entries(o)[0],u[n]=d):u.sprite=o),null!=l&&("object"==typeof l?([i,a]=Object.entries(l)[0],u[i]=a):u.techn=l),null!=h&&("object"==typeof h?([r,p]=Object.entries(h)[0],u[r]=p):u.legendText=h),null!=c&&("object"==typeof c?([s,n]=Object.entries(c)[0],u[s]=n):u.legendSprite=c))},"updateElStyle"),wu=mt(function(e,t,r,i,n,a,s){var o,l,h=su.find(e=>e.from===t&&e.to===r);void 0!==h&&(null!=i&&("object"==typeof i?([o,l]=Object.entries(i)[0],h[o]=l):h.textColor=i),null!=n&&("object"==typeof n?([o,l]=Object.entries(n)[0],h[o]=l):h.lineColor=n),null!=a&&("object"==typeof a?([i,o]=Object.entries(a)[0],h[i]=parseInt(o)):h.offsetX=parseInt(a)),null!=s)&&("object"==typeof s?([l,n]=Object.entries(s)[0],h[l]=parseInt(n)):h.offsetY=parseInt(s))},"updateRelStyle"),Cu=mt(function(e,t,r){var t="object"==typeof t?(i=Object.values(t)[0],parseInt(i)):parseInt(t),i="object"==typeof r?(i=Object.values(r)[0],parseInt(i)):parseInt(r);1<=t&&(hu=t),1<=i&&(cu=i)},"updateLayoutConfig"),Eu=mt(function(){return hu},"getC4ShapeInRow"),Su=mt(function(){return cu},"getC4BoundaryInRow"),_u=mt(function(){return iu},"getCurrentBoundaryParse"),Au=mt(function(){return nu},"getParentBoundaryParse"),Lu=mt(function(t){return null==t?tu:tu.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),Ru=mt(function(t){return tu.find(e=>e.alias===t)},"getC4Shape"),Iu=mt(function(e){return Object.keys(Lu(e))},"getC4ShapeKeys"),Nu=mt(function(t){return null==t?au:au.filter(e=>e.parentBoundary===t)},"getBoundaries"),Du=Nu,Mu=mt(function(){return su},"getRels"),Ou=mt(function(){return ou},"getTitle"),Bu=mt(function(e){lu=e},"setWrap"),Pu=mt(function(){return lu},"autoWrap"),$u=mt(function(){tu=[],au=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],iu="global",ru=[nu=""],ru=[ou=""],lu=!(su=[]),hu=4,cu=2},"clear"),Fu={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},zu={FILLED:0,OPEN:1},qu={LEFTOF:0,RIGHTOF:1,OVER:2},Wu=mt(function(e){ou=Ih(e,P())},"setTitle"),Uu={addPersonOrSystem:fu,addPersonOrSystemBoundary:vu,addContainer:mu,addContainerBoundary:xu,addComponent:yu,addDeploymentNode:bu,popBoundaryParseStack:Tu,addRel:gu,updateElStyle:ku,updateRelStyle:wu,updateLayoutConfig:Cu,autoWrap:Pu,setWrap:Bu,getC4ShapeArray:Lu,getC4Shape:Ru,getC4ShapeKeys:Iu,getBoundaries:Nu,getBoundarys:Du,getCurrentBoundaryParse:_u,getParentBoundaryParse:Au,getRels:Mu,getTitle:Ou,getC4Type:du,getC4ShapeInRow:Eu,getC4BoundaryInRow:Su,setAccTitle:$c,getAccTitle:Fc,getAccDescription:qc,setAccDescription:zc,getConfig:mt(()=>P().c4,"getConfig"),clear:$u,LINETYPE:Fu,ARROWTYPE:zu,PLACEMENT:qu,setTitle:Wu,setC4Type:pu}});function Yu(e,t){return null==e||null==t?NaN:e<t?-1:t<e?1:t<=e?0:NaN}var Hu=i(()=>{mt(Yu,"ascending")});function Xu(e,t){return null==e||null==t?NaN:t<e?-1:e<t?1:e<=t?0:NaN}var Ku=i(()=>{mt(Xu,"descending")});function Zu(r){let a,s,n;function o(e,t,r=0,i=e.length){if(r<i){if(0!==a(t,t))return i;do{var n=r+i>>>1}while(s(e[n],t)<0?r=1+n:i=n,r<i)}return r}function e(e,t,r=0,i=e.length){if(r<i){if(0!==a(t,t))return i;do{var n=r+i>>>1}while(s(e[n],t)<=0?r=1+n:i=n,r<i)}return r}function t(e,t,r=0,i=e.length){return r<(i=o(e,t,r,i-1))&&n(e[i-1],t)>-n(e[i],t)?i-1:i}return n=2!==r.length?(a=Yu,s=mt((e,t)=>Yu(r(e),t),"compare2"),mt((e,t)=>r(e)-t,"delta")):(a=r===Yu||r===Xu?r:Qu,s=r),mt(o,"left"),mt(e,"right"),mt(t,"center"),{left:o,center:t,right:e}}function Qu(){return 0}var Ju=i(()=>{Hu(),Ku(),mt(Zu,"bisector"),mt(Qu,"zero")});function ed(e){return null===e?NaN:+e}var td,rd,id=i(()=>{mt(ed,"number")}),nd=i(()=>{Hu(),Ju(),id(),td=Zu(Yu).right,Zu(ed).center,rd=td});function ad({_intern:e,_key:t},r){return t=t(r),e.has(t)?e.get(t):r}function sd({_intern:e,_key:t},r){return t=t(r),e.has(t)?e.get(t):(e.set(t,r),r)}function od({_intern:e,_key:t},r){return t=t(r),e.has(t)&&(r=e.get(t),e.delete(t)),r}function ld(e){return null!==e&&"object"==typeof e?e.valueOf():e}var hd,cd=i(()=>{hd=class extends Map{static{mt(this,"InternMap")}constructor(e,t=ld){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(var[r,i]of e)this.set(r,i)}get(e){return super.get(ad(this,e))}has(e){return super.has(ad(this,e))}set(e,t){return super.set(sd(this,e),t)}delete(e){return super.delete(od(this,e))}},mt(ad,"intern_get"),mt(sd,"intern_set"),mt(od,"intern_delete"),mt(ld,"keyof")});function ud(e,t,r){let i=(t-e)/Math.max(0,r),n=Math.floor(Math.log10(i)),a=i/Math.pow(10,n),s=fd<=a?10:md<=a?5:yd<=a?2:1,o,l,h;return n<0?(h=Math.pow(10,-n)/s,o=Math.round(e*h),l=Math.round(t*h),o/h<e&&++o,l/h>t&&--l,h=-h):(h=Math.pow(10,n)*s,o=Math.round(e/h),l=Math.round(t/h),o*h<e&&++o,l*h>t&&--l),l<o&&.5<=r&&r<2?ud(e,t,2*r):[o,l,h]}function dd(e,t,r){if(!(0<(r=+r)))return[];if((e=+e)==(t=+t))return[e];var i=t<e,[n,a,s]=i?ud(t,e,r):ud(e,t,r);if(!(n<=a))return[];var o=a-n+1,l=new Array(o);if(i)if(s<0)for(let e=0;e<o;++e)l[e]=(a-e)/-s;else for(let e=0;e<o;++e)l[e]=(a-e)*s;else if(s<0)for(let e=0;e<o;++e)l[e]=(n+e)/-s;else for(let e=0;e<o;++e)l[e]=(n+e)*s;return l}function pd(e,t,r){return ud(e=+e,t=+t,r=+r)[2]}function gd(e,t,r){r=+r;var i=(t=+t)<(e=+e);return(i?-1:1)*((e=i?pd(t,e,r):pd(e,t,r))<0?1/-e:e)}var fd,md,yd,vd=i(()=>{fd=Math.sqrt(50),md=Math.sqrt(10),yd=Math.sqrt(2),mt(ud,"tickSpec"),mt(dd,"ticks"),mt(pd,"tickIncrement"),mt(gd,"tickStep")});function xd(t,r){let i;if(void 0===r)for(var e of t)null!=e&&(i<e||void 0===i&&e<=e)&&(i=e);else{let e=-1;for(var n of t)null!=(n=r(n,++e,t))&&(i<n||void 0===i&&n<=n)&&(i=n)}return i}var bd=i(()=>{mt(xd,"max")});function Td(t,r){let i;if(void 0===r)for(var e of t)null!=e&&(i>e||void 0===i&&e<=e)&&(i=e);else{let e=-1;for(var n of t)null!=(n=r(n,++e,t))&&(i>n||void 0===i&&n<=n)&&(i=n)}return i}var kd=i(()=>{mt(Td,"min")});function wd(e,t,r){e=+e,t=+t,r=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+r;for(var i=-1,n=0|Math.max(0,Math.ceil((t-e)/r)),a=new Array(n);++i<n;)a[i]=e+i*r;return a}var Cd=i(()=>{mt(wd,"range")}),Ed=i(()=>{nd(),Ju(),bd(),kd(),Cd(),vd(),cd()});function Sd(e){return e}var _d=i(()=>{mt(Sd,"default")});function Ad(e){return"translate("+e+",0)"}function Ld(e){return"translate(0,"+e+")"}function Rd(t){return e=>+t(e)}function Id(t,r){return r=Math.max(0,t.bandwidth()-2*r)/2,t.round()&&(r=Math.round(r)),e=>+t(e)+r}function Nd(){return!this.__axis}function Dd(p,g){var f=[],m=null,y=null,v=6,x=6,b=3,T=typeof window<"u"&&1<window.devicePixelRatio?0:.5,k=p===Bd||4===p?-1:1,w=4===p||2===p?"x":"y",C=p===Bd||p===Pd?Ad:Ld;function t(e){var t=m??(g.ticks?g.ticks.apply(g,f):g.domain()),r=y??(g.tickFormat?g.tickFormat.apply(g,f):Sd),i=Math.max(v,0)+b,n=+(a=g.range())[0]+T,a=+a[a.length-1]+T,s=(g.bandwidth?Id:Rd)(g.copy(),T),o=e.selection?e.selection():e,l=o.selectAll(".domain").data([null]),h=(t=o.selectAll(".tick").data(t,g).order()).exit(),c=t.enter().append("g").attr("class","tick"),u=t.select("line"),d=t.select("text"),l=l.merge(l.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),t=t.merge(c),u=u.merge(c.append("line").attr("stroke","currentColor").attr(w+"2",k*v)),d=d.merge(c.append("text").attr("fill","currentColor").attr(w,k*i).attr("dy",p===Bd?"0em":p===Pd?"0.71em":"0.32em"));e!==o&&(l=l.transition(e),t=t.transition(e),u=u.transition(e),d=d.transition(e),h=h.transition(e).attr("opacity",1e-6).attr("transform",function(e){return isFinite(e=s(e))?C(e+T):this.getAttribute("transform")}),c.attr("opacity",1e-6).attr("transform",function(e){var t=this.parentNode.__axis;return C((t&&isFinite(t=t(e))?t:s(e))+T)})),h.remove(),l.attr("d",4===p||2===p?x?"M"+k*x+","+n+"H"+T+"V"+a+"H"+k*x:"M"+T+","+n+"V"+a:x?"M"+n+","+k*x+"V"+T+"H"+a+"V"+k*x:"M"+n+","+T+"H"+a),t.attr("opacity",1).attr("transform",function(e){return C(s(e)+T)}),u.attr(w+"2",k*v),d.attr(w,k*i).text(r),o.filter(Nd).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===p?"start":4===p?"end":"middle"),o.each(function(){this.__axis=s})}return mt(t,"axis"),t.scale=function(e){return arguments.length?(g=e,t):g},t.ticks=function(){return f=Array.from(arguments),t},t.tickArguments=function(e){return arguments.length?(f=null==e?[]:Array.from(e),t):f.slice()},t.tickValues=function(e){return arguments.length?(m=null==e?null:Array.from(e),t):m&&m.slice()},t.tickFormat=function(e){return arguments.length?(y=e,t):y},t.tickSize=function(e){return arguments.length?(v=x=+e,t):v},t.tickSizeInner=function(e){return arguments.length?(v=+e,t):v},t.tickSizeOuter=function(e){return arguments.length?(x=+e,t):x},t.tickPadding=function(e){return arguments.length?(b=+e,t):b},t.offset=function(e){return arguments.length?(T=+e,t):T},t}function Md(e){return Dd(Bd,e)}function Od(e){return Dd(Pd,e)}var Bd,Pd,$d=i(()=>{_d(),Bd=1,Pd=3,mt(Ad,"translateX"),mt(Ld,"translateY"),mt(Rd,"number"),mt(Id,"center"),mt(Nd,"entering"),mt(Dd,"axis"),mt(Md,"axisTop"),mt(Od,"axisBottom")}),Fd=i(()=>{$d()});function zd(){for(var e,t=0,r=arguments.length,i={};t<r;++t){if(!(e=arguments[t]+"")||e in i||/[\s.]/.test(e))throw new Error("illegal type: "+e);i[e]=[]}return new qd(i)}function qd(e){this._=e}function Wd(e,i){return e.trim().split(/^|\s+/).map(function(e){var t="",r=e.indexOf(".");if(0<=r&&(t=e.slice(r+1),e=e.slice(0,r)),e&&!i.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}})}function Ud(e,t){for(var r,i=0,n=e.length;i<n;++i)if((r=e[i]).name===t)return r.value}function Gd(e,t,r){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=jd,e=e.slice(0,i).concat(e.slice(i+1));break}return null!=r&&e.push({name:t,value:r}),e}var jd,Vd,Yd,Hd,Xd=i(()=>{jd={value:mt(()=>{},"value")},mt(zd,"dispatch"),mt(qd,"Dispatch"),mt(Wd,"parseTypenames"),qd.prototype=zd.prototype={constructor:qd,on:mt(function(e,t){var r,i=this._,n=Wd(e+"",i),a=-1,s=n.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++a<s;)if(r=(e=n[a]).type)i[r]=Gd(i[r],e.name,t);else if(null==t)for(r in i)i[r]=Gd(i[r],e.name,null);return this}for(;++a<s;)if(r=(r=(e=n[a]).type)&&Ud(i[r],e.name))return r},"on"),copy:mt(function(){var e,t={},r=this._;for(e in r)t[e]=r[e].slice();return new qd(t)},"copy"),call:mt(function(e,t){if(0<(r=arguments.length-2))for(var r,i,n=new Array(r),a=0;a<r;++a)n[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=0,r=(i=this._[e]).length;a<r;++a)i[a].value.apply(t,n)},"call"),apply:mt(function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],n=0,a=i.length;n<a;++n)i[n].value.apply(t,r)},"apply")},mt(Ud,"get"),mt(Gd,"set"),Vd=zd}),Kd=i(()=>{Xd()}),Zd=i(()=>{Hd={svg:"http://www.w3.org/2000/svg",xhtml:Yd="http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function Qd(e){var t=e+="",r=t.indexOf(":");return 0<=r&&"xmlns"!==(t=e.slice(0,r))&&(e=e.slice(r+1)),Hd.hasOwnProperty(t)?{space:Hd[t],local:e}:e}var Jd=i(()=>{Zd(),mt(Qd,"default")});function ep(r){return function(){var e=this.ownerDocument,t=this.namespaceURI;return t===Yd&&e.documentElement.namespaceURI===Yd?e.createElement(r):e.createElementNS(t,r)}}function tp(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function rp(e){return((e=Qd(e)).local?tp:ep)(e)}var ip=i(()=>{Jd(),Zd(),mt(ep,"creatorInherit"),mt(tp,"creatorFixed"),mt(rp,"default")});function np(){}function ap(e){return null==e?np:function(){return this.querySelector(e)}}var sp=i(()=>{mt(np,"none"),mt(ap,"default")});function op(e){"function"!=typeof e&&(e=ap(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a,s,o=t[n],l=o.length,h=i[n]=new Array(l),c=0;c<l;++c)(a=o[c])&&(s=e.call(a,a.__data__,c,o))&&("__data__"in a&&(s.__data__=a.__data__),h[c]=s);return new Mg(i,this._parents)}var lp=i(()=>{Fg(),sp(),mt(op,"default")});function hp(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}var cp=i(()=>{mt(hp,"array")});function up(){return[]}function dp(e){return null==e?up:function(){return this.querySelectorAll(e)}}var pp=i(()=>{mt(up,"empty"),mt(dp,"default")});function gp(e){return function(){return hp(e.apply(this,arguments))}}function fp(e){e=("function"==typeof e?gp:dp)(e);for(var t=this._groups,r=t.length,i=[],n=[],a=0;a<r;++a)for(var s,o=t[a],l=o.length,h=0;h<l;++h)(s=o[h])&&(i.push(e.call(s,s.__data__,h,o)),n.push(s));return new Mg(i,n)}var mp=i(()=>{Fg(),cp(),pp(),mt(gp,"arrayAll"),mt(fp,"default")});function yp(e){return function(){return this.matches(e)}}function vp(t){return function(e){return e.matches(t)}}var xp=i(()=>{mt(yp,"default"),mt(vp,"childMatcher")});function bp(e){return function(){return wp.call(this.children,e)}}function Tp(){return this.firstElementChild}function kp(e){return this.select(null==e?Tp:bp("function"==typeof e?e:vp(e)))}var wp,Cp=i(()=>{xp(),wp=Array.prototype.find,mt(bp,"childFind"),mt(Tp,"childFirst"),mt(kp,"default")});function Ep(){return Array.from(this.children)}function Sp(e){return function(){return Ap.call(this.children,e)}}function _p(e){return this.selectAll(null==e?Ep:Sp("function"==typeof e?e:vp(e)))}var Ap,Lp=i(()=>{xp(),Ap=Array.prototype.filter,mt(Ep,"children"),mt(Sp,"childrenFilter"),mt(_p,"default")});function Rp(e){"function"!=typeof e&&(e=yp(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a,s=t[n],o=s.length,l=i[n]=[],h=0;h<o;++h)(a=s[h])&&e.call(a,a.__data__,h,s)&&l.push(a);return new Mg(i,this._parents)}var Ip=i(()=>{Fg(),xp(),mt(Rp,"default")});function Np(e){return new Array(e.length)}var Dp=i(()=>{mt(Np,"default")});function Mp(){return new Mg(this._enter||this._groups.map(Np),this._parents)}function Op(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var Bp=i(()=>{Dp(),Fg(),mt(Mp,"default"),mt(Op,"EnterNode"),Op.prototype={constructor:Op,appendChild:mt(function(e){return this._parent.insertBefore(e,this._next)},"appendChild"),insertBefore:mt(function(e,t){return this._parent.insertBefore(e,t)},"insertBefore"),querySelector:mt(function(e){return this._parent.querySelector(e)},"querySelector"),querySelectorAll:mt(function(e){return this._parent.querySelectorAll(e)},"querySelectorAll")}});function Pp(e){return function(){return e}}var $p=i(()=>{mt(Pp,"default")});function Fp(e,t,r,i,n,a){for(var s,o=0,l=t.length,h=a.length;o<h;++o)(s=t[o])?(s.__data__=a[o],i[o]=s):r[o]=new Op(e,a[o]);for(;o<l;++o)(s=t[o])&&(n[o]=s)}function zp(e,t,r,i,n,a,s){for(var o,l,h=new Map,c=t.length,u=a.length,d=new Array(c),p=0;p<c;++p)(o=t[p])&&(d[p]=l=s.call(o,o.__data__,p,t)+"",h.has(l)?n[p]=o:h.set(l,o));for(p=0;p<u;++p)l=s.call(e,a[p],p,a)+"",(o=h.get(l))?((i[p]=o).__data__=a[p],h.delete(l)):r[p]=new Op(e,a[p]);for(p=0;p<c;++p)(o=t[p])&&h.get(d[p])===o&&(n[p]=o)}function qp(e){return e.__data__}function Wp(e,t){if(!arguments.length)return Array.from(this,qp);var r=t?zp:Fp,i=this._parents,n=this._groups;"function"!=typeof e&&(e=Pp(e));for(var a=n.length,s=new Array(a),o=new Array(a),l=new Array(a),h=0;h<a;++h){var c=i[h],u=n[h],d=u.length,p=Up(e.call(c,c&&c.__data__,h,i)),g=p.length,f=o[h]=new Array(g),m=s[h]=new Array(g);r(c,u,f,m,l[h]=new Array(d),p,t);for(var y,v,x=0,b=0;x<g;++x)if(y=f[x]){for(b<=x&&(b=x+1);!(v=m[b])&&++b<g;);y._next=v||null}}return(s=new Mg(s,i))._enter=o,s._exit=l,s}function Up(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}var Gp=i(()=>{Fg(),Bp(),$p(),mt(Fp,"bindIndex"),mt(zp,"bindKey"),mt(qp,"datum"),mt(Wp,"default"),mt(Up,"arraylike")});function jp(){return new Mg(this._exit||this._groups.map(Np),this._parents)}var Vp=i(()=>{Dp(),Fg(),mt(jp,"default")});function Yp(e,t,r){var i=this.enter(),n=this,a=this.exit(),i="function"==typeof e?(i=e(i))&&i.selection():i.append(e+"");return null!=t&&(n=(n=t(n))&&n.selection()),null==r?a.remove():r(a),i&&n?i.merge(n).order():n}var Hp=i(()=>{mt(Yp,"default")});function Xp(e){for(var e=e.selection?e.selection():e,t=this._groups,r=e._groups,i=t.length,e=r.length,n=Math.min(i,e),a=new Array(i),s=0;s<n;++s)for(var o,l=t[s],h=r[s],c=l.length,u=a[s]=new Array(c),d=0;d<c;++d)(o=l[d]||h[d])&&(u[d]=o);for(;s<i;++s)a[s]=t[s];return new Mg(a,this._parents)}var Kp=i(()=>{Fg(),mt(Xp,"default")});function Zp(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i,n=e[t],a=n.length-1,s=n[a];0<=--a;)(i=n[a])&&(s&&4^i.compareDocumentPosition(s)&&s.parentNode.insertBefore(i,s),s=i);return this}var Qp=i(()=>{mt(Zp,"default")});function Jp(r){function e(e,t){return e&&t?r(e.__data__,t.__data__):!e-!t}r=r||e0,mt(e,"compareNode");for(var t=this._groups,i=t.length,n=new Array(i),a=0;a<i;++a){for(var s,o=t[a],l=o.length,h=n[a]=new Array(l),c=0;c<l;++c)(s=o[c])&&(h[c]=s);h.sort(e)}return new Mg(n,this._parents).order()}function e0(e,t){return e<t?-1:t<e?1:t<=e?0:NaN}var t0=i(()=>{Fg(),mt(Jp,"default"),mt(e0,"ascending")});function r0(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var i0=i(()=>{mt(r0,"default")});function n0(){return Array.from(this)}var a0=i(()=>{mt(n0,"default")});function s0(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length;n<a;++n){var s=i[n];if(s)return s}return null}var o0=i(()=>{mt(s0,"default")});function l0(){let e=0;for(var t of this)++e;return e}var h0=i(()=>{mt(l0,"default")});function c0(){return!this.node()}var u0=i(()=>{mt(c0,"default")});function d0(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var n,a=t[r],s=0,o=a.length;s<o;++s)(n=a[s])&&e.call(n,n.__data__,s,a);return this}var p0=i(()=>{mt(d0,"default")});function g0(e){return function(){this.removeAttribute(e)}}function f0(e){return function(){this.removeAttributeNS(e.space,e.local)}}function m0(e,t){return function(){this.setAttribute(e,t)}}function y0(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function v0(t,r){return function(){var e=r.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function x0(t,r){return function(){var e=r.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function b0(e,t){var r,e=Qd(e);return arguments.length<2?(r=this.node(),e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)):this.each((null==t?e.local?f0:g0:"function"==typeof t?e.local?x0:v0:e.local?y0:m0)(e,t))}var T0=i(()=>{Jd(),mt(g0,"attrRemove"),mt(f0,"attrRemoveNS"),mt(m0,"attrConstant"),mt(y0,"attrConstantNS"),mt(v0,"attrFunction"),mt(x0,"attrFunctionNS"),mt(b0,"default")});function k0(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var w0=i(()=>{mt(k0,"default")});function C0(e){return function(){this.style.removeProperty(e)}}function E0(e,t,r){return function(){this.style.setProperty(e,t,r)}}function S0(t,r,i){return function(){var e=r.apply(this,arguments);null==e?this.style.removeProperty(t):this.style.setProperty(t,e,i)}}function _0(e,t,r){return 1<arguments.length?this.each((null==t?C0:"function"==typeof t?S0:E0)(e,t,r??"")):A0(this.node(),e)}function A0(e,t){return e.style.getPropertyValue(t)||k0(e).getComputedStyle(e,null).getPropertyValue(t)}var L0=i(()=>{w0(),mt(C0,"styleRemove"),mt(E0,"styleConstant"),mt(S0,"styleFunction"),mt(_0,"default"),mt(A0,"styleValue")});function R0(e){return function(){delete this[e]}}function I0(e,t){return function(){this[e]=t}}function N0(t,r){return function(){var e=r.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function D0(e,t){return 1<arguments.length?this.each((null==t?R0:"function"==typeof t?N0:I0)(e,t)):this.node()[e]}var M0=i(()=>{mt(R0,"propertyRemove"),mt(I0,"propertyConstant"),mt(N0,"propertyFunction"),mt(D0,"default")});function O0(e){return e.trim().split(/^|\s+/)}function B0(e){return e.classList||new P0(e)}function P0(e){this._node=e,this._names=O0(e.getAttribute("class")||"")}function $0(e,t){for(var r=B0(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function F0(e,t){for(var r=B0(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function z0(e){return function(){$0(this,e)}}function q0(e){return function(){F0(this,e)}}function W0(e,t){return function(){(t.apply(this,arguments)?$0:F0)(this,e)}}function U0(e,t){var r=O0(e+"");if(arguments.length<2){for(var i=B0(this.node()),n=-1,a=r.length;++n<a;)if(!i.contains(r[n]))return!1;return!0}return this.each(("function"==typeof t?W0:t?z0:q0)(r,t))}var G0=i(()=>{mt(O0,"classArray"),mt(B0,"classList"),mt(P0,"ClassList"),P0.prototype={add:mt(function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:mt(function(e){0<=(e=this._names.indexOf(e))&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:mt(function(e){return 0<=this._names.indexOf(e)},"contains")},mt($0,"classedAdd"),mt(F0,"classedRemove"),mt(z0,"classedTrue"),mt(q0,"classedFalse"),mt(W0,"classedFunction"),mt(U0,"default")});function j0(){this.textContent=""}function V0(e){return function(){this.textContent=e}}function Y0(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function H0(e){return arguments.length?this.each(null==e?j0:("function"==typeof e?Y0:V0)(e)):this.node().textContent}var X0=i(()=>{mt(j0,"textRemove"),mt(V0,"textConstant"),mt(Y0,"textFunction"),mt(H0,"default")});function K0(){this.innerHTML=""}function Z0(e){return function(){this.innerHTML=e}}function Q0(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function J0(e){return arguments.length?this.each(null==e?K0:("function"==typeof e?Q0:Z0)(e)):this.node().innerHTML}var eg=i(()=>{mt(K0,"htmlRemove"),mt(Z0,"htmlConstant"),mt(Q0,"htmlFunction"),mt(J0,"default")});function tg(){this.nextSibling&&this.parentNode.appendChild(this)}function rg(){return this.each(tg)}var ig=i(()=>{mt(tg,"raise"),mt(rg,"default")});function ng(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ag(){return this.each(ng)}var sg=i(()=>{mt(ng,"lower"),mt(ag,"default")});function og(e){var t="function"==typeof e?e:rp(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var lg=i(()=>{ip(),mt(og,"default")});function hg(){return null}function cg(e,t){var r="function"==typeof e?e:rp(e),i=null==t?hg:"function"==typeof t?t:ap(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}var ug=i(()=>{ip(),sp(),mt(hg,"constantNull"),mt(cg,"default")});function dg(){var e=this.parentNode;e&&e.removeChild(this)}function pg(){return this.each(dg)}var gg=i(()=>{mt(dg,"remove"),mt(pg,"default")});function fg(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function mg(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function yg(e){return this.select(e?mg:fg)}var vg=i(()=>{mt(fg,"selection_cloneShallow"),mt(mg,"selection_cloneDeep"),mt(yg,"default")});function xg(e){return arguments.length?this.property("__data__",e):this.node().__data__}var bg=i(()=>{mt(xg,"default")});function Tg(t){return function(e){t.call(this,e,this.__data__)}}function kg(e){return e.trim().split(/^|\s+/).map(function(e){var t="",r=e.indexOf(".");return 0<=r&&(t=e.slice(r+1),e=e.slice(0,r)),{type:e,name:t}})}function wg(a){return function(){var e=this.__on;if(e){for(var t,r=0,i=-1,n=e.length;r<n;++r)t=e[r],a.type&&t.type!==a.type||t.name!==a.name?e[++i]=t:this.removeEventListener(t.type,t.listener,t.options);++i?e.length=i:delete this.__on}}}function Cg(a,s,o){return function(){var e,t=this.__on,r=Tg(s);if(t)for(var i=0,n=t.length;i<n;++i)if((e=t[i]).type===a.type&&e.name===a.name)return this.removeEventListener(e.type,e.listener,e.options),this.addEventListener(e.type,e.listener=r,e.options=o),void(e.value=s);this.addEventListener(a.type,r,o),e={type:a.type,name:a.name,value:s,listener:r,options:o},t?t.push(e):this.__on=[e]}}function Eg(e,t,r){var i,n,a=kg(e+""),s=a.length;if(!(arguments.length<2)){for(o=t?Cg:wg,i=0;i<s;++i)this.each(o(a[i],t,r));return this}var o=this.node().__on;if(o)for(var l,h=0,c=o.length;h<c;++h)for(i=0,l=o[h];i<s;++i)if((n=a[i]).type===l.type&&n.name===l.name)return l.value}var Sg=i(()=>{mt(Tg,"contextListener"),mt(kg,"parseTypenames"),mt(wg,"onRemove"),mt(Cg,"onAdd"),mt(Eg,"default")});function _g(e,t,r){var i=k0(e),n=i.CustomEvent;"function"==typeof n?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function Ag(e,t){return function(){return _g(this,e,t)}}function Lg(e,t){return function(){return _g(this,e,t.apply(this,arguments))}}function Rg(e,t){return this.each(("function"==typeof t?Lg:Ag)(e,t))}var Ig=i(()=>{w0(),mt(_g,"dispatchEvent"),mt(Ag,"dispatchConstant"),mt(Lg,"dispatchFunction"),mt(Rg,"default")});function*Ng(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i,n=e[t],a=0,s=n.length;a<s;++a)(i=n[a])&&(yield i)}var Dg=i(()=>{mt(Ng,"default")});function Mg(e,t){this._groups=e,this._parents=t}function Og(){return new Mg([[document.documentElement]],Pg)}function Bg(){return this}var Pg,$g,Fg=i(()=>{lp(),mp(),Cp(),Lp(),Ip(),Gp(),Bp(),Vp(),Hp(),Kp(),Qp(),t0(),i0(),a0(),o0(),h0(),u0(),p0(),T0(),L0(),M0(),G0(),X0(),eg(),ig(),sg(),lg(),ug(),gg(),vg(),bg(),Sg(),Ig(),Dg(),Pg=[null],mt(Mg,"Selection"),mt(Og,"selection"),mt(Bg,"selection_selection"),Mg.prototype=Og.prototype={constructor:Mg,select:op,selectAll:fp,selectChild:kp,selectChildren:_p,filter:Rp,data:Wp,enter:Mp,exit:jp,join:Yp,merge:Xp,selection:Bg,order:Zp,sort:Jp,call:r0,nodes:n0,node:s0,size:l0,empty:c0,each:d0,attr:b0,style:_0,property:D0,classed:U0,text:H0,html:J0,raise:rg,lower:ag,append:og,insert:cg,remove:pg,clone:yg,datum:xg,on:Eg,dispatch:Rg,[Symbol.iterator]:Ng},$g=Og});function Q(e){return"string"==typeof e?new Mg([[document.querySelector(e)]],[document.documentElement]):new Mg([[e]],Pg)}var zg=i(()=>{Fg(),mt(Q,"default")}),qg=i(()=>{xp(),Jd(),zg(),Fg(),sp(),pp(),L0()}),Wg=i(()=>{});function Ug(e,t,r){(e.prototype=t.prototype=r).constructor=e}function Gg(e,t){var r,i=Object.create(e.prototype);for(r in t)i[r]=t[r];return i}var jg=i(()=>{mt(Ug,"default"),mt(Gg,"extend")});function Vg(){}function Yg(){return this.rgb().formatHex()}function Hg(){return this.rgb().formatHex8()}function Xg(){return uf(this).formatHsl()}function Kg(){return this.rgb().formatRgb()}function Zg(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=bf.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Qg(t):3===r?new rf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Jg(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Jg(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Tf.exec(e))?new rf(t[1],t[2],t[3],1):(t=kf.exec(e))?new rf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=wf.exec(e))?Jg(t[1],t[2],t[3],t[4]):(t=Cf.exec(e))?Jg(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Ef.exec(e))?cf(t[1],t[2]/100,t[3]/100,1):(t=Sf.exec(e))?cf(t[1],t[2]/100,t[3]/100,t[4]):_f.hasOwnProperty(e)?Qg(_f[e]):"transparent"===e?new rf(NaN,NaN,NaN,0):null}function Qg(e){return new rf(e>>16&255,e>>8&255,255&e,1)}function Jg(e,t,r,i){return new rf(e=i<=0?t=r=NaN:e,t,r,i)}function ef(e){return(e=e instanceof Vg?e:Zg(e))?new rf((e=e.rgb()).r,e.g,e.b,e.opacity):new rf}function tf(e,t,r,i){return 1===arguments.length?ef(e):new rf(e,t,r,i??1)}function rf(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}function nf(){return"#"+hf(this.r)+hf(this.g)+hf(this.b)}function af(){return"#"+hf(this.r)+hf(this.g)+hf(this.b)+hf(255*(isNaN(this.opacity)?1:this.opacity))}function sf(){var e=of(this.opacity);return(1===e?"rgb(":"rgba(")+lf(this.r)+`, ${lf(this.g)}, `+lf(this.b)+(1===e?")":`, ${e})`)}function of(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function lf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function hf(e){return((e=lf(e))<16?"0":"")+e.toString(16)}function cf(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||1<=r?e=t=NaN:t<=0&&(e=NaN),new pf(e,t,r,i)}function uf(e){var t,r,i,n,a,s,o,l;return e instanceof pf?new pf(e.h,e.s,e.l,e.opacity):(e=e instanceof Vg?e:Zg(e))?e instanceof pf?e:(t=(e=e.rgb()).r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),s=NaN,l=((a=Math.max(t,r,i))+n)/2,(o=a-n)?(s=t===a?(r-i)/o+6*(r<i):r===a?(i-t)/o+2:(t-r)/o+4,o/=l<.5?a+n:2-a-n,s*=60):o=0<l&&l<1?0:s,new pf(s,o,l,e.opacity)):new pf}function df(e,t,r,i){return 1===arguments.length?uf(e):new pf(e,t,r,i??1)}function pf(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}function gf(e){return(e=(e||0)%360)<0?e+360:e}function ff(e){return Math.max(0,Math.min(1,e||0))}function mf(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}var yf,vf,xf,bf,Tf,kf,wf,Cf,Ef,Sf,_f,Af,Lf,Rf=i(()=>{jg(),mt(Vg,"Color"),yf="\\s*([+-]?\\d+)\\s*",vf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",xf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",bf=/^#([0-9a-f]{3,8})$/,Tf=new RegExp(`^rgb\\(${yf},${yf},${yf}\\)$`),kf=new RegExp(`^rgb\\(${xf},${xf},${xf}\\)$`),wf=new RegExp(`^rgba\\(${yf},${yf},${yf},${vf}\\)$`),Cf=new RegExp(`^rgba\\(${xf},${xf},${xf},${vf}\\)$`),Ef=new RegExp(`^hsl\\(${vf},${xf},${xf}\\)$`),Sf=new RegExp(`^hsla\\(${vf},${xf},${xf},${vf}\\)$`),_f={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},Ug(Vg,Zg,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Yg,formatHex:Yg,formatHex8:Hg,formatHsl:Xg,formatRgb:Kg,toString:Kg}),mt(Yg,"color_formatHex"),mt(Hg,"color_formatHex8"),mt(Xg,"color_formatHsl"),mt(Kg,"color_formatRgb"),mt(Zg,"color"),mt(Qg,"rgbn"),mt(Jg,"rgba"),mt(ef,"rgbConvert"),mt(tf,"rgb"),mt(rf,"Rgb"),Ug(rf,tf,Gg(Vg,{brighter(e){return e=null==e?1/.7:Math.pow(1/.7,e),new rf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new rf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new rf(lf(this.r),lf(this.g),lf(this.b),of(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:nf,formatHex:nf,formatHex8:af,formatRgb:sf,toString:sf})),mt(nf,"rgb_formatHex"),mt(af,"rgb_formatHex8"),mt(sf,"rgb_formatRgb"),mt(of,"clampa"),mt(lf,"clampi"),mt(hf,"hex"),mt(cf,"hsla"),mt(uf,"hslConvert"),mt(df,"hsl"),mt(pf,"Hsl"),Ug(pf,df,Gg(Vg,{brighter(e){return e=null==e?1/.7:Math.pow(1/.7,e),new pf(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new pf(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l;return new rf(mf(240<=e?e-240:120+e,r=2*r-(t=r+(r<.5?r:1-r)*t),t),mf(e,r,t),mf(e<120?240+e:e-120,r,t),this.opacity)},clamp(){return new pf(gf(this.h),ff(this.s),ff(this.l),of(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(){var e=of(this.opacity);return(1===e?"hsl(":"hsla(")+gf(this.h)+`, ${100*ff(this.s)}%, ${100*ff(this.l)}%`+(1===e?")":`, ${e})`)}})),mt(gf,"clamph"),mt(ff,"clampt"),mt(mf,"hsl2rgb")}),If=i(()=>{Af=Math.PI/180,Lf=180/Math.PI});function Nf(e){var t,r,i,n,a,s;return e instanceof Mf?new Mf(e.l,e.a,e.b,e.opacity):e instanceof qf?Wf(e):(n=Of(.2225045*(t=$f((e=e instanceof rf?e:ef(e)).r))+.7168786*(r=$f(e.g))+.0606169*(i=$f(e.b))),t===r&&r===i?a=s=n:(a=Of((.4360747*t+.3850649*r+.1430804*i)/.96422),s=Of((.0139322*t+.0971045*r+.7141733*i)/.82521)),new Mf(116*n-16,500*(a-n),200*(n-s),e.opacity))}function Df(e,t,r,i){return 1===arguments.length?Nf(e):new Mf(e,t,r,i??1)}function Mf(e,t,r,i){this.l=+e,this.a=+t,this.b=+r,this.opacity=+i}function Of(e){return Vf<e?Math.pow(e,1/3):e/jf+Uf}function Bf(e){return Gf<e?e*e*e:jf*(e-Uf)}function Pf(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function $f(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ff(e){var t;return e instanceof qf?new qf(e.h,e.c,e.l,e.opacity):0===(e=e instanceof Mf?e:Nf(e)).a&&0===e.b?new qf(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity):new qf((t=Math.atan2(e.b,e.a)*Lf)<0?360+t:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function zf(e,t,r,i){return 1===arguments.length?Ff(e):new qf(e,t,r,i??1)}function qf(e,t,r,i){this.h=+e,this.c=+t,this.l=+r,this.opacity=+i}function Wf(e){var t;return isNaN(e.h)?new Mf(e.l,0,0,e.opacity):(t=e.h*Af,new Mf(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity))}var Uf,Gf,jf,Vf,Yf=i(()=>{jg(),Rf(),If(),Uf=4/29,jf=3*(Gf=6/29)*Gf,Vf=Gf*Gf*Gf,mt(Nf,"labConvert"),mt(Df,"lab"),mt(Mf,"Lab"),Ug(Mf,Df,Gg(Vg,{brighter(e){return new Mf(this.l+18*(e??1),this.a,this.b,this.opacity)},darker(e){return new Mf(this.l-18*(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 new rf(Pf(3.1338561*(t=.96422*Bf(t))-1.6168667*(e=+Bf(e))-.4906146*(r=.82521*Bf(r))),Pf(-.9787684*t+1.9161415*e+.033454*r),Pf(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),mt(Of,"xyz2lab"),mt(Bf,"lab2xyz"),mt(Pf,"lrgb2rgb"),mt($f,"rgb2lrgb"),mt(Ff,"hclConvert"),mt(zf,"hcl"),mt(qf,"Hcl"),mt(Wf,"hcl2lab"),Ug(qf,zf,Gg(Vg,{brighter(e){return new qf(this.h,this.c,this.l+18*(e??1),this.opacity)},darker(e){return new qf(this.h,this.c,this.l-18*(e??1),this.opacity)},rgb(){return Wf(this).rgb()}}))}),Hf=i(()=>{Rf(),Yf()});function Xf(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 Kf(s){var o=s.length-1;return function(e){var t=e<=0?e=0:1<=e?o-(e=1):Math.floor(e*o),r=s[t],i=s[t+1],n=0<t?s[t-1]:2*r-i,a=t<o-1?s[t+2]:2*i-r;return Xf((e-t/o)*o,n,r,i,a)}}var Zf=i(()=>{mt(Xf,"basis"),mt(Kf,"default")});function Qf(i){var n=i.length;return function(e){var t=Math.floor(((e%=1)<0?++e:e)*n),r=i[(t+n-1)%n];return Xf((e-t/n)*n,r,i[t%n],i[(t+1)%n],i[(t+2)%n])}}var Jf,e1=i(()=>{Zf(),mt(Qf,"default")}),t1=i(()=>{Jf=mt(e=>()=>e,"default")});function r1(t,r){return function(e){return t+e*r}}function i1(t,r,i){return t=Math.pow(t,i),r=Math.pow(r,i)-t,i=1/i,function(e){return Math.pow(t+e*r,i)}}function n1(e,t){var r=t-e;return r?r1(e,180<r||r<-180?r-360*Math.round(r/360):r):Jf(isNaN(e)?t:e)}function a1(r){return 1==(r=+r)?s1:function(e,t){return t-e?i1(e,t,r):Jf(isNaN(e)?t:e)}}function s1(e,t){var r=t-e;return r?r1(e,r):Jf(isNaN(e)?t:e)}var o1=i(()=>{t1(),mt(r1,"linear"),mt(i1,"exponential"),mt(n1,"hue"),mt(a1,"gamma"),mt(s1,"nogamma")});function l1(o){return function(e){for(var t,r=e.length,i=new Array(r),n=new Array(r),a=new Array(r),s=0;s<r;++s)t=tf(e[s]),i[s]=t.r||0,n[s]=t.g||0,a[s]=t.b||0;return i=o(i),n=o(n),a=o(a),t.opacity=1,function(e){return t.r=i(e),t.g=n(e),t.b=a(e),t+""}}}var h1,c1=i(()=>{Hf(),Zf(),e1(),o1(),h1=mt(function e(t){var s=a1(t);function r(t,e){var r=s((t=tf(t)).r,(e=tf(e)).r),i=s(t.g,e.g),n=s(t.b,e.b),a=s1(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=n(e),t.opacity=a(e),t+""}}return mt(r,"rgb"),r.gamma=e,r},"rgbGamma")(1),mt(l1,"rgbSpline"),l1(Kf),l1(Qf)});function u1(t,r){r=r||[];var i,n=t?Math.min(r.length,t.length):0,a=r.slice();return function(e){for(i=0;i<n;++i)a[i]=t[i]*(1-e)+r[i]*e;return a}}function d1(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var p1=i(()=>{mt(u1,"default"),mt(d1,"isNumberArray")});function g1(e,t){for(var r=t?t.length:0,i=e?Math.min(r,e.length):0,n=new Array(i),a=new Array(r),s=0;s<i;++s)n[s]=A1(e[s],t[s]);for(;s<r;++s)a[s]=t[s];return function(e){for(s=0;s<i;++s)a[s]=n[s](e);return a}}var f1=i(()=>{L1(),mt(g1,"genericArray")});function m1(t,r){var i=new Date;return t=+t,r=+r,function(e){return i.setTime(t*(1-e)+r*e),i}}var y1=i(()=>{mt(m1,"default")});function v1(t,r){return t=+t,r=+r,function(e){return t*(1-e)+r*e}}var x1=i(()=>{mt(v1,"default")});function b1(e,t){var r,i={},n={};for(r in null!==e&&"object"==typeof e||(e={}),t=null!==t&&"object"==typeof t?t:{})r in e?i[r]=A1(e[r],t[r]):n[r]=t[r];return function(e){for(r in i)n[r]=i[r](e);return n}}var T1=i(()=>{L1(),mt(b1,"default")});function k1(e){return function(){return e}}function w1(t){return function(e){return t(e)+""}}function C1(e,i){var t,r,n,a=E1.lastIndex=S1.lastIndex=0,s=-1,o=[],l=[];for(e+="",i+="";(t=E1.exec(e))&&(r=S1.exec(i));)(n=r.index)>a&&(n=i.slice(a,n),o[s]?o[s]+=n:o[++s]=n),(t=t[0])===(r=r[0])?o[s]?o[s]+=r:o[++s]=r:(o[++s]=null,l.push({i:s,x:v1(t,r)})),a=S1.lastIndex;return a<i.length&&(n=i.slice(a),o[s]?o[s]+=n:o[++s]=n),o.length<2?l[0]?w1(l[0].x):k1(i):(i=l.length,function(e){for(var t,r=0;r<i;++r)o[(t=l[r]).i]=t.x(e);return o.join("")})}var E1,S1,_1=i(()=>{x1(),E1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,S1=new RegExp(E1.source,"g"),mt(k1,"zero"),mt(w1,"one"),mt(C1,"default")});function A1(e,t){var r=typeof t;return null==t||"boolean"==r?Jf(t):("number"==r?v1:"string"==r?(r=Zg(t))?(t=r,h1):C1:t instanceof Zg?h1:t instanceof Date?m1:d1(t)?u1:Array.isArray(t)?g1:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?b1:v1)(e,t)}var L1=i(()=>{Hf(),c1(),f1(),y1(),x1(),T1(),_1(),t1(),p1(),mt(A1,"default")});function R1(t,r){return t=+t,r=+r,function(e){return Math.round(t*(1-e)+r*e)}}var I1=i(()=>{mt(R1,"default")});function N1(e,t,r,i,n,a){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,l/=o),e*i<t*r&&(e=-e,t=-t,l=-l,s=-s),{translateX:n,translateY:a,rotate:Math.atan2(t,e)*D1,skewX:Math.atan(l)*D1,scaleX:s,scaleY:o}}var D1,M1,O1=i(()=>{D1=180/Math.PI,M1={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},mt(N1,"default")});function B1(e){return(e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"")).isIdentity?M1:N1(e.a,e.b,e.c,e.d,e.e,e.f)}function P1(e){return null!=e&&(($1=$1||document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("transform",e),e=$1.transform.baseVal.consolidate())?N1((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):M1}var $1,F1=i(()=>{O1(),mt(B1,"parseCss"),mt(P1,"parseSvg")});function z1(r,o,l,n){function h(e){return e.length?e.pop()+" ":""}function i(e,t,r,i,n,a){var s;e!==r||t!==i?(s=n.push("translate(",null,o,null,l),a.push({i:s-4,x:v1(e,r)},{i:s-2,x:v1(t,i)})):(r||i)&&n.push("translate("+r+o+i+l)}function s(e,t,r,i){e!==t?(180<e-t?t+=360:180<t-e&&(e+=360),i.push({i:r.push(h(r)+"rotate(",null,n)-2,x:v1(e,t)})):t&&r.push(h(r)+"rotate("+t+n)}function c(e,t,r,i){e!==t?i.push({i:r.push(h(r)+"skewX(",null,n)-2,x:v1(e,t)}):t&&r.push(h(r)+"skewX("+t+n)}function u(e,t,r,i,n,a){var s;e!==r||t!==i?(s=n.push(h(n)+"scale(",null,",",null,")"),a.push({i:s-4,x:v1(e,r)},{i:s-2,x:v1(t,i)})):1===r&&1===i||n.push(h(n)+"scale("+r+","+i+")")}return mt(h,"pop"),mt(i,"translate"),mt(s,"rotate"),mt(c,"skewX"),mt(u,"scale"),function(e,t){var n=[],a=[];return e=r(e),t=r(t),i(e.translateX,e.translateY,t.translateX,t.translateY,n,a),s(e.rotate,t.rotate,n,a),c(e.skewX,t.skewX,n,a),u(e.scaleX,e.scaleY,t.scaleX,t.scaleY,n,a),function(e){for(var t,r=-1,i=a.length;++r<i;)n[(t=a[r]).i]=t.x(e);return n.join("")}}}var q1,W1,U1=i(()=>{x1(),F1(),mt(z1,"interpolateTransform"),q1=z1(B1,"px, ","px)","deg)"),W1=z1(P1,", ",")",")")});function G1(s){return function(t,e){var r=s((t=zf(t)).h,(e=zf(e)).h),i=s1(t.c,e.c),n=s1(t.l,e.l),a=s1(t.opacity,e.opacity);return function(e){return t.h=r(e),t.c=i(e),t.l=n(e),t.opacity=a(e),t+""}}}var j1,V1=i(()=>{Hf(),o1(),mt(G1,"hcl"),j1=G1(n1),G1(s1)}),Y1=i(()=>{L1(),x1(),I1(),_1(),U1(),c1(),V1()});function H1(){return cm||(pm(X1),cm=dm.now()+um)}function X1(){cm=0}function K1(){this._call=this._time=this._next=null}function Z1(e,t,r){var i=new K1;return i.restart(e,t,r),i}function Q1(){H1(),++im;for(var e,t=om;t;)0<=(e=cm-t._time)&&t._call.call(void 0,e),t=t._next;--im}function J1(){cm=(hm=dm.now())+um,im=nm=0;try{Q1()}finally{im=0,tm(),cm=0}}function em(){var e=dm.now(),t=e-hm;sm<t&&(um-=t,hm=e)}function tm(){for(var e,t,r=om,i=1/0;r;)r=r._call?(i>r._time&&(i=r._time),(e=r)._next):(t=r._next,r._next=null,e?e._next=t:om=t);lm=e,rm(i)}function rm(e){im||(nm=nm&&clearTimeout(nm),24<e-cm?(e<1/0&&(nm=setTimeout(J1,e-dm.now()-um)),am=am&&clearInterval(am)):(am||(hm=dm.now(),am=setInterval(em,sm)),im=1,pm(J1)))}var im,nm,am,sm,om,lm,hm,cm,um,dm,pm,gm=i(()=>{sm=1e3,um=cm=hm=am=nm=im=0,dm="object"==typeof performance&&performance.now?performance:Date,pm="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)},mt(H1,"now"),mt(X1,"clearNow"),mt(K1,"Timer"),K1.prototype=Z1.prototype={constructor:K1,restart:mt(function(e,t,r){if("function"!=typeof e)throw new TypeError("callback is not a function");r=(null==r?H1():+r)+(null==t?0:+t),this._next||lm===this||(lm?lm._next=this:om=this,lm=this),this._call=e,this._time=r,rm()},"restart"),stop:mt(function(){this._call&&(this._call=null,this._time=1/0,rm())},"stop")},mt(Z1,"timer"),mt(Q1,"timerFlush"),mt(J1,"wake"),mt(em,"poke"),mt(tm,"nap"),mt(rm,"sleep")});function fm(t,r,e){var i=new K1;return r=null==r?0:+r,i.restart(e=>{i.stop(),t(e+r)},r,e),i}var mm=i(()=>{gm(),mt(fm,"default")}),ym=i(()=>{gm(),mm()});function vm(e,t,r,i,n,a){var s=e.__transition;if(s){if(r in s)return}else e.__transition={};km(e,r,{name:t,index:i,group:n,on:wm,tween:Cm,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Em})}function xm(e,t){if((e=Tm(e,t)).state>Em)throw new Error("too late; already scheduled");return e}function bm(e,t){if((e=Tm(e,t)).state>Am)throw new Error("too late; already running");return e}function Tm(e,t){if(e=(e=e.__transition)&&e[t])return e;throw new Error("transition not found")}function km(a,s,o){var l,h=a.__transition;function e(e){o.state=Sm,o.timer.restart(c,o.delay,o.time),o.delay<=e&&c(e-o.delay)}function c(e){var t,r,i,n;if(o.state!==Sm)return d();for(t in h)if(n=h[t],n.name===o.name){if(n.state===Am)return fm(c);n.state===Lm?(n.state=Im,n.timer.stop(),n.on.call("interrupt",a,a.__data__,n.index,n.group),delete h[t]):+t<s&&(n.state=Im,n.timer.stop(),n.on.call("cancel",a,a.__data__,n.index,n.group),delete h[t])}if(fm(function(){o.state===Am&&(o.state=Lm,o.timer.restart(u,o.delay,o.time),u(e))}),o.state=_m,o.on.call("start",a,a.__data__,o.index,o.group),o.state===_m){for(o.state=Am,l=new Array(i=o.tween.length),t=0,r=-1;t<i;++t)(n=o.tween[t].value.call(a,a.__data__,o.index,o.group))&&(l[++r]=n);l.length=r+1}}function u(e){for(var t=e<o.duration?o.ease.call(null,e/o.duration):(o.timer.restart(d),o.state=Rm,1),r=-1,i=l.length;++r<i;)l[r].call(a,t);o.state===Rm&&(o.on.call("end",a,a.__data__,o.index,o.group),d())}function d(){for(var e in o.state=Im,o.timer.stop(),delete h[s],h)return;delete a.__transition}(h[s]=o).timer=Z1(e,0,o.time),mt(e,"schedule"),mt(c,"start"),mt(u,"tick"),mt(d,"stop")}var wm,Cm,Em,Sm,_m,Am,Lm,Rm,Im,Nm=i(()=>{Kd(),ym(),wm=Vd("start","end","cancel","interrupt"),Cm=[],Em=0,Sm=1,_m=2,Am=3,Lm=4,Rm=5,Im=6,mt(vm,"default"),mt(xm,"init"),mt(bm,"set"),mt(Tm,"get"),mt(km,"create")});function Dm(e,t){var r,i,n,a=e.__transition,s=!0;if(a){for(n in t=null==t?null:t+"",a)(r=a[n]).name!==t?s=!1:(i=_m<r.state&&r.state<Rm,r.state=Im,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete a[n]);s&&delete e.__transition}}var Mm=i(()=>{Nm(),mt(Dm,"default")});function Om(e){return this.each(function(){Dm(this,e)})}var Bm=i(()=>{Mm(),mt(Om,"default")});function Pm(n,a){var s,o;return function(){var e=bm(this,n),t=e.tween;if(t!==s)for(var r=0,i=(o=s=t).length;r<i;++r)if(o[r].name===a){(o=o.slice()).splice(r,1);break}e.tween=o}}function $m(a,s,o){var l,h;if("function"!=typeof o)throw new Error;return function(){var e=bm(this,a),t=e.tween;if(t!==l){h=(l=t).slice();for(var r={name:s,value:o},i=0,n=h.length;i<n;++i)if(h[i].name===s){h[i]=r;break}i===n&&h.push(r)}e.tween=h}}function Fm(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i,n=Tm(this.node(),r).tween,a=0,s=n.length;a<s;++a)if((i=n[a]).name===e)return i.value;return null}return this.each((null==t?Pm:$m)(r,e,t))}function zm(e,t,r){var i=e._id;return e.each(function(){var e=bm(this,i);(e.value||(e.value={}))[t]=r.apply(this,arguments)}),function(e){return Tm(e,i).value[t]}}var qm=i(()=>{Nm(),mt(Pm,"tweenRemove"),mt($m,"tweenFunction"),mt(Fm,"default"),mt(zm,"tweenValue")});function Wm(e,t){var r;return("number"==typeof t?v1:t instanceof Zg?h1:(r=Zg(t))?(t=r,h1):C1)(e,t)}var Um=i(()=>{Hf(),Y1(),mt(Wm,"default")});function Gm(e){return function(){this.removeAttribute(e)}}function jm(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Vm(t,r,i){var n,a,s=i+"";return function(){var e=this.getAttribute(t);return e===s?null:e===n?a:a=r(n=e,i)}}function Ym(t,r,i){var n,a,s=i+"";return function(){var e=this.getAttributeNS(t.space,t.local);return e===s?null:e===n?a:a=r(n=e,i)}}function Hm(i,n,a){var s,o,l;return function(){var e,t,r=a(this);return null==r?void this.removeAttribute(i):(e=this.getAttribute(i))===(t=r+"")?null:e===s&&t===o?l:(o=t,l=n(s=e,r))}}function Xm(i,n,a){var s,o,l;return function(){var e,t,r=a(this);return null==r?void this.removeAttributeNS(i.space,i.local):(e=this.getAttributeNS(i.space,i.local))===(t=r+"")?null:e===s&&t===o?l:(o=t,l=n(s=e,r))}}function Km(e,t){var r=Qd(e),i="transform"===r?W1:Wm;return this.attrTween(e,"function"==typeof t?(r.local?Xm:Hm)(r,i,zm(this,"attr."+e,t)):null==t?(r.local?jm:Gm)(r):(r.local?Ym:Vm)(r,i,t))}var Zm=i(()=>{Y1(),qg(),qm(),Um(),mt(Gm,"attrRemove"),mt(jm,"attrRemoveNS"),mt(Vm,"attrConstant"),mt(Ym,"attrConstantNS"),mt(Hm,"attrFunction"),mt(Xm,"attrFunctionNS"),mt(Km,"default")});function Qm(t,r){return function(e){this.setAttribute(t,r.call(this,e))}}function Jm(t,r){return function(e){this.setAttributeNS(t.space,t.local,r.call(this,e))}}function ey(t,r){var i,n;function e(){var e=r.apply(this,arguments);return i=e!==n?(n=e)&&Jm(t,e):i}return mt(e,"tween"),e._value=r,e}function ty(t,r){var i,n;function e(){var e=r.apply(this,arguments);return i=e!==n?(n=e)&&Qm(t,e):i}return mt(e,"tween"),e._value=r,e}function ry(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return e=Qd(e),this.tween(r,(e.local?ey:ty)(e,t))}var iy=i(()=>{qg(),mt(Qm,"attrInterpolate"),mt(Jm,"attrInterpolateNS"),mt(ey,"attrTweenNS"),mt(ty,"attrTween"),mt(ry,"default")});function ny(e,t){return function(){xm(this,e).delay=+t.apply(this,arguments)}}function ay(e,t){return t=+t,function(){xm(this,e).delay=t}}function sy(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?ny:ay)(t,e)):Tm(this.node(),t).delay}var oy=i(()=>{Nm(),mt(ny,"delayFunction"),mt(ay,"delayConstant"),mt(sy,"default")});function ly(e,t){return function(){bm(this,e).duration=+t.apply(this,arguments)}}function hy(e,t){return t=+t,function(){bm(this,e).duration=t}}function cy(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?ly:hy)(t,e)):Tm(this.node(),t).duration}var uy=i(()=>{Nm(),mt(ly,"durationFunction"),mt(hy,"durationConstant"),mt(cy,"default")});function dy(e,t){if("function"!=typeof t)throw new Error;return function(){bm(this,e).ease=t}}function py(e){var t=this._id;return arguments.length?this.each(dy(t,e)):Tm(this.node(),t).ease}var gy=i(()=>{Nm(),mt(dy,"easeConstant"),mt(py,"default")});function fy(t,r){return function(){var e=r.apply(this,arguments);if("function"!=typeof e)throw new Error;bm(this,t).ease=e}}function my(e){if("function"!=typeof e)throw new Error;return this.each(fy(this._id,e))}var yy=i(()=>{Nm(),mt(fy,"easeVarying"),mt(my,"default")});function vy(e){"function"!=typeof e&&(e=yp(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a,s=t[n],o=s.length,l=i[n]=[],h=0;h<o;++h)(a=s[h])&&e.call(a,a.__data__,h,s)&&l.push(a);return new a2(i,this._parents,this._name,this._id)}var xy=i(()=>{qg(),c2(),mt(vy,"default")});function by(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,e=r.length,n=Math.min(i,e),a=new Array(i),s=0;s<n;++s)for(var o,l=t[s],h=r[s],c=l.length,u=a[s]=new Array(c),d=0;d<c;++d)(o=l[d]||h[d])&&(u[d]=o);for(;s<i;++s)a[s]=t[s];return new a2(a,this._parents,this._name,this._id)}var Ty=i(()=>{c2(),mt(by,"default")});function ky(e){return(e+"").trim().split(/^|\s+/).every(function(e){var t=e.indexOf(".");return!(e=0<=t?e.slice(0,t):e)||"start"===e})}function wy(r,i,n){var a,s,o=ky(i)?xm:bm;return function(){var e=o(this,r),t=e.on;t!==a&&(s=(a=t).copy()).on(i,n),e.on=s}}function Cy(e,t){var r=this._id;return arguments.length<2?Tm(this.node(),r).on.on(e):this.each(wy(r,e,t))}var Ey=i(()=>{Nm(),mt(ky,"start"),mt(wy,"onFunction"),mt(Cy,"default")});function Sy(r){return function(){var e,t=this.parentNode;for(e in this.__transition)if(+e!==r)return;t&&t.removeChild(this)}}function _y(){return this.on("end.remove",Sy(this._id))}var Ay=i(()=>{mt(Sy,"removeFunction"),mt(_y,"default")});function Ly(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=ap(e));for(var i=this._groups,n=i.length,a=new Array(n),s=0;s<n;++s)for(var o,l,h=i[s],c=h.length,u=a[s]=new Array(c),d=0;d<c;++d)(o=h[d])&&(l=e.call(o,o.__data__,d,h))&&("__data__"in o&&(l.__data__=o.__data__),u[d]=l,vm(u[d],t,r,d,u,Tm(o,r)));return new a2(a,this._parents,t,r)}var Ry=i(()=>{qg(),c2(),Nm(),mt(Ly,"default")});function Iy(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=dp(e));for(var i=this._groups,n=i.length,a=[],s=[],o=0;o<n;++o)for(var l,h=i[o],c=h.length,u=0;u<c;++u)if(l=h[u]){for(var d,p=e.call(l,l.__data__,u,h),g=Tm(l,r),f=0,m=p.length;f<m;++f)(d=p[f])&&vm(d,t,r,f,p,g);a.push(p),s.push(l)}return new a2(a,s,t,r)}var Ny=i(()=>{qg(),c2(),Nm(),mt(Iy,"default")});function Dy(){return new My(this._groups,this._parents)}var My,Oy=i(()=>{qg(),My=$g.prototype.constructor,mt(Dy,"default")});function By(r,i){var n,a,s;return function(){var e=A0(this,r),t=(this.style.removeProperty(r),A0(this,r));return e===t?null:e===n&&t===a?s:s=i(n=e,a=t)}}function Py(e){return function(){this.style.removeProperty(e)}}function $y(t,r,i){var n,a,s=i+"";return function(){var e=A0(this,t);return e===s?null:e===n?a:a=r(n=e,i)}}function Fy(i,n,a){var s,o,l;return function(){var e=A0(this,i),t=a(this),r=t+"";return null==t&&(this.style.removeProperty(i),r=t=A0(this,i)),e===r?null:e===s&&r===o?l:(o=r,l=n(s=e,t))}}function zy(i,n){var a,s,o,l,h="style."+n,c="end."+h;return function(){var e=bm(this,i),t=e.on,r=null==e.value[h]?l=l||Py(n):void 0;t===a&&o===r||(s=(a=t).copy()).on(c,o=r),e.on=s}}function qy(e,t,r){var i="transform"==(e+="")?q1:Wm;return null==t?this.styleTween(e,By(e,i)).on("end.style."+e,Py(e)):"function"==typeof t?this.styleTween(e,Fy(e,i,zm(this,"style."+e,t))).each(zy(this._id,e)):this.styleTween(e,$y(e,i,t),r).on("end.style."+e,null)}var Wy=i(()=>{Y1(),qg(),Nm(),qm(),Um(),mt(By,"styleNull"),mt(Py,"styleRemove"),mt($y,"styleConstant"),mt(Fy,"styleFunction"),mt(zy,"styleMaybeRemove"),mt(qy,"default")});function Uy(t,r,i){return function(e){this.style.setProperty(t,r.call(this,e),i)}}function Gy(t,r,i){var n,a;function e(){var e=r.apply(this,arguments);return n=e!==a?(a=e)&&Uy(t,e,i):n}return mt(e,"tween"),e._value=r,e}function jy(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==t)return this.tween(i,null);if("function"!=typeof t)throw new Error;return this.tween(i,Gy(e,t,r??""))}var Vy=i(()=>{mt(Uy,"styleInterpolate"),mt(Gy,"styleTween"),mt(jy,"default")});function Yy(e){return function(){this.textContent=e}}function Hy(t){return function(){var e=t(this);this.textContent=e??""}}function Xy(e){return this.tween("text","function"==typeof e?Hy(zm(this,"text",e)):Yy(null==e?"":e+""))}var Ky=i(()=>{qm(),mt(Yy,"textConstant"),mt(Hy,"textFunction"),mt(Xy,"default")});function Zy(t){return function(e){this.textContent=t.call(this,e)}}function Qy(t){var r,i;function e(){var e=t.apply(this,arguments);return r=e!==i?(i=e)&&Zy(e):r}return mt(e,"tween"),e._value=t,e}function Jy(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,Qy(e))}var e2=i(()=>{mt(Zy,"textInterpolate"),mt(Qy,"textTween"),mt(Jy,"default")});function t2(){for(var e=this._name,t=this._id,r=++l2,i=this._groups,n=i.length,a=0;a<n;++a)for(var s,o=i[a],l=o.length,h=0;h<l;++h)(s=o[h])&&vm(s,e,r,h,o,{time:(s=Tm(s,t)).time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease});return new a2(i,this._parents,e,r)}var r2=i(()=>{c2(),Nm(),mt(t2,"default")});function i2(){var n,a,s=this,o=s._id,l=s.size();return new Promise(function(e,t){var r={value:t},i={value:mt(function(){0==--l&&e()},"value")};s.each(function(){var e=bm(this,o),t=e.on;t!==n&&((a=(n=t).copy())._.cancel.push(r),a._.interrupt.push(r),a._.end.push(i)),e.on=a}),0===l&&e()})}var n2=i(()=>{Nm(),mt(i2,"default")});function a2(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function s2(e){return $g().transition(e)}function o2(){return++l2}var l2,h2,c2=i(()=>{qg(),Zm(),iy(),oy(),uy(),gy(),yy(),xy(),Ty(),Ey(),Ay(),Ry(),Ny(),Oy(),Wy(),Vy(),Ky(),e2(),r2(),qm(),n2(),l2=0,mt(a2,"Transition"),mt(s2,"transition"),mt(o2,"newId"),h2=$g.prototype,a2.prototype=s2.prototype={constructor:a2,select:Ly,selectAll:Iy,selectChild:h2.selectChild,selectChildren:h2.selectChildren,filter:vy,merge:by,selection:Dy,transition:t2,call:h2.call,nodes:h2.nodes,node:h2.node,size:h2.size,empty:h2.empty,each:h2.each,on:Cy,attr:Km,attrTween:ry,style:qy,styleTween:jy,text:Xy,textTween:Jy,remove:_y,tween:Fm,delay:sy,duration:cy,ease:py,easeVarying:my,end:i2,[Symbol.iterator]:h2[Symbol.iterator]}});function u2(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var d2=i(()=>{mt(u2,"cubicInOut")}),p2=i(()=>{d2()});function g2(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function f2(e){var t,r;e=e instanceof a2?(t=e._id,e._name):(t=++l2,(r=m2).time=H1(),null==e?null:e+"");for(var i=this._groups,n=i.length,a=0;a<n;++a)for(var s,o=i[a],l=o.length,h=0;h<l;++h)(s=o[h])&&vm(s,e,t,h,o,r||g2(s,t));return new a2(i,this._parents,e,t)}var m2,y2=i(()=>{c2(),Nm(),p2(),ym(),m2={time:null,delay:0,duration:250,ease:u2},mt(g2,"inherit"),mt(f2,"default")}),v2=i(()=>{qg(),Bm(),y2(),$g.prototype.interrupt=Om,$g.prototype.transition=f2}),x2=i(()=>{v2()}),b2=i(()=>{}),T2=i(()=>{}),k2=i(()=>{});function w2(e){return[+e[0],+e[1]]}function C2(e){return[w2(e[0]),w2(e[1])]}function E2(e){return{type:e}}var S2,_2,A2,L2=i(()=>{x2(),b2(),T2(),k2(),{abs:S2,max:_2,min:A2}=Math,mt(w2,"number1"),mt(C2,"number2"),["w","e"].map(E2),mt(function(e,t){return null==e?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},"input"),mt(function(e){return e&&[e[0][0],e[1][0]]},"output"),["n","s"].map(E2),mt(function(e,t){return null==e?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},"input"),mt(function(e){return e&&[e[0][1],e[1][1]]},"output"),["n","w","e","s","nw","ne","sw","se"].map(E2),mt(function(e){return null==e?null:C2(e)},"input"),mt(function(e){return e},"output"),mt(E2,"type")}),R2=i(()=>{L2()});function I2(r){this._+=r[0];for(let e=1,t=r.length;e<t;++e)this._+=arguments[e]+r[e]}function N2(e){var t=Math.floor(e);if(!(0<=t))throw new Error("invalid digits: "+e);if(15<t)return I2;let i=10**t;return function(r){this._+=r[0];for(let e=1,t=r.length;e<t;++e)this._+=Math.round(arguments[e]*i)/i+r[e]}}function D2(){return new $2}var M2,O2,B2,P2,$2,F2=i(()=>{M2=Math.PI,P2=(O2=2*M2)-(B2=1e-6),mt(I2,"append"),mt(N2,"appendRound"),$2=class{static{mt(this,"Path")}constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?I2:N2(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(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)<0)throw new Error("negative radius: "+n);var a,s,o=this._x1,l=this._y1,h=r-e,c=i-t,u=o-e,d=l-t,p=u*u+d*d;null===this._x1?this._append`M${this._x1=e},${this._y1=t}`:B2<p&&(Math.abs(d*h-c*u)>B2&&n?(s=h*h+c*c,i=(r-=o)*r+(o=i-l)*o,l=Math.sqrt(s),a=Math.sqrt(p),p=(s=n*Math.tan((M2-Math.acos((s+p-i)/(2*l*a)))/2))/a,i=s/l,Math.abs(p-1)>B2&&this._append`L${e+p*u},${t+p*d}`,this._append`A${n},${n},0,0,${+(u*o<d*r)},${this._x1=e+i*h},${this._y1=t+i*c}`):this._append`L${this._x1=e},${this._y1=t}`)}arc(e,t,r,i,n,a){if(e=+e,t=+t,a=!!a,(r=+r)<0)throw new Error("negative radius: "+r);var s=r*Math.cos(i),o=r*Math.sin(i),l=e+s,h=t+o,c=1^a,a=a?i-n:n-i;null===this._x1?this._append`M${l},${h}`:(Math.abs(this._x1-l)>B2||Math.abs(this._y1-h)>B2)&&this._append`L${l},${h}`,r&&((a=a<0?a%O2+O2:a)>P2?this._append`A${r},${r},0,1,${c},${e-s},${t-o}A${r},${r},0,1,${c},${this._x1=l},${this._y1=h}`:B2<a&&this._append`A${r},${r},0,${+(M2<=a)},${c},${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._}},mt(D2,"path"),D2.prototype=$2.prototype}),z2=i(()=>{F2()}),q2=i(()=>{}),W2=i(()=>{}),U2=i(()=>{}),G2=i(()=>{}),j2=i(()=>{}),V2=i(()=>{}),Y2=i(()=>{});function H2(e){return 1e21<=Math.abs(e=Math.round(e))?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function X2(e,t){var r;return(t=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0?null:[1<(r=e.slice(0,t)).length?r[0]+r.slice(2):r,+e.slice(t+1)]}var K2=i(()=>{mt(H2,"default"),mt(X2,"formatDecimalParts")});function Z2(e){return(e=X2(Math.abs(e)))?e[1]:NaN}var Q2=i(()=>{K2(),mt(Z2,"default")});function J2(o,l){return function(e,t){for(var r=e.length,i=[],n=0,a=o[0],s=0;0<r&&0<a&&(t<s+a+1&&(a=Math.max(1,t-s)),i.push(e.substring(r-=a,r+a)),!((s+=a+1)>t));)a=o[n=(n+1)%o.length];return i.reverse().join(l)}}var ev=i(()=>{mt(J2,"default")});function tv(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}var rv=i(()=>{mt(tv,"default")});function iv(e){var t;if(t=av.exec(e))return new nv({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]});throw new Error("invalid format: "+e)}function nv(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}var av,sv=i(()=>{av=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i,mt(iv,"formatSpecifier"),iv.prototype=nv.prototype,mt(nv,"FormatSpecifier"),nv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type}});function ov(e){e:for(var t,r=e.length,i=1,n=-1;i<r;++i)switch(e[i]){case".":n=t=i;break;case"0":0===n&&(n=i),t=i;break;default:if(!+e[i])break e;0<n&&(n=0)}return 0<n?e.slice(0,n)+e.slice(t+1):e}var lv=i(()=>{mt(ov,"default")});function hv(e,t){var r,i,n=X2(e,t);return n?(r=n[0],(n=(n=n[1])-(cv=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1)===(i=r.length)?r:i<n?r+new Array(n-i+1).join("0"):0<n?r.slice(0,n)+"."+r.slice(n):"0."+new Array(1-n).join("0")+X2(e,Math.max(0,t+n-1))[0]):e+""}var cv,uv=i(()=>{K2(),mt(hv,"default")});function dv(e,t){var r;return(t=X2(e,t))?(r=t[0],(t=t[1])<0?"0."+new Array(-t).join("0")+r:r.length>t+1?r.slice(0,t+1)+"."+r.slice(t+1):r+new Array(t-r.length+2).join("0")):e+""}var pv,gv=i(()=>{K2(),mt(dv,"default")}),fv=i(()=>{K2(),uv(),gv(),pv={"%":mt((e,t)=>(100*e).toFixed(t),"%"),b:mt(e=>Math.round(e).toString(2),"b"),c:mt(e=>e+"","c"),d:H2,e:mt((e,t)=>e.toExponential(t),"e"),f:mt((e,t)=>e.toFixed(t),"f"),g:mt((e,t)=>e.toPrecision(t),"g"),o:mt(e=>Math.round(e).toString(8),"o"),p:mt((e,t)=>dv(100*e,t),"p"),r:dv,s:hv,X:mt(e=>Math.round(e).toString(16).toUpperCase(),"X"),x:mt(e=>Math.round(e).toString(16),"x")}});function mv(e){return e}var yv=i(()=>{mt(mv,"default")});function vv(e){var k=void 0===e.grouping||void 0===e.thousands?mv:J2(xv.call(e.grouping,Number),e.thousands+""),i=void 0===e.currency?"":e.currency[0]+"",n=void 0===e.currency?"":e.currency[1]+"",w=void 0===e.decimal?".":e.decimal+"",C=void 0===e.numerals?mv:tv(xv.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",E=void 0===e.minus?"":e.minus+"",S=void 0===e.nan?"NaN":e.nan+"";function s(e){var h=(e=iv(e)).fill,c=e.align,u=e.sign,t=e.symbol,d=e.zero,p=e.width,g=e.comma,f=e.precision,m=e.trim,y=e.type,v=("n"===y?(g=!0,y="g"):pv[y]||(void 0===f&&(f=12),m=!0,y="g"),(d||"0"===h&&"="===c)&&(d=!0,h="0",c="="),"$"===t?i:"#"===t&&/[boxX]/.test(y)?"0"+y.toLowerCase():""),x="$"===t?n:/[%p]/.test(y)?a:"",b=pv[y],T=/[defgprs%]/.test(y);function r(e){var t,r,i,n=v,a=x;if("c"===y)a=b(e)+a,e="";else{var s=(e=+e)<0||1/e<0;if(e=isNaN(e)?S:b(Math.abs(e),f),m&&(e=ov(e)),n=((s=(!s||0!=+e||"+"===u)&&s)?"("===u?u:E:"-"===u||"("===u?"":u)+n,a=("s"===y?bv[8+cv/3]:"")+a+(s&&"("===u?")":""),T)for(t=-1,r=e.length;++t<r;)if((i=e.charCodeAt(t))<48||57<i){a=(46===i?w+e.slice(t+1):e.slice(t))+a,e=e.slice(0,t);break}}g&&!d&&(e=k(e,1/0));var o=n.length+e.length+a.length,l=o<p?new Array(p-o+1).join(h):"";switch(g&&d&&(e=k(l+e,l.length?p-a.length:1/0),l=""),c){case"<":e=n+e+a+l;break;case"=":e=n+l+e+a;break;case"^":e=l.slice(0,o=l.length>>1)+n+e+a+l.slice(o);break;default:e=l+n+e+a}return C(e)}return f=void 0===f?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),mt(r,"format"),r.toString=function(){return e+""},r}function t(e,t){var r=s(((e=iv(e)).type="f",e)),e=3*Math.max(-8,Math.min(8,Math.floor(Z2(t)/3))),i=Math.pow(10,-e),n=bv[8+e/3];return function(e){return r(i*e)+n}}return mt(s,"newFormat"),mt(t,"formatPrefix"),{format:s,formatPrefix:t}}var xv,bv,Tv=i(()=>{Q2(),ev(),rv(),sv(),lv(),fv(),uv(),yv(),xv=Array.prototype.map,bv=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],mt(vv,"default")});function kv(e){return wv=vv(e),Cv=wv.format,Ev=wv.formatPrefix,wv}var wv,Cv,Ev,Sv=i(()=>{Tv(),kv({thousands:",",grouping:[3],currency:["$",""]}),mt(kv,"defaultLocale")});function _v(e){return Math.max(0,-Z2(Math.abs(e)))}var Av=i(()=>{Q2(),mt(_v,"default")});function Lv(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Z2(t)/3)))-Z2(Math.abs(e)))}var Rv=i(()=>{Q2(),mt(Lv,"default")});function Iv(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Z2(t)-Z2(e))+1}var Nv=i(()=>{Q2(),mt(Iv,"default")}),Dv=i(()=>{Sv(),sv(),Av(),Rv(),Nv()}),Mv=i(()=>{});function Ov(e){var t=0,r=e.children,i=r&&r.length;if(i)for(;0<=--i;)t+=r[i].value;else t=1;e.value=t}function Bv(){return this.eachAfter(Ov)}var Pv=i(()=>{mt(Ov,"count"),mt(Bv,"default")});function $v(e,t){let r=-1;for(var i of this)e.call(t,i,++r,this);return this}var Fv=i(()=>{mt($v,"default")});function zv(e,t){for(var r,i,n,a=[this],s=-1;r=a.pop();)if(e.call(t,r,++s,this),i=r.children)for(n=i.length-1;0<=n;--n)a.push(i[n]);return this}var qv=i(()=>{mt(zv,"default")});function Wv(e,t){for(var r,i,n,a=this,s=[a],o=[],l=-1;a=s.pop();)if(o.push(a),r=a.children)for(i=0,n=r.length;i<n;++i)s.push(r[i]);for(;a=o.pop();)e.call(t,a,++l,this);return this}var Uv=i(()=>{mt(Wv,"default")});function Gv(e,t){let r=-1;for(var i of this)if(e.call(t,i,++r,this))return i}var jv=i(()=>{mt(Gv,"default")});function Vv(n){return this.eachAfter(function(e){for(var t=+n(e.data)||0,r=e.children,i=r&&r.length;0<=--i;)t+=r[i].value;e.value=t})}var Yv=i(()=>{mt(Vv,"default")});function Hv(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}var Xv=i(()=>{mt(Hv,"default")});function Kv(e){for(var t=this,r=Zv(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 Zv(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}var Qv=i(()=>{mt(Kv,"default"),mt(Zv,"leastCommonAncestor")});function Jv(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}var ex=i(()=>{mt(Jv,"default")});function tx(){return Array.from(this)}var rx=i(()=>{mt(tx,"default")});function ix(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}var nx=i(()=>{mt(ix,"default")});function ax(){var t=this,r=[];return t.each(function(e){e!==t&&r.push({source:e.parent,target:e})}),r}var sx=i(()=>{mt(ax,"default")});function*ox(){var e,t,r,i,n,a=[this];do{for(t=a.reverse(),a=[];e=t.pop();)if(yield e,r=e.children)for(i=0,n=r.length;i<n;++i)a.push(r[i])}while(a.length)}var lx=i(()=>{mt(ox,"default")});function hx(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=dx)):void 0===t&&(t=ux);for(var r,i,n,a,s,o=[e=new fx(e)];r=o.pop();)if((n=t(r.data))&&(s=(n=Array.from(n)).length))for(r.children=n,a=s-1;0<=a;--a)o.push(i=n[a]=new fx(n[a])),i.parent=r,i.depth=r.depth+1;return e.eachBefore(gx)}function cx(){return hx(this).eachBefore(px)}function ux(e){return e.children}function dx(e){return Array.isArray(e)?e[1]:null}function px(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function gx(e){for(var t=0;e.height=t,(e=e.parent)&&e.height<++t;);}function fx(e){this.data=e,this.depth=this.height=0,this.parent=null}var mx=i(()=>{Pv(),Fv(),qv(),Uv(),jv(),Yv(),Xv(),Qv(),ex(),rx(),nx(),sx(),lx(),mt(hx,"hierarchy"),mt(cx,"node_copy"),mt(ux,"objectChildren"),mt(dx,"mapChildren"),mt(px,"copyData"),mt(gx,"computeHeight"),mt(fx,"Node"),fx.prototype=hx.prototype={constructor:fx,count:Bv,each:$v,eachAfter:Wv,eachBefore:zv,find:Gv,sum:Vv,sort:Hv,path:Kv,ancestors:Jv,descendants:tx,leaves:ix,links:ax,copy:cx,[Symbol.iterator]:ox}});function yx(e){if("function"!=typeof e)throw new Error;return e}var vx=i(()=>{mt(yx,"required")});function xx(){return 0}function bx(e){return function(){return e}}var Tx=i(()=>{mt(xx,"constantZero"),mt(bx,"default")});function kx(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}var wx=i(()=>{mt(kx,"default")});function Cx(e,t,r,i,n){for(var a,s=e.children,o=-1,l=s.length,h=e.value&&(i-t)/e.value;++o<l;)(a=s[o]).y0=r,a.y1=n,a.x0=t,a.x1=t+=a.value*h}var Ex=i(()=>{mt(Cx,"default")});function Sx(e,t,r,i,n){for(var a,s=e.children,o=-1,l=s.length,h=e.value&&(n-r)/e.value;++o<l;)(a=s[o]).x0=t,a.x1=i,a.y0=r,a.y1=r+=a.value*h}var _x=i(()=>{mt(Sx,"default")});function Ax(e,t,r,i,n,a){for(var s,o,l,h,c,u,d,p,g,f,m,y=[],v=t.children,x=0,b=0,T=v.length,k=t.value;x<T;){for(l=n-r,h=a-i;!(c=v[b++].value)&&b<T;);for(m=(u=d=c)*c*(f=Math.max(h/l,l/h)/(k*e)),g=Math.max(d/m,m/u);b<T;++b){if(c+=o=v[b].value,o<u&&(u=o),d<o&&(d=o),m=c*c*f,g<(p=Math.max(d/m,m/u))){c-=o;break}g=p}y.push(s={value:c,dice:l<h,children:v.slice(x,b)}),s.dice?Cx(s,r,i,n,k?i+=h*c/k:a):Sx(s,r,i,k?r+=l*c/k:n,a),k-=c,x=b}return y}var Lx,Rx,Ix=i(()=>{Ex(),_x(),Lx=(1+Math.sqrt(5))/2,mt(Ax,"squarifyRatio"),Rx=mt(function t(a){function e(e,t,r,i,n){Ax(a,e,t,r,i,n)}return mt(e,"squarify"),e.ratio=function(e){return t(1<(e=+e)?e:1)},e},"custom")(Lx)});function Nx(){var s=Rx,t=!1,r=1,i=1,o=[0],l=xx,h=xx,c=xx,u=xx,d=xx;function n(e){return e.x0=e.y0=0,e.x1=r,e.y1=i,e.eachBefore(a),o=[0],t&&e.eachBefore(kx),e}function a(e){var t=o[e.depth],r=e.x0+t,i=e.y0+t,n=e.x1-t,a=e.y1-t;n<r&&(r=n=(r+n)/2),a<i&&(i=a=(i+a)/2),e.x0=r,e.y0=i,e.x1=n,e.y1=a,e.children&&(t=o[e.depth+1]=l(e)/2,r+=d(e)-t,i+=h(e)-t,(n-=c(e)-t)<r&&(r=n=(r+n)/2),(a-=u(e)-t)<i&&(i=a=(i+a)/2),s(e,r,i,n,a))}return mt(n,"treemap"),mt(a,"positionNode"),n.round=function(e){return arguments.length?(t=!!e,n):t},n.size=function(e){return arguments.length?(r=+e[0],i=+e[1],n):[r,i]},n.tile=function(e){return arguments.length?(s=yx(e),n):s},n.padding=function(e){return arguments.length?n.paddingInner(e).paddingOuter(e):n.paddingInner()},n.paddingInner=function(e){return arguments.length?(l="function"==typeof e?e:bx(+e),n):l},n.paddingOuter=function(e){return arguments.length?n.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):n.paddingTop()},n.paddingTop=function(e){return arguments.length?(h="function"==typeof e?e:bx(+e),n):h},n.paddingRight=function(e){return arguments.length?(c="function"==typeof e?e:bx(+e),n):c},n.paddingBottom=function(e){return arguments.length?(u="function"==typeof e?e:bx(+e),n):u},n.paddingLeft=function(e){return arguments.length?(d="function"==typeof e?e:bx(+e),n):d},n}var Dx=i(()=>{wx(),Ix(),vx(),Tx(),mt(Nx,"default")}),Mx=i(()=>{mx(),Dx()}),Ox=i(()=>{}),Bx=i(()=>{});function Px(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var $x=i(()=>{mt(Px,"initRange")});function Fx(){var r=new hd,i=[],n=[],a=zx;function s(e){let t=r.get(e);if(void 0===t){if(a!==zx)return a;r.set(e,t=i.push(e)-1)}return n[t%n.length]}return mt(s,"scale"),s.domain=function(e){if(!arguments.length)return i.slice();i=[],r=new hd;for(var t of e)r.has(t)||r.set(t,i.push(t)-1);return s},s.range=function(e){return arguments.length?(n=Array.from(e),s):n.slice()},s.unknown=function(e){return arguments.length?(a=e,s):a},s.copy=function(){return Fx(i,n).unknown(a)},Px.apply(s,arguments),s}var zx,qx=i(()=>{Ed(),$x(),zx=Symbol("implicit"),mt(Fx,"ordinal")});function Wx(){var n,a,e=Fx().unknown(void 0),s=e.domain,o=e.range,l=0,h=1,c=!1,u=0,d=0,p=.5;function t(){var e=s().length,t=h<l,r=t?h:l,i=(n=((i=t?l:h)-r)/Math.max(1,e-u+2*d),c&&(n=Math.floor(n)),r+=(i-r-n*(e-u))*p,a=n*(1-u),c&&(r=Math.round(r),a=Math.round(a)),wd(e).map(function(e){return r+n*e}));return o(t?i.reverse():i)}return delete e.unknown,mt(t,"rescale"),e.domain=function(e){return(arguments.length?(s(e),t):s)()},e.range=function(e){return arguments.length?([l,h]=e,l=+l,h=+h,t()):[l,h]},e.rangeRound=function(e){return[l,h]=e,l=+l,h=+h,c=!0,t()},e.bandwidth=function(){return a},e.step=function(){return n},e.round=function(e){return arguments.length?(c=!!e,t()):c},e.padding=function(e){return arguments.length?(u=Math.min(1,d=+e),t()):u},e.paddingInner=function(e){return arguments.length?(u=Math.min(1,e),t()):u},e.paddingOuter=function(e){return arguments.length?(d=+e,t()):d},e.align=function(e){return arguments.length?(p=Math.max(0,Math.min(1,e)),t()):p},e.copy=function(){return Wx(s(),[l,h]).round(c).paddingInner(u).paddingOuter(d).align(p)},Px.apply(t(),arguments)}var Ux=i(()=>{Ed(),$x(),qx(),mt(Wx,"band")});function Gx(e){return function(){return e}}var jx=i(()=>{mt(Gx,"constants")});function Vx(e){return+e}var Yx=i(()=>{mt(Vx,"number")});function Hx(e){return e}function Xx(t,r){return(r-=t=+t)?function(e){return(e-t)/r}:Gx(isNaN(r)?NaN:.5)}function Kx(t,r){var e;return r<t&&(e=t,t=r,r=e),function(e){return Math.max(t,Math.min(r,e))}}function Zx(e,t,r){var i=e[0],e=e[1],n=t[0],t=t[1],n=e<i?(i=Xx(e,i),r(t,n)):(i=Xx(i,e),r(n,t));return function(e){return n(i(e))}}function Qx(r,e,t){var i=Math.min(r.length,e.length)-1,n=new Array(i),a=new Array(i),s=-1;for(r[i]<r[0]&&(r=r.slice().reverse(),e=e.slice().reverse());++s<i;)n[s]=Xx(r[s],r[s+1]),a[s]=t(e[s],e[s+1]);return function(e){var t=rd(r,e,1,i)-1;return a[t](n[t](e))}}function Jx(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function eb(){var r,i,t,n,a,s,o=rb,l=rb,h=A1,c=Hx;function u(){var e=Math.min(o.length,l.length);return c!==Hx&&(c=Kx(o[0],o[e-1])),n=2<e?Qx:Zx,a=s=null,d}function d(e){return null==e||isNaN(e=+e)?t:(a=a||n(o.map(r),l,h))(r(c(e)))}return mt(u,"rescale"),mt(d,"scale"),d.invert=function(e){return c(i((s=s||n(l,o.map(r),v1))(e)))},d.domain=function(e){return arguments.length?(o=Array.from(e,Vx),u()):o.slice()},d.range=function(e){return arguments.length?(l=Array.from(e),u()):l.slice()},d.rangeRound=function(e){return l=Array.from(e),h=R1,u()},d.clamp=function(e){return arguments.length?(c=!!e||Hx,u()):c!==Hx},d.interpolate=function(e){return arguments.length?(h=e,u()):h},d.unknown=function(e){return arguments.length?(t=e,d):t},function(e,t){return r=e,i=t,u()}}function tb(){return eb()(Hx,Hx)}var rb,ib=i(()=>{Ed(),Y1(),jx(),Yx(),rb=[0,1],mt(Hx,"identity"),mt(Xx,"normalize"),mt(Kx,"clamper"),mt(Zx,"bimap"),mt(Qx,"polymap"),mt(Jx,"copy"),mt(eb,"transformer"),mt(tb,"continuous")});function nb(e,t,r,i){var n,a=gd(e,t,r);switch((i=iv(i??",f")).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t));return null!=i.precision||isNaN(n=Lv(a,s))||(i.precision=n),Ev(i,s);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(n=Iv(a,Math.max(Math.abs(e),Math.abs(t))))||(i.precision=n-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(n=_v(a))||(i.precision=n-2*("%"===i.type))}return Cv(i)}var ab=i(()=>{Ed(),Dv(),mt(nb,"tickFormat")});function sb(h){var c=h.domain;return h.ticks=function(e){var t=c();return dd(t[0],t[t.length-1],e??10)},h.tickFormat=function(e,t){var r=c();return nb(r[0],r[r.length-1],e??10,t)},h.nice=function(e){null==e&&(e=10);var t,r,i=c(),n=0,a=i.length-1,s=i[n],o=i[a],l=10;for(o<s&&(r=s,s=o,o=r,r=n,n=a,a=r);0<l--;){if((r=pd(s,o,e))===t)return i[n]=s,i[a]=o,c(i);if(0<r)s=Math.floor(s/r)*r,o=Math.ceil(o/r)*r;else{if(!(r<0))break;s=Math.ceil(s*r)/r,o=Math.floor(o*r)/r}t=r}return h},h}function ob(){var e=tb();return e.copy=function(){return Jx(e,ob())},Px.apply(e,arguments),sb(e)}var lb=i(()=>{Ed(),ib(),$x(),ab(),mt(sb,"linearish"),mt(ob,"linear")});function hb(e,t){var r,i=0,n=(e=e.slice()).length-1,a=e[i],s=e[n];return s<a&&(r=i,i=n,n=r,r=a,a=s,s=r),e[i]=t.floor(a),e[n]=t.ceil(s),e}var cb=i(()=>{mt(hb,"nice")});function ub(a,s,r,i){function o(e){return a(e=0===arguments.length?new Date:new Date(+e)),e}return mt(o,"interval"),o.floor=e=>(a(e=new Date(+e)),e),o.ceil=e=>(a(e=new Date(e-1)),s(e,1),a(e),e),o.round=e=>{var t=o(e),r=o.ceil(e);return e-t<r-e?t:r},o.offset=(e,t)=>(s(e=new Date(+e),null==t?1:Math.floor(t)),e),o.range=(e,t,r)=>{var i,n=[];if(e=o.ceil(e),r=null==r?1:Math.floor(r),e<t&&0<r)for(;n.push(i=new Date(+e)),s(e,r),a(e),i<e&&e<t;);return n},o.filter=r=>ub(e=>{if(e<=e)for(;a(e),!r(e);)e.setTime(e-1)},(e,t)=>{if(e<=e)if(t<0)for(;++t<=0;)for(;s(e,-1),!r(e););else for(;0<=--t;)for(;s(e,1),!r(e););}),r&&(o.count=(e,t)=>(db.setTime(+e),pb.setTime(+t),a(db),a(pb),Math.floor(r(db,pb))),o.every=t=>(t=Math.floor(t),isFinite(t)&&0<t?1<t?o.filter(i?e=>i(e)%t==0:e=>o.count(0,e)%t==0):o:null)),o}var db,pb,gb,fb,mb,yb,vb,xb,bb,Tb,kb,wb=i(()=>{db=new Date,pb=new Date,mt(ub,"timeInterval")}),Cb=i(()=>{wb(),(gb=ub(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e)).every=r=>(r=Math.floor(r),isFinite(r)&&0<r?1<r?ub(e=>{e.setTime(Math.floor(e/r)*r)},(e,t)=>{e.setTime(+e+t*r)},(e,t)=>(t-e)/r):gb:null)}),Eb=i(()=>{wb(),(fb=ub(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+1e3*t)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds())).range}),Sb=i(()=>{wb(),(mb=ub(e=>{e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getMinutes())).range,(yb=ub(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes())).range}),_b=i(()=>{wb(),(vb=ub(e=>{e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())},(e,t)=>{e.setTime(+e+36e5*t)},(e,t)=>(t-e)/36e5,e=>e.getHours())).range,(xb=ub(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+36e5*t)},(e,t)=>(t-e)/36e5,e=>e.getUTCHours())).range}),Ab=i(()=>{wb(),(bb=ub(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5,e=>e.getDate()-1)).range,(Tb=ub(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>e.getUTCDate()-1)).range,(kb=ub(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>Math.floor(e/864e5))).range});function Lb(t){return ub(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5)}function Rb(t){return ub(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/6048e5)}var Ib,Nb,Db,Mb,Ob,Bb,Pb,$b,Fb,zb,qb,Wb,Ub,Gb,jb,Vb,Yb,Hb,Xb=i(()=>{wb(),mt(Lb,"timeWeekday"),Ib=Lb(0),Nb=Lb(1),Db=Lb(2),Mb=Lb(3),Ob=Lb(4),Bb=Lb(5),Pb=Lb(6),Ib.range,Nb.range,Db.range,Mb.range,Ob.range,Bb.range,Pb.range,mt(Rb,"utcWeekday"),$b=Rb(0),Fb=Rb(1),zb=Rb(2),qb=Rb(3),Wb=Rb(4),Ub=Rb(5),Gb=Rb(6),$b.range,Fb.range,zb.range,qb.range,Wb.range,Ub.range,Gb.range}),Kb=i(()=>{wb(),(jb=ub(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth())).range,(Vb=ub(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth())).range}),Zb=i(()=>{wb(),(Yb=ub(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())).every=r=>isFinite(r=Math.floor(r))&&0<r?ub(e=>{e.setFullYear(Math.floor(e.getFullYear()/r)*r),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t*r)}):null,(Hb=ub(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())).every=r=>isFinite(r=Math.floor(r))&&0<r?ub(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/r)*r),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t*r)}):null});function Qb(a,e,t,r,i,n){let s=[[fb,1,1e3],[fb,5,5e3],[fb,15,15e3],[fb,30,3e4],[n,1,6e4],[n,5,3e5],[n,15,9e5],[n,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[t,1,6048e5],[e,1,2592e6],[e,3,7776e6],[a,1,31536e6]];function o(e,t,r){var i=t<e;return i&&([e,t]=[t,e]),r=(r=r&&"function"==typeof r.range?r:l(e,t,r))?r.range(e,+t+1):[],i?r.reverse():r}function l(e,t,r){var i=Math.abs(t-e)/r,n=Zu(([,,e])=>e).right(s,i);return n===s.length?a.every(gd(e/31536e6,t/31536e6,r)):0===n?gb.every(Math.max(gd(e,t,r),1)):([e,t]=s[i/s[n-1][2]<s[n][2]/i?n-1:n],e.every(t))}return mt(o,"ticks"),mt(l,"tickInterval"),[o,l]}var Jb,e4,t4,r4,i4=i(()=>{Ed(),Cb(),Eb(),Sb(),_b(),Ab(),Xb(),Kb(),Zb(),mt(Qb,"ticker"),[Jb,e4]=Qb(Hb,Vb,$b,kb,xb,yb),[t4,r4]=Qb(Yb,jb,Ib,bb,vb,mb)}),n4=i(()=>{Cb(),Eb(),Sb(),_b(),Ab(),Xb(),Kb(),Zb(),i4()});function a4(e){var t;return 0<=e.y&&e.y<100?((t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L)).setFullYear(e.y),t):new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function s4(e){var t;return 0<=e.y&&e.y<100?((t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L))).setUTCFullYear(e.y),t):new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function o4(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function l4(e){var i=e.dateTime,n=e.date,a=e.time,t=e.periods,r=e.days,s=e.shortDays,o=e.months,l=e.shortMonths,h=u4(t),c=d4(t),B=u4(r),P=d4(r),$=u4(s),F=d4(s),z=u4(o),q=d4(o),W=u4(l),U=d4(l),u={a:C,A:E,b:S,B:_,c:null,d:D4,e:D4,f:$4,g:X4,G:Z4,H:M4,I:O4,j:B4,L:P4,m:F4,M:z4,p:A,q:L,Q:b5,s:T5,S:q4,u:W4,U:U4,V:j4,w:V4,W:Y4,x:null,X:null,y:H4,Y:K4,Z:Q4,"%":x5},d={a:R,A:I,b:N,B:D,c:null,d:J4,e:J4,f:n5,g:f5,G:y5,H:e5,I:t5,j:r5,L:i5,m:a5,M:s5,p:M,q:O,Q:b5,s:T5,S:o5,u:l5,U:h5,V:u5,w:d5,W:p5,x:null,X:null,y:g5,Y:m5,Z:v5,"%":x5},G={a:y,A:v,b:x,B:b,c:T,d:w4,e:w4,f:L4,g:x4,G:v4,H:E4,I:E4,j:C4,L:A4,m:k4,M:S4,p:m,q:T4,Q:I4,s:N4,S:_4,u:g4,U:f4,V:m4,w:p4,W:y4,x:k,X:w,y:x4,Y:v4,Z:b4,"%":R4};function p(l,h){return function(e){var t,r,i,n=[],a=-1,s=0,o=l.length;for(e instanceof Date||(e=new Date(+e));++a<o;)37===l.charCodeAt(a)&&(n.push(l.slice(s,a)),null!=(r=k5[t=l.charAt(++a)])?t=l.charAt(++a):r="e"===t?" ":"0",(i=h[t])&&(t=i(e,r)),n.push(t),s=a+1);return n.push(l.slice(s,a)),n.join("")}}function g(n,a){return function(e){var t,r,i=o4(1900,void 0,1);if(f(i,n,e+="",0)!=e.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(!a||"Z"in i||(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||53<i.V)return null;"w"in i||(i.w=1),"Z"in i?(t=4<(r=(t=s4(o4(i.y,0,1))).getUTCDay())||0===r?Fb.ceil(t):Fb(t),t=Tb.offset(t,7*(i.V-1)),i.y=t.getUTCFullYear(),i.m=t.getUTCMonth(),i.d=t.getUTCDate()+(i.w+6)%7):(t=4<(r=(t=a4(o4(i.y,0,1))).getDay())||0===r?Nb.ceil(t):Nb(t),t=bb.offset(t,7*(i.V-1)),i.y=t.getFullYear(),i.m=t.getMonth(),i.d=t.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),r="Z"in i?s4(o4(i.y,0,1)).getUTCDay():a4(o4(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(r+5)%7:i.w+7*i.U-(r+6)%7);return("Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,s4):a4)(i)}}function f(e,t,r,i){for(var n,a,s=0,o=t.length,l=r.length;s<o;){if(l<=i)return-1;if(37===(n=t.charCodeAt(s++))){if(n=t.charAt(s++),!(a=G[n in k5?t.charAt(s++):n])||(i=a(e,r,i))<0)return-1}else if(n!=r.charCodeAt(i++))return-1}return i}function m(e,t,r){return(t=h.exec(t.slice(r)))?(e.p=c.get(t[0].toLowerCase()),r+t[0].length):-1}function y(e,t,r){return(t=$.exec(t.slice(r)))?(e.w=F.get(t[0].toLowerCase()),r+t[0].length):-1}function v(e,t,r){return(t=B.exec(t.slice(r)))?(e.w=P.get(t[0].toLowerCase()),r+t[0].length):-1}function x(e,t,r){return(t=W.exec(t.slice(r)))?(e.m=U.get(t[0].toLowerCase()),r+t[0].length):-1}function b(e,t,r){return(t=z.exec(t.slice(r)))?(e.m=q.get(t[0].toLowerCase()),r+t[0].length):-1}function T(e,t,r){return f(e,i,t,r)}function k(e,t,r){return f(e,n,t,r)}function w(e,t,r){return f(e,a,t,r)}function C(e){return s[e.getDay()]}function E(e){return r[e.getDay()]}function S(e){return l[e.getMonth()]}function _(e){return o[e.getMonth()]}function A(e){return t[+(12<=e.getHours())]}function L(e){return 1+~~(e.getMonth()/3)}function R(e){return s[e.getUTCDay()]}function I(e){return r[e.getUTCDay()]}function N(e){return l[e.getUTCMonth()]}function D(e){return o[e.getUTCMonth()]}function M(e){return t[+(12<=e.getUTCHours())]}function O(e){return 1+~~(e.getUTCMonth()/3)}return u.x=p(n,u),u.X=p(a,u),u.c=p(i,u),d.x=p(n,d),d.X=p(a,d),d.c=p(i,d),mt(p,"newFormat"),mt(g,"newParse"),mt(f,"parseSpecifier"),mt(m,"parsePeriod"),mt(y,"parseShortWeekday"),mt(v,"parseWeekday"),mt(x,"parseShortMonth"),mt(b,"parseMonth"),mt(T,"parseLocaleDateTime"),mt(k,"parseLocaleDate"),mt(w,"parseLocaleTime"),mt(C,"formatShortWeekday"),mt(E,"formatWeekday"),mt(S,"formatShortMonth"),mt(_,"formatMonth"),mt(A,"formatPeriod"),mt(L,"formatQuarter"),mt(R,"formatUTCShortWeekday"),mt(I,"formatUTCWeekday"),mt(N,"formatUTCShortMonth"),mt(D,"formatUTCMonth"),mt(M,"formatUTCPeriod"),mt(O,"formatUTCQuarter"),{format:mt(function(e){var t=p(e+="",u);return t.toString=function(){return e},t},"format"),parse:mt(function(e){var t=g(e+="",!1);return t.toString=function(){return e},t},"parse"),utcFormat:mt(function(e){var t=p(e+="",d);return t.toString=function(){return e},t},"utcFormat"),utcParse:mt(function(e){var t=g(e+="",!0);return t.toString=function(){return e},t},"utcParse")}}function h4(e,t,r){var i=e<0?"-":"",n=(e=(i?-e:e)+"").length;return i+(n<r?new Array(r-n+1).join(t)+e:e)}function c4(e){return e.replace(E5,"\\$&")}function u4(e){return new RegExp("^(?:"+e.map(c4).join("|")+")","i")}function d4(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function p4(e,t,r){return(t=w5.exec(t.slice(r,r+1)))?(e.w=+t[0],r+t[0].length):-1}function g4(e,t,r){return(t=w5.exec(t.slice(r,r+1)))?(e.u=+t[0],r+t[0].length):-1}function f4(e,t,r){return(t=w5.exec(t.slice(r,r+2)))?(e.U=+t[0],r+t[0].length):-1}function m4(e,t,r){return(t=w5.exec(t.slice(r,r+2)))?(e.V=+t[0],r+t[0].length):-1}function y4(e,t,r){return(t=w5.exec(t.slice(r,r+2)))?(e.W=+t[0],r+t[0].length):-1}function v4(e,t,r){return(t=w5.exec(t.slice(r,r+4)))?(e.y=+t[0],r+t[0].length):-1}function x4(e,t,r){return(t=w5.exec(t.slice(r,r+2)))?(e.y=+t[0]+(68<+t[0]?1900:2e3),r+t[0].length):-1}function b4(e,t,r){return(t=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6)))?(e.Z=t[1]?0:-(t[2]+(t[3]||"00")),r+t[0].length):-1}function T4(e,t,r){return(t=w5.exec(t.slice(r,r+1)))?(e.q=3*t[0]-3,r+t[0].length):-1}function k4(e,t,r){return(t=w5.exec(t.slice(r,r+2)))?(e.m=t[0]-1,r+t[0].length):-1}function w4(e,t,r){return(t=w5.exec(t.slice(r,r+2)))?(e.d=+t[0],r+t[0].length):-1}function C4(e,t,r){return(t=w5.exec(t.slice(r,r+3)))?(e.m=0,e.d=+t[0],r+t[0].length):-1}function E4(e,t,r){return(t=w5.exec(t.slice(r,r+2)))?(e.H=+t[0],r+t[0].length):-1}function S4(e,t,r){return(t=w5.exec(t.slice(r,r+2)))?(e.M=+t[0],r+t[0].length):-1}function _4(e,t,r){return(t=w5.exec(t.slice(r,r+2)))?(e.S=+t[0],r+t[0].length):-1}function A4(e,t,r){return(t=w5.exec(t.slice(r,r+3)))?(e.L=+t[0],r+t[0].length):-1}function L4(e,t,r){return(t=w5.exec(t.slice(r,r+6)))?(e.L=Math.floor(t[0]/1e3),r+t[0].length):-1}function R4(e,t,r){return(t=C5.exec(t.slice(r,r+1)))?r+t[0].length:-1}function I4(e,t,r){return(t=w5.exec(t.slice(r)))?(e.Q=+t[0],r+t[0].length):-1}function N4(e,t,r){return(t=w5.exec(t.slice(r)))?(e.s=+t[0],r+t[0].length):-1}function D4(e,t){return h4(e.getDate(),t,2)}function M4(e,t){return h4(e.getHours(),t,2)}function O4(e,t){return h4(e.getHours()%12||12,t,2)}function B4(e,t){return h4(1+bb.count(Yb(e),e),t,3)}function P4(e,t){return h4(e.getMilliseconds(),t,3)}function $4(e,t){return P4(e,t)+"000"}function F4(e,t){return h4(e.getMonth()+1,t,2)}function z4(e,t){return h4(e.getMinutes(),t,2)}function q4(e,t){return h4(e.getSeconds(),t,2)}function W4(e){return 0===(e=e.getDay())?7:e}function U4(e,t){return h4(Ib.count(Yb(e)-1,e),t,2)}function G4(e){var t=e.getDay();return 4<=t||0===t?Ob(e):Ob.ceil(e)}function j4(e,t){return e=G4(e),h4(Ob.count(Yb(e),e)+(4===Yb(e).getDay()),t,2)}function V4(e){return e.getDay()}function Y4(e,t){return h4(Nb.count(Yb(e)-1,e),t,2)}function H4(e,t){return h4(e.getFullYear()%100,t,2)}function X4(e,t){return h4((e=G4(e)).getFullYear()%100,t,2)}function K4(e,t){return h4(e.getFullYear()%1e4,t,4)}function Z4(e,t){var r=e.getDay();return h4((e=4<=r||0===r?Ob(e):Ob.ceil(e)).getFullYear()%1e4,t,4)}function Q4(e){return(0<(e=e.getTimezoneOffset())?"-":(e*=-1,"+"))+h4(e/60|0,"0",2)+h4(e%60,"0",2)}function J4(e,t){return h4(e.getUTCDate(),t,2)}function e5(e,t){return h4(e.getUTCHours(),t,2)}function t5(e,t){return h4(e.getUTCHours()%12||12,t,2)}function r5(e,t){return h4(1+Tb.count(Hb(e),e),t,3)}function i5(e,t){return h4(e.getUTCMilliseconds(),t,3)}function n5(e,t){return i5(e,t)+"000"}function a5(e,t){return h4(e.getUTCMonth()+1,t,2)}function s5(e,t){return h4(e.getUTCMinutes(),t,2)}function o5(e,t){return h4(e.getUTCSeconds(),t,2)}function l5(e){return 0===(e=e.getUTCDay())?7:e}function h5(e,t){return h4($b.count(Hb(e)-1,e),t,2)}function c5(e){var t=e.getUTCDay();return 4<=t||0===t?Wb(e):Wb.ceil(e)}function u5(e,t){return e=c5(e),h4(Wb.count(Hb(e),e)+(4===Hb(e).getUTCDay()),t,2)}function d5(e){return e.getUTCDay()}function p5(e,t){return h4(Fb.count(Hb(e)-1,e),t,2)}function g5(e,t){return h4(e.getUTCFullYear()%100,t,2)}function f5(e,t){return h4((e=c5(e)).getUTCFullYear()%100,t,2)}function m5(e,t){return h4(e.getUTCFullYear()%1e4,t,4)}function y5(e,t){var r=e.getUTCDay();return h4((e=4<=r||0===r?Wb(e):Wb.ceil(e)).getUTCFullYear()%1e4,t,4)}function v5(){return"+0000"}function x5(){return"%"}function b5(e){return+e}function T5(e){return Math.floor(+e/1e3)}var k5,w5,C5,E5,S5=i(()=>{n4(),mt(a4,"localDate"),mt(s4,"utcDate"),mt(o4,"newDate"),mt(l4,"formatLocale"),k5={"-":"",_:" ",0:"0"},w5=/^\s*\d+/,C5=/^%/,E5=/[\\^$*+?|[\]().{}]/g,mt(h4,"pad"),mt(c4,"requote"),mt(u4,"formatRe"),mt(d4,"formatLookup"),mt(p4,"parseWeekdayNumberSunday"),mt(g4,"parseWeekdayNumberMonday"),mt(f4,"parseWeekNumberSunday"),mt(m4,"parseWeekNumberISO"),mt(y4,"parseWeekNumberMonday"),mt(v4,"parseFullYear"),mt(x4,"parseYear"),mt(b4,"parseZone"),mt(T4,"parseQuarter"),mt(k4,"parseMonthNumber"),mt(w4,"parseDayOfMonth"),mt(C4,"parseDayOfYear"),mt(E4,"parseHour24"),mt(S4,"parseMinutes"),mt(_4,"parseSeconds"),mt(A4,"parseMilliseconds"),mt(L4,"parseMicroseconds"),mt(R4,"parseLiteralPercent"),mt(I4,"parseUnixTimestamp"),mt(N4,"parseUnixTimestampSeconds"),mt(D4,"formatDayOfMonth"),mt(M4,"formatHour24"),mt(O4,"formatHour12"),mt(B4,"formatDayOfYear"),mt(P4,"formatMilliseconds"),mt($4,"formatMicroseconds"),mt(F4,"formatMonthNumber"),mt(z4,"formatMinutes"),mt(q4,"formatSeconds"),mt(W4,"formatWeekdayNumberMonday"),mt(U4,"formatWeekNumberSunday"),mt(G4,"dISO"),mt(j4,"formatWeekNumberISO"),mt(V4,"formatWeekdayNumberSunday"),mt(Y4,"formatWeekNumberMonday"),mt(H4,"formatYear"),mt(X4,"formatYearISO"),mt(K4,"formatFullYear"),mt(Z4,"formatFullYearISO"),mt(Q4,"formatZone"),mt(J4,"formatUTCDayOfMonth"),mt(e5,"formatUTCHour24"),mt(t5,"formatUTCHour12"),mt(r5,"formatUTCDayOfYear"),mt(i5,"formatUTCMilliseconds"),mt(n5,"formatUTCMicroseconds"),mt(a5,"formatUTCMonthNumber"),mt(s5,"formatUTCMinutes"),mt(o5,"formatUTCSeconds"),mt(l5,"formatUTCWeekdayNumberMonday"),mt(h5,"formatUTCWeekNumberSunday"),mt(c5,"UTCdISO"),mt(u5,"formatUTCWeekNumberISO"),mt(d5,"formatUTCWeekdayNumberSunday"),mt(p5,"formatUTCWeekNumberMonday"),mt(g5,"formatUTCYear"),mt(f5,"formatUTCYearISO"),mt(m5,"formatUTCFullYear"),mt(y5,"formatUTCFullYearISO"),mt(v5,"formatUTCZone"),mt(x5,"formatLiteralPercent"),mt(b5,"formatUnixTimestamp"),mt(T5,"formatUnixTimestampSeconds")});function _5(e){return A5=l4(e),L5=A5.format,A5}var A5,L5,R5=i(()=>{S5(),_5({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"]}),mt(_5,"defaultLocale")}),I5=i(()=>{R5()});function N5(e){return new Date(e)}function D5(e){return e instanceof Date?+e:+new Date(+e)}function M5(r,i,t,n,a,s,o,l,h,c){var u=tb(),d=u.invert,p=u.domain,g=c(".%L"),f=c(":%S"),m=c("%I:%M"),y=c("%I %p"),v=c("%a %d"),x=c("%b %d"),b=c("%B"),T=c("%Y");function k(e){return(h(e)<e?g:l(e)<e?f:o(e)<e?m:s(e)<e?y:n(e)<e?a(e)<e?v:x:t(e)<e?b:T)(e)}return mt(k,"tickFormat"),u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?p(Array.from(e,D5)):p().map(N5)},u.ticks=function(e){var t=p();return r(t[0],t[t.length-1],e??10)},u.tickFormat=function(e,t){return null==t?k:c(t)},u.nice=function(e){var t=p();return(e=e&&"function"==typeof e.range?e:i(t[0],t[t.length-1],e??10))?p(hb(t,e)):u},u.copy=function(){return Jx(u,M5(r,i,t,n,a,s,o,l,h,c))},u}function O5(){return Px.apply(M5(t4,r4,Yb,jb,Ib,bb,vb,mb,fb,L5).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var B5=i(()=>{n4(),I5(),ib(),$x(),cb(),mt(N5,"date"),mt(D5,"number"),mt(M5,"calendar"),mt(O5,"time")}),P5=i(()=>{Ux(),lb(),qx(),B5()});function $5(e){for(var t=e.length/6|0,r=new Array(t),i=0;i<t;)r[i]="#"+e.slice(6*i,6*++i);return r}var F5,z5=i(()=>{mt($5,"default")}),q5=i(()=>{z5(),F5=$5("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")}),W5=i(()=>{q5()});function U5(e){return mt(function(){return e},"constant")}var G5=i(()=>{mt(U5,"default")});function j5(e){return 1<e?0:e<-1?t3:Math.acos(e)}function V5(e){return 1<=e?r3:e<=-1?-r3:Math.asin(e)}var Y5,H5,X5,K5,Z5,Q5,J5,e3,t3,r3,i3,n3=i(()=>{Y5=Math.abs,H5=Math.atan2,X5=Math.cos,K5=Math.max,Z5=Math.min,Q5=Math.sin,J5=Math.sqrt,e3=1e-12,r3=(t3=Math.PI)/2,i3=2*t3,mt(j5,"acos"),mt(V5,"asin")});function a3(r){let i=3;return r.digits=function(e){if(!arguments.length)return i;if(null==e)i=null;else{var t=Math.floor(e);if(!(0<=t))throw new RangeError("invalid digits: "+e);i=t}return r},()=>new $2(i)}var s3=i(()=>{z2(),mt(a3,"withPath")});function o3(e){return e.innerRadius}function l3(e){return e.outerRadius}function h3(e){return e.startAngle}function c3(e){return e.endAngle}function u3(e){return e&&e.padAngle}function d3(e,t,r,i,n,a,s,o){var l=(o-=a)*(r-=e)-(s-=n)*(i-=t);if(!(l*l<e3))return[e+(l=(s*(t-a)-o*(e-n))/l)*r,t+l*i]}function p3(e,t,r,i,n,a,s){var o=(s=(s?a:-a)/J5((l=e-r)*l+(o=t-i)*o))*o,s=-s*l,l=e+o,e=t+s,t=r+o,r=i+s,i=(l+t)/2,h=(e+r)/2,c=t-l,u=r-e,d=c*c+u*u,t=((l=l*r-t*e)*u-c*(r=(u<0?-1:1)*J5(K5(0,(a=n-a)*a*d-l*l))))/d,e=(-l*c-u*r)/d,p=(l*u+c*r)/d,l=(-l*c+u*r)/d;return(r=p-i)*r+(d=l-h)*d<(c=t-i)*c+(u=e-h)*u&&(t=p,e=l),{cx:t,cy:e,x01:-o,y01:-s,x11:t*(n/a-1),y11:e*(n/a-1)}}function g3(){var A=o3,L=l3,R=U5(0),I=null,N=h3,D=c3,M=u3,O=null,B=a3(t);function t(){var e,t,r,i,n,a,s,o,l,h,c,u,d,p,g,f,m,y,v,x,b,T,k=+A.apply(this,arguments),w=+L.apply(this,arguments),C=N.apply(this,arguments)-r3,E=D.apply(this,arguments)-r3,S=Y5(E-C),_=C<E;if(O=O||(e=B()),w<k&&(t=w,w=k,k=t),e3<w?i3-e3<S?(O.moveTo(w*X5(C),w*Q5(C)),O.arc(0,0,w,C,E,!_),e3<k&&(O.moveTo(k*X5(E),k*Q5(E)),O.arc(0,0,k,E,C,_))):(i=t=C,n=r=E,s=a=S,c=M.apply(this,arguments)/2,d=e3<c&&(I?+I.apply(this,arguments):J5(k*k+w*w)),T=b=o=Z5(Y5(w-k)/2,+R.apply(this,arguments)),e3<d&&(u=V5(d/k*Q5(c)),d=V5(d/w*Q5(c)),(a-=2*u)>e3?(i+=u*=_?1:-1,n-=u):(a=0,i=n=(C+E)/2),(s-=2*d)>e3?(t+=d*=_?1:-1,r-=d):(s=0,t=r=(C+E)/2)),c=w*X5(t),u=w*Q5(t),d=k*X5(n),C=k*Q5(n),e3<o&&(p=w*X5(r),g=w*Q5(r),f=k*X5(i),m=k*Q5(i),S<t3)&&((E=d3(c,u,f,m,p,g,d,C))?(S=c-E[0],x=u-E[1],y=p-E[0],v=g-E[1],S=1/Q5(j5((S*y+x*v)/(J5(S*S+x*x)*J5(y*y+v*v)))/2),x=J5(E[0]*E[0]+E[1]*E[1]),b=Z5(o,(k-x)/(S-1)),T=Z5(o,(w-x)/(1+S))):b=T=0),e3<s?e3<T?(l=p3(f,m,c,u,w,T,_),h=p3(p,g,d,C,w,T,_),O.moveTo(l.cx+l.x01,l.cy+l.y01),T<o?O.arc(l.cx,l.cy,T,H5(l.y01,l.x01),H5(h.y01,h.x01),!_):(O.arc(l.cx,l.cy,T,H5(l.y01,l.x01),H5(l.y11,l.x11),!_),O.arc(0,0,w,H5(l.cy+l.y11,l.cx+l.x11),H5(h.cy+h.y11,h.cx+h.x11),!_),O.arc(h.cx,h.cy,T,H5(h.y11,h.x11),H5(h.y01,h.x01),!_))):(O.moveTo(c,u),O.arc(0,0,w,t,r,!_)):O.moveTo(c,u),e3<k&&e3<a?e3<b?(l=p3(d,C,p,g,k,-b,_),h=p3(c,u,f,m,k,-b,_),O.lineTo(l.cx+l.x01,l.cy+l.y01),b<o?O.arc(l.cx,l.cy,b,H5(l.y01,l.x01),H5(h.y01,h.x01),!_):(O.arc(l.cx,l.cy,b,H5(l.y01,l.x01),H5(l.y11,l.x11),!_),O.arc(0,0,k,H5(l.cy+l.y11,l.cx+l.x11),H5(h.cy+h.y11,h.cx+h.x11),_),O.arc(h.cx,h.cy,b,H5(h.y11,h.x11),H5(h.y01,h.x01),!_))):O.arc(0,0,k,n,i,_):O.lineTo(d,C)):O.moveTo(0,0),O.closePath(),e)return O=null,e+""||null}return mt(t,"arc"),t.centroid=function(){var e=(+A.apply(this,arguments)+ +L.apply(this,arguments))/2,t=(+N.apply(this,arguments)+ +D.apply(this,arguments))/2-t3/2;return[X5(t)*e,Q5(t)*e]},t.innerRadius=function(e){return arguments.length?(A="function"==typeof e?e:U5(+e),t):A},t.outerRadius=function(e){return arguments.length?(L="function"==typeof e?e:U5(+e),t):L},t.cornerRadius=function(e){return arguments.length?(R="function"==typeof e?e:U5(+e),t):R},t.padRadius=function(e){return arguments.length?(I=null==e?null:"function"==typeof e?e:U5(+e),t):I},t.startAngle=function(e){return arguments.length?(N="function"==typeof e?e:U5(+e),t):N},t.endAngle=function(e){return arguments.length?(D="function"==typeof e?e:U5(+e),t):D},t.padAngle=function(e){return arguments.length?(M="function"==typeof e?e:U5(+e),t):M},t.context=function(e){return arguments.length?(O=e??null,t):O},t}var f3=i(()=>{G5(),n3(),s3(),mt(o3,"arcInnerRadius"),mt(l3,"arcOuterRadius"),mt(h3,"arcStartAngle"),mt(c3,"arcEndAngle"),mt(u3,"arcPadAngle"),mt(d3,"intersect"),mt(p3,"cornerTangents"),mt(g3,"default")});function m3(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}var y3=i(()=>{Array.prototype.slice,mt(m3,"default")});function v3(e){this._context=e}function x3(e){return new v3(e)}var b3=i(()=>{mt(v3,"Linear"),v3.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._point=0},"lineStart"),lineEnd:mt(function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(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)}},"point")},mt(x3,"default")});function T3(e){return e[0]}function k3(e){return e[1]}var w3=i(()=>{mt(T3,"x"),mt(k3,"y")});function C3(s,o){var l=U5(!0),h=null,c=x3,u=null,d=a3(t);function t(e){var t,r,i,n=(e=m3(e)).length,a=!1;for(null==h&&(u=c(i=d())),t=0;t<=n;++t)!(t<n&&l(r=e[t],t,e))===a&&((a=!a)?u.lineStart():u.lineEnd()),a&&u.point(+s(r,t,e),+o(r,t,e));if(i)return u=null,i+""||null}return s="function"==typeof s?s:void 0===s?T3:U5(s),o="function"==typeof o?o:void 0===o?k3:U5(o),mt(t,"line"),t.x=function(e){return arguments.length?(s="function"==typeof e?e:U5(+e),t):s},t.y=function(e){return arguments.length?(o="function"==typeof e?e:U5(+e),t):o},t.defined=function(e){return arguments.length?(l="function"==typeof e?e:U5(!!e),t):l},t.curve=function(e){return arguments.length?(c=e,null!=h&&(u=c(h)),t):c},t.context=function(e){return arguments.length?(null==e?h=u=null:u=c(h=e),t):h},t}var E3=i(()=>{y3(),G5(),b3(),s3(),w3(),mt(C3,"default")});function S3(e,t){return t<e?-1:e<t?1:e<=t?0:NaN}var _3=i(()=>{mt(S3,"default")});function A3(e){return e}var L3=i(()=>{mt(A3,"default")});function R3(){var p=A3,g=S3,f=null,m=U5(0),y=U5(i3),v=U5(0);function t(r){for(var e,t,i,n=(r=m3(r)).length,a=0,s=new Array(n),o=new Array(n),l=+m.apply(this,arguments),h=Math.min(i3,Math.max(-i3,y.apply(this,arguments)-l)),c=Math.min(Math.abs(h)/n,v.apply(this,arguments)),u=c*(h<0?-1:1),d=0;d<n;++d)0<(i=o[s[d]=d]=+p(r[d],d,r))&&(a+=i);for(null!=g?s.sort(function(e,t){return g(o[e],o[t])}):null!=f&&s.sort(function(e,t){return f(r[e],r[t])}),d=0,e=a?(h-n*u)/a:0;d<n;++d,l=t)t=s[d],i=o[t],o[t]={data:r[t],index:d,value:i,startAngle:l,endAngle:t=l+(0<i?i*e:0)+u,padAngle:c};return o}return mt(t,"pie"),t.value=function(e){return arguments.length?(p="function"==typeof e?e:U5(+e),t):p},t.sortValues=function(e){return arguments.length?(g=e,f=null,t):g},t.sort=function(e){return arguments.length?(f=e,g=null,t):f},t.startAngle=function(e){return arguments.length?(m="function"==typeof e?e:U5(+e),t):m},t.endAngle=function(e){return arguments.length?(y="function"==typeof e?e:U5(+e),t):y},t.padAngle=function(e){return arguments.length?(v="function"==typeof e?e:U5(+e),t):v},t}var I3=i(()=>{y3(),G5(),_3(),L3(),n3(),mt(R3,"default")});function N3(e){return new M3(e,!0)}function D3(e){return new M3(e,!1)}var M3,O3=i(()=>{M3=class{static{mt(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||0!==this._line&&1===this._point)&&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)}this._x0=e,this._y0=t}},mt(N3,"bumpX"),mt(D3,"bumpY")});function B3(){}var P3=i(()=>{mt(B3,"default")});function $3(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 F3(e){this._context=e}function z3(e){return new F3(e)}var q3=i(()=>{mt($3,"point"),mt(F3,"Basis"),F3.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){switch(this._point){case 3:$3(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(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:$3(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},mt(z3,"default")});function W3(e){this._context=e}function U3(e){return new W3(e)}var G3=i(()=>{P3(),q3(),mt(W3,"BasisClosed"),W3.prototype={areaStart:B3,areaEnd:B3,lineStart:mt(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:mt(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)}},"lineEnd"),point:mt(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:$3(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},mt(U3,"default")});function j3(e){this._context=e}function V3(e){return new j3(e)}var Y3=i(()=>{q3(),mt(j3,"BasisOpen"),j3.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(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:$3(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},mt(V3,"default")});function H3(e,t){this._basis=new F3(e),this._beta=t}var X3,K3=i(()=>{q3(),mt(H3,"Bundle"),H3.prototype={lineStart:mt(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:mt(function(){var e=this._x,t=this._y,r=e.length-1;if(0<r)for(var i,n=e[0],a=t[0],s=e[r]-n,o=t[r]-a,l=-1;++l<=r;)this._basis.point(this._beta*e[l]+(1-this._beta)*(n+(i=l/r)*s),this._beta*t[l]+(1-this._beta)*(a+i*o));this._x=this._y=null,this._basis.lineEnd()},"lineEnd"),point:mt(function(e,t){this._x.push(+e),this._y.push(+t)},"point")},X3=mt(function t(r){function e(e){return 1===r?new F3(e):new H3(e,r)}return mt(e,"bundle"),e.beta=function(e){return t(+e)},e},"custom")(.85)});function Z3(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 Q3(e,t){this._context=e,this._k=(1-t)/6}var J3,eT=i(()=>{mt(Z3,"point"),mt(Q3,"Cardinal"),Q3.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Z3(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(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:Z3(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")},J3=mt(function t(r){function e(e){return new Q3(e,r)}return mt(e,"cardinal"),e.tension=function(e){return t(+e)},e},"custom")(0)});function tT(e,t){this._context=e,this._k=(1-t)/6}var rT,iT=i(()=>{P3(),eT(),mt(tT,"CardinalClosed"),tT.prototype={areaStart:B3,areaEnd:B3,lineStart:mt(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:mt(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)}},"lineEnd"),point:mt(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:Z3(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")},rT=mt(function t(r){function e(e){return new tT(e,r)}return mt(e,"cardinal"),e.tension=function(e){return t(+e)},e},"custom")(0)});function nT(e,t){this._context=e,this._k=(1-t)/6}var aT,sT=i(()=>{eT(),mt(nT,"CardinalOpen"),nT.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(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:Z3(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")},aT=mt(function t(r){function e(e){return new nT(e,r)}return mt(e,"cardinal"),e.tension=function(e){return t(+e)},e},"custom")(0)});function oT(e,t,r){var i,n,a=e._x1,s=e._y1,o=e._x2,l=e._y2;e3<e._l01_a&&(a=(a*(i=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a)-e._x0*e._l12_2a+e._x2*e._l01_2a)/(n=3*e._l01_a*(e._l01_a+e._l12_a)),s=(s*i-e._y0*e._l12_2a+e._y2*e._l01_2a)/n),e3<e._l23_a&&(o=(o*(i=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a)+e._x1*e._l23_2a-t*e._l12_2a)/(n=3*e._l23_a*(e._l23_a+e._l12_a)),l=(l*i+e._y1*e._l23_2a-r*e._l12_2a)/n),e._context.bezierCurveTo(a,s,o,l,e._x2,e._y2)}function lT(e,t){this._context=e,this._alpha=t}var hT,cT=i(()=>{n3(),eT(),mt(oT,"point"),mt(lT,"CatmullRom"),lT.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(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:mt(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(function(e,t){var r,i;switch(e=+e,t=+t,this._point&&(r=this._x2-e,i=this._y2-t,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))),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:oT(this,e,t)}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")},hT=mt(function t(r){function e(e){return r?new lT(e,r):new Q3(e,0)}return mt(e,"catmullRom"),e.alpha=function(e){return t(+e)},e},"custom")(.5)});function uT(e,t){this._context=e,this._alpha=t}var dT,pT=i(()=>{iT(),P3(),cT(),mt(uT,"CatmullRomClosed"),uT.prototype={areaStart:B3,areaEnd:B3,lineStart:mt(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:mt(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)}},"lineEnd"),point:mt(function(e,t){var r,i;switch(e=+e,t=+t,this._point&&(r=this._x2-e,i=this._y2-t,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))),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:oT(this,e,t)}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")},dT=mt(function t(r){function e(e){return r?new uT(e,r):new tT(e,0)}return mt(e,"catmullRom"),e.alpha=function(e){return t(+e)},e},"custom")(.5)});function gT(e,t){this._context=e,this._alpha=t}var fT,mT=i(()=>{sT(),cT(),mt(gT,"CatmullRomOpen"),gT.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(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:mt(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(function(e,t){var r,i;switch(e=+e,t=+t,this._point&&(r=this._x2-e,i=this._y2-t,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))),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:oT(this,e,t)}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")},fT=mt(function t(r){function e(e){return r?new gT(e,r):new nT(e,0)}return mt(e,"catmullRom"),e.alpha=function(e){return t(+e)},e},"custom")(.5)});function yT(e){this._context=e}function vT(e){return new yT(e)}var xT=i(()=>{P3(),mt(yT,"LinearClosed"),yT.prototype={areaStart:B3,areaEnd:B3,lineStart:mt(function(){this._point=0},"lineStart"),lineEnd:mt(function(){this._point&&this._context.closePath()},"lineEnd"),point:mt(function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))},"point")},mt(vT,"default")});function bT(e){return e<0?-1:1}function TT(e,t,r){var i=e._x1-e._x0,t=t-e._x1,n=(e._y1-e._y0)/(i||t<0&&-0),e=(n*t+(r=(r-e._y1)/(t||i<0&&-0))*i)/(i+t);return(bT(n)+bT(r))*Math.min(Math.abs(n),Math.abs(r),.5*Math.abs(e))||0}function kT(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function wT(e,t,r){var i=e._x0,n=e._x1,a=e._y1,s=(n-i)/3;e._context.bezierCurveTo(i+s,e._y0+s*t,n-s,a-s*r,n,a)}function CT(e){this._context=e}function ET(e){this._context=new ST(e)}function ST(e){this._context=e}function _T(e){return new CT(e)}function AT(e){return new ET(e)}var LT=i(()=>{mt(bT,"sign"),mt(TT,"slope3"),mt(kT,"slope2"),mt(wT,"point"),mt(CT,"MonotoneX"),CT.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:wT(this,this._t0,kT(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(function(e,t){var r=NaN;if(t=+t,(e=+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,wT(this,kT(this,r=TT(this,e,t)),r);break;default:wT(this,this._t0,r=TT(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}},"point")},mt(ET,"MonotoneY"),(ET.prototype=Object.create(CT.prototype)).point=function(e,t){CT.prototype.point.call(this,t,e)},mt(ST,"ReflectContext"),ST.prototype={moveTo:mt(function(e,t){this._context.moveTo(t,e)},"moveTo"),closePath:mt(function(){this._context.closePath()},"closePath"),lineTo:mt(function(e,t){this._context.lineTo(t,e)},"lineTo"),bezierCurveTo:mt(function(e,t,r,i,n,a){this._context.bezierCurveTo(t,e,i,r,a,n)},"bezierCurveTo")},mt(_T,"monotoneX"),mt(AT,"monotoneY")});function RT(e){this._context=e}function IT(e){var t,r,i=e.length-1,n=new Array(i),a=new Array(i),s=new Array(i);for(a[n[0]=0]=2,s[0]=e[0]+2*e[1],t=1;t<i-1;++t)n[t]=1,a[t]=4,s[t]=4*e[t]+2*e[t+1];for(n[i-1]=2,a[i-1]=7,s[i-1]=8*e[i-1]+e[i],t=1;t<i;++t)r=n[t]/a[t-1],a[t]-=r,s[t]-=r*s[t-1];for(n[i-1]=s[i-1]/a[i-1],t=i-2;0<=t;--t)n[t]=(s[t]-n[t+1])/a[t];for(a[i-1]=(e[i]+n[i-1])/2,t=0;t<i-1;++t)a[t]=2*e[t+1]-n[t+1];return[n,a]}function NT(e){return new RT(e)}var DT=i(()=>{mt(RT,"Natural"),RT.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:mt(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]),2===r)this._context.lineTo(e[1],t[1]);else for(var i=IT(e),n=IT(t),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(i[0][a],n[0][a],i[1][a],n[1][a],e[s],t[s]);(this._line||0!==this._line&&1===r)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},"lineEnd"),point:mt(function(e,t){this._x.push(+e),this._y.push(+t)},"point")},mt(IT,"controlPoints"),mt(NT,"default")});function MT(e,t){this._context=e,this._t=t}function OT(e){return new MT(e,.5)}function BT(e){return new MT(e,0)}function PT(e){return new MT(e,1)}var $T=i(()=>{mt(MT,"Step"),MT.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x=this._y=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),0<=this._line&&(this._t=1-this._t,this._line=1-this._line)},"lineEnd"),point:mt(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:var r;this._t<=0?(this._context.lineTo(this._x,t),this._context.lineTo(e,t)):(r=this._x*(1-this._t)+e*this._t,this._context.lineTo(r,this._y),this._context.lineTo(r,t))}this._x=e,this._y=t},"point")},mt(OT,"default"),mt(BT,"stepBefore"),mt(PT,"stepAfter")}),FT=i(()=>{f3(),E3(),I3(),G3(),Y3(),q3(),O3(),K3(),iT(),sT(),eT(),pT(),mT(),cT(),xT(),b3(),LT(),DT(),$T()}),zT=i(()=>{}),qT=i(()=>{});function WT(e,t,r){this.k=e,this.x=t,this.y=r}function UT(e){for(;!e.__zoom;)if(!(e=e.parentNode))return GT;return e.__zoom}var GT,jT,VT,YT,HT,XT,KT,ZT,QT,JT,ek,tk,rk,ik,nk,ak,sk,ok,lk,hk,ck,uk,dk,pk,gk,fk,mk,yk,vk,xk,bk,Tk,kk=i(()=>{mt(WT,"Transform"),WT.prototype={constructor:WT,scale:mt(function(e){return 1===e?this:new WT(this.k*e,this.x,this.y)},"scale"),translate:mt(function(e,t){return 0===e&0===t?this:new WT(this.k,this.x+this.k*e,this.y+this.k*t)},"translate"),apply:mt(function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},"apply"),applyX:mt(function(e){return e*this.k+this.x},"applyX"),applyY:mt(function(e){return e*this.k+this.y},"applyY"),invert:mt(function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},"invert"),invertX:mt(function(e){return(e-this.x)/this.k},"invertX"),invertY:mt(function(e){return(e-this.y)/this.k},"invertY"),rescaleX:mt(function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},"rescaleX"),rescaleY:mt(function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},"rescaleY"),toString:mt(function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"},"toString")},GT=new WT(1,0,0),UT.prototype=WT.prototype,mt(UT,"transform")}),wk=i(()=>{}),Ck=i(()=>{x2(),zT(),qT(),kk(),wk()}),Ek=i(()=>{Ck(),kk()}),Sk=i(()=>{Ed(),Fd(),R2(),q2(),Hf(),W2(),U2(),Kd(),Wg(),G2(),p2(),j2(),Y2(),Dv(),Mv(),Mx(),Y1(),z2(),Ox(),V2(),Bx(),P5(),W5(),qg(),FT(),n4(),I5(),ym(),x2(),Ek()}),_k=tYe(e=>{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=/^.+(:|&colon;)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"}),Ak=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeUrl=void 0;var a=_k();function s(e){return-1<a.relativeFirstCharacters.indexOf(e[0])}function o(e){return e.replace(a.ctrlCharactersRegex,"").replace(a.htmlEntitiesRegex,function(e,t){return String.fromCharCode(t)})}function l(e){return URL.canParse(e)}function h(e){try{return decodeURIComponent(e)}catch{return e}}function t(e){if(!e)return a.BLANK_URL;for(var t,r,i,n=h(e.trim());(t=(n=h(n=o(n).replace(a.htmlCtrlEntityRegex,"").replace(a.ctrlCharactersRegex,"").replace(a.whitespaceEscapeCharsRegex,"").trim())).match(a.ctrlCharactersRegex)||n.match(a.htmlEntitiesRegex)||n.match(a.htmlCtrlEntityRegex)||n.match(a.whitespaceEscapeCharsRegex))&&0<t.length;);return(e=n)?!s(e)&&(i=(r=e.trimStart()).match(a.urlSchemeRegex))?(i=i[0].toLowerCase().trim(),a.invalidProtocolRegex.test(i)?a.BLANK_URL:(r=r.replace(/\\/g,"/"),"mailto:"===i||i.includes("://")||"http:"!==i&&"https:"!==i?r:l(r)?((i=new URL(r)).protocol=i.protocol.toLowerCase(),i.hostname=i.hostname.toLowerCase(),i.toString()):a.BLANK_URL)):e:a.BLANK_URL}mt(s,"isRelativeUrlWithoutProtocol"),mt(o,"decodeHtmlCharacters"),mt(l,"isValidUrl"),mt(h,"decodeURI"),mt(t,"sanitizeUrl"),e.sanitizeUrl=t}),Lk=i(()=>{jT=U(Ak(),1),Sk(),ic(),VT=mt((e,t)=>{var 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),void 0!==t.attrs)for(var i in t.attrs)r.attr(i,t.attrs[i]);return t.class&&r.attr("class",t.class),r},"drawRect"),YT=mt((e,t)=>{t={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"},VT(e,t).lower()},"drawBackgroundRect"),HT=mt((e,t)=>{var r=t.text.replace(Sh," "),i=((e=e.append("text")).attr("x",t.x),e.attr("y",t.y),e.attr("class","legend"),e.style("text-anchor",t.anchor),t.class&&e.attr("class",t.class),e.append("tspan"));return i.attr("x",t.x+2*t.textMargin),i.text(r),e},"drawText"),XT=mt((e,t,r,i)=>{(e=e.append("image")).attr("x",t),e.attr("y",r),t=(0,jT.sanitizeUrl)(i),e.attr("xlink:href",t)},"drawImage"),KT=mt((e,t,r,i)=>{(e=e.append("use")).attr("x",t),e.attr("y",r),t=(0,jT.sanitizeUrl)(i),e.attr("xlink:href","#"+t)},"drawEmbeddedImage"),ZT=mt(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),QT=mt(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),JT=mt(()=>{let e=Q(".mermaidTooltip");return e=e.empty()?Q("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")}),Rk=i(()=>{function t(e,t,r,i,n,a,s){g(t.append("text").attr("x",r+n/2).attr("y",i+a/2+5).style("text-anchor","middle").text(e),s)}function l(e,t,r,i,n,a,s,o){var{fontSize:l,fontFamily:h,fontWeight:c}=o,u=e.split(I.lineBreakRegex);for(let e=0;e<u.length;e++){var d=e*l-l*(u.length-1)/2,p=t.append("text").attr("x",r+n/2).attr("y",i).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",l).style("font-weight",c).style("font-family",h);p.append("tspan").attr("dy",d).text(u[e]).attr("alignment-baseline","mathematical"),g(p,s)}}function r(e,t,r,i,n,a,s,o){(a=(t=t.append("switch")).append("foreignObject").attr("x",r).attr("y",i).attr("width",n).attr("height",a).append("xhtml:div").style("display","table").style("height","100%").style("width","100%")).append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(e),l(e,t,r,i,n,0,s,o),g(a,s)}function g(e,t){for(var r in t)t.hasOwnProperty(r)&&e.attr(r,t[r])}ic(),Lk(),ek=U(Ak(),1),tk=mt(function(e,t){return VT(e,t)},"drawRect"),rk=mt(function(e,t,r,i,n,a){(e=e.append("image")).attr("width",t),e.attr("height",r),e.attr("x",i),e.attr("y",n),t=a.startsWith("data:image/png;base64")?a:(0,ek.sanitizeUrl)(a),e.attr("xlink:href",t)},"drawImage"),ik=mt((e,t,r,i)=>{let n=e.append("g"),a=0;for(var s of t){var o,l=s.textColor||"#444444",h=s.lineColor||"#444444",c=s.offsetX?parseInt(s.offsetX):0,u=s.offsetY?parseInt(s.offsetY):0,h=(0===a?((o=n.append("line")).attr("x1",s.startPoint.x),o.attr("y1",s.startPoint.y),o.attr("x2",s.endPoint.x),o.attr("y2",s.endPoint.y),o.attr("stroke-width","1"),o.attr("stroke",h),o.style("fill","none"),"rel_b"!==s.type&&o.attr("marker-end","url(#"+i+"-arrowhead)"),"birel"!==s.type&&"rel_b"!==s.type||o.attr("marker-start","url(#"+i+"-arrowend)"),a=-1):((o=n.append("path")).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)),"rel_b"!==s.type&&o.attr("marker-end","url(#"+i+"-arrowhead)"),"birel"!==s.type&&"rel_b"!==s.type||o.attr("marker-start","url(#"+i+"-arrowend)")),r.messageFont());gk(r)(s.label.text,n,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+c,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+u,s.label.width,s.label.height,{fill:l},h),s.techn&&""!==s.techn.text&&(h=r.messageFont(),gk(r)("["+s.techn.text+"]",n,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+c,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+r.messageFontSize+5+u,Math.max(s.label.width,s.techn.width),s.techn.height,{fill:l,"font-style":"italic"},h))}},"drawRels"),nk=mt(function(e,t,r){let i=e.append("g"),n=t.bgColor||"none",a=t.borderColor||"#444444",s=t.fontColor||"black",o=t.nodeType?{"stroke-width":1}:{"stroke-width":1,"stroke-dasharray":"7.0,7.0"},l=(tk(i,e={x:t.x,y:t.y,fill:n,stroke:a,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:o}),r.boundaryFont());l.fontWeight="bold",l.fontSize=l.fontSize+2,l.fontColor=s,gk(r)(t.label.text,i,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},l),t.type&&""!==t.type.text&&((l=r.boundaryFont()).fontColor=s,gk(r)(t.type.text,i,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},l)),t.descr&&""!==t.descr.text&&((l=r.boundaryFont()).fontSize=l.fontSize-2,l.fontColor=s,gk(r)(t.descr.text,i,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},l))},"drawBoundary"),ak=mt(function(e,t,r){let i=t.bgColor||r[t.typeC4Shape.text+"_bg_color"],n=t.borderColor||r[t.typeC4Shape.text+"_border_color"],a=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="}var o=e.append("g"),l=(o.attr("class","person-man"),ZT());switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":l.x=t.x,l.y=t.y,l.fill=i,l.width=t.width,l.height=t.height,l.stroke=n,l.rx=2.5,l.ry=2.5,l.attrs={"stroke-width":.5},tk(o,l);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",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)),o.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":o.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)),o.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))}switch(e=pk(r,t.typeC4Shape.text),o.append("text").attr("fill",a).attr("font-family",e.fontFamily).attr("font-size",e.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":rk(o,48,48,t.x+t.width/2-24,t.y+t.image.Y,s)}let h=r[t.typeC4Shape.text+"Font"]();return h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=a,gk(r)(t.label.text,o,t.x,t.y+t.label.Y,t.width,t.height,{fill:a},h),(h=r[t.typeC4Shape.text+"Font"]()).fontColor=a,t.techn&&""!==t.techn?.text?gk(r)(t.techn.text,o,t.x,t.y+t.techn.Y,t.width,t.height,{fill:a,"font-style":"italic"},h):t.type&&""!==t.type.text&&gk(r)(t.type.text,o,t.x,t.y+t.type.Y,t.width,t.height,{fill:a,"font-style":"italic"},h),t.descr&&""!==t.descr.text&&((h=r.personFont()).fontColor=a,gk(r)(t.descr.text,o,t.x,t.y+t.descr.Y,t.width,t.height,{fill:a},h)),t.height},"drawC4Shape"),sk=mt(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"),ok=mt(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"),lk=mt(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"),hk=mt(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"),ck=mt(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"),uk=mt(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"),dk=mt(function(e,t){(e=e.append("defs").append("marker").attr("id",t+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4)).append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),pk=mt((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"getC4ShapeFont"),mt(t,"byText"),mt(l,"byTspan"),mt(r,"byFo"),mt(g,"_setTextAttrs"),gk=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:l},fk={drawRect:tk,drawBoundary:nk,drawC4Shape:ak,drawRels:ik,drawImage:rk,insertArrowHead:hk,insertArrowEnd:ck,insertArrowFilledHead:uk,insertArrowCrossHead:dk,insertDatabaseIcon:sk,insertComputerIcon:ok,insertClockIcon:lk}}),Ik=i(()=>{mk="object"==typeof global&&global&&global.Object===Object&&global,yk=mk}),Nk=i(()=>{Ik(),vk="object"==typeof self&&self&&self.Object===Object&&self,vk=yk||vk||Function("return this")(),xk=vk}),Dk=i(()=>{Nk(),bk=xk.Symbol,Tk=bk});function Mk(e){var t=Bk.call(e,$k),r=e[$k];try{var i=!(e[$k]=void 0)}catch{}var n=Pk.call(e);return i&&(t?e[$k]=r:delete e[$k]),n}var Ok,Bk,Pk,$k,Fk,zk=i(()=>{Dk(),Ok=Object.prototype,Bk=Ok.hasOwnProperty,Pk=Ok.toString,$k=Tk?Tk.toStringTag:void 0,mt(Mk,"getRawTag"),Fk=Mk});function qk(e){return Uk.call(e)}var Wk,Uk,Gk,jk=i(()=>{Wk=Object.prototype,Uk=Wk.toString,mt(qk,"objectToString"),Gk=qk});function Vk(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":(Yk&&Yk in Object(e)?Fk:Gk)(e)}var Yk,Hk,Xk=i(()=>{Dk(),zk(),jk(),Yk=Tk?Tk.toStringTag:void 0,mt(Vk,"baseGetTag"),Hk=Vk});function Kk(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var Zk,Qk=i(()=>{mt(Kk,"isObject"),Zk=Kk});function Jk(e){return!!Zk(e)&&("[object Function]"==(e=Hk(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}var ew,tw,rw,iw=i(()=>{Xk(),Qk(),mt(Jk,"isFunction"),ew=Jk}),nw=i(()=>{Nk(),tw=xk["__core-js_shared__"],rw=tw});function aw(e){return!!sw&&sw in e}var sw,ow,lw=i(()=>{var e;nw(),e=/[^.]+$/.exec(rw&&rw.keys&&rw.keys.IE_PROTO||""),sw=e?"Symbol(src)_1."+e:"",mt(aw,"isMasked"),ow=aw});function hw(e){if(null!=e){try{return uw.call(e)}catch{}try{return e+""}catch{}}return""}var cw,uw,dw,pw=i(()=>{cw=Function.prototype,uw=cw.toString,mt(hw,"toSource"),dw=hw});function gw(e){return!(!Zk(e)||ow(e))&&(ew(e)?xw:mw).test(dw(e))}var fw,mw,yw,vw,xw,bw,Tw=i(()=>{iw(),lw(),Qk(),pw(),fw=/[\\^$.*+?()[\]{}|]/g,mw=/^\[object .+?Constructor\]$/,yw=Function.prototype,vw=Object.prototype,yw=yw.toString,vw=vw.hasOwnProperty,xw=RegExp("^"+yw.call(vw).replace(fw,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt(gw,"baseIsNative"),bw=gw});function kw(e,t){return e?.[t]}var ww,Cw=i(()=>{mt(kw,"getValue"),ww=kw});function Ew(e,t){return e=ww(e,t),bw(e)?e:void 0}var Sw,_w,Aw,Lw=i(()=>{Tw(),Cw(),mt(Ew,"getNative"),Sw=Ew}),Rw=i(()=>{Lw(),_w=Sw(Object,"create"),Aw=_w});function Iw(){this.__data__=Aw?Aw(null):{},this.size=0}var Nw,Dw=i(()=>{Rw(),mt(Iw,"hashClear"),Nw=Iw});function Mw(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e}var Ow,Bw=i(()=>{mt(Mw,"hashDelete"),Ow=Mw});function Pw(e){var t,r=this.__data__;return Aw?"__lodash_hash_undefined__"===(t=r[e])?void 0:t:Fw.call(r,e)?r[e]:void 0}var $w,Fw,zw,qw=i(()=>{Rw(),$w=Object.prototype,Fw=$w.hasOwnProperty,mt(Pw,"hashGet"),zw=Pw});function Ww(e){var t=this.__data__;return Aw?void 0!==t[e]:Gw.call(t,e)}var Uw,Gw,jw,Vw=i(()=>{Rw(),Uw=Object.prototype,Gw=Uw.hasOwnProperty,mt(Ww,"hashHas"),jw=Ww});function Yw(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Aw&&void 0===t?"__lodash_hash_undefined__":t,this}var Hw,Xw=i(()=>{Rw(),mt(Yw,"hashSet"),Hw=Yw});function Kw(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}var Zw,Qw=i(()=>{Dw(),Bw(),qw(),Vw(),Xw(),mt(Kw,"Hash"),Kw.prototype.clear=Nw,Kw.prototype.delete=Ow,Kw.prototype.get=zw,Kw.prototype.has=jw,Kw.prototype.set=Hw,Zw=Kw});function Jw(){this.__data__=[],this.size=0}var eC,tC=i(()=>{mt(Jw,"listCacheClear"),eC=Jw});function rC(e,t){return e===t||e!=e&&t!=t}var iC,nC=i(()=>{mt(rC,"eq"),iC=rC});function aC(e,t){for(var r=e.length;r--;)if(iC(e[r][0],t))return r;return-1}var sC,oC=i(()=>{nC(),mt(aC,"assocIndexOf"),sC=aC});function lC(e){var t=this.__data__;return!((e=sC(t,e))<0||(e==t.length-1?t.pop():cC.call(t,e,1),--this.size,0))}var hC,cC,uC,dC=i(()=>{oC(),hC=Array.prototype,cC=hC.splice,mt(lC,"listCacheDelete"),uC=lC});function pC(e){var t=this.__data__;return(e=sC(t,e))<0?void 0:t[e][1]}var gC,fC=i(()=>{oC(),mt(pC,"listCacheGet"),gC=pC});function mC(e){return-1<sC(this.__data__,e)}var yC,vC=i(()=>{oC(),mt(mC,"listCacheHas"),yC=mC});function xC(e,t){var r=this.__data__,i=sC(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}var bC,TC=i(()=>{oC(),mt(xC,"listCacheSet"),bC=xC});function kC(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}var wC,CC,EC,SC=i(()=>{tC(),dC(),fC(),vC(),TC(),mt(kC,"ListCache"),kC.prototype.clear=eC,kC.prototype.delete=uC,kC.prototype.get=gC,kC.prototype.has=yC,kC.prototype.set=bC,wC=kC}),_C=i(()=>{Lw(),Nk(),CC=Sw(xk,"Map"),EC=CC});function AC(){this.size=0,this.__data__={hash:new Zw,map:new(EC||wC),string:new Zw}}var LC,RC=i(()=>{Qw(),SC(),_C(),mt(AC,"mapCacheClear"),LC=AC});function IC(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var NC,DC=i(()=>{mt(IC,"isKeyable"),NC=IC});function MC(e,t){return e=e.__data__,NC(t)?e["string"==typeof t?"string":"hash"]:e.map}var OC,BC=i(()=>{DC(),mt(MC,"getMapData"),OC=MC});function PC(e){return e=OC(this,e).delete(e),this.size-=e?1:0,e}var $C,FC=i(()=>{BC(),mt(PC,"mapCacheDelete"),$C=PC});function zC(e){return OC(this,e).get(e)}var qC,WC=i(()=>{BC(),mt(zC,"mapCacheGet"),qC=zC});function UC(e){return OC(this,e).has(e)}var GC,jC=i(()=>{BC(),mt(UC,"mapCacheHas"),GC=UC});function VC(e,t){var r=OC(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}var YC,HC=i(()=>{BC(),mt(VC,"mapCacheSet"),YC=VC});function XC(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}var KC,ZC=i(()=>{RC(),FC(),WC(),jC(),HC(),mt(XC,"MapCache"),XC.prototype.clear=LC,XC.prototype.delete=$C,XC.prototype.get=qC,XC.prototype.has=GC,XC.prototype.set=YC,KC=XC});function QC(i,n){if("function"!=typeof i||null!=n&&"function"!=typeof n)throw new TypeError(JC);var a=mt(function(){var e=arguments,t=n?n.apply(this,e):e[0],r=a.cache;return r.has(t)?r.get(t):(e=i.apply(this,e),a.cache=r.set(t,e)||r,e)},"memoized");return a.cache=new(QC.Cache||KC),a}var JC,e6,t6=i(()=>{ZC(),JC="Expected a function",mt(QC,"memoize"),QC.Cache=KC,e6=QC});function r6(){this.__data__=new wC,this.size=0}var i6,n6=i(()=>{SC(),mt(r6,"stackClear"),i6=r6});function a6(e){var t=this.__data__,e=t.delete(e);return this.size=t.size,e}var s6,o6=i(()=>{mt(a6,"stackDelete"),s6=a6});function l6(e){return this.__data__.get(e)}var h6,c6=i(()=>{mt(l6,"stackGet"),h6=l6});function u6(e){return this.__data__.has(e)}var d6,p6=i(()=>{mt(u6,"stackHas"),d6=u6});function g6(e,t){var r=this.__data__;if(r instanceof wC){var i=r.__data__;if(!EC||i.length<199)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new KC(i)}return r.set(e,t),this.size=r.size,this}var f6,m6=i(()=>{SC(),_C(),ZC(),mt(g6,"stackSet"),f6=g6});function y6(e){e=this.__data__=new wC(e),this.size=e.size}var v6,x6,b6,T6=i(()=>{SC(),n6(),o6(),c6(),p6(),m6(),mt(y6,"Stack"),y6.prototype.clear=i6,y6.prototype.delete=s6,y6.prototype.get=h6,y6.prototype.has=d6,y6.prototype.set=f6,v6=y6}),k6=i(()=>{Lw(),x6=(()=>{try{var e=Sw(Object,"defineProperty");return e({},"",{}),e}catch{}})(),b6=x6});function w6(e,t,r){"__proto__"==t&&b6?b6(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var C6,E6=i(()=>{k6(),mt(w6,"baseAssignValue"),C6=w6});function S6(e,t,r){(void 0===r||iC(e[t],r))&&(void 0!==r||t in e)||C6(e,t,r)}var _6,A6=i(()=>{E6(),nC(),mt(S6,"assignMergeValue"),_6=S6});function L6(l){return function(e,t,r){for(var i=-1,n=Object(e),a=r(e),s=a.length;s--;){var o=a[l?s:++i];if(!1===t(n[o],o,n))break}return e}}var R6,I6,N6,D6=i(()=>{mt(L6,"createBaseFor"),R6=L6}),M6=i(()=>{D6(),I6=R6(),N6=I6});function O6(e,t){return t?e.slice():(t=e.length,t=$6?$6(t):new e.constructor(t),e.copy(t),t)}var B6,P6,$6,F6,z6,q6,W6=i(()=>{Nk(),B6="object"==typeof exports&&exports&&!exports.nodeType&&exports,P6=(P6=B6&&"object"==typeof module&&module&&!module.nodeType&&module)&&P6.exports===B6?xk.Buffer:void 0,$6=P6?P6.allocUnsafe:void 0,mt(O6,"cloneBuffer"),F6=O6}),U6=i(()=>{Nk(),z6=xk.Uint8Array,q6=z6});function G6(e){var t=new e.constructor(e.byteLength);return new q6(t).set(new q6(e)),t}var j6,V6=i(()=>{U6(),mt(G6,"cloneArrayBuffer"),j6=G6});function Y6(e,t){return t=t?j6(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.length)}var H6,X6=i(()=>{V6(),mt(Y6,"cloneTypedArray"),H6=Y6});function K6(e,t){var r=-1,i=e.length;for(t=t||Array(i);++r<i;)t[r]=e[r];return t}var Z6,Q6,J6,eE=i(()=>{mt(K6,"copyArray"),Z6=K6}),tE=i(()=>{function t(){}Qk(),Q6=Object.create,mt(t,"object"),J6=function(e){return Zk(e)?Q6?Q6(e):(t.prototype=e,e=new t,t.prototype=void 0,e):{}}});function rE(t,r){return function(e){return t(r(e))}}var iE,nE,aE,sE=i(()=>{mt(rE,"overArg"),iE=rE}),oE=i(()=>{sE(),nE=iE(Object.getPrototypeOf,Object),aE=nE});function lE(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||hE)}var hE,cE,uE=i(()=>{hE=Object.prototype,mt(lE,"isPrototype"),cE=lE});function dE(e){return"function"!=typeof e.constructor||cE(e)?{}:J6(aE(e))}var pE,gE=i(()=>{tE(),oE(),uE(),mt(dE,"initCloneObject"),pE=dE});function fE(e){return null!=e&&"object"==typeof e}var mE,yE=i(()=>{mt(fE,"isObjectLike"),mE=fE});function vE(e){return mE(e)&&"[object Arguments]"==Hk(e)}var xE,bE,TE,kE,wE,CE,EE,SE=i(()=>{Xk(),yE(),mt(vE,"baseIsArguments"),xE=vE}),_E=i(()=>{SE(),yE(),kE=Object.prototype,bE=kE.hasOwnProperty,TE=kE.propertyIsEnumerable,kE=xE(function(){return arguments}())?xE:function(e){return mE(e)&&bE.call(e,"callee")&&!TE.call(e,"callee")},wE=kE}),AE=i(()=>{CE=Array.isArray,EE=CE});function LE(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=9007199254740991}var RE,IE=i(()=>{mt(LE,"isLength"),RE=LE});function NE(e){return null!=e&&RE(e.length)&&!ew(e)}var DE,ME=i(()=>{iw(),IE(),mt(NE,"isArrayLike"),DE=NE});function OE(e){return mE(e)&&DE(e)}var BE,PE=i(()=>{ME(),yE(),mt(OE,"isArrayLikeObject"),BE=OE});function $E(){return!1}var FE,zE,qE,WE,UE=i(()=>{mt($E,"stubFalse"),FE=$E}),GE=i(()=>{Nk(),UE(),qE="object"==typeof exports&&exports&&!exports.nodeType&&exports,zE=(zE=qE&&"object"==typeof module&&module&&!module.nodeType&&module)&&zE.exports===qE?xk.Buffer:void 0,qE=zE?zE.isBuffer:void 0,WE=qE||FE});function jE(e){return!(!mE(e)||"[object Object]"!=Hk(e))&&(null===(e=aE(e))||"function"==typeof(e=XE.call(e,"constructor")&&e.constructor)&&e instanceof e&&HE.call(e)==KE)}var VE,YE,HE,XE,KE,ZE,QE=i(()=>{Xk(),oE(),yE(),VE=Function.prototype,YE=Object.prototype,HE=VE.toString,XE=YE.hasOwnProperty,KE=HE.call(Object),mt(jE,"isPlainObject"),ZE=jE});function JE(e){return mE(e)&&RE(e.length)&&!!eS[Hk(e)]}var eS,tS,rS=i(()=>{Xk(),IE(),yE(),(eS={})["[object Float32Array]"]=eS["[object Float64Array]"]=eS["[object Int8Array]"]=eS["[object Int16Array]"]=eS["[object Int32Array]"]=eS["[object Uint8Array]"]=eS["[object Uint8ClampedArray]"]=eS["[object Uint16Array]"]=eS["[object Uint32Array]"]=!0,eS["[object Arguments]"]=eS["[object Array]"]=eS["[object ArrayBuffer]"]=eS["[object Boolean]"]=eS["[object DataView]"]=eS["[object Date]"]=eS["[object Error]"]=eS["[object Function]"]=eS["[object Map]"]=eS["[object Number]"]=eS["[object Object]"]=eS["[object RegExp]"]=eS["[object Set]"]=eS["[object String]"]=eS["[object WeakMap]"]=!1,mt(JE,"baseIsTypedArray"),tS=JE});function iS(t){return function(e){return t(e)}}var nS,aS,sS,oS,lS,hS,cS,uS=i(()=>{mt(iS,"baseUnary"),nS=iS}),dS=i(()=>{Ik(),oS="object"==typeof exports&&exports&&!exports.nodeType&&exports,aS=oS&&"object"==typeof module&&module&&!module.nodeType&&module,oS=aS&&aS.exports===oS,sS=oS&&yk.process,oS=(()=>{try{return aS&&aS.require&&aS.require("util").types||sS&&sS.binding&&sS.binding("util")}catch{}})(),lS=oS}),pS=i(()=>{rS(),uS(),dS(),hS=(hS=lS&&lS.isTypedArray)?nS(hS):tS,cS=hS});function gS(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var fS,mS=i(()=>{mt(gS,"safeGet"),fS=gS});function yS(e,t,r){var i=e[t];xS.call(e,t)&&iC(i,r)&&(void 0!==r||t in e)||C6(e,t,r)}var vS,xS,bS,TS=i(()=>{E6(),nC(),vS=Object.prototype,xS=vS.hasOwnProperty,mt(yS,"assignValue"),bS=yS});function kS(e,t,r,i){var n=!r;r=r||{};for(var a=-1,s=t.length;++a<s;){var o=t[a],l=i?i(r[o],e[o],o,r,e):void 0;void 0===l&&(l=e[o]),(n?C6:bS)(r,o,l)}return r}var wS,CS=i(()=>{TS(),E6(),mt(kS,"copyObject"),wS=kS});function ES(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var SS,_S=i(()=>{mt(ES,"baseTimes"),SS=ES});function AS(e,t){var r=typeof e;return!!(t=t??9007199254740991)&&("number"==r||"symbol"!=r&&LS.test(e))&&-1<e&&e%1==0&&e<t}var LS,RS,IS=i(()=>{LS=/^(?:0|[1-9]\d*)$/,mt(AS,"isIndex"),RS=AS});function NS(e,t){var r,i=EE(e),n=!i&&wE(e),a=!i&&!n&&WE(e),s=!i&&!n&&!a&&cS(e),o=i||n||a||s,l=o?SS(e.length,String):[],h=l.length;for(r in e)!t&&!MS.call(e,r)||o&&("length"==r||a&&("offset"==r||"parent"==r)||s&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||RS(r,h))||l.push(r);return l}var DS,MS,OS,BS=i(()=>{_S(),_E(),AE(),GE(),IS(),pS(),DS=Object.prototype,MS=DS.hasOwnProperty,mt(NS,"arrayLikeKeys"),OS=NS});function PS(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}var $S,FS=i(()=>{mt(PS,"nativeKeysIn"),$S=PS});function zS(e){if(!Zk(e))return $S(e);var t,r=cE(e),i=[];for(t in e)("constructor"!=t||!r&&WS.call(e,t))&&i.push(t);return i}var qS,WS,US,GS=i(()=>{Qk(),uE(),FS(),qS=Object.prototype,WS=qS.hasOwnProperty,mt(zS,"baseKeysIn"),US=zS});function jS(e){return DE(e)?OS(e,!0):US(e)}var VS,YS=i(()=>{BS(),GS(),ME(),mt(jS,"keysIn"),VS=jS});function HS(e){return wS(e,VS(e))}var XS,KS=i(()=>{CS(),YS(),mt(HS,"toPlainObject"),XS=HS});function ZS(e,t,r,i,n,a,s){var o,l,h,c=fS(e,r),u=fS(t,r),d=s.get(u);d||((t=void 0===(d=a?a(c,u,r+"",e,t,s):void 0))&&(l=!(o=EE(u))&&WE(u),h=!o&&!l&&cS(u),d=u,o||l||h?d=EE(c)?c:BE(c)?Z6(c):l?F6(u,!(t=!1)):h?H6(u,!(t=!1)):[]:ZE(u)||wE(u)?wE(d=c)?d=XS(c):Zk(c)&&!ew(c)||(d=pE(u)):t=!1),t&&(s.set(u,d),n(d,u,i,a,s),s.delete(u))),_6(e,r,d)}var QS,JS=i(()=>{A6(),W6(),X6(),eE(),gE(),_E(),AE(),PE(),GE(),iw(),Qk(),QE(),pS(),mS(),KS(),mt(ZS,"baseMergeDeep"),QS=ZS});function e_(i,n,a,s,o){i!==n&&N6(n,function(e,t){var r;o=o||new v6,Zk(e)?QS(i,n,t,a,e_,s,o):(r=s?s(fS(i,t),e,t+"",i,n,o):void 0,_6(i,t,void 0===r?e:r))},VS)}var t_,r_=i(()=>{T6(),A6(),M6(),JS(),Qk(),YS(),mS(),mt(e_,"baseMerge"),t_=e_});function i_(e){return e}var n_,a_=i(()=>{mt(i_,"identity"),n_=i_});function s_(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var o_,l_=i(()=>{mt(s_,"apply"),o_=s_});function h_(a,s,o){return s=c_(void 0===s?a.length-1:s,0),function(){for(var e=arguments,t=-1,r=c_(e.length-s,0),i=Array(r);++t<r;)i[t]=e[s+t];for(var t=-1,n=Array(s+1);++t<s;)n[t]=e[t];return n[s]=o(i),o_(a,this,n)}}var c_,u_,d_=i(()=>{l_(),c_=Math.max,mt(h_,"overRest"),u_=h_});function p_(e){return function(){return e}}var g_,f_,m_=i(()=>{mt(p_,"constant"),g_=p_}),y_=i(()=>{m_(),k6(),a_(),f_=b6?function(e,t){return b6(e,"toString",{configurable:!0,enumerable:!1,value:g_(t),writable:!0})}:n_});function v_(r){var i=0,n=0;return function(){var e=x_(),t=16-(e-n);if(n=e,0<t){if(800<=++i)return arguments[0]}else i=0;return r.apply(void 0,arguments)}}var x_,b_,T_,k_,w_=i(()=>{x_=Date.now,mt(v_,"shortOut"),b_=v_}),C_=i(()=>{y_(),w_(),T_=b_(f_),k_=T_});function E_(e,t){return k_(u_(e,t,n_),e+"")}var S_,__=i(()=>{a_(),d_(),C_(),mt(E_,"baseRest"),S_=E_});function A_(e,t,r){var i;return!!Zk(r)&&!!("number"==(i=typeof t)?DE(r)&&RS(t,r.length):"string"==i&&t in r)&&iC(r[t],e)}var L_,R_=i(()=>{nC(),ME(),IS(),Qk(),mt(A_,"isIterateeCall"),L_=A_});function I_(o){return S_(function(e,t){var r=-1,i=t.length,n=1<i?t[i-1]:void 0,a=2<i?t[2]:void 0,n=3<o.length&&"function"==typeof n?(i--,n):void 0;for(a&&L_(t[0],t[1],a)&&(n=i<3?void 0:n,i=1),e=Object(e);++r<i;){var s=t[r];s&&o(e,s,r,n)}return e})}var N_,D_,M_,O_=i(()=>{__(),R_(),mt(I_,"createAssigner"),N_=I_}),B_=i(()=>{r_(),O_(),D_=N_(function(e,t,r){t_(e,t,r)}),M_=D_});function P_(e,t){return e?(e="curve"+(e.charAt(0).toUpperCase()+e.slice(1)),J_[e]??t):t}function $_(e,t){if(e=e.trim())return"loose"!==t.securityLevel?(0,Z_.sanitizeUrl)(e):e}function F_(e,t){return e&&t?Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0}function z_(e){let t,r=0;e.forEach(e=>{r+=F_(e,t),t=e});var i=r/2;return o7(e,i)}function q_(e){return 1===e.length?e[0]:z_(e)}function W_(e,t,r){var r=structuredClone(r),i=(B.info("our points",r),"start_left"!==t&&"start_right"!==t&&r.reverse(),25+e),i=o7(r,i),e=10+.5*e,n=Math.atan2(r[0].y-i.y,r[0].x-i.x),a={x:0,y:0};return"start_left"===t?(a.x=Math.sin(n+Math.PI)*e+(r[0].x+i.x)/2,a.y=-Math.cos(n+Math.PI)*e+(r[0].y+i.y)/2):"end_right"===t?(a.x=Math.sin(n-Math.PI)*e+(r[0].x+i.x)/2-5,a.y=-Math.cos(n-Math.PI)*e+(r[0].y+i.y)/2-5):"end_left"===t?(a.x=Math.sin(n)*e+(r[0].x+i.x)/2-5,a.y=-Math.cos(n)*e+(r[0].y+i.y)/2-5):(a.x=Math.sin(n)*e+(r[0].x+i.x)/2,a.y=-Math.cos(n)*e+(r[0].y+i.y)/2),a}function U_(e){let t="",r="";for(var i of e)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}function G_(t){let r="",i="0123456789abcdef",n=i.length;for(let e=0;e<t;e++)r+=i.charAt(Math.floor(Math.random()*n));return r}function j_(e,t){return m7(e,t).height}function V_(e,t){return m7(e,t).width}function Y_(e){return"str"in e}function H_(e,t){return M_({},e,t)}function X_(e){return e??null}function K_(e,t){var r=Math.round(e.x),e=Math.round(e.y);return(t=t.replace(/(\d+\.\d+)/g,e=>Math.round(parseFloat(e)).toString())).includes(r.toString())||t.includes(e.toString())}var Z_,Q_,J_,e7,t7,r7,i7,n7,a7,s7,o7,l7,h7,c7,u7,d7,p7,g7,f7,m7,y7,v7,x7,b7,T7,k7,w7,C7,E7,S7=i(()=>{Z_=U(Ak(),1),Sk(),ic(),Ci(),e(),Ac(),Nr(),t6(),B_(),Sc(),Q_="",J_={curveBasis:z3,curveBasisClosed:U3,curveBasisOpen:V3,curveBumpX:N3,curveBumpY:D3,curveBundle:X3,curveCardinalClosed:rT,curveCardinalOpen:aT,curveCardinal:J3,curveCatmullRomClosed:dT,curveCatmullRomOpen:fT,curveCatmullRom:hT,curveLinear:x3,curveLinearClosed:vT,curveMonotoneX:_T,curveMonotoneY:AT,curveNatural:NT,curveStep:OT,curveStepAfter:PT,curveStepBefore:BT},e7=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,t7=mt(function(e,t){var r,i=r7(e,/(?:init\b)|(?:initialize\b)/),n={};if(n=Array.isArray(i)?(r=i.map(e=>e.args),sr(r),Le(n,[...r])):i.args)return r=uc(e,t),void 0!==n[i="config"]&&(n[r="flowchart-v2"===r?"flowchart":r]=n[i],delete n[i]),n},"detectInit"),r7=mt(function(e,t=null){try{var r=new RegExp(`[%]{2}(?![{]${e7.source})(?=[}][%]{2}).*
`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),B.debug(`Detecting diagram directive${null!==t?" type:"+t:""} based on the text:`+e);for(var i,n,a,s=[];null!==(i=oc.exec(e));)i.index===oc.lastIndex&&oc.lastIndex++,(i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t))&&(n=i[1]||i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null,s.push({type:n,args:a}));return 0===s.length?{type:e,args:null}:1===s.length?s[0]:s}catch(r){return B.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),i7=mt(function(e){return e.replace(oc,"")},"removeDirectives"),n7=mt(function(e,t){for(var[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray"),mt(P_,"interpolateToCurve"),mt($_,"formatUrl"),a7=mt((t,...e)=>{let r=t.split("."),i=r.length-1,n=r[i],a=window;for(let e=0;e<i;e++)if(!(a=a[r[e]]))return void B.error(`Function name: ${t} not found in window`);a[n](...e)},"runFunc"),mt(F_,"distance"),mt(z_,"traverseEdge"),mt(q_,"calcLabelPosition"),s7=mt((e,t=2)=>(t=Math.pow(10,t),Math.round(e*t)/t),"roundNumber"),o7=mt((e,t)=>{let r,i=t;for(var n of e){if(r){var a=F_(n,r);if(0===a)return r;if(a<i)i-=a;else{if((a=i/a)<=0)return r;if(1<=a)return{x:n.x,y:n.y};if(0<a&&a<1)return{x:s7((1-a)*r.x+a*n.x,5),y:s7((1-a)*r.y+a*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),l7=mt((e,t,r)=>{B.info("our points "+JSON.stringify(t)),t[0]!==r&&(t=t.reverse());var r=o7(t,25),e=e?10:5,i=Math.atan2(t[0].y-r.y,t[0].x-r.x),n={x:0,y:0};return n.x=Math.sin(i)*e+(t[0].x+r.x)/2,n.y=-Math.cos(i)*e+(t[0].y+r.y)/2,n},"calcCardinalityPosition"),mt(W_,"calcTerminalLabelPosition"),mt(U_,"getStylesFromArray"),h7=0,c7=mt(()=>(h7++,"id-"+Math.random().toString(36).substr(2,12)+"-"+h7),"generateId"),mt(G_,"makeRandomHex"),u7=mt(e=>G_(e.length),"random"),d7=mt(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"),p7=mt(function(e,t){var r=t.text.replace(I.lineBreakRegex," "),[,i]=T7(t.fontSize);return(e=e.append("text")).attr("x",t.x),e.attr("y",t.y),e.style("text-anchor",t.anchor),e.style("font-family",t.fontFamily),e.style("font-size",i),e.style("font-weight",t.fontWeight),e.attr("fill",t.fill),void 0!==t.class&&e.attr("class",t.class),(i=e.append("tspan")).attr("x",t.x+2*t.textMargin),i.attr("fill",t.fill),i.text(r),e},"drawSimpleText"),g7=e6((e,s,o)=>{if(!e||(o=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},o),I.lineBreakRegex.test(e)))return e;let l=e.split(" ").filter(Boolean),h=[],c="";return l.forEach((e,t)=>{var r,i,n=V_(e+" ",o),a=V_(c,o);c=s<n?({hyphenatedStrings:r,remainingWord:i}=f7(e,s,"-",o),h.push(c,...r),i):s<=a+n?(h.push(c),e):[c,e].filter(Boolean).join(" "),t+1===l.length&&h.push(c)}),h.filter(e=>""!==e).join(o.joinWith)},(e,t,r)=>""+e+t+r.fontSize+r.fontWeight+r.fontFamily+r.joinWith),f7=e6((e,i,n="-",a)=>{a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},a);let s=[...e],o=[],l="";return s.forEach((e,t)=>{var r,e=""+l+e;l=V_(e,a)>=i?(t+=1,t=s.length===t,r=e+n,o.push(t?e:r),""):e}),{hyphenatedStrings:o,remainingWord:l}},(e,t,r="-",i)=>""+e+t+r+i.fontSize+i.fontWeight+i.fontFamily),mt(j_,"calculateTextHeight"),mt(V_,"calculateTextWidth"),m7=e6((e,t)=>{var{fontSize:t=12,fontFamily:r="Arial",fontWeight:i=400}=t;if(!e)return{width:0,height:0};var[,n]=T7(t),t=["sans-serif",r],a=e.split(I.lineBreakRegex),s=[];if(!(r=Q("body")).remove)return{width:0,height:0,lineHeight:0};var o,l=r.append("svg");for(o of t){var h,c={width:0,height:0,lineHeight:0};for(h of a){var u=d7();if(u.text=h||Q_,0===(u=((u=p7(l,u).style("font-size",n).style("font-weight",i).style("font-family",o))._groups||u)[0][0].getBBox()).width&&0===u.height)throw new Error("svg element not in render tree");c.width=Math.round(Math.max(c.width,u.width)),u=Math.round(u.height),c.height+=u,c.lineHeight=Math.round(Math.max(c.lineHeight,u))}s.push(c)}return l.remove(),s[isNaN(s[1].height)||isNaN(s[1].width)||isNaN(s[1].lineHeight)||s[0].height>s[1].height&&s[0].width>s[1].width&&s[0].lineHeight>s[1].lineHeight?0:1]},(e,t)=>""+e+t.fontSize+t.fontWeight+t.fontFamily),y7=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{mt(this,"InitIDGenerator")}},x7=mt(function(e){return v7=v7||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),v7.innerHTML=e,unescape(v7.textContent)},"entityDecode"),mt(Y_,"isDetailedError"),b7=mt((e,t,r,i)=>{var n;i&&(n=e.node()?.getBBox())&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),T7=mt(e=>{var t;return"number"==typeof e?[e,e+"px"]:(t=parseInt(e??"",10),Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e])},"parseFontSize"),mt(H_,"cleanAndMerge"),k7={assignWithDepth:Le,wrapLabel:g7,calculateTextHeight:j_,calculateTextWidth:V_,calculateTextDimensions:m7,cleanAndMerge:H_,detectInit:t7,detectDirective:r7,isSubstringInArray:n7,interpolateToCurve:P_,calcLabelPosition:q_,calcCardinalityPosition:l7,calcTerminalLabelPosition:W_,formatUrl:$_,getStylesFromArray:U_,generateId:c7,random:u7,runFunc:a7,entityDecode:x7,insertTitle:b7,isLabelCoordinateInPath:K_,parseFontSize:T7,InitIDGenerator:y7},w7=mt(function(e){let t=e;return t=(t=(t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)})).replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)})).replace(/#\w+;/g,function(e){return e=e.substring(1,e.length-1),/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"})},"encodeEntities"),C7=mt(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),E7=mt((e,t,{counter:r=0,prefix:i,suffix:n},a)=>a||(i?i+"_":"")+e+`_${t}_`+r+(n?"_"+n:""),"getEdgeId"),mt(X_,"handleUndefinedAttr"),mt(K_,"isLabelCoordinateInPath")});function _7(e,t,r,i,n){if(!t[e].width)if(r)t[e].text=g7(t[e].text,n,i),t[e].textLines=t[e].text.split(I.lineBreakRegex).length,t[e].width=n,t[e].height=j_(t[e].text,i);else{var a,s,r=t[e].text.split(I.lineBreakRegex);t[e].textLines=r.length,t[e].height=0,t[e].width=0;for(s of r)t[e].width=Math.max(V_(s,i),t[e].width),a=j_(s,i),t[e].height=t[e].height+a}}function A7(t,r,i,e,n){var a,s,o=new M7(n);o.data.widthLimit=i.data.widthLimit/Math.min(N7,e.length);for([a,s]of e.entries()){let e=0;s.image={width:0,height:0,Y:0},s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=e,e=s.image.Y+s.image.height);var l=s.wrap&&D7.wrap,h=P7(D7),l=(h.fontSize=h.fontSize+2,h.fontWeight="bold",_7("label",s,l,h,o.data.widthLimit),s.label.Y=e+8,e=s.label.Y+s.label.height,s.type&&""!==s.type.text&&(s.type.text="["+s.type.text+"]",_7("type",s,l,h=P7(D7),o.data.widthLimit),s.type.Y=e+5,e=s.type.Y+s.type.height),s.descr&&""!==s.descr.text&&((h=P7(D7)).fontSize=h.fontSize-2,_7("descr",s,l,h,o.data.widthLimit),s.descr.Y=e+20,e=s.descr.Y+s.descr.height),h=0==a||a%N7==0?(l=i.data.startx+D7.diagramMarginX,i.data.stopy+D7.diagramMarginY+e):(l=o.data.stopx!==o.data.startx?o.data.stopx+D7.diagramMarginX:o.data.startx,o.data.starty),o.setData(l,l,h,h),o.name=s.alias,n.db.getC4ShapeArray(s.alias));0<(h=n.db.getC4ShapeKeys(s.alias)).length&&z7(o,t,l,h),r=s.alias,0<(l=n.db.getBoundaries(r)).length&&A7(t,0,o,l,n),"global"!==s.alias&&F7(t,s,o),i.data.stopy=Math.max(o.data.stopy+D7.c4ShapeMargin,i.data.stopy),i.data.stopx=Math.max(o.data.stopx+D7.c4ShapeMargin,i.data.stopx),L7=Math.max(L7,i.data.stopx),R7=Math.max(R7,i.data.stopy)}}var L7,R7,I7,N7,D7,M7,O7,B7,P7,$7,F7,z7,q7,W7,U7,G7,j7,V7,Y7,H7,X7=i(()=>{Sk(),Rk(),e(),Lc(),ic(),Vu(),ju(),Nr(),S7(),Rc(),R7=L7=0,I7=4,N7=2,fc.yy=Uu,D7={},M7=class{static{mt(this,"Bounds")}constructor(e){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,O7(e.db.getConfig())}setData(e,t,r,i){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=t,this.nextData.starty=this.data.starty=r,this.nextData.stopy=this.data.stopy=i}updateVal(e,t,r,i){void 0===e[t]?e[t]=r:e[t]=i(r,e[t])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let t=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+e.margin:this.nextData.stopx+2*e.margin,r=t+e.width,i=this.nextData.starty+2*e.margin,n=i+e.height;(t>=this.data.widthLimit||r>=this.data.widthLimit||this.nextData.cnt>I7)&&(t=this.nextData.startx+e.margin+D7.nextLinePaddingX,i=this.nextData.stopy+2*e.margin,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},O7(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},O7=mt(function(e){Le(D7,e),e.fontFamily&&(D7.personFontFamily=D7.systemFontFamily=D7.messageFontFamily=e.fontFamily),e.fontSize&&(D7.personFontSize=D7.systemFontSize=D7.messageFontSize=e.fontSize),e.fontWeight&&(D7.personFontWeight=D7.systemFontWeight=D7.messageFontWeight=e.fontWeight)},"setConf"),B7=mt((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),P7=mt(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),$7=mt(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),mt(_7,"calcC4ShapeTextWH"),F7=mt(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=D7.c4ShapeMargin-35;var r=t.wrap&&D7.wrap,i=P7(D7),n=(i.fontSize=i.fontSize+2,i.fontWeight="bold",V_(t.label.text,i));_7("label",t,r,i,n),fk.drawBoundary(e,t,D7)},"drawBoundary"),z7=mt(function(r,i,n,e){let a=0;for(var s of e){a=0;var o=n[s];switch((s=B7(D7,o.typeC4Shape.text)).fontSize=s.fontSize-2,o.typeC4Shape.width=V_("«"+o.typeC4Shape.text+"»",s),o.typeC4Shape.height=s.fontSize+2,o.typeC4Shape.Y=D7.c4ShapePadding,a=o.typeC4Shape.Y+o.typeC4Shape.height-4,o.image={width:0,height:0,Y:0},o.typeC4Shape.text){case"person":case"external_person":o.image.width=48,o.image.height=48,o.image.Y=a,a=o.image.Y+o.image.height}o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=a,a=o.image.Y+o.image.height);var s=o.wrap&&D7.wrap,l=D7.width-2*D7.c4ShapePadding,h=B7(D7,o.typeC4Shape.text);h.fontSize=h.fontSize+2,h.fontWeight="bold",_7("label",o,s,h,l),o.label.Y=a+8,a=o.label.Y+o.label.height,o.type&&""!==o.type.text?(o.type.text="["+o.type.text+"]",_7("type",o,s,B7(D7,o.typeC4Shape.text),l),o.type.Y=a+5,a=o.type.Y+o.type.height):o.techn&&""!==o.techn.text&&(o.techn.text="["+o.techn.text+"]",_7("techn",o,s,B7(D7,o.techn.text),l),o.techn.Y=a+5,a=o.techn.Y+o.techn.height);let e=a,t=o.label.width;o.descr&&""!==o.descr.text&&(_7("descr",o,s,B7(D7,o.typeC4Shape.text),l),o.descr.Y=a+20,a=o.descr.Y+o.descr.height,t=Math.max(o.label.width,o.descr.width),e=a-5*o.descr.textLines),t+=D7.c4ShapePadding,o.width=Math.max(o.width||D7.width,t,D7.width),o.height=Math.max(o.height||D7.height,e,D7.height),o.margin=o.margin||D7.c4ShapeMargin,r.insert(o),fk.drawC4Shape(i,o,D7)}r.bumpLastMargin(D7.c4ShapeMargin)},"drawC4ShapeArray"),q7=class{static{mt(this,"Point")}constructor(e,t){this.x=e,this.y=t}},W7=mt(function(e,t){let r=e.x,i=e.y,n=t.x,a=t.y,s=r+e.width/2,o=i+e.height/2,l=Math.abs(r-n),h=Math.abs(i-a),c=h/l,u=e.height/e.width,d=null;return i==a&&r<n?d=new q7(r+e.width,o):i==a&&n<r?d=new q7(r,o):r==n&&i<a?d=new q7(s,i+e.height):r==n&&a<i&&(d=new q7(s,i)),n<r&&i<a?d=c<=u?new q7(r,o+c*e.width/2):new q7(s-l/h*e.height/2,i+e.height):r<n&&i<a?d=c<=u?new q7(r+e.width,o+c*e.width/2):new q7(s+l/h*e.height/2,i+e.height):r<n&&a<i?d=c<=u?new q7(r+e.width,o-c*e.width/2):new q7(s+e.height/2*l/h,i):n<r&&a<i&&(d=c<=u?new q7(r,o-e.width/2*c):new q7(s-e.height/2*l/h,i)),d},"getIntersectPoint"),U7=mt(function(e,t){var r={x:0,y:0},i=(r.x=t.x+t.width/2,r.y=t.y+t.height/2,W7(e,r));return r.x=e.x+e.width/2,r.y=e.y+e.height/2,{startPoint:i,endPoint:e=W7(t,r)}},"getIntersectPoints"),G7=mt(function(e,t,r,i,n){let a=0;for(var s of t){a+=1;var o=s.wrap&&D7.wrap,l=$7(D7);"C4Dynamic"===i.db.getC4Type()&&(s.label.text=a+": "+s.label.text);let e=V_(s.label.text,l);_7("label",s,o,l,e),s.techn&&""!==s.techn.text&&_7("techn",s,o,l,e=V_(s.techn.text,l)),s.descr&&""!==s.descr.text&&_7("descr",s,o,l,e=V_(s.descr.text,l)),o=r(s.from),l=r(s.to),o=U7(o,l),s.startPoint=o.startPoint,s.endPoint=o.endPoint}fk.drawRels(e,t,D7,n)},"drawRels"),mt(A7,"drawInsideBoundary"),j7=mt(function(e,t,r,i){D7=P().c4;let n=P().securityLevel,a;"sandbox"===n&&(a=Q("#i"+t));var s=Q("sandbox"===n?a.nodes()[0].contentDocument.body:"body"),o=i.db,o=(i.db.setWrap(D7.wrap),I7=o.getC4ShapeInRow(),N7=o.getC4BoundaryInRow(),B.debug("C:"+JSON.stringify(D7,null,2)),"sandbox"===n?s.select(`[id="${t}"]`):Q(`[id="${t}"]`)),l=(fk.insertComputerIcon(o,t),fk.insertDatabaseIcon(o,t),fk.insertClockIcon(o,t),(s=new M7(i)).setData(D7.diagramMarginX,D7.diagramMarginX,D7.diagramMarginY,D7.diagramMarginY),s.data.widthLimit=screen.availWidth,L7=D7.diagramMarginX,R7=D7.diagramMarginY,i.db.getTitle());A7(o,0,s,i.db.getBoundaries(""),i),fk.insertArrowHead(o,t),fk.insertArrowEnd(o,t),fk.insertArrowCrossHead(o,t),fk.insertArrowFilledHead(o,t),G7(o,i.db.getRels(),i.db.getC4Shape,i,t),s.data.stopx=L7,s.data.stopy=R7,t=(i=s.data).stopy-i.starty+2*D7.diagramMarginY,s=i.stopx-i.startx+2*D7.diagramMarginX,l&&o.append("text").text(l).attr("x",(i.stopx-i.startx)/2-4*D7.diagramMarginX).attr("y",i.starty+D7.diagramMarginY),xc(o,t,s,D7.useMaxWidth),o.attr("viewBox",i.startx-D7.diagramMarginX+" -"+(D7.diagramMarginY+(l=l?60:0))+" "+s+" "+(t+l)),B.debug("models:",i)},"draw"),V7={drawPersonOrSystemArray:z7,drawBoundary:F7,setConf:O7,draw:j7}}),K7=i(()=>{Y7=mt(e=>`.person {
stroke: ${e.personBorder};
fill: ${e.personBkg};
}
`,"getStyles"),H7=Y7}),Z7={};sYe(Z7,{diagram:()=>Q7});var Q7,J7=i(()=>{Lc(),Vu(),X7(),K7(),Q7={parser:mc,db:Uu,renderer:V7,styles:H7,init:mt(({c4:e,wrap:t})=>{V7.setConf(e),Uu.setWrap(t)},"init")}});function e8(e){return"u"<typeof e||null===e}function t8(e){return"object"==typeof e&&null!==e}function r8(e){return Array.isArray(e)?e:e8(e)?[]:[e]}function i8(e,t){var r,i,n,a;if(t)for(r=0,i=(a=Object.keys(t)).length;r<i;r+=1)e[n=a[r]]=t[n];return e}function n8(e,t){for(var r="",i=0;i<t;i+=1)r+=e;return r}function a8(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}function s8(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
`+e.mark.snippet),i+" "+r):i}function o8(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=s8(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}function l8(e,t,r,i,n){var a="",s="";return(n=Math.floor(n/2)-1)<i-t&&(t=i-n+(a=" ... ").length),n<r-i&&(r=i+n-(s=" ...").length),{str:a+e.slice(t,r).replace(/\t/g,"→")+s,pos:i-t+a.length}}function h8(e,t){return s9.repeat(" ",t-e.length)+e}function c8(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var r,i=/\r?\n|\r|\0/g,n=[0],a=[],s=-1;r=i.exec(e.buffer);)a.push(r.index),n.push(r.index+r[0].length),e.position<=r.index&&s<0&&(s=n.length-2);s<0&&(s=n.length-1);for(var o,l="",h=Math.min(e.line+t.linesAfter,a.length).toString().length,c=t.maxLength-(t.indent+h+3),u=1;u<=t.linesBefore&&!(s-u<0);u++)o=l8(e.buffer,n[s-u],a[s-u],e.position-(n[s]-n[s-u]),c),l=s9.repeat(" ",t.indent)+h8((e.line-u+1).toString(),h)+" | "+o.str+`
`+l;for(o=l8(e.buffer,n[s],a[s],e.position,c),l=(l+=s9.repeat(" ",t.indent)+h8((e.line+1).toString(),h)+" | "+o.str+`
`)+s9.repeat("-",t.indent+h+3+o.pos)+`^
`,u=1;u<=t.linesAfter&&!(a.length<=s+u);u++)o=l8(e.buffer,n[s+u],a[s+u],e.position-(n[s]-n[s+u]),c),l+=s9.repeat(" ",t.indent)+h8((e.line+u+1).toString(),h)+" | "+o.str+`
`;return l.replace(/\n$/,"")}function u8(e){var r={};return null!==e&&Object.keys(e).forEach(function(t){e[t].forEach(function(e){r[String(e)]=t})}),r}function d8(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===h9.indexOf(e))throw new o9('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(e){return e},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=u8(e.styleAliases||null),-1===c9.indexOf(this.kind))throw new o9('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}function p8(e,t){var n=[];return e[t].forEach(function(r){var i=n.length;n.forEach(function(e,t){e.tag===r.tag&&e.kind===r.kind&&e.multi===r.multi&&(i=t)}),n[i]=r}),n}function g8(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(e){e.multi?(r.multi[e.kind].push(e),r.multi.fallback.push(e)):r[e.kind][e.tag]=r.fallback[e.tag]=e}for(mt(i,"collectType"),e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(i);return r}function f8(e){return this.extend(e)}function m8(e){var t;return null===e||1===(t=e.length)&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)}function y8(){return null}function v8(e){return null===e}function x8(e){var t;return null!==e&&(4===(t=e.length)&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e))}function b8(e){return"true"===e||"True"===e||"TRUE"===e}function T8(e){return"[object Boolean]"===Object.prototype.toString.call(e)}function k8(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function w8(e){return 48<=e&&e<=55}function C8(e){return 48<=e&&e<=57}function E8(e){if(null===e)return!1;var t,r=e.length,i=0,n=!1;if(!r)return!1;if("0"===(t="-"!==(t=e[i])&&"+"!==t?t:e[++i])){if(i+1===r)return!0;if("b"===(t=e[++i])){for(i++;i<r;i++)if("_"!==(t=e[i])){if("0"!==t&&"1"!==t)return!1;n=!0}return n&&"_"!==t}if("x"===t){for(i++;i<r;i++)if("_"!==(t=e[i])){if(!k8(e.charCodeAt(i)))return!1;n=!0}return n&&"_"!==t}if("o"===t){for(i++;i<r;i++)if("_"!==(t=e[i])){if(!w8(e.charCodeAt(i)))return!1;n=!0}return n&&"_"!==t}}if("_"===t)return!1;for(;i<r;i++)if("_"!==(t=e[i])){if(!C8(e.charCodeAt(i)))return!1;n=!0}return!(!n||"_"===t)}function S8(e){var t,r=1;if("-"!==(t=(e=-1!==e.indexOf("_")?e.replace(/_/g,""):e)[0])&&"+"!==t||("-"===t&&(r=-1),t=(e=e.slice(1))[0]),"0"===e)return 0;if("0"===t){if("b"===e[1])return r*parseInt(e.slice(2),2);if("x"===e[1])return r*parseInt(e.slice(2),16);if("o"===e[1])return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}function _8(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!s9.isNegativeZero(e)}function A8(e){return!(null===e||!d9.test(e)||"_"===e[e.length-1])}function L8(e){var t="-"===(e=e.replace(/_/g,"").toLowerCase())[0]?-1:1;return".inf"===(e=0<="+-".indexOf(e[0])?e.slice(1):e)?1==t?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:t*parseFloat(e,10)}function R8(e,t){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(s9.isNegativeZero(e))return"-0.0";return t=e.toString(10),p9.test(t)?t.replace("e",".e"):t}function I8(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||s9.isNegativeZero(e))}function N8(e){return null!==e&&(null!==f9.exec(e)||null!==m9.exec(e))}function D8(e){var t,r,i,n,a,s=0,o=null,l=f9.exec(e);if(null===(l=null===l?m9.exec(e):l))throw new Error("Date resolve error");if(e=+l[1],t=+l[2]-1,r=+l[3],!l[4])return new Date(Date.UTC(e,t,r));if(i=+l[4],n=+l[5],a=+l[6],l[7]){for(s=l[7].slice(0,3);s.length<3;)s+="0";s=+s}return l[9]&&(o=6e4*(60*+l[10]+ +(l[11]||0)),"-"===l[9])&&(o=-o),l=new Date(Date.UTC(e,t,r,i,n,a,s)),o&&l.setTime(l.getTime()-o),l}function M8(e){return e.toISOString()}function O8(e){return"<<"===e||null===e}function B8(e){if(null===e)return!1;for(var t,r=0,i=e.length,n=x9,a=0;a<i;a++)if(!(64<(t=n.indexOf(e.charAt(a))))){if(t<0)return!1;r+=6}return r%8==0}function P8(e){for(var t=e.replace(/[\r\n=]/g,""),r=t.length,i=x9,n=0,a=[],s=0;s<r;s++)s%4==0&&s&&(a.push(n>>16&255),a.push(n>>8&255),a.push(255&n)),n=n<<6|i.indexOf(t.charAt(s));return 0==(e=r%4*6)?(a.push(n>>16&255),a.push(n>>8&255),a.push(255&n)):18==e?(a.push(n>>10&255),a.push(n>>2&255)):12==e&&a.push(n>>4&255),new Uint8Array(a)}function $8(e){for(var t,r="",i=0,n=e.length,a=x9,s=0;s<n;s++)s%3==0&&s&&(r=(r=(r=(r+=a[i>>18&63])+a[i>>12&63])+a[i>>6&63])+a[63&i]),i=(i<<8)+e[s];return 0==(t=n%3)?r=(r=(r=(r+=a[i>>18&63])+a[i>>12&63])+a[i>>6&63])+a[63&i]:2==t?r=(r=(r=(r+=a[i>>10&63])+a[i>>4&63])+a[i<<2&63])+a[64]:1==t&&(r=(r=(r=(r+=a[i>>2&63])+a[i<<4&63])+a[64])+a[64]),r}function F8(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}function z8(e){if(null!==e)for(var t,r,i,n=[],a=e,s=0,o=a.length;s<o;s+=1){if(t=a[s],i=!1,"[object Object]"!==k9.call(t))return!1;for(r in t)if(T9.call(t,r)){if(i)return!1;i=!0}if(!i)return!1;if(-1!==n.indexOf(r))return!1;n.push(r)}return!0}function q8(e){return null!==e?e:[]}function W8(e){if(null!==e)for(var t,r,i=e,n=new Array(i.length),a=0,s=i.length;a<s;a+=1){if(t=i[a],"[object Object]"!==C9.call(t)||1!==(r=Object.keys(t)).length)return!1;n[a]=[r[0],t[r[0]]]}return!0}function U8(e){if(null===e)return[];for(var t,r,i=e,n=new Array(i.length),a=0,s=i.length;a<s;a+=1)t=i[a],r=Object.keys(t),n[a]=[r[0],t[r[0]]];return n}function G8(e){if(null!==e){var t,r=e;for(t in r)if(S9.call(r,t)&&null!==r[t])return!1}return!0}function j8(e){return null!==e?e:{}}function V8(e){return Object.prototype.toString.call(e)}function Y8(e){return 10===e||13===e}function H8(e){return 9===e||32===e}function X8(e){return 9===e||32===e||10===e||13===e}function K8(e){return 44===e||91===e||93===e||123===e||125===e}function Z8(e){return 48<=e&&e<=57?e-48:97<=(e|=32)&&e<=102?e-97+10:-1}function Q8(e){return 120===e?2:117===e?4:85===e?8:0}function J8(e){return 48<=e&&e<=57?e-48:-1}function eA(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?`
`:118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function tA(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}function rA(e,t,r){"__proto__"===t?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}function iA(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||A9,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 nA(e,t){return(e={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart}).snippet=l9(e),new o9(t,e)}function aA(e,t){throw nA(e,t)}function sA(e,t){e.onWarning&&e.onWarning.call(null,nA(e,t))}function oA(e,t,r,i){var n,a,s,o;if(t<r){if(o=e.input.slice(t,r),i)for(n=0,a=o.length;n<a;n+=1)9===(s=o.charCodeAt(n))||32<=s&&s<=1114111||aA(e,"expected valid JSON character");else P9.test(o)&&aA(e,"the stream contains non-printable characters");e.result+=o}}function lA(e,t,r,i){var n,a,s,o;for(s9.isObject(r)||aA(e,"cannot merge mappings; the provided source object is unacceptable"),s=0,o=(n=Object.keys(r)).length;s<o;s+=1)a=n[s],L9.call(t,a)||(rA(t,a,r[a]),i[a]=!0)}function hA(e,t,r,i,n,a,s,o,l){var h,c;if(Array.isArray(n))for(h=0,c=(n=Array.prototype.slice.call(n)).length;h<c;h+=1)Array.isArray(n[h])&&aA(e,"nested arrays are not supported inside keys"),"object"==typeof n&&"[object Object]"===V8(n[h])&&(n[h]="[object Object]");if("object"==typeof n&&"[object Object]"===V8(n)&&(n="[object Object]"),n=String(n),null===t&&(t={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(a))for(h=0,c=a.length;h<c;h+=1)lA(e,t,a[h],r);else lA(e,t,a,r);else e.json||L9.call(r,n)||!L9.call(t,n)||(e.line=s||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,aA(e,"duplicated mapping key")),rA(t,n,a),delete r[n];return t}function cA(e){var t=e.input.charCodeAt(e.position);10===t?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):aA(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function uA(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);0!==n;){for(;H8(n);)9===n&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&35===n)for(;10!==(n=e.input.charCodeAt(++e.position))&&13!==n&&0!==n;);if(!Y8(n))break;for(cA(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;32===n;)e.lineIndent++,n=e.input.charCodeAt(++e.position)}return-1!==r&&0!==i&&e.lineIndent<r&&sA(e,"deficient indentation"),i}function dA(e){var t=e.position,r=e.input.charCodeAt(t);return!(45!==r&&46!==r||r!==e.input.charCodeAt(t+1)||r!==e.input.charCodeAt(t+2)||0!==(r=e.input.charCodeAt(t+=3))&&!X8(r))}function pA(e,t){1===t?e.result+=" ":1<t&&(e.result+=s9.repeat(`
`,t-1))}function gA(e,t,r){var i,n,a,s,o,l,h,c=e.kind,u=e.result,d=e.input.charCodeAt(e.position);if(X8(d)||K8(d)||35===d||38===d||42===d||33===d||124===d||62===d||39===d||34===d||37===d||64===d||96===d||(63===d||45===d)&&(X8(i=e.input.charCodeAt(e.position+1))||r&&K8(i)))return!1;for(e.kind="scalar",e.result="",n=a=e.position,s=!1;0!==d;){if(58===d){if(X8(i=e.input.charCodeAt(e.position+1))||r&&K8(i))break}else if(35===d){if(X8(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&dA(e)||r&&K8(d))break;if(Y8(d)){if(o=e.line,l=e.lineStart,h=e.lineIndent,uA(e,!1,-1),t<=e.lineIndent){s=!0,d=e.input.charCodeAt(e.position);continue}e.position=a,e.line=o,e.lineStart=l,e.lineIndent=h;break}}s&&(oA(e,n,a,!1),pA(e,e.line-o),n=a=e.position,s=!1),H8(d)||(a=e.position+1),d=e.input.charCodeAt(++e.position)}return oA(e,n,a,!1),!!e.result||(e.kind=c,e.result=u,!1)}function fA(e,t){var r,i,n=e.input.charCodeAt(e.position);if(39!==n)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(oA(e,r,e.position,!0),39!==(n=e.input.charCodeAt(++e.position)))return!0;r=e.position,e.position++,i=e.position}else Y8(n)?(oA(e,r,i,!0),pA(e,uA(e,!1,t)),r=i=e.position):e.position===e.lineStart&&dA(e)?aA(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);aA(e,"unexpected end of the stream within a single quoted scalar")}function mA(e,t){var r,i,n,a,s,o=e.input.charCodeAt(e.position);if(34!==o)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;0!==(o=e.input.charCodeAt(e.position));){if(34===o)return oA(e,r,e.position,!0),e.position++,!0;if(92===o){if(oA(e,r,e.position,!0),Y8(o=e.input.charCodeAt(++e.position)))uA(e,!1,t);else if(o<256&&W9[o])e.result+=U9[o],e.position++;else if(0<(s=Q8(o))){for(n=s,a=0;0<n;n--)0<=(s=Z8(o=e.input.charCodeAt(++e.position)))?a=(a<<4)+s:aA(e,"expected hexadecimal character");e.result+=tA(a),e.position++}else aA(e,"unknown escape sequence");r=i=e.position}else Y8(o)?(oA(e,r,i,!0),pA(e,uA(e,!1,t)),r=i=e.position):e.position===e.lineStart&&dA(e)?aA(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}aA(e,"unexpected end of the stream within a double quoted scalar")}function yA(e,t){var r,i,n,a,s,o,l,h,c,u,d,p=!0,g=e.tag,f=e.anchor,m=Object.create(null),y=e.input.charCodeAt(e.position);if(91===y)h=!(s=93),a=[];else{if(123!==y)return!1;s=125,h=!0,a={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),y=e.input.charCodeAt(++e.position);0!==y;){if(uA(e,!0,t),(y=e.input.charCodeAt(e.position))===s)return e.position++,e.tag=g,e.anchor=f,e.kind=h?"mapping":"sequence",e.result=a,!0;p?44===y&&aA(e,"expected the node content, but found ','"):aA(e,"missed comma between flow collection entries"),d=null,o=l=!1,63===y&&X8(e.input.charCodeAt(e.position+1))&&(o=l=!0,e.position++,uA(e,!0,t)),r=e.line,i=e.lineStart,n=e.position,CA(e,t,R9,!1,!0),u=e.tag,c=e.result,uA(e,!0,t),y=e.input.charCodeAt(e.position),!l&&e.line!==r||58!==y||(o=!0,y=e.input.charCodeAt(++e.position),uA(e,!0,t),CA(e,t,R9,!1,!0),d=e.result),h?hA(e,a,m,u,c,d,r,i,n):o?a.push(hA(e,null,m,u,c,d,r,i,n)):a.push(c),uA(e,!0,t),44===(y=e.input.charCodeAt(e.position))?(p=!0,y=e.input.charCodeAt(++e.position)):p=!1}aA(e,"unexpected end of the stream within a flow collection")}function vA(e,t){var r,i,n,a=M9,s=!1,o=!1,l=t,h=0,c=!1,u=e.input.charCodeAt(e.position);if(124===u)i=!1;else{if(62!==u)return!1;i=!0}for(e.kind="scalar",e.result="";0!==u;)if(43===(u=e.input.charCodeAt(++e.position))||45===u)M9===a?a=43===u?B9:O9:aA(e,"repeat of a chomping mode identifier");else{if(!(0<=(n=J8(u))))break;0===n?aA(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?aA(e,"repeat of an indentation width identifier"):(l=t+n-1,o=!0)}if(H8(u)){for(;H8(u=e.input.charCodeAt(++e.position)););if(35===u)for(;!Y8(u=e.input.charCodeAt(++e.position))&&0!==u;);}for(;0!==u;){for(cA(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndent<l)&&32===u;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>l&&(l=e.lineIndent),Y8(u))h++;else{if(e.lineIndent<l){a===B9?e.result+=s9.repeat(`
`,s?1+h:h):a===M9&&s&&(e.result+=`
`);break}for(i?H8(u)?(c=!0,e.result+=s9.repeat(`
`,s?1+h:h)):c?(c=!1,e.result+=s9.repeat(`
`,h+1)):0===h?s&&(e.result+=" "):e.result+=s9.repeat(`
`,h):e.result+=s9.repeat(`
`,s?1+h:h),o=s=!0,h=0,r=e.position;!Y8(u)&&0!==u;)u=e.input.charCodeAt(++e.position);oA(e,r,e.position,!1)}}return!0}function xA(e,t){var r,i,n=e.tag,a=e.anchor,s=[],o=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=s),i=e.input.charCodeAt(e.position);0!==i&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,aA(e,"tab characters must not be used in indentation")),45===i)&&X8(e.input.charCodeAt(e.position+1));)if(o=!0,e.position++,uA(e,!0,-1)&&e.lineIndent<=t)s.push(null),i=e.input.charCodeAt(e.position);else if(r=e.line,CA(e,t,N9,!1,!0),s.push(e.result),uA(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==i)aA(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!o&&(e.tag=n,e.anchor=a,e.kind="sequence",e.result=s,!0)}function bA(e,t,r){var i,n,a,s,o,l,h,c=e.tag,u=e.anchor,d={},p=Object.create(null),g=null,f=null,m=null,y=!1,v=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=d),h=e.input.charCodeAt(e.position);0!==h;){if(y||-1===e.firstTabInLine||(e.position=e.firstTabInLine,aA(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,63!==h&&58!==h||!X8(i)){if(s=e.line,o=e.lineStart,l=e.position,!CA(e,r,I9,!1,!0))break;if(e.line===a){for(h=e.input.charCodeAt(e.position);H8(h);)h=e.input.charCodeAt(++e.position);if(58===h)X8(h=e.input.charCodeAt(++e.position))||aA(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(hA(e,d,p,g,f,null,s,o,l),g=f=m=null),n=y=!(v=!0),g=e.tag,f=e.result;else{if(!v)return e.tag=c,e.anchor=u,!0;aA(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!v)return e.tag=c,e.anchor=u,!0;aA(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===h?(y&&(hA(e,d,p,g,f,null,s,o,l),g=f=m=null),n=y=v=!0):y?n=!(y=!1):aA(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,h=i;if((e.line===a||e.lineIndent>t)&&(y&&(s=e.line,o=e.lineStart,l=e.position),CA(e,t,D9,!0,n)&&(y?f=e.result:m=e.result),y||(hA(e,d,p,g,f,m,s,o,l),g=f=m=null),uA(e,!0,-1),h=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&0!==h)aA(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&hA(e,d,p,g,f,null,s,o,l),v&&(e.tag=c,e.anchor=u,e.kind="mapping",e.result=d),v}function TA(e){var t,r,i,n=!1,a=!1,s=e.input.charCodeAt(e.position);if(33!==s)return!1;if(null!==e.tag&&aA(e,"duplication of a tag property"),60===(s=e.input.charCodeAt(++e.position))?(n=!0,s=e.input.charCodeAt(++e.position)):33===s?(a=!0,r="!!",s=e.input.charCodeAt(++e.position)):r="!",t=e.position,n){for(;0!==(s=e.input.charCodeAt(++e.position))&&62!==s;);e.position<e.length?(i=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):aA(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==s&&!X8(s);)33===s&&(a?aA(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),z9.test(r)||aA(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),F9.test(i)&&aA(e,"tag suffix cannot contain flow indicator characters")}i&&!q9.test(i)&&aA(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{aA(e,"tag name is malformed: "+i)}return n?e.tag=i:L9.call(e.tagMap,r)?e.tag=e.tagMap[r]+i:"!"===r?e.tag="!"+i:"!!"===r?e.tag="tag:yaml.org,2002:"+i:aA(e,'undeclared tag handle "'+r+'"'),!0}function kA(e){var t,r=e.input.charCodeAt(e.position);if(38!==r)return!1;for(null!==e.anchor&&aA(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!X8(r)&&!K8(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&aA(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function wA(e){var t,r=e.input.charCodeAt(e.position);if(42!==r)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!X8(r)&&!K8(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&aA(e,"name of an alias node must contain at least one character"),t=e.input.slice(t,e.position),L9.call(e.anchorMap,t)||aA(e,'unidentified alias "'+t+'"'),e.result=e.anchorMap[t],uA(e,!0,-1),!0}function CA(e,t,r,i,n){var a,s,o,l,h,c,u,d=1,p=!1,g=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=s=o=D9===r||N9===r,i&&uA(e,!0,-1)&&(p=!0,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)),1===d)for(;TA(e)||kA(e);)uA(e,!0,-1)?(p=!0,o=a,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)):o=!1;if(o=o&&(p||n),1!==d&&D9!==r||(i=R9===r||I9===r?t:t+1,n=e.position-e.lineStart,1===d?o&&(xA(e,n)||bA(e,n,i))||yA(e,i)?g=!0:(s&&vA(e,i)||fA(e,i)||mA(e,i)?g=!0:wA(e)?(g=!0,null===e.tag&&null===e.anchor||aA(e,"alias node should not have any properties")):gA(e,i,R9===r)&&(g=!0,null===e.tag)&&(e.tag="?"),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===d&&(g=o&&xA(e,n))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&aA(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),l=0,h=e.implicitTypes.length;l<h;l+=1)if((u=e.implicitTypes[l]).resolve(e.result)){e.result=u.construct(e.result),e.tag=u.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else if("!"!==e.tag){if(L9.call(e.typeMap[e.kind||"fallback"],e.tag))u=e.typeMap[e.kind||"fallback"][e.tag];else for(u=null,l=0,h=(c=e.typeMap.multi[e.kind||"fallback"]).length;l<h;l+=1)if(e.tag.slice(0,c[l].tag.length)===c[l].tag){u=c[l];break}u||aA(e,"unknown tag !<"+e.tag+">"),null!==e.result&&u.kind!==e.kind&&aA(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+u.kind+'", not "'+e.kind+'"'),u.resolve(e.result,e.tag)?(e.result=u.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):aA(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function EA(e){var t,r,i,n,a=e.position,s=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(n=e.input.charCodeAt(e.position))&&(uA(e,!0,-1),n=e.input.charCodeAt(e.position),!(0<e.lineIndent||37!==n));){for(s=!0,n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!X8(n);)n=e.input.charCodeAt(++e.position);for(i=[],(r=e.input.slice(t,e.position)).length<1&&aA(e,"directive name must not be less than one character in length");0!==n;){for(;H8(n);)n=e.input.charCodeAt(++e.position);if(35===n){for(;0!==(n=e.input.charCodeAt(++e.position))&&!Y8(n););break}if(Y8(n))break;for(t=e.position;0!==n&&!X8(n);)n=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==n&&cA(e),L9.call(j9,r)?j9[r](e,r,i):sA(e,'unknown document directive "'+r+'"')}uA(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,uA(e,!0,-1)):s&&aA(e,"directives end mark is expected"),CA(e,e.lineIndent-1,D9,!1,!0),uA(e,!0,-1),e.checkLineBreaks&&$9.test(e.input.slice(a,e.position))&&sA(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&dA(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,uA(e,!0,-1)):e.position<e.length-1&&aA(e,"end of the stream or a document separator is expected")}function SA(e,t){t=t||{};var r=new iA(e=0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+=`
`),65279===e.charCodeAt(0))?e.slice(1):e,t);for(-1!==(t=e.indexOf("\0"))&&(r.position=t,aA(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)EA(r);return r.documents}function _A(e,t,r){null!==t&&"object"==typeof t&&"u"<typeof r&&(r=t,t=null);var i=SA(e,r);if("function"!=typeof t)return i;for(var n=0,a=i.length;n<a;n+=1)t(i[n])}function AA(e,t){if(0!==(e=SA(e,t)).length){if(1===e.length)return e[0];throw new o9("expected a single document in the stream, but found more")}}function LA(e,t){var r,i,n,a,s,o,l;if(null===t)return{};for(r={},n=0,a=(i=Object.keys(t)).length;n<a;n+=1)s=i[n],o=String(t[s]),"!!"===s.slice(0,2)&&(s="tag:yaml.org,2002:"+s.slice(2)),(l=e.compiledTypeMap.fallback[s])&&H9.call(l.styleAliases,o)&&(o=l.styleAliases[o]),r[s]=o;return r}function RA(e){var t,r,i=e.toString(16).toUpperCase();if(e<=255)t="x",r=2;else if(e<=65535)t="u",r=4;else{if(!(e<=4294967295))throw new o9("code point within a string may not be greater than 0xFFFFFFFF");t="U",r=8}return"\\"+t+s9.repeat("0",r-i.length)+i}function IA(e){this.schema=e.schema||A9,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=s9.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=LA(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?eL:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function NA(e,t){for(var r,i,n=s9.repeat(" ",t),a=0,s="",o=e.length;a<o;)a=-1===(r=e.indexOf(`
`,a))?(i=e.slice(a),o):(i=e.slice(a,r+1),r+1),i.length&&i!==`
`&&(s+=n),s+=i;return s}function DA(e,t){return`
`+s9.repeat(" ",e.indent*t)}function MA(e,t){for(var r=0,i=e.implicitTypes.length;r<i;r+=1)if(e.implicitTypes[r].resolve(t))return!0;return!1}function OA(e){return 32===e||9===e}function BA(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&e!==X9||65536<=e&&e<=1114111}function PA(e){return BA(e)&&e!==X9&&13!==e&&e!==K9}function $A(e,t,r){var i=PA(e),n=i&&!OA(e);return(r?i:i&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!n)||PA(t)&&!OA(t)&&35===e||58===t&&n}function FA(e){return BA(e)&&e!==X9&&!OA(e)&&45!==e&&63!==e&&58!==e&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e&&35!==e&&38!==e&&42!==e&&33!==e&&124!==e&&61!==e&&62!==e&&39!==e&&34!==e&&37!==e&&64!==e&&96!==e}function zA(e){return!OA(e)&&58!==e}function qA(e,t){var r=e.charCodeAt(t);return 55296<=r&&r<=56319&&t+1<e.length&&56320<=(e=e.charCodeAt(t+1))&&e<=57343?1024*(r-55296)+e-56320+65536:r}function WA(e){return/^\n* /.test(e)}function UA(e,t,r,i,n,a,s,o){var l,h=0,c=null,u=!1,d=!1,p=-1!==i,g=-1,f=FA(qA(e,0))&&zA(qA(e,e.length-1));if(t||s)for(l=0;l<e.length;65536<=h?l+=2:l++){if(!BA(h=qA(e,l)))return aL;f=f&&$A(h,c,o),c=h}else{for(l=0;l<e.length;65536<=h?l+=2:l++){if((h=qA(e,l))===K9)u=!0,p&&(d=d||i<l-g-1&&" "!==e[g+1],g=l);else if(!BA(h))return aL;f=f&&$A(h,c,o),c=h}d=d||p&&i<l-g-1&&" "!==e[g+1]}return u||d?9<r&&WA(e)?aL:s?a===eL?aL:rL:d?nL:iL:!f||s||n(e)?a===eL?aL:rL:tL}function GA(n,a,s,o,l){n.dump=(()=>{if(0===a.length)return n.quotingType===eL?'""':"''";if(!n.noCompatMode&&(-1!==Q9.indexOf(a)||J9.test(a)))return n.quotingType===eL?'"'+a+'"':"'"+a+"'";var e=n.indent*Math.max(1,s),t=-1===n.lineWidth?-1:Math.max(Math.min(n.lineWidth,40),n.lineWidth-e),r=o||-1<n.flowLevel&&s>=n.flowLevel;function i(e){return MA(n,e)}switch(mt(i,"testAmbiguity"),UA(a,r,n.indent,t,i,n.quotingType,n.forceQuotes&&!o,l)){case tL:return a;case rL:return"'"+a.replace(/'/g,"''")+"'";case iL:return"|"+jA(a,n.indent)+VA(NA(a,e));case nL:return">"+jA(a,n.indent)+VA(NA(YA(a,t),e));case aL:return'"'+XA(a)+'"';default:throw new o9("impossible error: invalid scalar style")}})()}function jA(e,t){var t=WA(e)?String(t):"",r=e[e.length-1]===`
`;return t+(!r||e[e.length-2]!==`
`&&e!==`
`?r?"":"-":"+")+`
`}function VA(e){return e[e.length-1]===`
`?e.slice(0,-1):e}function YA(e,t){for(var r,i=/(\n+)([^\n]*)/g,n=(r=-1!==(r=e.indexOf(`
`))?r:e.length,i.lastIndex=r,HA(e.slice(0,r),t)),a=e[0]===`
`||" "===e[0];o=i.exec(e);){var s=o[1],o=o[2],l=" "===o[0];n+=s+(a||l||""===o?"":`
`)+HA(o,t),a=l}return n}function HA(e,t){if(""===e||" "===e[0])return e;for(var r,i,n=/ [^ ]/g,a=0,s=0,o="";i=n.exec(e);)t<(i=i.index)-a&&(o+=`
`+e.slice(a,r=a<s?s:i),a=r+1),s=i;return o+=`
`,e.length-a>t&&a<s?o+=e.slice(a,s)+`
`+e.slice(s+1):o+=e.slice(a),o.slice(1)}function XA(e){for(var t,r,i="",n=0;n<e.length;65536<=t?n+=2:n++)t=qA(e,n),!(r=Z9[t])&&BA(t)?(i+=e[n],65536<=t&&(i+=e[n+1])):i+=r||RA(t);return i}function KA(e,t,r){for(var i,n="",a=e.tag,s=0,o=r.length;s<o;s+=1)i=r[s],e.replacer&&(i=e.replacer.call(r,String(s),i)),(t9(e,t,i,!1,!1)||"u"<typeof i&&t9(e,t,null,!1,!1))&&(""!==n&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=a,e.dump="["+n+"]"}function ZA(e,t,r,i){for(var n,a="",s=e.tag,o=0,l=r.length;o<l;o+=1)n=r[o],e.replacer&&(n=e.replacer.call(r,String(o),n)),(t9(e,t+1,n,!0,!0,!1,!0)||"u"<typeof n&&t9(e,t+1,null,!0,!0,!1,!0))&&(i&&""===a||(a+=DA(e,t)),e.dump&&K9===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}function QA(e,t,r){for(var i,n,a,s="",o=e.tag,l=Object.keys(r),h=0,c=l.length;h<c;h+=1)(a="")!==s&&(a+=", "),e.condenseFlow&&(a+='"'),n=r[i=l[h]],e.replacer&&(n=e.replacer.call(r,i,n)),t9(e,t,i,!1,!1)&&(1024<e.dump.length&&(a+="? "),a+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),t9(e,t,n,!1,!1))&&(s+=a+=e.dump);e.tag=o,e.dump="{"+s+"}"}function JA(e,t,r,i){var n,a,s,o,l,h="",c=e.tag,u=Object.keys(r);if(!0===e.sortKeys)u.sort();else if("function"==typeof e.sortKeys)u.sort(e.sortKeys);else if(e.sortKeys)throw new o9("sortKeys must be a boolean or a function");for(n=0,a=u.length;n<a;n+=1)l="",i&&""===h||(l+=DA(e,t)),s=r[o=u[n]],e.replacer&&(s=e.replacer.call(r,o,s)),t9(e,t+1,o,!0,!0,!0)&&((o=null!==e.tag&&"?"!==e.tag||e.dump&&1024<e.dump.length)&&(e.dump&&K9===e.dump.charCodeAt(0)?l+="?":l+="? "),l+=e.dump,o&&(l+=DA(e,t)),t9(e,t+1,s,!0,o))&&(e.dump&&K9===e.dump.charCodeAt(0)?l+=":":l+=": ",h+=l+=e.dump);e.tag=c,e.dump=h||"{}"}function e9(e,t,r){for(var i,n,a,s=r?e.explicitTypes:e.implicitTypes,o=0,l=s.length;o<l;o+=1)if(((n=s[o]).instanceOf||n.predicate)&&(!n.instanceOf||"object"==typeof t&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(a=e.styleMap[n.tag]||n.defaultStyle,"[object Function]"===Y9.call(n.represent))i=n.represent(t,a);else{if(!H9.call(n.represent,a))throw new o9("!<"+n.tag+'> tag resolver accepts not "'+a+'" style');i=n.represent[a](t,a)}e.dump=i}return!0}return!1}function t9(e,t,r,i,n,a,s){e.tag=null,e.dump=r,e9(e,r,!1)||e9(e,r,!0);var o,l,h=Y9.call(e.dump),c=i,u=(i=i&&(e.flowLevel<0||e.flowLevel>t),"[object Object]"===h||"[object Array]"===h);if(u&&(l=-1!==(o=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||l||2!==e.indent&&0<t)&&(n=!1),l&&e.usedDuplicates[o])e.dump="*ref_"+o;else{if(u&&l&&!e.usedDuplicates[o]&&(e.usedDuplicates[o]=!0),"[object Object]"===h)i&&0!==Object.keys(e.dump).length?(JA(e,t,e.dump,n),l&&(e.dump="&ref_"+o+e.dump)):(QA(e,t,e.dump),l&&(e.dump="&ref_"+o+" "+e.dump));else if("[object Array]"===h)i&&0!==e.dump.length?(e.noArrayIndent&&!s&&0<t?ZA(e,t-1,e.dump,n):ZA(e,t,e.dump,n),l&&(e.dump="&ref_"+o+e.dump)):(KA(e,t,e.dump),l&&(e.dump="&ref_"+o+" "+e.dump));else{if("[object String]"!==h){if("[object Undefined]"===h)return!1;if(e.skipInvalid)return!1;throw new o9("unacceptable kind of an object to dump "+h)}"?"!==e.tag&&GA(e,e.dump,t,a,c)}null!==e.tag&&"?"!==e.tag&&(r=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),r="!"===e.tag[0]?"!"+r:"tag:yaml.org,2002:"===r.slice(0,18)?"!!"+r.slice(18):"!<"+r+">",e.dump=r+" "+e.dump)}return!0}function r9(e,t){var r,i,n=[],a=[];for(i9(e,n,a),r=0,i=a.length;r<i;r+=1)t.duplicates.push(n[a[r]]);t.usedDuplicates=new Array(i)}function i9(e,t,r){var i,n,a;if(null!==e&&"object"==typeof e)if(-1!==(n=t.indexOf(e)))-1===r.indexOf(n)&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,a=e.length;n<a;n+=1)i9(e[n],t,r);else for(n=0,a=(i=Object.keys(e)).length;n<a;n+=1)i9(e[i[n]],t,r)}function n9(e,t){return(t=new IA(t=t||{})).noRefs||r9(e,t),t.replacer&&(e=t.replacer.call({"":e},"",e)),t9(t,0,e,!0,!0)?t.dump+`
`:""}function a9(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var s9,o9,l9,h9,c9,u9,d9,p9,g9,f9,m9,y9,v9,x9,b9,T9,k9,w9,C9,E9,S9,_9,A9,L9,R9,I9,N9,D9,M9,O9,B9,P9,$9,F9,z9,q9,W9,U9,G9,j9,V9,Y9,H9,X9,K9,Z9,Q9,J9,eL,tL,rL,iL,nL,aL,sL,oL,lL=i(()=>{for(mt(e8,"isNothing"),mt(t8,"isObject"),mt(r8,"toArray"),mt(i8,"extend"),mt(n8,"repeat"),mt(a8,"isNegativeZero"),s9={isNothing:e8,isObject:t8,toArray:r8,repeat:n8,isNegativeZero:a8,extend:i8},mt(s8,"formatError"),mt(o8,"YAMLException$1"),((o8.prototype=Object.create(Error.prototype)).constructor=o8).prototype.toString=mt(function(e){return this.name+": "+s8(this,e)},"toString"),o9=o8,mt(l8,"getLine"),mt(h8,"padStart"),mt(c8,"makeSnippet"),l9=c8,h9=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],c9=["scalar","sequence","mapping"],mt(u8,"compileStyleAliases"),mt(d8,"Type$1"),u9=d8,mt(p8,"compileList"),mt(g8,"compileMap"),mt(f8,"Schema$1"),f8.prototype.extend=mt(function(e){var t=[],r=[];if(e instanceof u9)r.push(e);else if(Array.isArray(e))r=r.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new o9("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit))}return t.forEach(function(e){if(!(e instanceof u9))throw new o9("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new o9("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new o9("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(e){if(!(e instanceof u9))throw new o9("Specified list of YAML types (or a single Type object) contains a non-Type object.")}),(e=Object.create(f8.prototype)).implicit=(this.implicit||[]).concat(t),e.explicit=(this.explicit||[]).concat(r),e.compiledImplicit=p8(e,"implicit"),e.compiledExplicit=p8(e,"explicit"),e.compiledTypeMap=g8(e.compiledImplicit,e.compiledExplicit),e},"extend"),g9=f8,V9=new u9("tag:yaml.org,2002:str",{kind:"scalar",construct:mt(function(e){return null!==e?e:""},"construct")}),y9=new u9("tag:yaml.org,2002:seq",{kind:"sequence",construct:mt(function(e){return null!==e?e:[]},"construct")}),v9=new u9("tag:yaml.org,2002:map",{kind:"mapping",construct:mt(function(e){return null!==e?e:{}},"construct")}),g9=new g9({explicit:[V9,y9,v9]}),mt(m8,"resolveYamlNull"),mt(y8,"constructYamlNull"),mt(v8,"isNull"),V9=new u9("tag:yaml.org,2002:null",{kind:"scalar",resolve:m8,construct:y8,predicate:v8,represent:{canonical:mt(function(){return"~"},"canonical"),lowercase:mt(function(){return"null"},"lowercase"),uppercase:mt(function(){return"NULL"},"uppercase"),camelcase:mt(function(){return"Null"},"camelcase"),empty:mt(function(){return""},"empty")},defaultStyle:"lowercase"}),mt(x8,"resolveYamlBoolean"),mt(b8,"constructYamlBoolean"),mt(T8,"isBoolean"),y9=new u9("tag:yaml.org,2002:bool",{kind:"scalar",resolve:x8,construct:b8,predicate:T8,represent:{lowercase:mt(function(e){return e?"true":"false"},"lowercase"),uppercase:mt(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:mt(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),mt(k8,"isHexCode"),mt(w8,"isOctCode"),mt(C8,"isDecCode"),mt(E8,"resolveYamlInteger"),mt(S8,"constructYamlInteger"),mt(_8,"isInteger"),v9=new u9("tag:yaml.org,2002:int",{kind:"scalar",resolve:E8,construct:S8,predicate:_8,represent:{binary:mt(function(e){return 0<=e?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:mt(function(e){return 0<=e?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:mt(function(e){return e.toString(10)},"decimal"),hexadecimal:mt(function(e){return 0<=e?"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"]}}),d9=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),mt(A8,"resolveYamlFloat"),mt(L8,"constructYamlFloat"),p9=/^[-+]?[0-9]+e/,mt(R8,"representYamlFloat"),mt(I8,"isFloat"),b9=new u9("tag:yaml.org,2002:float",{kind:"scalar",resolve:A8,construct:L8,predicate:I8,represent:R8,defaultStyle:"lowercase"}),g9=g9.extend({implicit:[V9,y9,v9,b9]}),V9=g9,f9=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),m9=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]))?))?$"),mt(N8,"resolveYamlTimestamp"),mt(D8,"constructYamlTimestamp"),mt(M8,"representYamlTimestamp"),y9=new u9("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:N8,construct:D8,instanceOf:Date,represent:M8}),mt(O8,"resolveYamlMerge"),v9=new u9("tag:yaml.org,2002:merge",{kind:"scalar",resolve:O8}),x9=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`,mt(B8,"resolveYamlBinary"),mt(P8,"constructYamlBinary"),mt($8,"representYamlBinary"),mt(F8,"isBinary"),b9=new u9("tag:yaml.org,2002:binary",{kind:"scalar",resolve:B8,construct:P8,predicate:F8,represent:$8}),T9=Object.prototype.hasOwnProperty,k9=Object.prototype.toString,mt(z8,"resolveYamlOmap"),mt(q8,"constructYamlOmap"),w9=new u9("tag:yaml.org,2002:omap",{kind:"sequence",resolve:z8,construct:q8}),C9=Object.prototype.toString,mt(W8,"resolveYamlPairs"),mt(U8,"constructYamlPairs"),E9=new u9("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:W8,construct:U8}),S9=Object.prototype.hasOwnProperty,mt(G8,"resolveYamlSet"),mt(j8,"constructYamlSet"),_9=new u9("tag:yaml.org,2002:set",{kind:"mapping",resolve:G8,construct:j8}),A9=V9.extend({implicit:[y9,v9],explicit:[b9,w9,E9,_9]}),L9=Object.prototype.hasOwnProperty,D9=4,M9=R9=1,O9=I9=2,B9=N9=3,P9=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,$9=/[\x85\u2028\u2029]/,F9=/[,\[\]\{\}]/,z9=/^(?:!|!!|![a-z\-]+!)$/i,q9=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,mt(V8,"_class"),mt(Y8,"is_EOL"),mt(H8,"is_WHITE_SPACE"),mt(X8,"is_WS_OR_EOL"),mt(K8,"is_FLOW_INDICATOR"),mt(Z8,"fromHexCode"),mt(Q8,"escapedHexLen"),mt(J8,"fromDecimalCode"),mt(eA,"simpleEscapeSequence"),mt(tA,"charFromCodepoint"),mt(rA,"setProperty"),W9=new Array(256),U9=new Array(256),G9=0;G9<256;G9++)W9[G9]=eA(G9)?1:0,U9[G9]=eA(G9);mt(iA,"State$1"),mt(nA,"generateError"),mt(aA,"throwError"),mt(sA,"throwWarning"),j9={YAML:mt(function(e,t,r){var i,n;null!==e.version&&aA(e,"duplication of %YAML directive"),1!==r.length&&aA(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&aA(e,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),n=parseInt(n[2],10),1!==i&&aA(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=n<2,1!==n&&2!==n&&sA(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:mt(function(e,t,r){var i;2!==r.length&&aA(e,"TAG directive accepts exactly two arguments"),i=r[1],z9.test(r=r[0])||aA(e,"ill-formed tag handle (first argument) of the TAG directive"),L9.call(e.tagMap,r)&&aA(e,'there is a previously declared suffix for "'+r+'" tag handle'),q9.test(i)||aA(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch{aA(e,"tag prefix is malformed: "+i)}e.tagMap[r]=i},"handleTagDirective")},mt(oA,"captureSegment"),mt(lA,"mergeMappings"),mt(hA,"storeMappingPair"),mt(cA,"readLineBreak"),mt(uA,"skipSeparationSpace"),mt(dA,"testDocumentSeparator"),mt(pA,"writeFoldedLines"),mt(gA,"readPlainScalar"),mt(fA,"readSingleQuotedScalar"),mt(mA,"readDoubleQuotedScalar"),mt(yA,"readFlowCollection"),mt(vA,"readBlockScalar"),mt(xA,"readBlockSequence"),mt(bA,"readBlockMapping"),mt(TA,"readTagProperty"),mt(kA,"readAnchorProperty"),mt(wA,"readAlias"),mt(CA,"composeNode"),mt(EA,"readDocument"),mt(SA,"loadDocuments"),mt(_A,"loadAll$1"),mt(AA,"load$1"),V9={loadAll:_A,load:AA},Y9=Object.prototype.toString,H9=Object.prototype.hasOwnProperty,X9=65279,K9=10,Z9={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Q9=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],J9=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/,mt(LA,"compileStyleMap"),mt(RA,"encodeHex"),eL=2,mt(IA,"State"),mt(NA,"indentString"),mt(DA,"generateNextLine"),mt(MA,"testImplicitResolving"),mt(OA,"isWhitespace"),mt(BA,"isPrintable"),mt(PA,"isNsCharOrWhitespace"),mt($A,"isPlainSafe"),mt(FA,"isPlainSafeFirst"),mt(zA,"isPlainSafeLast"),mt(qA,"codePointAt"),mt(WA,"needIndentIndicator"),tL=1,rL=2,iL=3,nL=4,aL=5,mt(UA,"chooseScalarStyle"),mt(GA,"writeScalar"),mt(jA,"blockHeader"),mt(VA,"dropEndingNewline"),mt(YA,"foldString"),mt(HA,"foldLine"),mt(XA,"escapeString"),mt(KA,"writeFlowSequence"),mt(ZA,"writeBlockSequence"),mt(QA,"writeFlowMapping"),mt(JA,"writeBlockMapping"),mt(e9,"detectType"),mt(t9,"writeNode"),mt(r9,"getDuplicateReferences"),mt(i9,"inspectNode"),mt(n9,"dump$1"),mt(a9,"renamed"),sL=g9,oL=V9.load,a9("safeLoad","load"),a9("safeLoadAll","loadAll"),a9("safeDump","dump")});function hL(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function cL(e){bL=e}function uL(e,t=""){let i="string"==typeof e?e:e.source,n={replace:mt((e,t)=>{let r="string"==typeof t?t:t.source;return r=r.replace(kL.caret,"$1"),i=i.replace(e,r),n},"replace"),getRegex:mt(()=>new RegExp(i,t),"getRegex")};return n}function dL(e,t){if(t){if(kL.escapeTest.test(e))return e.replace(kL.escapeReplace,YL)}else if(kL.escapeTestNoEncode.test(e))return e.replace(kL.escapeReplaceNoEncode,YL);return e}function pL(e){try{e=encodeURI(e).replace(kL.percentDecode,"%")}catch{return null}return e}function gL(e,t){let r=e.replace(kL.findPipe,(e,t,r)=>{let i=!1,n=t;for(;0<=--n&&"\\"===r[n];)i=!i;return i?"|":" |"}),i=r.split(kL.splitPipe),n=0;if(i[0].trim()||i.shift(),0<i.length&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(kL.slashPipe,"|");return i}function fL(e,t,r){var i=e.length;if(0===i)return"";let n=0;for(;n<i;){var a=e.charAt(i-n-1);if((a!==t||r)&&(a===t||!r))break;n++}return e.slice(0,i-n)}function mL(t,r){if(-1===t.indexOf(r[1]))return-1;let i=0;for(let e=0;e<t.length;e++)if("\\"===t[e])e++;else if(t[e]===r[0])i++;else if(t[e]===r[1]&&--i<0)return e;return 0<i?-2:-1}function yL(e,t,r,i,n){var a=t.href,t=t.title||null,n=e[1].replace(n.other.outputLinkReplace,"$1"),e=(i.state.inLink=!0,{type:"!"===e[0].charAt(0)?"image":"link",raw:r,href:a,title:t,text:n,tokens:i.inlineTokens(n)});return i.state.inLink=!1,e}function vL(e,t,r){if(null===(e=e.match(r.other.indentCodeCompensation)))return t;let i=e[1];return t.split(`
`).map(e=>{var t=e.match(r.other.beginningSpace);return null!==t&&([t]=t,t.length>=i.length)?e.slice(i.length):e}).join(`
`)}function xL(e,t){return tR.parse(e,t)}var bL,TL,kL,wL,CL,EL,SL,_L,AL,LL,RL,IL,NL,DL,ML,OL,BL,PL,$L,FL,zL,qL,WL,UL,GL,jL,VL,YL,HL,XL,KL,ZL,QL,JL,eR,tR,rR=i(()=>{mt(hL,"L"),bL=hL(),mt(cL,"G"),TL={exec:mt(()=>null,"exec")},mt(uL,"h"),kL={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:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,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+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:mt(e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),"listItemRegex"),nextBulletRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),"nextBulletRegex"),hrRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),"hrRegex"),fencesBeginRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),"fencesBeginRegex"),headingBeginRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),"headingBeginRegex"),htmlBeginRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),"htmlBeginRegex")},AL=/^(?:[ \t]*(?:\n|$))+/,LL=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,EL=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,DL=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,SL=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,_L=/(?:[*+-]|\d{1,9}[.)])/,WL=uL(PL=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,_L).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(),PL=uL(PL).replace(/bull/g,_L).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(),zL=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ML=/^[^\n]+/,$L=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,CL=uL(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",$L).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_L=uL(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,_L).getRegex(),qL="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",BL=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,UL=uL("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",BL).replace("tag",qL).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),OL=uL(zL).replace("hr",DL).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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",qL).getRegex(),wL={blockquote:uL(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",OL).getRegex(),code:LL,def:CL,fences:EL,heading:SL,hr:DL,html:UL,lheading:WL,list:_L,newline:AL,paragraph:OL,table:TL,text:ML},LL=uL("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",DL).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",qL).getRegex(),CL={...wL,lheading:PL,table:LL,paragraph:uL(zL).replace("hr",DL).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",LL).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",qL).getRegex()},EL={...wL,html:uL(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",BL).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:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:TL,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:uL(zL).replace("hr",DL).replace("heading",` *#{1,6} *[^
]`).replace("lheading",WL).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},SL=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,UL=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,_L=/^( {2,}|\\)\n(?!\s*$)/,AL=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,OL=/[\p{P}\p{S}]/u,ML=/[\s\p{P}\p{S}]/u,PL=/[^\s\p{P}\p{S}]/u,LL=uL(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ML).getRegex(),qL=/(?!~)[\p{P}\p{S}]/u,zL=/(?!~)[\s\p{P}\p{S}]/u,DL=/(?:[^\s\p{P}\p{S}]|~)/u,WL=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,eR=uL(RL=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,"u").replace(/punct/g,OL).getRegex(),RL=uL(RL,"u").replace(/punct/g,qL).getRegex(),IL=uL(NL="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,PL).replace(/punctSpace/g,ML).replace(/punct/g,OL).getRegex(),NL=uL(NL,"gu").replace(/notPunctSpace/g,DL).replace(/punctSpace/g,zL).replace(/punct/g,qL).getRegex(),DL=uL("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,PL).replace(/punctSpace/g,ML).replace(/punct/g,OL).getRegex(),zL=uL(/\\(punct)/,"gu").replace(/punct/g,OL).getRegex(),qL=uL(/^<(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(),PL=uL(BL).replace("(?:--\x3e|$)","--\x3e").getRegex(),ML=uL("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",PL).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),OL=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,BL=uL(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",OL).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),PL=uL(/^!?\[(label)\]\[(ref)\]/).replace("label",OL).replace("ref",$L).getRegex(),$L=uL(/^!?\[(ref)\](?:\[\])?/).replace("ref",$L).getRegex(),FL=uL("reflink|nolink(?!\\()","g").replace("reflink",PL).replace("nolink",$L).getRegex(),qL={...zL={_backpedal:TL,anyPunctuation:zL,autolink:qL,blockSkip:WL,br:_L,code:UL,del:TL,emStrongLDelim:eR,emStrongRDelimAst:IL,emStrongRDelimUnd:DL,escape:SL,link:BL,nolink:$L,punctuation:LL,reflink:PL,reflinkSearch:FL,tag:ML,text:AL,url:TL},link:uL(/^!?\[(label)\]\((.*?)\)/).replace("label",OL).getRegex(),reflink:uL(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",OL).getRegex()},WL={...zL,emStrongRDelimAst:NL,emStrongLDelim:RL,url:uL(/^((?: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]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},UL={...WL,br:uL(_L).replace("{2,}","*").getRegex(),text:uL(WL.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},GL={normal:wL,gfm:CL,pedantic:EL},jL={normal:zL,gfm:WL,breaks:UL,pedantic:qL},VL={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},YL=mt(e=>VL[e],"ke"),mt(dL,"w"),mt(pL,"J"),mt(gL,"V"),mt(fL,"z"),mt(mL,"ge"),mt(yL,"fe"),mt(vL,"Je"),HL=class{static{mt(this,"y")}options;rules;lexer;constructor(e){this.options=e||bL}space(e){if((e=this.rules.block.newline.exec(e))&&0<e[0].length)return{type:"space",raw:e[0]}}code(e){var t;if(e=this.rules.block.code.exec(e))return t=e[0].replace(this.rules.other.codeRemoveIndent,""),{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:fL(t,`
`)}}fences(e){var t,r;if(e=this.rules.block.fences.exec(e))return r=vL(t=e[0],e[3]||"",this.rules),{type:"code",raw:t,lang:e[2]&&e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"),text:r}}heading(t){var r;if(t=this.rules.block.heading.exec(t)){let e=t[2].trim();return this.rules.other.endingHash.test(e)&&(r=fL(e,"#"),!this.options.pedantic&&r&&!this.rules.other.endingSpaceChar.test(r)||(e=r.trim())),{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){if(e=this.rules.block.hr.exec(e))return{type:"hr",raw:fL(e[0],`
`)}}blockquote(e){if(e=this.rules.block.blockquote.exec(e)){let i=fL(e[0],`
`).split(`
`),n="",a="",s=[];for(;0<i.length;){let e=!1,t=[],r;for(r=0;r<i.length;r++)if(this.rules.other.blockquoteStart.test(i[r]))t.push(i[r]),e=!0;else{if(e)break;t.push(i[r])}i=i.slice(r);var o,l=(h=t.join(`
`)).replace(this.rules.other.blockquoteSetextReplace,`
$1`).replace(this.rules.other.blockquoteSetextReplace2,""),h=(n=n?n+`
`+h:h,a=a?a+`
`+l:l,this.lexer.state.top);if(this.lexer.state.top=!0,this.lexer.blockTokens(l,s,!0),this.lexer.state.top=h,0===i.length)break;if("code"===(l=s.at(-1))?.type)break;if("blockquote"===l?.type){var c=(h=l).raw+`
`+i.join(`
`),c=this.blockquote(c);s[s.length-1]=c,n=n.substring(0,n.length-h.raw.length)+c.raw,a=a.substring(0,a.length-h.text.length)+c.text;break}"list"===l?.type&&(c=(h=l).raw+`
`+i.join(`
`),o=this.list(c),s[s.length-1]=o,n=n.substring(0,n.length-l.raw.length)+o.raw,a=a.substring(0,a.length-h.raw.length)+o.raw,i=c.substring(s.at(-1).raw.length).split(`
`))}return{type:"blockquote",raw:n,tokens:s,text:a}}}list(d){let p=this.rules.block.list.exec(d);if(p){let e=p[1].trim(),t=1<e.length,h={type:"list",raw:"",ordered:t,start:t?+e.slice(0,-1):"",loose:!1,items:[]},c=(e=t?"\\d{1,9}\\"+e.slice(-1):"\\"+e,this.options.pedantic&&(e=t?e:"[*+-]"),this.rules.other.listItemRegex(e)),u=!1;for(;d;){let e=!1,t="",r="";if(!(p=c.exec(d))||this.rules.block.hr.test(d))break;t=p[0],d=d.substring(t.length);let i=p[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),n=d.split(`
`,1)[0],a=!i.trim(),s=0;if(this.options.pedantic?(s=2,r=i.trimStart()):a?s=p[1].length+1:(s=4<(s=p[2].search(this.rules.other.nonSpaceChar))?1:s,r=i.slice(s),s+=p[1].length),a&&this.rules.other.blankLine.test(n)&&(t+=n+`
`,d=d.substring(n.length+1),e=!0),!e)for(var g=this.rules.other.nextBulletRegex(s),f=this.rules.other.hrRegex(s),m=this.rules.other.fencesBeginRegex(s),y=this.rules.other.headingBeginRegex(s),v=this.rules.other.htmlBeginRegex(s);d;){var x,b=d.split(`
`,1)[0];if(n=b,x=this.options.pedantic?n=n.replace(this.rules.other.listReplaceNesting," "):n.replace(this.rules.other.tabCharGlobal," "),m.test(n)||y.test(n)||v.test(n)||g.test(n)||f.test(n))break;if(x.search(this.rules.other.nonSpaceChar)>=s||!n.trim())r+=`
`+x.slice(s);else{if(a||4<=i.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)||m.test(i)||y.test(i)||f.test(i))break;r+=`
`+n}a||n.trim()||(a=!0),t+=b+`
`,d=d.substring(b.length+1),i=x.slice(s)}h.loose||(u?h.loose=!0:this.rules.other.doubleBlankLine.test(t)&&(u=!0));let o=null,l;this.options.gfm&&(o=this.rules.other.listIsTask.exec(r))&&(l="[ ] "!==o[0],r=r.replace(this.rules.other.listReplaceTask,"")),h.items.push({type:"list_item",raw:t,task:!!o,checked:l,loose:!1,text:r,tokens:[]}),h.raw+=t}var r,i=h.items.at(-1);if(i){i.raw=i.raw.trimEnd(),i.text=i.text.trimEnd(),h.raw=h.raw.trimEnd();for(let e=0;e<h.items.length;e++)this.lexer.state.top=!1,h.items[e].tokens=this.lexer.blockTokens(h.items[e].text,[]),h.loose||(r=0<(r=h.items[e].tokens.filter(e=>"space"===e.type)).length&&r.some(e=>this.rules.other.anyLine.test(e.raw)),h.loose=r);if(h.loose)for(let e=0;e<h.items.length;e++)h.items[e].loose=!0;return h}}}html(e){if(e=this.rules.block.html.exec(e))return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}def(e){var t,r,i;if(e=this.rules.block.def.exec(e))return t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]&&e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"),{type:"def",tag:t,raw:e[0],href:r,title:i}}table(n){if((n=this.rules.block.table.exec(n))&&this.rules.other.tableDelimiter.test(n[2])){let t=gL(n[1]),e=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=n[3]?.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],i={type:"table",raw:n[0],header:[],align:[],rows:[]};if(t.length===e.length){for(var a of e)this.rules.other.tableAlignRight.test(a)?i.align.push("right"):this.rules.other.tableAlignCenter.test(a)?i.align.push("center"):this.rules.other.tableAlignLeft.test(a)?i.align.push("left"):i.align.push(null);for(let e=0;e<t.length;e++)i.header.push({text:t[e],tokens:this.lexer.inline(t[e]),header:!0,align:i.align[e]});for(var s of r)i.rows.push(gL(s,i.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:i.align[t]})));return i}}}lheading(e){if(e=this.rules.block.lheading.exec(e))return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(e){var t;if(e=this.rules.block.paragraph.exec(e))return t=e[1].charAt(e[1].length-1)===`
`?e[1].slice(0,-1):e[1],{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}text(e){if(e=this.rules.block.text.exec(e))return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(e){if(e=this.rules.inline.escape.exec(e))return{type:"escape",raw:e[0],text:e[1]}}tag(e){if(e=this.rules.inline.tag.exec(e))return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){if(r=this.rules.inline.link.exec(r)){var i,n=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;var a=fL(n.slice(0,-1),"\\");if((n.length-a.length)%2==0)return}else{if(-2===(a=mL(r[2],"()")))return;-1<a&&(i=(0===r[0].indexOf("!")?5:4)+r[1].length+a,r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,i).trim(),r[3]="")}let e=r[2],t="";return this.options.pedantic?(a=this.rules.other.pedanticHrefTitle.exec(e))&&(e=a[1],t=a[3]):t=r[3]?r[3].slice(1,-1):"",e=e.trim(),yL(r,{href:(e=this.rules.other.startAngleBracket.test(e)?this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?e.slice(1):e.slice(1,-1):e)&&e.replace(this.rules.inline.anyPunctuation,"$1"),title:t&&t.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(e,t){var r;if(r=(r=this.rules.inline.reflink.exec(e))||this.rules.inline.nolink.exec(e))return(e=t[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()])?yL(r,e,r[0],this.lexer,this.rules):{type:"text",raw:t=r[0].charAt(0),text:t}}emStrong(s,o,e=""){let l=this.rules.inline.emStrongLDelim.exec(s);if(!(!l||l[3]&&e.match(this.rules.other.unicodeAlphaNumeric))&&(!l[1]&&!l[2]||!e||this.rules.inline.punctuation.exec(e))){let e=[...l[0]].length-1,t,r,i=e,n=0,a="*"===l[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,o=o.slice(-1*s.length+e);null!=(l=a.exec(o));){var h,c;if(t=l[1]||l[2]||l[3]||l[4]||l[5]||l[6])if(r=[...t].length,l[3]||l[4])i+=r;else if((l[5]||l[6])&&e%3&&!((e+r)%3))n+=r;else if(!(0<(i-=r)))return r=Math.min(r,r+i+n),h=[...l[0]][0].length,h=s.slice(0,e+l.index+h+r),Math.min(e,r)%2?(c=h.slice(1,-1),{type:"em",raw:h,text:c,tokens:this.lexer.inlineTokens(c)}):(c=h.slice(2,-2),{type:"strong",raw:h,text:c,tokens:this.lexer.inlineTokens(c)})}}}codespan(i){if(i=this.rules.inline.code.exec(i)){let e=i[2].replace(this.rules.other.newLineCharGlobal," "),t=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return t&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:i[0],text:e}}}br(e){if(e=this.rules.inline.br.exec(e))return{type:"br",raw:e[0]}}del(e){if(e=this.rules.inline.del.exec(e))return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(r){if(r=this.rules.inline.autolink.exec(r)){let e,t;return t="@"===r[2]?"mailto:"+(e=r[1]):e=r[1],{type:"link",raw:r[0],text:e,href:t,tokens:[{type:"text",raw:e,text:e}]}}}url(e){var r,i;if(r=this.rules.inline.url.exec(e)){let e,t;if("@"===r[2])e=r[0],t="mailto:"+e;else{for(;i=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"",i!==r[0];);e=r[0],t="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:e,href:t,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){var t;if(e=this.rules.inline.text.exec(e))return t=this.lexer.state.inRawBlock,{type:"text",raw:e[0],text:e[0],escaped:t}}},XL=class r{static{mt(this,"l")}tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||bL,this.options.tokenizer=this.options.tokenizer||new HL,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,(this.tokenizer.lexer=this).inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0},e={other:kL,block:GL.normal,inline:jL.normal},this.options.pedantic?(e.block=GL.pedantic,e.inline=jL.pedantic):this.options.gfm&&(e.block=GL.gfm,this.options.breaks?e.inline=jL.breaks:e.inline=jL.gfm),this.tokenizer.rules=e}static get rules(){return{block:GL,inline:jL}}static lex(e,t){return new r(t).lex(e)}static lexInline(e,t){return new r(t).inlineTokens(e)}lex(e){e=e.replace(kL.carriageReturn,`
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){var t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(n,r=[],i=!1){for(this.options.pedantic&&(n=n.replace(kL.tabCharGlobal," ").replace(kL.spaceLine,""));n;){let t;if(!this.options.extensions?.block?.some(e=>!!(t=e.call({lexer:this},n,r))&&(n=n.substring(t.raw.length),r.push(t),!0)))if(t=this.tokenizer.space(n)){n=n.substring(t.raw.length);var e=r.at(-1);1===t.raw.length&&void 0!==e?e.raw+=`
`:r.push(t)}else if(t=this.tokenizer.code(n))n=n.substring(t.raw.length),"paragraph"===(e=r.at(-1))?.type||"text"===e?.type?(e.raw+=(e.raw.endsWith(`
`)?"":`
`)+t.raw,e.text+=`
`+t.text,this.inlineQueue.at(-1).src=e.text):r.push(t);else if(t=this.tokenizer.fences(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.heading(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.hr(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.blockquote(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.list(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.html(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.def(n)){n=n.substring(t.raw.length);var a=r.at(-1);"paragraph"===a?.type||"text"===a?.type?(a.raw+=(a.raw.endsWith(`
`)?"":`
`)+t.raw,a.text+=`
`+t.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title},r.push(t))}else if(t=this.tokenizer.table(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.lheading(n))n=n.substring(t.raw.length),r.push(t);else{let e=n;if(this.options.extensions?.startBlock){let t=1/0,r=n.slice(1),i;this.options.extensions.startBlock.forEach(e=>{"number"==typeof(i=e.call({lexer:this},r))&&0<=i&&(t=Math.min(t,i))}),t<1/0&&0<=t&&(e=n.substring(0,t+1))}if(this.state.top&&(t=this.tokenizer.paragraph(e)))a=r.at(-1),i&&"paragraph"===a?.type?(a.raw+=(a.raw.endsWith(`
`)?"":`
`)+t.raw,a.text+=`
`+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(t),i=e.length!==n.length,n=n.substring(t.raw.length);else if(t=this.tokenizer.text(n)){n=n.substring(t.raw.length);var s=r.at(-1);"text"===s?.type?(s.raw+=(s.raw.endsWith(`
`)?"":`
`)+t.raw,s.text+=`
`+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(t)}else if(n){if(s="Infinite loop on byte: "+n.charCodeAt(0),this.options.silent){console.error(s);break}throw new Error(s)}}}return this.state.top=!0,r}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(n,r=[]){let e=n,t=null;if(this.tokens.links){var i=Object.keys(this.tokens.links);if(0<i.length)for(;null!=(t=this.tokenizer.rules.inline.reflinkSearch.exec(e));)i.includes(t[0].slice(t[0].lastIndexOf("[")+1,-1))&&(e=e.slice(0,t.index)+"["+"a".repeat(t[0].length-2)+"]"+e.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(t=this.tokenizer.rules.inline.anyPunctuation.exec(e));)e=e.slice(0,t.index)+"++"+e.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(t=this.tokenizer.rules.inline.blockSkip.exec(e));)e=e.slice(0,t.index)+"["+"a".repeat(t[0].length-2)+"]"+e.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);e=this.options.hooks?.emStrongMask?.call({lexer:this},e)??e;let a=!1,s="";for(;n;){a||(s=""),a=!1;let t;if(!this.options.extensions?.inline?.some(e=>!!(t=e.call({lexer:this},n,r))&&(n=n.substring(t.raw.length),r.push(t),!0)))if(t=this.tokenizer.escape(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.tag(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.link(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.reflink(n,this.tokens.links)){n=n.substring(t.raw.length);var o=r.at(-1);"text"===t.type&&"text"===o?.type?(o.raw+=t.raw,o.text+=t.text):r.push(t)}else if(t=this.tokenizer.emStrong(n,e,s))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.codespan(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.br(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.del(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.autolink(n))n=n.substring(t.raw.length),r.push(t);else if(!this.state.inLink&&(t=this.tokenizer.url(n)))n=n.substring(t.raw.length),r.push(t);else{let e=n;if(this.options.extensions?.startInline){let t=1/0,r=n.slice(1),i;this.options.extensions.startInline.forEach(e=>{"number"==typeof(i=e.call({lexer:this},r))&&0<=i&&(t=Math.min(t,i))}),t<1/0&&0<=t&&(e=n.substring(0,t+1))}if(t=this.tokenizer.inlineText(e))n=n.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(s=t.raw.slice(-1)),a=!0,"text"===(o=r.at(-1))?.type?(o.raw+=t.raw,o.text+=t.text):r.push(t);else if(n){var l="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(l);break}throw new Error(l)}}}return r}},KL=class{static{mt(this,"P")}options;parser;constructor(e){this.options=e||bL}space(e){return""}code({text:e,lang:t,escaped:r}){return t=(t||"").match(kL.notSpaceStart)?.[0],e=e.replace(kL.endingNewline,"")+`
`,t?'<pre><code class="language-'+dL(t)+'">'+(r?e:dL(e,!0))+`</code></pre>
`:"<pre><code>"+(r?e:dL(e,!0))+`</code></pre>
`}blockquote({tokens:e}){return`<blockquote>
${this.parser.parse(e)}</blockquote>
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
`}hr(e){return`<hr>
`}list(t){let e=t.ordered,r=t.start,i="";for(let e=0;e<t.items.length;e++){var n=t.items[e];i+=this.listitem(n)}var a=e?"ol":"ul";return"<"+a+(e&&1!==r?' start="'+r+'"':"")+`>
`+i+"</"+a+`>
`}listitem(e){let t="",r;return e.task&&(r=this.checkbox({checked:!!e.checked}),e.loose?"paragraph"===e.tokens[0]?.type?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&0<e.tokens[0].tokens.length&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=r+" "+dL(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+" "),`<li>${t+=this.parser.parse(e.tokens,!!e.loose)}</li>
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
`}table(t){let e="",r="";for(let e=0;e<t.header.length;e++)r+=this.tablecell(t.header[e]);e+=this.tablerow({text:r});let i="";for(let e=0;e<t.rows.length;e++){var n=t.rows[e];r="";for(let e=0;e<n.length;e++)r+=this.tablecell(n[e]);i+=this.tablerow({text:r})}return`<table>
<thead>
`+e+`</thead>
`+(i=i&&`<tbody>${i}</tbody>`)+`</table>
`}tablerow({text:e}){return`<tr>
${e}</tr>
`}tablecell(e){var t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${dL(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){var r=this.parser.parseInline(r),i=pL(e);if(null===i)return r;let n='<a href="'+(e=i)+'"';return t&&(n+=' title="'+dL(t)+'"'),n+=">"+r+"</a>"}image({href:e,title:t,text:r,tokens:i}){if(i&&(r=this.parser.parseInline(i,this.parser.textRenderer)),null===(i=pL(e)))return dL(r);let n=`<img src="${e=i}" alt="${r}"`;return t&&(n+=` title="${dL(t)}"`),n+=">"}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:dL(e.text)}},ZL=class{static{mt(this,"$")}strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},QL=class i{static{mt(this,"l")}options;renderer;textRenderer;constructor(e){this.options=e||bL,this.options.renderer=this.options.renderer||new KL,this.renderer=this.options.renderer,this.renderer.options=this.options,(this.renderer.parser=this).textRenderer=new ZL}static parse(e,t){return new i(t).parse(e)}static parseInline(e,t){return new i(t).parseInline(e)}parse(i,n=!0){let a="";for(let r=0;r<i.length;r++){var e=i[r];if(this.options.extensions?.renderers?.[e.type]){var t=e,s=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==s||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(t.type)){a+=s||"";continue}}var o=e;switch(o.type){case"space":a+=this.renderer.space(o);continue;case"hr":a+=this.renderer.hr(o);continue;case"heading":a+=this.renderer.heading(o);continue;case"code":a+=this.renderer.code(o);continue;case"table":a+=this.renderer.table(o);continue;case"blockquote":a+=this.renderer.blockquote(o);continue;case"list":a+=this.renderer.list(o);continue;case"html":a+=this.renderer.html(o);continue;case"def":a+=this.renderer.def(o);continue;case"paragraph":a+=this.renderer.paragraph(o);continue;case"text":{let e=o,t=this.renderer.text(e);for(;r+1<i.length&&"text"===i[r+1].type;)e=i[++r],t+=`
`+this.renderer.text(e);a+=n?this.renderer.paragraph({type:"paragraph",raw:t,text:t,tokens:[{type:"text",raw:t,text:t,escaped:!0}]}):t;continue}default:var l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}return a}parseInline(t,r=this.renderer){let i="";for(let e=0;e<t.length;e++){var n=t[e];if(this.options.extensions?.renderers?.[n.type]){var a=this.options.extensions.renderers[n.type].call({parser:this},n);if(!1!==a||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=a||"";continue}}var s=n;switch(s.type){case"escape":i+=r.text(s);break;case"html":i+=r.html(s);break;case"link":i+=r.link(s);break;case"image":i+=r.image(s);break;case"strong":i+=r.strong(s);break;case"em":i+=r.em(s);break;case"codespan":i+=r.codespan(s);break;case"br":i+=r.br(s);break;case"del":i+=r.del(s);break;case"text":i+=r.text(s);break;default:var o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}return i}},JL=class{static{mt(this,"S")}options;block;constructor(e){this.options=e||bL}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?XL.lex:XL.lexInline}provideParser(){return this.block?QL.parse:QL.parseInline}},eR=class{static{mt(this,"B")}defaults=hL();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=QL;Renderer=KL;TextRenderer=ZL;Lexer=XL;Tokenizer=HL;Hooks=JL;constructor(...e){this.use(...e)}walkTokens(e,r){let i=[];for(var n of e)switch(i=i.concat(r.call(this,n)),n.type){case"table":var t,a,s=n;for(t of s.header)i=i.concat(this.walkTokens(t.tokens,r));for(a of s.rows)for(var o of a)i=i.concat(this.walkTokens(o.tokens,r));break;case"list":s=n,i=i.concat(this.walkTokens(s.items,r));break;default:{let t=n;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(e=>{e=t[e].flat(1/0),i=i.concat(this.walkTokens(e,r))}):t.tokens&&(i=i.concat(this.walkTokens(t.tokens,r)))}}return i}use(...e){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(a=>{var e={...a};if(e.async=this.defaults.async||e.async||!1,a.extensions&&(a.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let r=n.renderers[i.name];r?n.renderers[i.name]=function(...e){var t=i.renderer.apply(this,e);return!1===t?r.apply(this,e):t}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||"block"!==i.level&&"inline"!==i.level)throw new Error("extension level must be 'block' or 'inline'");var e=n[i.level];e?e.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&("block"===i.level?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:"inline"===i.level&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),e.extensions=n),a.renderer){let n=this.defaults.renderer||new KL(this.defaults);for(var t in a.renderer){if(!(t in n))throw new Error(`renderer '${t}' does not exist`);if(!["options","parser"].includes(t)){let e=t,r=a.renderer[e],i=n[e];n[e]=(...e)=>{var t=r.apply(n,e);return(!1===t?i.apply(n,e):t)||""}}}e.renderer=n}if(a.tokenizer){let n=this.defaults.tokenizer||new HL(this.defaults);for(var s in a.tokenizer){if(!(s in n))throw new Error(`tokenizer '${s}' does not exist`);if(!["options","rules","lexer"].includes(s)){let e=s,r=a.tokenizer[e],i=n[e];n[e]=(...e)=>{var t=r.apply(n,e);return!1===t?i.apply(n,e):t}}}e.tokenizer=n}if(a.hooks){let n=this.defaults.hooks||new JL;for(let t in a.hooks){if(!(t in n))throw new Error(`hook '${t}' does not exist`);if(!["options","block"].includes(t)){let e=t,r=a.hooks[e],i=n[e];JL.passThroughHooks.has(t)?n[e]=e=>this.defaults.async&&JL.passThroughHooksRespectAsync.has(t)?Promise.resolve(r.call(n,e)).then(e=>i.call(n,e)):(e=r.call(n,e),i.call(n,e)):n[e]=(...e)=>{var t=r.apply(n,e);return!1===t?i.apply(n,e):t}}}e.hooks=n}if(a.walkTokens){let r=this.defaults.walkTokens,i=a.walkTokens;e.walkTokens=function(e){let t=[];return t.push(i.call(this,e)),t=r?t.concat(r.call(this,e)):t}}this.defaults={...this.defaults,...e}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return XL.lex(e,t??this.defaults)}parser(e,t){return QL.parse(e,t??this.defaults)}parseMarkdown(o){return(r,e)=>{let t={...e},i={...this.defaults,...t},n=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===t.async)return n(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("u"<typeof r||null===r)return n(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));i.hooks&&((i.hooks.options=i).hooks.block=o);let a=i.hooks?i.hooks.provideLexer():o?XL.lex:XL.lexInline,s=i.hooks?i.hooks.provideParser():o?QL.parse:QL.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(r):r).then(e=>a(e,i)).then(e=>i.hooks?i.hooks.processAllTokens(e):e).then(e=>i.walkTokens?Promise.all(this.walkTokens(e,i.walkTokens)).then(()=>e):e).then(e=>s(e,i)).then(e=>i.hooks?i.hooks.postprocess(e):e).catch(n);try{i.hooks&&(r=i.hooks.preprocess(r));let e=a(r,i),t=(i.hooks&&(e=i.hooks.processAllTokens(e)),i.walkTokens&&this.walkTokens(e,i.walkTokens),s(e,i));return i.hooks?i.hooks.postprocess(t):t}catch(e){return n(e)}}}onError(r,i){return e=>{var t;if(e.message+=`
Please report this to https://github.com/markedjs/marked.`,r)return t="<p>An error occurred:</p><pre>"+dL(e.message+"",!0)+"</pre>",i?Promise.resolve(t):t;if(i)return Promise.reject(e);throw e}}},tR=new eR,mt(xL,"d"),xL.options=xL.setOptions=function(e){return tR.setOptions(e),cL(xL.defaults=tR.defaults),xL},xL.getDefaults=hL,xL.defaults=bL,xL.use=function(...e){return tR.use(...e),cL(xL.defaults=tR.defaults),xL},xL.walkTokens=function(e,t){return tR.walkTokens(e,t)},xL.parseInline=tR.parseInline,xL.Parser=QL,xL.parser=QL.parse,xL.Renderer=KL,xL.TextRenderer=ZL,xL.Lexer=XL,xL.lexer=XL.lex,xL.Tokenizer=HL,xL.Hooks=JL,xL.parse=xL,XL.lex});function iR(e,{}){return ac(e.replace(/<br\/>/g,`
`).replace(/\n{2,}/g,`
`))}function nR(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(e=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(e=>({content:e,type:"normal"}))??[])}function aR(e,t={}){let r=iR(e,t),i=xL.lexer(r),n=[[]],a=0;function s(t,r="normal"){"text"===t.type?t.text.split(`
`).forEach((e,t)=>{0!==t&&(a++,n.push([])),e.split(" ").forEach(e=>{(e=e.replace(/&#39;/g,"'"))&&n[a].push({content:e,type:r})})}):"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{s(e,t.type)}):"html"===t.type&&n[a].push({content:t.text,type:"normal"})}return mt(s,"processNode"),i.forEach(e=>{"paragraph"===e.type?e.tokens?.forEach(e=>{s(e)}):"html"===e.type?n[a].push({content:e.text,type:"normal"}):n[a].push({content:e.raw,type:"normal"})}),n}function sR(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}function oR(e,{markdownAutoWrap:t}={}){function r(e){return"text"===e.type?!1===t?e.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):e.text.replace(/\n */g,"<br/>"):"strong"===e.type?`<strong>${e.tokens?.map(r).join("")}</strong>`:"em"===e.type?`<em>${e.tokens?.map(r).join("")}</em>`:"paragraph"===e.type?`<p>${e.tokens?.map(r).join("")}</p>`:"space"===e.type?"":"html"===e.type?""+e.text:"escape"===e.type?e.text:(B.warn("Unsupported markdown: "+e.type),e.raw)}return e=xL.lexer(e),mt(r,"output"),e.map(r).join("")}var lR=i(()=>{rR(),Ec(),e(),mt(iR,"preprocessMarkdown"),mt(nR,"nonMarkdownToLines"),mt(aR,"markdownToLines"),mt(sR,"nonMarkdownToHTML"),mt(oR,"markdownToHTML")});function hR(e){return Intl.Segmenter?[...(new Intl.Segmenter).segment(e)].map(e=>e.segment):[...e]}function cR(e,t){return uR(e,[],hR(t.content),t.type)}function uR(e,t,r,i){var n,a,s;return 0===r.length?[{content:t.join(""),type:i},{content:"",type:i}]:([n,...a]=r,e([{content:(s=[...t,n]).join(""),type:i}])?uR(e,s,a,i):(0===t.length&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}]))}function dR(e,t){if(e.some(({content:e})=>e.includes(`
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return pR(e,t)}function pR(e,t,r=[],i=[]){if(0===e.length)return 0<i.length&&r.push(i),0<r.length?r:[];let n="";" "===e[0].content&&(n=" ",e.shift());var a=e.shift()??{content:" ",type:"normal"},s=[...i];return""!==n&&s.push({content:n,type:"normal"}),s.push(a),t(s)?pR(e,t,r,s):(0<i.length?(r.push(i),e.unshift(a)):a.content&&([s,i]=cR(t,a),r.push([s]),i.content)&&e.unshift(i),pR(e,t,r))}var gR=i(()=>{mt(hR,"splitTextToChars"),mt(cR,"splitWordToFitWidth"),mt(uR,"splitWordToFitWidthRecursion"),mt(dR,"splitLineToFitWidth"),mt(pR,"splitLineToFitWidthRecursion")});function fR(e,t){t&&e.attr("style",t)}async function mR(e,t,r,i,n=!1,a=br()){(e=e.append("foreignObject")).attr("width",Math.min(10*r,16384)+"px"),e.attr("height",Math.min(10*r,16384)+"px");var s=e.append("xhtml:div"),a=Vh(t.label)?await Xh(t.label.replace(I.lineBreakRegex,`
`),a):Ih(t.label,a),o=t.isNode?"nodeLabel":"edgeLabel",l=s.append("span");return l.html(a),fR(l,t.labelStyle),l.attr("class",o+" "+i),fR(s,t.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(s.style("max-width",r+"px"),s.style("text-align","center")),s.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&s.attr("class","labelBkg"),(a=s.node().getBoundingClientRect()).width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),a=s.node().getBoundingClientRect()),e.node()}function yR(e,t,r,i=!1){return e=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em"),i&&e.attr("text-anchor","middle"),e}function vR(e,t,r){return kR(t=yR(e=e.append("text"),1,t),r),r=t.node().getComputedTextLength(),e.remove(),r}function xR(e,t,r){return kR(t=yR(e=e.append("text"),1,t),[{content:r,type:"normal"}]),(r=t.node()?.getBoundingClientRect())&&e.remove(),r}function bR(t,e,r,i=!1,n=!1){let a=e.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),o=a.append("text").attr("y","-10.1"),l=(n&&o.attr("text-anchor","middle"),0);for(var h of r){var c,u=mt(e=>vR(a,1.1,e)<=t,"checkWidth");for(c of u(h)?[h]:dR(h,u))kR(yR(o,l,1.1,n),c),l++}return(i?(e=o.node().getBBox(),s.attr("x",e.x-2).attr("y",e.y-2).attr("width",e.width+4).attr("height",e.height+4),a):o).node()}function TR(e){return e.replace(/&(amp|lt|gt);/g,(e,t)=>{switch(t){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return e}})}function kR(i,e){i.text(""),e.forEach((e,t)=>{var r=i.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===t?r.text(TR(e.content)):r.text(" "+TR(e.content))})}async function wR(e,n={}){let a=[],t=(e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,r,i)=>(a.push((async()=>{var e=r+":"+i;return await tc(e)?await rc(e,void 0,{class:"label-icon"}):`<i class='${Ih(t,n).replace(":"," ")}'></i>`})()),t)),await Promise.all(a));return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>t.shift()??"")}var CR,ER=i(()=>{Sk(),ic(),e(),lR(),S7(),nc(),gR(),Ei(),mt(fR,"applyStyle"),mt(mR,"addHtmlSpan"),mt(yR,"createTspan"),mt(vR,"computeWidthOfText"),mt(xR,"computeDimensionOfText"),mt(bR,"createFormattedText"),mt(TR,"decodeHTMLEntities"),mt(kR,"updateTextContentAndStyles"),mt(wR,"replaceIconSubstring"),CR=mt(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,markdown:s=!0,isNode:o=!0,width:l=200,addSvgBackground:h=!1}={},c)=>{var u;return B.debug("XYZ createText",t,r,i,n,a,o,"addSvgBackground: ",h),a?(a=s?oR(t,c):sR(t),a=await wR(C7(a),c),u=t.replace(/\\\\/g,"\\"),mR(e,{isNode:o,label:Vh(t)?u:a,labelStyle:r.replace("fill:","color:")},l,n,h,c)):(u=C7(t.replace(/<br\s*\/?>/g,"<br/>")),a=bR(l,e,s?aR(u.replace("<br>","<br/>"),c):nR(u),!!t&&h,!o),o?(n=(r=/stroke:/.exec(r)?r.replace("stroke:","lineColor:"):r).replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),Q(a).attr("style",n)):(l=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:"),Q(a).select("rect").attr("style",l.replace(/background:/g,"fill:")),e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),Q(a).select("text").attr("style",e)),i?Q(a).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Q(a).selectAll("tspan.text-outer-tspan").classed("row",!0),a)},"createText")});async function SR(e,t){if((e=e.getElementsByTagName("img"))&&0!==e.length){let i=""===t.replace(/<img[^>]*>/g,"").trim();await Promise.all([...e].map(r=>new Promise(t=>{function e(){var e;r.style.display="flex",r.style.flexDirection="column",i?(e=(P().fontSize?P():window.getComputedStyle(document.body)).fontSize,[e=ar.fontSize]=T7(e),r.style.minWidth=e=5*e+"px",r.style.maxWidth=e):r.style.width="100%",t(r)}mt(e,"setupImage"),setTimeout(()=>{r.complete&&e()}),r.addEventListener("error",e),r.addEventListener("load",e)})))}}var _R=i(()=>{ju(),wi(),S7(),mt(SR,"configureLabelImages")});function AR(e){return(e=e.map((e,t)=>(0===t?"M":"L")+e.x+","+e.y)).push("Z"),e.join(" ")}function LR(t,e,r,i,n,a){var s=[],o=r-t,l=2*Math.PI/(o/a),h=e+(i-e)/2;for(let e=0;e<=50;e++){var c=t+e/50*o,u=h+n*Math.sin(l*(c-t));s.push({x:c,y:u})}return s}function RR(t,r,i,n,e,a){var s=[],o=e*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let e=0;e<n;e++){var h=o+e*l,c=t+i*Math.cos(h),h=r+i*Math.sin(h);s.push({x:-c,y:-h})}return s}function IR(e){let t=Array.from(e.childNodes).filter(e=>"path"===e.tagName),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(e=>e.getAttribute("d")).filter(e=>null!==e).join(" ");r.setAttribute("d",i);var e=t.find(e=>"none"!==e.getAttribute("fill")),n=t.find(e=>"none"!==e.getAttribute("stroke")),a=mt((e,t)=>e?.getAttribute(t)??void 0,"getAttr");return e&&(e={fill:a(e,"fill"),"fill-opacity":a(e,"fill-opacity")??"1"},Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})),n&&(e={stroke:a(n,"stroke"),"stroke-width":a(n,"stroke-width")??"1","stroke-opacity":a(n,"stroke-opacity")??"1"},Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})),(a=document.createElementNS("http://www.w3.org/2000/svg","g")).appendChild(r),a}var NR,DR,MR,OR,BR=i(()=>{ER(),ju(),Ei(),Sk(),ic(),S7(),_R(),NR=mt(async(e,t,r)=>{let i,n=t.useHtmlLabels||hr(P()?.htmlLabels),a=(i=r||"node default",e.insert("g").attr("class",i).attr("id",t.domId||t.id)),s=a.insert("g").attr("class","label").attr("style",X_(t.labelStyle)),o,l=(o=void 0===t.label?"":"string"==typeof t.label?t.label:t.label[0],!!t.icon||!!t.img),h="markdown"===t.labelType,c=await CR(s,Ih(C7(o),P()),{useHtmlLabels:n,width:t.width||P().flowchart?.wrappingWidth,classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:h},P()),u=c.getBBox(),d=(t?.padding??0)/2;return n&&(r=c.children[0],e=Q(c),await SR(r,o),u=r.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)),n?s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):s.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:u,halfPadding:d,label:s}},"labelHelper"),DR=mt(async(e,t,r)=>{let i=r.useHtmlLabels??Lr(P()),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await CR(n,Ih(C7(t),P()),{useHtmlLabels:i,width:r.width||P()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=a.getBBox(),o=r.padding/2,l;return Lr(P())&&(t=a.children[0],l=Q(a),s=t.getBoundingClientRect(),l.attr("width",s.width),l.attr("height",s.height)),i?n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):n.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:s,halfPadding:o,label:n}},"insertLabel"),MR=mt((e,t)=>{t=t.node().getBBox(),e.width=t.width,e.height=t.height},"updateNodeBounds"),OR=mt((e,t)=>("handDrawn"===e.look?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses"),mt(AR,"createPathFromPoints"),mt(LR,"generateFullSineWavePoints"),mt(RR,"generateCirclePoints"),mt(IR,"mergePaths")});function PR(e,t){return e.intersect(t)}var $R,FR=i(()=>{mt(PR,"intersectNode"),$R=PR});function zR(e,t,r,i){var n=e.x,e=e.y,a=n-i.x,s=e-i.y,o=Math.sqrt(t*t*s*s+r*r*a*a),a=Math.abs(t*r*a/o),t=(i.x<n&&(a=-a),Math.abs(t*r*s/o));return{x:n+a,y:e+(t=i.y<e?-t:t)}}var qR,WR=i(()=>{mt(zR,"intersectEllipse"),qR=zR});function UR(e,t,r){return qR(e,t,t,r)}var GR,jR=i(()=>{WR(),mt(UR,"intersectCircle"),GR=UR});function VR(e,t,r,i){var n=t.y-e.y,a=e.x-t.x,s=t.x*e.y-e.x*t.y,o=n*r.x+a*r.y+s,l=n*i.x+a*i.y+s;if(!(0!=o&&0!=l&&0<o*l||(i=(o=i.y-r.y)*e.x+(l=r.x-i.x)*e.y+(r=i.x*r.y-r.x*i.y),e=o*t.x+l*t.y+r,Math.abs(i)<1e-6&&Math.abs(e)<1e-6&&0<i*e)||0==(t=n*l-o*a)))return i=Math.abs(t/2),{x:(e=a*r-l*s)<0?(e-i)/t:(e+i)/t,y:(e=o*s-n*r)<0?(e-i)/t:(e+i)/t}}function YR(e,t){return 0<e*t}var HR,XR=i(()=>{mt(VR,"intersectLine"),mt(YR,"sameSign"),HR=VR});function KR(t,r,i){let e=t.x,n=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof r.forEach?r.forEach(function(e){s=Math.min(s,e.x),o=Math.min(o,e.y)}):(s=Math.min(s,r.x),o=Math.min(o,r.y));var l=e-t.width/2-s,h=n-t.height/2-o;for(let e=0;e<r.length;e++){var c=r[e],u=r[e<r.length-1?e+1:0];(c=HR(t,i,{x:l+c.x,y:h+c.y},{x:l+u.x,y:h+u.y}))&&a.push(c)}return a.length?(1<a.length&&a.sort(function(e,t){var r=e.x-i.x,e=e.y-i.y,r=Math.sqrt(r*r+e*e),e=t.x-i.x,t=t.y-i.y;return r<(e=Math.sqrt(e*e+t*t))?-1:r===e?0:1}),a[0]):t}var ZR,QR,JR,J,eI,tI,rI,iI,ee,nI,aI,sI=i(()=>{XR(),mt(KR,"intersectPolygon"),ZR=KR}),oI=i(()=>{QR=mt((e,t)=>{var r,i=e.x,n=e.y,a=t.x-i,t=t.y-n,s=e.width/2,e=e.height/2,e=Math.abs(t)*s>Math.abs(a)*e?(t<0&&(e=-e),r=0==t?0:e*a/t,e):(r=s=a<0?-s:s,0==a?0:s*t/a);return{x:i+r,y:n+e}},"intersectRect"),JR=QR}),lI=i(()=>{FR(),jR(),WR(),sI(),oI(),J={node:$R,circle:GR,ellipse:qR,polygon:ZR,rect:JR}}),hI=i(()=>{ju(),eI=mt(e=>({fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:P().handDrawnSeed}),"solidStateFill"),tI=mt(e=>({stylesMap:e=rI([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]),stylesArray:[...e]}),"compileStyles"),rI=mt(e=>{let r=new Map;return e.forEach(e=>{var[e,t]=e.split(":");r.set(e.trim(),t?.trim())}),r},"styles2Map"),iI=mt(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"===e,"isLabelStyle"),ee=mt(e=>{let t=tI(e).stylesArray,r=[],i=[],n=[],a=[];return t.forEach(e=>{var t=e[0];iI(t)?r.push(e.join(":")+" !important"):(i.push(e.join(":")+" !important"),t.includes("stroke")&&n.push(e.join(":")+" !important"),"fill"===t&&a.push(e.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:a}},"styles2String"),nI=mt((e,t)=>{var{themeVariables:r,handDrawnSeed:i}=P(),{nodeBorder:r,mainBkg:n}=r,e=tI(e).stylesMap;return Object.assign({roughness:.7,fill:e.get("fill")||n,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:e.get("stroke")||r,seed:i,strokeWidth:e.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:aI(e.get("stroke-dasharray"))},t)},"userNodeOverrides"),aI=mt(e=>{var t;return e?1===(e=e.trim().split(/\s+/).map(Number)).length?[t=isNaN(e[0])?0:e[0],t]:[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]:[0,0]},"getStrokeDashArray")});function cI(e,t,r){if(e&&e.length){var i,[n,a]=t,t=Math.PI/180*r,s=Math.cos(t),o=Math.sin(t);for(i of e){var[l,h]=i;i[0]=(l-n)*s-(h-a)*o+n,i[1]=(l-n)*o+(h-a)*s+a}}}function uI(e,t){return e[0]===t[0]&&e[1]===t[1]}function dI(e,r,i,t=1){var n=i,i=Math.max(r,.1),p=e[0]&&e[0][0]&&"number"==typeof e[0][0]?[e]:e,a=[0,0];if(n)for(var s of p)cI(s,a,n);if(r=((t,n)=>{var e,r=[];for(e of p){var i=[...e];uI(i[0],i[i.length-1])||i.push([i[0][0],i[0][1]]),2<i.length&&r.push(i)}var a,s=[],o=(t=Math.max(t,.1),[]);for(a of r)for(let e=0;e<a.length-1;e++){var l,h=a[e],c=a[e+1];h[1]!==c[1]&&(l=Math.min(h[1],c[1]),o.push({ymin:l,ymax:Math.max(h[1],c[1]),x:(l===h[1]?h:c)[0],islope:(c[0]-h[0])/(c[1]-h[1])}))}if(o.sort((e,t)=>e.ymin<t.ymin?-1:e.ymin>t.ymin?1:e.x<t.x?-1:e.x>t.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax)),o.length){let r=[],i=o[0].ymin,e=0;for(;r.length||o.length;){if(o.length){let t=-1;for(let e=0;e<o.length&&!(o[e].ymin>i);e++)t=e;o.splice(0,t+1).forEach(e=>{r.push({s:i,edge:e})})}if((r=r.filter(e=>!(e.edge.ymax<=i))).sort((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x)),(1!==n||e%t==0)&&1<r.length)for(let e=0;e<r.length&&!((d=e+1)>=r.length);e+=2){var u=r[e].edge,d=r[d].edge;s.push([[Math.round(u.x),i],[Math.round(d.x),i]])}i+=n,r.forEach(e=>{e.edge.x=e.edge.x+n*e.edge.islope}),e++}}return s})(i,t),n){for(var o of p)cI(o,a,-n);{e=a,i=-n;let t=[];r.forEach(e=>t.push(...e)),cI(t,e,i)}}return r}function pI(e,t){let r,i=t.hachureAngle+90,n=t.hachureGap,a=(n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1)),1);return 1<=t.roughness&&.7<((null==(r=t.randomizer)?void 0:r.next())||Math.random())&&(a=n),dI(e,n,i,a||1)}function gI(e){var t=e[0],e=e[1];return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function fI(e,t){return e.type===t}function mI(e){let i=[],n=(e=>{for(var t=new Array;""!==e;){if(!e.match(/^([ \t\r\n,]+)/))if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:aN,text:RegExp.$1};else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:sN,text:""+parseFloat(RegExp.$1)}}e=e.substr(RegExp.$1.length)}return t[t.length]={type:oN,text:""},t})(e),a="BOD",s=0,o=n[s];for(;!fI(o,oN);){let t=0,r=[];if("BOD"===a){if("M"!==o.text&&"m"!==o.text)return mI("M0,0"+e);s++,t=lN[o.text],a=o.text}else fI(o,sN)?t=lN[a]:(s++,t=lN[o.text],a=o.text);if(!(s+t<n.length))throw new Error("Path data ended short");for(let e=s;e<s+t;e++){var l=n[e];if(!fI(l,sN))throw new Error("Param not a number: "+a+","+l.text);r[r.length]=+l.text}if("number"!=typeof lN[a])throw new Error("Bad segment: "+a);var h={key:a,data:r};i.push(h),s+=t,o=n[s],"m"===(a="M"===a?"L":a)&&(a="l")}return i}function yI(e){let r=0,i=0,t=0,n=0,a=[];for(var{key:s,data:o}of e)switch(s){case"M":a.push({key:"M",data:[...o]}),[r,i]=o,[t,n]=o;break;case"m":r+=o[0],i+=o[1],a.push({key:"M",data:[r,i]}),t=r,n=i;break;case"L":a.push({key:"L",data:[...o]}),[r,i]=o;break;case"l":r+=o[0],i+=o[1],a.push({key:"L",data:[r,i]});break;case"C":a.push({key:"C",data:[...o]}),r=o[4],i=o[5];break;case"c":var l=o.map((e,t)=>t%2?e+i:e+r);a.push({key:"C",data:l}),r=l[4],i=l[5];break;case"Q":a.push({key:"Q",data:[...o]}),r=o[2],i=o[3];break;case"q":l=o.map((e,t)=>t%2?e+i:e+r),a.push({key:"Q",data:l}),r=l[2],i=l[3];break;case"A":a.push({key:"A",data:[...o]}),r=o[5],i=o[6];break;case"a":r+=o[5],i+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],r,i]});break;case"H":a.push({key:"H",data:[...o]}),r=o[0];break;case"h":r+=o[0],a.push({key:"H",data:[r]});break;case"V":a.push({key:"V",data:[...o]}),i=o[0];break;case"v":i+=o[0],a.push({key:"V",data:[i]});break;case"S":a.push({key:"S",data:[...o]}),r=o[2],i=o[3];break;case"s":var h=o.map((e,t)=>t%2?e+i:e+r);a.push({key:"S",data:h}),r=h[2],i=h[3];break;case"T":a.push({key:"T",data:[...o]}),r=o[0],i=o[1];break;case"t":r+=o[0],i+=o[1],a.push({key:"T",data:[r,i]});break;case"Z":case"z":a.push({key:"Z",data:[]}),r=t,i=n}return a}function vI(e){let n=[],a="",s=0,o=0,t=0,r=0,l=0,h=0;for(var{key:i,data:c}of e){switch(i){case"M":n.push({key:"M",data:[...c]}),[s,o]=c,[t,r]=c;break;case"C":n.push({key:"C",data:[...c]}),s=c[4],o=c[5],l=c[2],h=c[3];break;case"L":n.push({key:"L",data:[...c]}),[s,o]=c;break;case"H":s=c[0],n.push({key:"L",data:[s,o]});break;case"V":o=c[0],n.push({key:"L",data:[s,o]});break;case"S":{let e=0,t;t="C"===a||"S"===a?(e=s+(s-l),o+(o-h)):(e=s,o),n.push({key:"C",data:[e,t,...c]}),l=c[0],h=c[1],s=c[2],o=c[3];break}case"T":{let[e,t]=c,r=0,i;i="Q"===a||"T"===a?(r=s+(s-l),o+(o-h)):(r=s,o);var u=s+2*(r-s)/3,d=o+2*(i-o)/3,p=e+2*(r-e)/3,g=t+2*(i-t)/3;n.push({key:"C",data:[u,d,p,g,e,t]}),l=r,h=i,s=e,o=t;break}case"Q":var[u,d,p,g]=c,f=s+2*(u-s)/3,m=o+2*(d-o)/3;n.push({key:"C",data:[f,m,p+2*(u-p)/3,g+2*(d-g)/3,p,g]}),l=u,h=d,s=p,o=g;break;case"A":var f=Math.abs(c[0]),m=Math.abs(c[1]),y=c[2],v=c[3],x=c[4],b=c[5],T=c[6];0===f||0===m?(n.push({key:"C",data:[s,o,b,T,b,T]}),s=b,o=T):s===b&&o===T||(bI(s,o,b,T,f,m,y,v,x).forEach(function(e){n.push({key:"C",data:e})}),s=b,o=T);break;case"Z":n.push({key:"Z",data:[]}),s=t,o=r}a=i}return n}function xI(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function bI(e,t,r,i,n,a,s,o,l,h){let c=Math.PI*s/180,u=[],d=0,p=0,g=0,f=0;h?[d,p,g,f]=h:([e,t]=xI(e,t,-c),[r,i]=xI(r,i,-c),1<(m=(y=(e-r)/2)*y/(n*n)+(v=(t-i)/2)*v/(a*a))&&(n*=m=Math.sqrt(m),a*=m),m=n*n,x=a*a,o=(o===l?-1:1)*Math.sqrt(Math.abs((m*x-m*v*v-x*y*y)/(m*v*v+x*y*y))),g=o*n*v/a+(e+r)/2,f=o*-a*y/n+(t+i)/2,d=Math.asin(parseFloat(((t-f)/a).toFixed(9))),p=Math.asin(parseFloat(((i-f)/a).toFixed(9))),e<g&&(d=Math.PI-d),r<g&&(p=Math.PI-p),d<0&&(d=2*Math.PI+d),p<0&&(p=2*Math.PI+p),l&&d>p&&(d-=2*Math.PI),!l&&p>d&&(p-=2*Math.PI));var m=p-d,y=(Math.abs(m)>120*Math.PI/180&&(x=p,v=r,o=i,p=l&&p>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,u=bI(r=g+n*Math.cos(p),i=f+a*Math.sin(p),v,o,n,a,s,0,l,[p,x,g,f])),m=p-d,Math.cos(d)),v=Math.sin(d),o=Math.cos(p),s=Math.sin(p),x=4/3*n*(l=Math.tan(m/4)),n=[e,t],a=[e+x*v,t-(m=4/3*a*l)*y],l=[r+x*s,i-m*o],e=[r,i];if(a[0]=2*n[0]-a[0],a[1]=2*n[1]-a[1],h)return[a,l,e].concat(u);u=[a,l,e].concat(u);var b=[];for(let e=0;e<u.length;e+=3){var T=xI(u[e][0],u[e][1],c),k=xI(u[e+1][0],u[e+1][1],c),w=xI(u[e+2][0],u[e+2][1],c);b.push([T[0],T[1],k[0],k[1],w[0],w[1]])}return b}function TI(e,t,r,i,n){return{type:"path",ops:OI(e,t,r,i,n)}}function kI(t,e,r){var i=(t||[]).length;if(2<i){var n=[];for(let e=0;e<i-1;e++)n.push(...OI(t[e][0],t[e][1],t[e+1][0],t[e+1][1],r));return e&&n.push(...OI(t[i-1][0],t[i-1][1],t[0][0],t[0][1],r)),{type:"path",ops:n}}return 2===i?TI(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function wI(e,t,r,i,n){return kI([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],!0,n)}function CI(e,t){if(e.length){var r="number"==typeof e[0][0]?[e]:e,i=PI(r[0],1+.2*t.roughness,t),n=t.disableMultiStroke?[]:PI(r[0],1.5*(1+.22*t.roughness),II(t));for(let e=1;e<r.length;e++)if((l=r[e]).length){var a,s,o=PI(l,1+.2*t.roughness,t),l=t.disableMultiStroke?[]:PI(l,1.5*(1+.22*t.roughness),II(t));for(a of o)"move"!==a.op&&i.push(a);for(s of l)"move"!==s.op&&n.push(s)}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function EI(e,t,r){var i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),i=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),i=2*Math.PI/i,e=Math.abs(e/2),t=Math.abs(t/2),n=1-r.curveFitting;return{increment:i,rx:e+=MI(e*n,r),ry:t+=MI(t*n,r)}}function SI(e,t,r,i){let[n,a]=FI(i.increment,e,t,i.rx,i.ry,1,i.increment*DI(.1,DI(.4,1,r),r),r),s=$I(n,null,r);return r.disableMultiStroke||0===r.roughness||([e]=FI(i.increment,e,t,i.rx,i.ry,1.5,0,r),t=$I(e,null,r),s=s.concat(t)),{estimatedPoints:a,opset:{type:"path",ops:s}}}function _I(e,t,r,i,n,a,s,o,l){r=Math.abs(r/2),i=Math.abs(i/2),r+=MI(.01*r,l),i+=MI(.01*i,l);let h=n,c=a;for(;h<0;)h+=2*Math.PI,c+=2*Math.PI;return c-h>2*Math.PI&&(h=0,c=2*Math.PI),n=2*Math.PI/l.curveStepCount,n=zI(a=Math.min(n/2,(c-h)/2),e,t,r,i,h,c,1,l),l.disableMultiStroke||(a=zI(a,e,t,r,i,h,c,1.5,l),n.push(...a)),s&&(o?n.push(...OI(e,t,e+r*Math.cos(h),t+i*Math.sin(h),l),...OI(e,t,e+r*Math.cos(c),t+i*Math.sin(c),l)):n.push({op:"lineTo",data:[e,t]},{op:"lineTo",data:[e+r*Math.cos(h),t+i*Math.sin(h)]})),{type:"path",ops:n}}function AI(e,t){let r=vI(yI(mI(e))),i=[],n=[0,0],a=[0,0];for(var{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],n=[o[0],o[1]];break;case"L":i.push(...OI(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case"C":var[l,h,c,u,d,p]=o;i.push(...qI(l,h,c,u,d,p,a,t)),a=[d,p];break;case"Z":i.push(...OI(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function LI(e,t){var r,i=[];for(r of e)if(r.length){var n=t.maxRandomnessOffset||0,a=r.length;if(2<a){i.push({op:"move",data:[r[0][0]+MI(n,t),r[0][1]+MI(n,t)]});for(let e=1;e<a;e++)i.push({op:"lineTo",data:[r[e][0]+MI(n,t),r[e][1]+MI(n,t)]})}}return{type:"fillPath",ops:i}}function RI(e,r){return(e=>{let t=r.fillStyle||"hachure";if(!iN[t])switch(t){case"zigzag":iN[t]||(iN[t]=new QI(e));break;case"cross-hatch":iN[t]||(iN[t]=new JI(e));break;case"dots":iN[t]||(iN[t]=new eN(e));break;case"dashed":iN[t]||(iN[t]=new tN(e));break;case"zigzag-line":iN[t]||(iN[t]=new rN(e));break;default:t="hachure",iN[t]||(iN[t]=new ZI(e))}return iN[t]})(hN).fillPolygons(e,r)}function II(e){var t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function NI(e){return e.randomizer||(e.randomizer=new nN(e.seed||0)),e.randomizer.next()}function DI(e,t,r,i=1){return r.roughness*i*(NI(r)*(t-e)+e)}function MI(e,t,r=1){return DI(-e,e,t,r)}function OI(e,t,r,i,n,a=!1){var a=a?n.disableMultiStrokeFill:n.disableMultiStroke,s=BI(e,t,r,i,n,!0,!1);return a?s:(a=BI(e,t,r,i,n,!0,!0),s.concat(a))}function BI(e,t,r,i,n,a,s){let o=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(o),h,c=(h=l<200?1:500<l?.4:-.0016668*l+1.233334,n.maxRandomnessOffset||0),u=(c=c*c*100>o?l/10:c)/2,d=.2+.2*NI(n),p=n.bowing*n.maxRandomnessOffset*(i-t)/200,g=n.bowing*n.maxRandomnessOffset*(e-r)/200;p=MI(p,n,h),g=MI(g,n,h);var f=[],m=mt(()=>MI(u,n,h),"M"),y=mt(()=>MI(c,n,h),"k"),v=n.preserveVertices;return a&&f.push(s?{op:"move",data:[e+(v?0:m()),t+(v?0:m())]}:{op:"move",data:[e+(v?0:MI(c,n,h)),t+(v?0:MI(c,n,h))]}),f.push(s?{op:"bcurveTo",data:[p+e+(r-e)*d+m(),g+t+(i-t)*d+m(),p+e+2*(r-e)*d+m(),g+t+2*(i-t)*d+m(),r+(v?0:m()),i+(v?0:m())]}:{op:"bcurveTo",data:[p+e+(r-e)*d+y(),g+t+(i-t)*d+y(),p+e+2*(r-e)*d+y(),g+t+2*(i-t)*d+y(),r+(v?0:y()),i+(v?0:y())]}),f}function PI(t,r,i){if(!t.length)return[];var n=[];n.push([t[0][0]+MI(r,i),t[0][1]+MI(r,i)]),n.push([t[0][0]+MI(r,i),t[0][1]+MI(r,i)]);for(let e=1;e<t.length;e++)n.push([t[e][0]+MI(r,i),t[e][1]+MI(r,i)]),e===t.length-1&&n.push([t[e][0]+MI(r,i),t[e][1]+MI(r,i)]);return $I(n,null,i)}function $I(t,e,r){var i=t.length,n=[];if(3<i){var a,s=[],o=1-r.curveTightness;n.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<i;e++){var l=t[e];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*t[e+1][0]-o*t[e-1][0])/6,l[1]+(o*t[e+1][1]-o*t[e-1][1])/6],s[2]=[t[e+1][0]+(o*t[e][0]-o*t[e+2][0])/6,t[e+1][1]+(o*t[e][1]-o*t[e+2][1])/6],s[3]=[t[e+1][0],t[e+1][1]],n.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}e&&2===e.length&&(a=r.maxRandomnessOffset,n.push({op:"lineTo",data:[e[0]+MI(a,r),e[1]+MI(a,r)]}))}else 3===i?(n.push({op:"move",data:[t[1][0],t[1][1]]}),n.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===i&&n.push(...BI(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return n}function FI(t,r,i,n,a,s,e,o){var l=[],h=[];if(0===o.roughness){t/=4,h.push([r+n*Math.cos(-t),i+a*Math.sin(-t)]);for(let e=0;e<=2*Math.PI;e+=t){var c=[r+n*Math.cos(e),i+a*Math.sin(e)];l.push(c),h.push(c)}h.push([r+n*Math.cos(0),i+a*Math.sin(0)]),h.push([r+n*Math.cos(t),i+a*Math.sin(t)])}else{var u=MI(.5,o)-Math.PI/2,d=(h.push([MI(s,o)+r+.9*n*Math.cos(u-t),MI(s,o)+i+.9*a*Math.sin(u-t)]),2*Math.PI+u-.01);for(let e=u;e<d;e+=t){var p=[MI(s,o)+r+n*Math.cos(e),MI(s,o)+i+a*Math.sin(e)];l.push(p),h.push(p)}h.push([MI(s,o)+r+n*Math.cos(u+2*Math.PI+.5*e),MI(s,o)+i+a*Math.sin(u+2*Math.PI+.5*e)]),h.push([MI(s,o)+r+.98*n*Math.cos(u+e),MI(s,o)+i+.98*a*Math.sin(u+e)]),h.push([MI(s,o)+r+.9*n*Math.cos(u+.5*e),MI(s,o)+i+.9*a*Math.sin(u+.5*e)])}return[h,l]}function zI(t,r,i,n,a,s,o,l,h){var s=s+MI(.1,h),c=[];c.push([MI(l,h)+r+.9*n*Math.cos(s-t),MI(l,h)+i+.9*a*Math.sin(s-t)]);for(let e=s;e<=o;e+=t)c.push([MI(l,h)+r+n*Math.cos(e),MI(l,h)+i+a*Math.sin(e)]);return c.push([r+n*Math.cos(o),i+a*Math.sin(o)]),c.push([r+n*Math.cos(o),i+a*Math.sin(o)]),$I(c,null,h)}function qI(t,r,i,n,a,s,o,l){var h,c=[],u=[l.maxRandomnessOffset||1,(l.maxRandomnessOffset||1)+.3],d=l.disableMultiStroke?1:2,p=l.preserveVertices;for(let e=0;e<d;e++)0===e?c.push({op:"move",data:[o[0],o[1]]}):c.push({op:"move",data:[o[0]+(p?0:MI(u[0],l)),o[1]+(p?0:MI(u[0],l))]}),h=p?[a,s]:[a+MI(u[e],l),s+MI(u[e],l)],c.push({op:"bcurveTo",data:[t+MI(u[e],l),r+MI(u[e],l),i+MI(u[e],l),n+MI(u[e],l),h[0],h[1]]});return c}function WI(e){return[...e]}function UI(t,e=0){var r=t.length;if(r<3)throw new Error("A curve must have at least three points.");var i=[];if(3===r)i.push(WI(t[0]),WI(t[1]),WI(t[2]),WI(t[2]));else{var n=[];n.push(t[0],t[0]);for(let e=1;e<t.length;e++)n.push(t[e]),e===t.length-1&&n.push(t[e]);var a=[],s=1-e;i.push(WI(n[0]));for(let e=1;e+2<n.length;e++){var o=n[e];a[0]=[o[0],o[1]],a[1]=[o[0]+(s*n[e+1][0]-s*n[e-1][0])/6,o[1]+(s*n[e+1][1]-s*n[e-1][1])/6],a[2]=[n[e+1][0]+(s*n[e][0]-s*n[e+2][0])/6,n[e+1][1]+(s*n[e][1]-s*n[e+2][1])/6],a[3]=[n[e+1][0],n[e+1][1]],i.push(a[1],a[2],a[3])}}return i}function GI(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function jI(e,t,r){var i=GI(t,r);return 0===i?GI(e,t):(i=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i,GI(e,VI(t,r,Math.max(0,Math.min(1,i)))))}function VI(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function YI(l,h,e,t){var r,i,n,a,s,o,t=t||[];return(()=>{let e=l[h+0],t=l[h+1],r=l[h+2],i=l[h+3],n=3*t[0]-2*e[0]-i[0],a=(n*=n,3*t[1]-2*e[1]-i[1]);a*=a;var s=3*r[0]-2*i[0]-e[0],o=(s*=s,3*r[1]-2*i[1]-e[1]);return o*=o,n<s&&(n=s),a<o&&(a=o),n+a})()<e?(r=l[h+0],(!t.length||(o=t[t.length-1],1<Math.sqrt(GI(o,r))))&&t.push(r),t.push(l[h+3])):(i=VI(o=l[h+0],r=l[h+1],.5),s=VI(r,r=l[h+2],.5),n=VI(r,r=l[h+3],.5),a=VI(i,s,.5),s=VI(s,n,.5),YI([o,i,a,o=VI(a,s,.5)],0,e,t),YI([o,s,n,r],0,e,t)),t}function HI(e,t){return XI(e,0,e.length,t)}function XI(t,r,i,e,n){let a=n||[],s=t[r],o=t[i-1],l=0,h=1;for(let e=r+1;e<i-1;++e){var c=jI(t[e],s,o);c>l&&(l=c,h=e)}return Math.sqrt(l)>e?(XI(t,r,h+1,e,a),XI(t,h,i,e,a)):(a.length||a.push(s),a.push(o)),a}function KI(t,r=.15,e){var i=[],n=(t.length-1)/3;for(let e=0;e<n;e++)YI(t,3*e,r,i);return e&&0<e?XI(i,0,i.length,e):i}var ZI,QI,JI,eN,tN,rN,iN,nN,aN,sN,oN,lN,hN,cN,uN,dN,pN,gN,fN,mN=i(()=>{mt(cI,"t"),mt(uI,"e"),mt(dI,"s"),mt(pI,"n"),ZI=class{static{mt(this,"o")}constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){return e=pI(e,t),{type:"fillSketch",ops:this.renderLines(e,t)}}renderLines(e,t){var r,i=[];for(r of e)i.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return i}},mt(gI,"a"),QI=class extends ZI{static{mt(this,"h")}fillPolygons(e,t){let r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);var i,n,e=pI(e,Object.assign({},t,{hachureGap:r})),a=Math.PI/180*t.hachureAngle,s=[],o=.5*r*Math.cos(a),l=.5*r*Math.sin(a);for([i,n]of e)gI([i,n])&&s.push([[i[0]-o,i[1]+l],[...n]],[[i[0]+o,i[1]-l],[...n]]);return{type:"fillSketch",ops:this.renderLines(s,t)}}},JI=class extends ZI{static{mt(this,"r")}fillPolygons(e,t){var r=this._fillPolygons(e,t),t=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),e=this._fillPolygons(e,t);return r.ops=r.ops.concat(e.ops),r}},eN=class{static{mt(this,"i")}constructor(e){this.helper=e}fillPolygons(e,t){return e=pI(e,t=Object.assign({},t,{hachureAngle:0})),this.dotsOnLines(e,t)}dotsOnLines(e,t){let r=[],i=t.hachureGap,n=(i<0&&(i=4*t.strokeWidth),i=Math.max(i,.1),t.fillWeight);n<0&&(n=t.strokeWidth/2);var a,s=i/4;for(a of e){var o=gI(a),l=o/i,h=Math.ceil(l)-1,c=o-h*i,u=(a[0][0]+a[1][0])/2-i/4,d=Math.min(a[0][1],a[1][1]);for(let e=0;e<h;e++){var p=d+c+e*i,g=u-s+2*Math.random()*s,p=p-s+2*Math.random()*s,g=this.helper.ellipse(g,p,n,n,t);r.push(...g.ops)}}return{type:"fillSketch",ops:r}}},tN=class{static{mt(this,"c")}constructor(e){this.helper=e}fillPolygons(e,t){return e=pI(e,t),{type:"fillSketch",ops:this.dashedLine(e,t)}}dashedLine(e,h){let c=h.dashOffset<0?h.hachureGap<0?4*h.strokeWidth:h.hachureGap:h.dashOffset,u=h.dashGap<0?h.hachureGap<0?4*h.strokeWidth:h.hachureGap:h.dashGap,d=[];return e.forEach(e=>{let t=gI(e),r=Math.floor(t/(c+u)),i=(t+u-r*(c+u))/2,n=e[0],a=e[1];n[0]>a[0]&&(n=e[1],a=e[0]);var s=Math.atan((a[1]-n[1])/(a[0]-n[0]));for(let e=0;e<r;e++){var o=(l=e*(c+u))+c,l=[n[0]+l*Math.cos(s)+i*Math.cos(s),n[1]+l*Math.sin(s)+i*Math.sin(s)],o=[n[0]+o*Math.cos(s)+i*Math.cos(s),n[1]+o*Math.sin(s)+i*Math.sin(s)];d.push(...this.helper.doubleLineOps(l[0],l[1],o[0],o[1],h))}}),d}},rN=class{static{mt(this,"l")}constructor(e){this.helper=e}fillPolygons(e,t){var r=t.hachureGap<0?4*t.strokeWidth:t.hachureGap,i=t.zigzagOffset<0?r:t.zigzagOffset,e=pI(e,t=Object.assign({},t,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(e,i,t)}}zigzagLines(e,h,c){let u=[];return e.forEach(e=>{let t=gI(e),r=Math.round(t/(2*h)),i=e[0],n=e[1];i[0]>n[0]&&(i=e[1],n=e[0]);var a=Math.atan((n[1]-i[1])/(n[0]-i[0]));for(let e=0;e<r;e++){var s=2*e*h,o=2*(e+1)*h,l=Math.sqrt(2*Math.pow(h,2)),s=[i[0]+s*Math.cos(a),i[1]+s*Math.sin(a)],o=[i[0]+o*Math.cos(a),i[1]+o*Math.sin(a)],l=[s[0]+l*Math.cos(a+Math.PI/4),s[1]+l*Math.sin(a+Math.PI/4)];u.push(...this.helper.doubleLineOps(s[0],s[1],l[0],l[1],c),...this.helper.doubleLineOps(l[0],l[1],o[0],o[1],c))}}),u}},iN={},nN=class{static{mt(this,"p")}constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}},lN={A:7,a:7,C:6,c:6,H:sN=1,h:1,L:oN=2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:aN=0,z:0},mt(fI,"k"),mt(mI,"b"),mt(yI,"y"),mt(vI,"m"),mt(xI,"w"),mt(bI,"x"),hN={randOffset:mt(function(e,t){return MI(e,t)},"randOffset"),randOffsetWithRange:mt(function(e,t,r){return DI(e,t,r)},"randOffsetWithRange"),ellipse:mt(function(e,t,r,i,n){return SI(e,t,n,EI(r,i,n)).opset},"ellipse"),doubleLineOps:mt(function(e,t,r,i,n){return OI(e,t,r,i,n,!0)},"doubleLineOps")},mt(TI,"v"),mt(kI,"S"),mt(wI,"O"),mt(CI,"L"),mt(EI,"T"),mt(SI,"D"),mt(_I,"A"),mt(AI,"_"),mt(LI,"I"),mt(RI,"C"),mt(II,"z"),mt(NI,"W"),mt(DI,"E"),mt(MI,"G"),mt(OI,"$"),mt(BI,"R"),mt(PI,"j"),mt($I,"q"),mt(FI,"F"),mt(zI,"V"),mt(qI,"Z"),mt(WI,"Q"),mt(UI,"H"),mt(GI,"N"),mt(jI,"B"),mt(VI,"J"),mt(YI,"K"),mt(HI,"U"),mt(XI,"X"),mt(KI,"Y"),cN="none",uN=class{static{mt(this,"et")}constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,r){return{shape:e,sets:t||[],options:r||this.defaultOptions}}line(e,t,r,i,n){return n=this._o(n),this._d("line",[TI(e,t,r,i,n)],n)}rectangle(e,t,r,i,n){var a=[],s=wI(e,t,r,i,n=this._o(n));return n.fill&&(r=[[e,t],[e+r,t],[e+r,t+i],[e,t+i]],"solid"===n.fillStyle?a.push(LI([r],n)):a.push(RI([r],n))),n.stroke!==cN&&a.push(s),this._d("rectangle",a,n)}ellipse(e,t,r,i,n){var a=[],i=SI(e,t,n=this._o(n),r=EI(r,i,n));return n.fill&&("solid"===n.fillStyle?((e=SI(e,t,n,r).opset).type="fillPath",a.push(e)):a.push(RI([i.estimatedPoints],n))),n.stroke!==cN&&a.push(i.opset),this._d("ellipse",a,n)}circle(e,t,r,i){return(e=this.ellipse(e,t,r,r,i)).shape="circle",e}linearPath(e,t){return t=this._o(t),this._d("linearPath",[kI(e,!1,t)],t)}arc(d,p,g,e,t,r,i=!1,n){var n=this._o(n),a=[],s=_I(d,p,g,e,t,r,i,!0,n);return i&&n.fill&&("solid"===n.fillStyle?(i=Object.assign({},n),(i=_I(d,p,g,e,t,r,i.disableMultiStroke=!0,!1,i)).type="fillPath",a.push(i)):a.push(((e,t,r,i)=>{var n=d,a=p,s=Math.abs(g/2),o=Math.abs(e/2);s+=MI(.01*s,i),o+=MI(.01*o,i);let l=t,h=r;for(;l<0;)l+=2*Math.PI,h+=2*Math.PI;h-l>2*Math.PI&&(l=0,h=2*Math.PI);var c=(h-l)/i.curveStepCount,u=[];for(let e=l;e<=h;e+=c)u.push([n+s*Math.cos(e),a+o*Math.sin(e)]);return u.push([n+s*Math.cos(h),a+o*Math.sin(h)]),u.push([n,a]),RI([u],i)})(e,t,r,n))),n.stroke!==cN&&a.push(s),this._d("arc",a,n)}curve(e,t){var r=this._o(t),t=[],i=CI(e,r);if(r.fill&&r.fill!==cN)if("solid"===r.fillStyle){var n=CI(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));t.push({type:"fillPath",ops:this._mergedShape(n.ops)})}else{var a,s=[];if((n=e).length)for(a of"number"==typeof n[0][0]?[n]:n)a.length<3?s.push(...a):3===a.length?s.push(...KI(UI([a[0],a[0],a[1],a[2]]),10,(1+r.roughness)/2)):s.push(...KI(UI(a),10,(1+r.roughness)/2));s.length&&t.push(RI([s],r))}return r.stroke!==cN&&t.push(i),this._d("curve",t,r)}polygon(e,t){var r=[],i=kI(e,!0,t=this._o(t));return t.fill&&("solid"===t.fillStyle?r.push(LI([e],t)):r.push(RI([e],t))),t.stroke!==cN&&r.push(i),this._d("polygon",r,t)}path(e,t){let r=this._o(t),i=[];var n,a,s,o;return e&&(e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," "),t=r.fill&&"transparent"!==r.fill&&r.fill!==cN,n=r.stroke!==cN,s=((e,t)=>{let r=vI(yI(mI(e))),i=[],n=[],a=[0,0],s=[],o=mt(()=>{4<=s.length&&n.push(...KI(s,1)),s=[]},"i"),l=mt(()=>{o(),n.length&&(i.push(n),n=[])},"c");for(var{key:h,data:c}of r)switch(h){case"M":l(),a=[c[0],c[1]],n.push(a);break;case"L":o(),n.push([c[0],c[1]]);break;case"C":var u;s.length||(u=n.length?n[n.length-1]:a,s.push([u[0],u[1]])),s.push([c[0],c[1]]),s.push([c[2],c[3]]),s.push([c[4],c[5]]);break;case"Z":o(),n.push([a[0],a[1]])}if(l(),!t)return i;var d,p=[];for(d of i){var g=HI(d,t);g.length&&p.push(g)}return p})(e,(a=!!(r.simplification&&r.simplification<1))?4-4*(r.simplification||1):(1+r.roughness)/2),o=AI(e,r),t&&("solid"===r.fillStyle?1===s.length?(t=AI(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0})),i.push({type:"fillPath",ops:this._mergedShape(t.ops)})):i.push(LI(s,r)):i.push(RI(s,r))),n)&&(a?s.forEach(e=>{i.push(kI(e,!1,r))}):i.push(o)),this._d("path",i,r)}opsToPath(e,t){let r="";for(var i of e.ops){var n="number"==typeof t&&0<=t?i.data.map(e=>+e.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){var t,r=e.sets||[],i=e.options||this.defaultOptions,n=[];for(t of r){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:cN};break;case"fillPath":e={d:this.opsToPath(t),stroke:cN,strokeWidth:0,fill:i.fill||cN};break;case"fillSketch":e=this.fillSketch(t,i)}e&&n.push(e)}return n}fillSketch(e,t){let r=t.fillWeight;return r<0&&(r=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||cN,strokeWidth:r,fill:cN}}_mergedShape(e){return e.filter((e,t)=>0===t||"move"!==e.op)}},dN=class{static{mt(this,"st")}constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new uN(t)}draw(e){var t,r=e.sets||[],i=e.options||this.getDefaultOptions(),n=this.ctx,a=e.options.fixedDecimalPlaceDigits;for(t of r)switch(t.type){case"path":n.save(),n.strokeStyle="none"===i.stroke?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,t,a),n.restore();break;case"fillPath":n.save(),n.fillStyle=i.fill||"";var s="curve"===e.shape||"polygon"===e.shape||"path"===e.shape?"evenodd":"nonzero";this._drawToContext(n,t,a,s),n.restore();break;case"fillSketch":this.fillSketch(n,t,i)}}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(var n of t.ops){var a="number"==typeof r&&0<=r?n.data.map(e=>+e.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])}}"fillPath"===t.type?e.fill(i):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,t,r,i,n){return e=this.gen.line(e,t,r,i,n),this.draw(e),e}rectangle(e,t,r,i,n){return e=this.gen.rectangle(e,t,r,i,n),this.draw(e),e}ellipse(e,t,r,i,n){return e=this.gen.ellipse(e,t,r,i,n),this.draw(e),e}circle(e,t,r,i){return e=this.gen.circle(e,t,r,i),this.draw(e),e}linearPath(e,t){return e=this.gen.linearPath(e,t),this.draw(e),e}polygon(e,t){return e=this.gen.polygon(e,t),this.draw(e),e}arc(e,t,r,i,n,a,s=!1,o){return e=this.gen.arc(e,t,r,i,n,a,s,o),this.draw(e),e}curve(e,t){return e=this.gen.curve(e,t),this.draw(e),e}path(e,t){return e=this.gen.path(e,t),this.draw(e),e}},pN="http://www.w3.org/2000/svg",gN=class{static{mt(this,"ot")}constructor(e,t){this.svg=e,this.gen=new uN(t)}draw(t){var r,e=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(pN,"g"),s=t.options.fixedDecimalPlaceDigits;for(r of e){let e=null;switch(r.type){case"path":(e=n.createElementNS(pN,"path")).setAttribute("d",this.opsToPath(r,s)),e.setAttribute("stroke",i.stroke),e.setAttribute("stroke-width",i.strokeWidth+""),e.setAttribute("fill","none"),i.strokeLineDash&&e.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",""+i.strokeLineDashOffset);break;case"fillPath":(e=n.createElementNS(pN,"path")).setAttribute("d",this.opsToPath(r,s)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",i.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(n,r,i)}e&&a.appendChild(e)}return a}fillSketch(e,t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),(e=e.createElementNS(pN,"path")).setAttribute("d",this.opsToPath(t,r.fixedDecimalPlaceDigits)),e.setAttribute("stroke",r.fill||""),e.setAttribute("stroke-width",i+""),e.setAttribute("fill","none"),r.fillLineDash&&e.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&e.setAttribute("stroke-dashoffset",""+r.fillLineDashOffset),e}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){return e=this.gen.line(e,t,r,i,n),this.draw(e)}rectangle(e,t,r,i,n){return e=this.gen.rectangle(e,t,r,i,n),this.draw(e)}ellipse(e,t,r,i,n){return e=this.gen.ellipse(e,t,r,i,n),this.draw(e)}circle(e,t,r,i){return e=this.gen.circle(e,t,r,i),this.draw(e)}linearPath(e,t){return e=this.gen.linearPath(e,t),this.draw(e)}polygon(e,t){return e=this.gen.polygon(e,t),this.draw(e)}arc(e,t,r,i,n,a,s=!1,o){return e=this.gen.arc(e,t,r,i,n,a,s,o),this.draw(e)}curve(e,t){return e=this.gen.curve(e,t),this.draw(e)}path(e,t){return e=this.gen.path(e,t),this.draw(e)}},fN={canvas:mt((e,t)=>new dN(e,t),"canvas"),svg:mt((e,t)=>new gN(e,t),"svg"),generator:mt(e=>new uN(e),"generator"),newSeed:mt(()=>uN.newSeed(),"newSeed")}});function yN(e,t){var r=ee(t).labelStyles;t.labelStyle=r;let i=OR(t),n=i,a=(i||(n="anchor"),e.insert("g").attr("class",n).attr("id",t.domId||t.id)),s=t.cssStyles,o=fN.svg(a),l=nI(t,{fill:"black",stroke:"none",fillStyle:"solid"}),h=("handDrawn"!==t.look&&(l.roughness=0),o.circle(0,0,2,l)),c=a.insert(()=>h,":first-child");return c.attr("class","anchor").attr("style",X_(s)),MR(t,c),t.intersect=function(e){return B.info("Circle intersect",t,1,e),J.circle(t,1,e)},a}var vN=i(()=>{e(),BR(),lI(),hI(),mN(),S7(),mt(yN,"anchor")});function xN(e,t,r,i,n,a,s){var o=(e+r)/2,l=(t+i)/2,h=Math.atan2(i-t,r-e),c=Math.sqrt(((r-e)/2/n)**2+((i-t)/2/a)**2);if(1<c)throw new Error("The given radii are too small to create an arc between the points.");let u=Math.sqrt(1-c**2),d=o+u*a*Math.sin(h)*(s?-1:1),p=l-u*n*Math.cos(h)*(s?-1:1),g=Math.atan2((t-p)/a,(e-d)/n),f=Math.atan2((i-p)/a,(r-d)/n)-g;s&&f<0&&(f+=2*Math.PI),!s&&0<f&&(f-=2*Math.PI);var m=[];for(let e=0;e<20;e++){var y=g+e/19*f,v=d+n*Math.cos(y),y=p+a*Math.sin(y);m.push({x:v,y:y})}return m}function bN(e,t,r){var[t,r]=[t,r].sort((e,t)=>t-e);return r*(1-Math.sqrt(1-(e/t/2)**2))}async function TN(e,t){var{labelStyles:r,nodeStyles:i}=ee(t);t.labelStyle=r;let n=t.padding??0,a="neo"===t.look?16:n,s="neo"===t.look?12:n,o=mt(e=>e+s,"calcTotalHeight"),l=mt(e=>{var t=e/2;return[t/(2.5+e/50),t]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await NR(e,t,OR(t)),u=o(t?.height||c.height),[d,p]=l(u),g=bN(u,d,p),f=(t?.width||c.width)+2*a+g-g,m=u,y=t.cssStyles,v=[{x:f/2,y:-m/2},{x:-f/2,y:-m/2},...xN(-f/2,-m/2,-f/2,m/2,d,p,!1),{x:f/2,y:m/2},...xN(f/2,m/2,f/2,-m/2,d,p,!0)],x=fN.svg(h),b=nI(t,{}),T=("handDrawn"!==t.look&&(b.roughness=0,b.fillStyle="solid"),AR(v)),k=x.path(T,b),w=h.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path"),y&&"handDrawn"!==t.look&&w.selectAll("path").attr("style",y),i&&"handDrawn"!==t.look&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${d/2}, 0)`),MR(t,w),t.intersect=function(e){return J.polygon(t,v,e)},h}var kN=i(()=>{BR(),lI(),hI(),mN(),mt(xN,"generateArcPoints"),mt(bN,"calculateArcSagitta"),mt(TN,"bowTieRect")});function wN(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(e){return e.x+","+e.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}var CN=i(()=>{mt(wN,"insertPolygonShape")});async function EN(e,n){var{labelStyles:t,nodeStyles:r}=ee(n);n.labelStyle=t;let i=n.padding??0,a="neo"===n.look?28:i,s="neo"===n.look?24:i,{shapeSvg:o,bbox:l}=await NR(e,n,OR(n)),h=(n?.width??l.width)+("neo"===n.look?2*a:a+SN),c=(n?.height??l.height)+("neo"===n.look?2*s:s),u=h,d=-c,p=[{x:0+SN,y:d},{x:u,y:d},{x:u,y:0},{x:0,y:0},{x:0,y:d+SN},{x:0+SN,y:d}],g,f=n.cssStyles;if("handDrawn"===n.look){let e=fN.svg(o),t=nI(n,{}),r=AR(p),i=e.path(r,t);g=o.insert(()=>i,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&g.attr("style",f)}else g=wN(o,h,c,p);return r&&g.attr("style",r),MR(n,g),n.intersect=function(e){return J.polygon(n,p,e)},o}var SN,_N=i(()=>{BR(),lI(),hI(),mN(),CN(),BR(),SN=12,mt(EN,"card")});function AN(e,t){var r=ee(t).nodeStyles;t.label="";let i=e.insert("g").attr("class",OR(t)).attr("id",t.domId??t.id),n=t.cssStyles,a=Math.max(28,t.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=fN.svg(i),l=nI(t,{}),h=("handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid"),AR(s)),c=o.path(h,l),u=i.insert(()=>c,":first-child");return n&&"handDrawn"!==t.look&&u.selectAll("path").attr("style",n),r&&"handDrawn"!==t.look&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(e){return J.polygon(t,s,e)},i}var LN=i(()=>{lI(),mN(),hI(),BR(),mt(AN,"choice")});async function RN(e,i,t){var{labelStyles:r,nodeStyles:n}=ee(i);i.labelStyle=r;let{shapeSvg:a,bbox:s,halfPadding:o}=await NR(e,i,OR(i)),l=t?.padding??o,h="neo"===i.look?s.width/2+32:s.width/2+l,c,u=i.cssStyles;if("handDrawn"===i.look){let e=fN.svg(a),t=nI(i,{}),r=e.circle(0,0,2*h,t);(c=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",X_(u))}else c=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",h).attr("cx",0).attr("cy",0);return MR(i,c),i.calcIntersect=function(e,t){var r=e.width/2;return J.circle(e,r,t)},i.intersect=function(e){return B.info("Circle intersect",i,h,e),J.circle(i,h,e)},a}var IN=i(()=>{mN(),e(),S7(),lI(),hI(),BR(),mt(RN,"circle")});function NN(e){var t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4);return`M ${-(e*=2)/2*t},${e/2*r} L ${e/2*t},${-e/2*r}
M ${e/2*t},${e/2*r} L ${-e/2*t},`+-e/2*r}function DN(e,t){var{labelStyles:r,nodeStyles:i}=ee(t);t.labelStyle=r,t.label="";let n=e.insert("g").attr("class",OR(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),s=t.cssStyles,o=fN.svg(n),l=nI(t,{}),h=("handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid"),o.circle(0,0,2*a,l)),c=NN(a),u=o.path(c,l),d=n.insert(()=>h,":first-child");return d.insert(()=>u),d.attr("class","outer-path"),s&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",s),i&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",i),MR(t,d),t.intersect=function(e){return B.info("crossedCircle intersect",t,{radius:a,point:e}),J.circle(t,a,e)},n}var MN=i(()=>{e(),BR(),hI(),mN(),lI(),mt(NN,"createLine"),mt(DN,"crossedCircle")});function ON(t,r,i,n=100,e=0,a=180){var s=[],o=e*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let e=0;e<n;e++){var h=o+e*l,c=t+i*Math.cos(h),h=r+i*Math.sin(h);s.push({x:-c,y:-h})}return s}async function BN(e,t){var{labelStyles:r,nodeStyles:i}=ee(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await NR(e,t,OR(t)),o="neo"===t.look?18:t.padding??0,l="neo"===t.look?12:t.padding??0,h=a.width+o,c=a.height+l,u=Math.max(5,.1*c),d=t.cssStyles,p=[...ON(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...ON(h/2+2*u,-u,u,20,-180,-270),...ON(h/2+2*u,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...ON(h/2,c/2,u,20,0,90)],g=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...ON(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...ON(h/2+.1*h,-u,u,20,-180,-270),...ON(h/2+.1*h,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...ON(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2,y:c/2+u}],f=fN.svg(n),m=nI(t,{fill:"none"}),y=("handDrawn"!==t.look&&(m.roughness=0,m.fillStyle="solid"),AR(p).replace("Z","")),v=f.path(y,m),x=AR(g),b=f.path(x,{...m}),T=n.insert("g",":first-child");return T.insert(()=>b,":first-child").attr("stroke-opacity",0),T.insert(()=>v,":first-child"),T.attr("class","text"),d&&"handDrawn"!==t.look&&T.selectAll("path").attr("style",d),i&&"handDrawn"!==t.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(${u}, 0)`),s.attr("transform",`translate(${-h/2+u-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),MR(t,T),t.intersect=function(e){return J.polygon(t,g,e)},n}var PN=i(()=>{BR(),lI(),hI(),mN(),mt(ON,"generateCirclePoints"),mt(BN,"curlyBraceLeft")});function $N(t,r,i,n=100,e=0,a=180){var s=[],o=e*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let e=0;e<n;e++){var h=o+e*l,c=t+i*Math.cos(h),h=r+i*Math.sin(h);s.push({x:c,y:h})}return s}async function FN(e,t){var{labelStyles:r,nodeStyles:i}=ee(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await NR(e,t,OR(t)),o="neo"===t.look?18:t.padding??0,l="neo"===t.look?12:t.padding??0,h=a.width+("neo"===t.look?2*o:o),c=a.height+("neo"===t.look?2*l:l),u=Math.max(5,.1*c),d=t.cssStyles,p=[...$N(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...$N(h/2+2*u,-u,u,20,-180,-270),...$N(h/2+2*u,u,u,20,-90,-180),{x:h/2+u,y:c/2},...$N(h/2,c/2,u,20,0,90)],g=[{x:-h/2,y:-c/2-u},{x:h/2,y:-c/2-u},...$N(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...$N(h/2+2*u,-u,u,20,-180,-270),...$N(h/2+2*u,u,u,20,-90,-180),{x:h/2+u,y:c/2},...$N(h/2,c/2,u,20,0,90),{x:h/2,y:c/2+u},{x:-h/2,y:c/2+u}],f=fN.svg(n),m=nI(t,{fill:"none"}),y=("handDrawn"!==t.look&&(m.roughness=0,m.fillStyle="solid"),AR(p).replace("Z","")),v=f.path(y,m),x=AR(g),b=f.path(x,{...m}),T=n.insert("g",":first-child");return T.insert(()=>b,":first-child").attr("stroke-opacity",0),T.insert(()=>v,":first-child"),T.attr("class","text"),d&&"handDrawn"!==t.look&&T.selectAll("path").attr("style",d),i&&"handDrawn"!==t.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(${-u}, 0)`),s.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),MR(t,T),t.intersect=function(e){return J.polygon(t,g,e)},n}var zN=i(()=>{BR(),lI(),hI(),mN(),mt($N,"generateCirclePoints"),mt(FN,"curlyBraceRight")});function qN(t,r,i,n=100,e=0,a=180){var s=[],o=e*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let e=0;e<n;e++){var h=o+e*l,c=t+i*Math.cos(h),h=r+i*Math.sin(h);s.push({x:-c,y:-h})}return s}async function WN(e,t){var{labelStyles:r,nodeStyles:i}=ee(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await NR(e,t,OR(t)),o="neo"===t.look?18:t.padding??0,l="neo"===t.look?12:t.padding??0,h=a.width+("neo"===t.look?2*o:o),c=a.height+("neo"===t.look?2*l:l),u=Math.max(5,.1*c),d=t.cssStyles,p=[...qN(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...qN(h/2+2*u,-u,u,20,-180,-270),...qN(h/2+2*u,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...qN(h/2,c/2,u,20,0,90)],g=[...qN(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...qN(-h/2-u/2,-u,u,20,0,90),...qN(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...qN(-h/2+u+u/2,c/2,u,30,-180,-270)],f=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...qN(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...qN(h/2+2*u,-u,u,20,-180,-270),...qN(h/2+2*u,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...qN(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2-u-u/2,y:c/2+u},...qN(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...qN(-h/2-u/2,-u,u,20,0,90),...qN(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...qN(-h/2+u+u/2,c/2,u,30,-180,-270)],m=fN.svg(n),y=nI(t,{fill:"none"}),v=("handDrawn"!==t.look&&(y.roughness=0,y.fillStyle="solid"),AR(p).replace("Z","")),x=m.path(v,y),b=AR(g).replace("Z",""),T=m.path(b,y),k=AR(f),w=m.path(k,{...y}),C=n.insert("g",":first-child");return C.insert(()=>w,":first-child").attr("stroke-opacity",0),C.insert(()=>x,":first-child"),C.insert(()=>T,":first-child"),C.attr("class","text"),d&&"handDrawn"!==t.look&&C.selectAll("path").attr("style",d),i&&"handDrawn"!==t.look&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${u-u/4}, 0)`),s.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),MR(t,C),t.intersect=function(e){return J.polygon(t,f,e)},n}var UN=i(()=>{BR(),lI(),hI(),mN(),mt(qN,"generateCirclePoints"),mt(WN,"curlyBraces")});async function GN(e,t){var{labelStyles:r,nodeStyles:i}=ee(t),r=(t.labelStyle=r,t.padding??0),n="neo"===t.look?16:r,r="neo"===t.look?12:r,{shapeSvg:e,bbox:a}=await NR(e,t,OR(t)),n=Math.max(20,1.25*(a.width+2*n),t?.width??0),r=(a=Math.max(5,a.height+2*r,t?.height??0))/2,s=t.cssStyles,o=fN.svg(e),l=nI(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");let h=n,c=a,u=h-r,d=c/4,p=[{x:u,y:0},{x:d,y:0},{x:0,y:c/2},{x:d,y:c},{x:u,y:c},...RR(-u,-c/2,r,50,270,90)],g=AR(p),f=o.path(g,l),m=e.insert(()=>f,":first-child");return m.attr("class","basic label-container outer-path"),s&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",s),i&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",i),m.attr("transform",`translate(${-n/2}, ${-a/2})`),MR(t,m),t.intersect=function(e){return J.polygon(t,p,e)},e}var jN=i(()=>{BR(),lI(),hI(),mN(),mt(GN,"curvedTrapezoid")});async function VN(e,s){var{labelStyles:t,nodeStyles:r}=ee(s),t=(s.labelStyle=t,s.padding??0),i="neo"===s.look?24:t,t="neo"===s.look?24:t;(s.width||s.height)&&(g=s.width??0,s.width=(s.width??0)-t,s.width<ZN&&(s.width=ZN),s.height=(s.height??0)-i-g/2/(2.5+g/50)*3,s.height<KN)&&(s.height=KN);let{shapeSvg:o,bbox:n,label:a}=await NR(e,s,OR(s)),l=(s.width||n.width)+t,h=l/2,c=h/(2.5+l/50),u=(s.height||n.height)+i+c,d,p=s.cssStyles;if("handDrawn"===s.look){let e=fN.svg(o),t=HN(0,0,l,u,h,c),r=XN(0,c,l,u,h,c),i=nI(s,{}),n=e.path(t,i),a=e.path(r,nI(s,{fill:"none"}));d=o.insert(()=>a,":first-child"),(d=o.insert(()=>n,":first-child")).attr("class","basic label-container"),p&&d.attr("style",p)}else{var g=YN(0,0,l,u,h,c);d=o.insert("path",":first-child").attr("d",g).attr("class","basic label-container outer-path").attr("style",X_(p)).attr("style",r)}return d.attr("label-offset-y",c),d.attr("transform",`translate(${-l/2}, ${-(u/2+c)})`),MR(s,d),a.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+(s.padding??0)/1.5-(n.y-(n.top??0))})`),s.intersect=function(t){var r=J.rect(s,t),i=r.x-(s.x??0);if(0!=h&&(Math.abs(i)<(s.width??0)/2||Math.abs(i)==(s.width??0)/2&&Math.abs(r.y-(s.y??0))>(s.height??0)/2-c)){let e=c*c*(1-i*i/(h*h));0<e&&(e=Math.sqrt(e)),e=c-e,0<t.y-(s.y??0)&&(e=-e),r.y+=e}return r},o}var YN,HN,XN,KN,ZN,QN=i(()=>{BR(),lI(),hI(),mN(),S7(),YN=mt((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"),HN=mt((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"),XN=mt((e,t,r,i,n,a)=>[`M${e-r/2},`+-i/2,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),ZN=KN=8,mt(VN,"cylinder")});async function JN(e,t){var{labelStyles:r,nodeStyles:i}=ee(t),r=(t.labelStyle=r,"neo"===t.look?16:t.padding??0),n="neo"===t.look?16:t.padding??0,{shapeSvg:e,bbox:a,label:s}=await NR(e,t,OR(t)),r=a.width+r,o=.2*(n=a.height+n),r=-r/2,n=-n/2-o/2,l=t.cssStyles,h=fN.svg(e),c=nI(t,{});"handDrawn"!==t.look&&(c.roughness=0,c.fillStyle="solid");let u=[{x:r,y:n+o},{x:-r,y:n+o},{x:-r,y:-n},{x:r,y:-n},{x:r,y:n},{x:-r,y:n},{x:-r,y:n+o}],d=h.polygon(u.map(e=>[e.x,e.y]),c),p=e.insert(()=>d,":first-child");return p.attr("class","basic label-container outer-path"),l&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",l),i&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",i),s.attr("transform",`translate(${r+(t.padding??0)/2-(a.x-(a.left??0))}, ${n+o+(t.padding??0)/2-(a.y-(a.top??0))})`),MR(t,p),t.intersect=function(e){return J.rect(t,e)},e}var eD=i(()=>{BR(),lI(),hI(),mN(),mt(JN,"dividedRectangle")});async function tD(e,t){var{labelStyles:r,nodeStyles:i}=ee(t),n="neo"===t.look?12:5;t.labelStyle=r;let a=t.padding??0,s="neo"===t.look?16:a,{shapeSvg:o,bbox:l}=await NR(e,t,OR(t)),h=(t?.width?t?.width/2:l.width/2)+(s??0),c=h-n,u,d=t.cssStyles;return"handDrawn"===t.look?(r=fN.svg(o),e=nI(t,{roughness:.2,strokeWidth:2.5}),n=nI(t,{roughness:.2,strokeWidth:1.5}),e=r.circle(0,0,2*h,e),r=r.circle(0,0,2*c,n),(u=o.insert("g",":first-child")).attr("class",X_(t.cssClasses)).attr("style",X_(d)),u.node()?.appendChild(e),u.node()?.appendChild(r)):(n=(u=o.insert("g",":first-child")).insert("circle",":first-child"),e=u.insert("circle"),u.attr("class","basic label-container").attr("style",i),n.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)),MR(t,u),t.intersect=function(e){return B.info("DoubleCircle intersect",t,h,e),J.circle(t,h,e)},o}var rD=i(()=>{e(),BR(),lI(),hI(),mN(),S7(),mt(tD,"doublecircle")});function iD(e,t,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:n}=ee(t);t.label="",t.labelStyle=i;let a=e.insert("g").attr("class",OR(t)).attr("id",t.domId??t.id),s=t.cssStyles,o=fN.svg(a),l=r.nodeBorder,h=nI(t,{fillStyle:"solid"}),c=("handDrawn"!==t.look&&(h.roughness=0),o.circle(0,0,14,h)),u=a.insert(()=>c,":first-child");return u.selectAll("path").attr("style",`fill: ${l} !important;`),s&&0<s.length&&"handDrawn"!==t.look&&u.selectAll("path").attr("style",s),n&&"handDrawn"!==t.look&&u.selectAll("path").attr("style",n),MR(t,u),t.intersect=function(e){return B.info("filledCircle intersect",t,{radius:7,point:e}),J.circle(t,7,e)},a}var nD=i(()=>{mN(),e(),lI(),hI(),BR(),mt(iD,"filledCircle")});async function aD(e,t){var{labelStyles:r,nodeStyles:i}=ee(t),r=(t.labelStyle=r,t.padding??0),r="neo"===t.look?2*r:r;(t.width||t.height)&&(t.height=t?.height??0,t.height<sD&&(t.height=sD),t.width=(t?.width??0)-r-r/2,t.width<oD)&&(t.width=oD);let{shapeSvg:n,bbox:a,label:s}=await NR(e,t,OR(t)),o=(t?.width||a.width)+(r??0),l=t?.height||o+a.height,h=l,c=[{x:0,y:-l},{x:h,y:-l},{x:h/2,y:0}],u=t.cssStyles,d=fN.svg(n),p=nI(t,{}),g=("handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid"),AR(c)),f=d.path(g,p),m=n.insert(()=>f,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`).attr("class","outer-path");return u&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",u),i&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",i),t.width=o,t.height=l,MR(t,m),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(t.padding??0)/2+(a.y-(a.top??0))})`),t.intersect=function(e){return B.info("Triangle intersect",t,c,e),J.polygon(t,c,e)},n}var sD,oD,lD=i(()=>{e(),BR(),lI(),hI(),mN(),BR(),oD=sD=10,mt(aD,"flippedTriangle")});function hD(e,t,{dir:r,config:{state:i,themeVariables:n}}){var a=ee(t).nodeStyles;t.label="";let s=e.insert("g").attr("class",OR(t)).attr("id",t.domId??t.id),o=t.cssStyles,l=Math.max(70,t?.width??0),h=Math.max(10,t?.height??0);"LR"===r&&(l=Math.max(10,t?.width??0),h=Math.max(70,t?.height??0));var e=-1*l/2,r=-1*h/2,c=fN.svg(s),n=nI(t,{stroke:n.lineColor,fill:n.lineColor});"handDrawn"!==t.look&&(n.roughness=0,n.fillStyle="solid");let u=c.rectangle(e,r,l,h,n),d=s.insert(()=>u,":first-child");return o&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",o),a&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",a),MR(t,d),c=i?.padding??0,t.width&&t.height&&(t.width+=c/2||0,t.height+=c/2||0),t.intersect=function(e){return J.rect(t,e)},s}var cD=i(()=>{mN(),lI(),hI(),BR(),mt(hD,"forkJoin")});async function uD(e,t){var{labelStyles:r,nodeStyles:i}=ee(t),r=(t.labelStyle=r,"neo"===t.look?16:t.padding??0),n="neo"===t.look?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-2*n,t.height<10&&(t.height=10),t.width=(t?.width??0)-2*r,t.width<15)&&(t.width=15);let{shapeSvg:a,bbox:s}=await NR(e,t,OR(t)),o=(t?.width||Math.max(15,s.width))+2*r,l=(t?.height||Math.max(10,s.height))+2*n,h=l/2,c=t.cssStyles,u=fN.svg(a),d=nI(t,{}),p=("handDrawn"!==t.look&&(d.roughness=0,d.fillStyle="solid"),[{x:-o/2,y:-l/2},{x:o/2-h,y:-l/2},...RR(-o/2+h,0,h,50,90,270),{x:o/2-h,y:l/2},{x:-o/2,y:l/2}]),g=AR(p),f=u.path(g,d),m=a.insert(()=>f,":first-child");return m.attr("class","basic label-container outer-path"),c&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",c),i&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",i),MR(t,m),t.intersect=function(e){return B.info("Pill intersect",t,{radius:h,point:e}),J.polygon(t,p,e)},a}var dD=i(()=>{e(),BR(),lI(),hI(),mN(),mt(uD,"halfRoundedRectangle")});async function pD(e,n){var t,{labelStyles:r,nodeStyles:i}=ee(n),a="neo"===n.look?3.5:4,r=(n.labelStyle=r,n.padding??0),s="neo"===n.look?70:r,r="neo"===n.look?32:r;(n.width||n.height)&&(t=(n.height??0)/a,n.width=(n?.width??0)-2*t-r,n.height=(n.height??0)-s);let{shapeSvg:o,bbox:l}=await NR(e,n,OR(n)),h=(n?.height||l.height)+s,c=h/a,u=(n?.width||l.width)+2*c+r,d=[{x:c,y:0},{x:u-c,y:0},{x:u,y:-h/2},{x:u-c,y:-h},{x:c,y:-h},{x:0,y:-h/2}],p,g=n.cssStyles;if("handDrawn"===n.look){let e=fN.svg(o),t=nI(n,{}),r=gD(0,0,u,h,c),i=e.path(r,t);p=o.insert(()=>i,":first-child").attr("transform",`translate(${-u/2}, ${h/2})`),g&&p.attr("style",g)}else p=wN(o,u,h,d);return i&&p.attr("style",i),n.width=u,n.height=h,MR(n,p),n.intersect=function(e){return J.polygon(n,d,e)},o}var gD,fD=i(()=>{BR(),lI(),hI(),mN(),CN(),gD=mt((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"),mt(pD,"hexagon")});async function mD(e,t){var{labelStyles:r,nodeStyles:i}=ee(t),r=(t.label="",t.labelStyle=r,(await NR(e,t,OR(t))).shapeSvg),e=Math.max(30,t?.width??0),n=Math.max(30,t?.height??0),a=t.cssStyles,s=fN.svg(r),o=nI(t,{});"handDrawn"!==t.look&&(o.roughness=0,o.fillStyle="solid");let l=[{x:0,y:0},{x:e,y:0},{x:0,y:n},{x:e,y:n}],h=AR(l),c=s.path(h,o),u=r.insert(()=>c,":first-child");return u.attr("class","basic label-container outer-path"),a&&"handDrawn"!==t.look&&u.selectChildren("path").attr("style",a),i&&"handDrawn"!==t.look&&u.selectChildren("path").attr("style",i),u.attr("transform",`translate(${-e/2}, ${-n/2})`),MR(t,u),t.intersect=function(e){return B.info("Pill intersect",t,{points:l}),J.polygon(t,l,e)},r}var yD=i(()=>{e(),BR(),lI(),hI(),mN(),mt(mD,"hourglass")});async function vD(e,n,{config:{themeVariables:t,flowchart:r}}){var i,a=ee(n).labelStyles,a=(n.labelStyle=a,n.assetHeight??48),a=Math.max(a,n.assetWidth??48),r=r?.wrappingWidth;n.width=Math.max(a,r??0);let{shapeSvg:s,bbox:o,label:l}=await NR(e,n,"icon-shape default"),h="t"===n.pos,c=a,u=a,d=t.nodeBorder,p=tI(n).stylesMap,g=-u/2,f=-c/2,m=n.label?8:0,y=fN.svg(s),v=nI(n,{stroke:"none",fill:"none"}),x=("handDrawn"!==n.look&&(v.roughness=0,v.fillStyle="solid"),y.rectangle(g,f,u,c,v)),b=Math.max(u,o.width),T=c+o.height+m,k=y.rectangle(-b/2,-T/2,b,T,{...v,fill:"transparent",stroke:"none"}),w=s.insert(()=>x,":first-child"),C=s.insert(()=>k);return n.icon&&((r=s.append("g")).html(`<g>${await rc(n.icon,{height:a,width:a,fallbackPrefix:""})}</g>`),t=(e=r.node().getBBox()).width,a=e.height,i=e.y,r.attr("transform",`translate(${-t/2-e.x},${h?o.height/2+m/2-a/2-i:-o.height/2-m/2-a/2-i})`),r.attr("style",`color: ${p.get("stroke")??d};`)),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))},${h?-T/2:T/2-o.height})`),w.attr("transform",`translate(0,${h?o.height/2+m/2:-o.height/2-m/2})`),MR(n,C),n.intersect=function(e){var t,r,i;return B.info("iconSquare intersect",n,e),n.label?(i=n.x??0,t=n.y??0,r=n.height??0,i=h?[{x:i-o.width/2,y:t-r/2},{x:i+o.width/2,y:t-r/2},{x:i+o.width/2,y:t-r/2+o.height+m},{x:i+u/2,y:t-r/2+o.height+m},{x:i+u/2,y:t+r/2},{x:i-u/2,y:t+r/2},{x:i-u/2,y:t-r/2+o.height+m},{x:i-o.width/2,y:t-r/2+o.height+m}]:[{x:i-u/2,y:t-r/2},{x:i+u/2,y:t-r/2},{x:i+u/2,y:t-r/2+c},{x:i+o.width/2,y:t-r/2+c},{x:i+o.width/2/2,y:t+r/2},{x:i-o.width/2,y:t+r/2},{x:i-o.width/2,y:t-r/2+c},{x:i-u/2,y:t-r/2+c}],J.polygon(n,i,e)):J.rect(n,e)},s}var xD=i(()=>{mN(),e(),nc(),lI(),hI(),BR(),mt(vD,"icon")});async function bD(e,t,{config:{themeVariables:r,flowchart:i}}){var n=ee(t).labelStyles,n=(t.labelStyle=n,t.assetHeight??48),n=Math.max(n,t.assetWidth??48),i=i?.wrappingWidth,{shapeSvg:i,bbox:e,label:a}=(t.width=Math.max(n,i??0),await NR(e,t,"icon-shape default")),s=t.label?8:0,o="t"===t.pos,{nodeBorder:r,mainBkg:l}=r,h=tI(t).stylesMap,c=fN.svg(i),u=nI(t,{}),d=("handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid"),h.get("fill")),d=(u.stroke=d??l,i.append("g"));t.icon&&d.html(`<g>${await rc(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let p=d.node().getBBox(),g=p.width,f=p.height,m=p.x,y=p.y,v=Math.max(g,f)*Math.SQRT2+40,x=c.circle(0,0,v,u),b=Math.max(v,e.width),T=v+e.height+s,k=c.rectangle(-b/2,-T/2,b,T,{...u,fill:"transparent",stroke:"none"}),w=i.insert(()=>x,":first-child"),C=i.insert(()=>k);return d.attr("transform",`translate(${-g/2-m},${o?e.height/2+s/2-f/2-y:-e.height/2-s/2-f/2-y})`),d.attr("style",`color: ${h.get("stroke")??r};`),a.attr("transform",`translate(${-e.width/2-(e.x-(e.left??0))},${o?-T/2:T/2-e.height})`),w.attr("transform",`translate(0,${o?e.height/2+s/2:-e.height/2-s/2})`),MR(t,C),t.intersect=function(e){return B.info("iconSquare intersect",t,e),J.rect(t,e)},i}var TD,kD=i(()=>{mN(),e(),nc(),lI(),hI(),BR(),mt(bD,"iconCircle")}),wD=i(()=>{TD=mt((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")});async function CD(e,n,{config:{themeVariables:t,flowchart:r}}){var i=ee(n).labelStyles,i=(n.labelStyle=i,n.assetHeight??48),i=Math.max(i,n.assetWidth??48),r=r?.wrappingWidth;n.width=Math.max(i,r??0);let{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await NR(e,n,"icon-shape default"),h="t"===n.pos,c=i+2*o,u=i+2*o,{nodeBorder:d,mainBkg:p}=t,g=tI(n).stylesMap,f=-u/2,m=-c/2,y=n.label?8:0,v=fN.svg(a),x=nI(n,{});"handDrawn"!==n.look&&(x.roughness=0,x.fillStyle="solid");var b,r=g.get("fill");x.stroke=r??p;let T=v.path(TD(f,m,u,c,5),x),k=Math.max(u,s.width),w=c+s.height+y,C=v.rectangle(-k/2,-w/2,k,w,{...x,fill:"transparent",stroke:"none"}),E=a.insert(()=>T,":first-child").attr("class","icon-shape2"),S=a.insert(()=>C);return n.icon&&((e=a.append("g")).html(`<g>${await rc(n.icon,{height:i,width:i,fallbackPrefix:""})}</g>`),r=(t=e.node().getBBox()).width,i=t.height,b=t.y,e.attr("transform",`translate(${-r/2-t.x},${h?s.height/2+y/2-i/2-b:-s.height/2-y/2-i/2-b})`),e.attr("style",`color: ${g.get("stroke")??d};`)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${h?-w/2:w/2-s.height})`),E.attr("transform",`translate(0,${h?s.height/2+y/2:-s.height/2-y/2})`),MR(n,S),n.intersect=function(e){var t,r,i;return B.info("iconSquare intersect",n,e),n.label?(i=n.x??0,t=n.y??0,r=n.height??0,i=h?[{x:i-s.width/2,y:t-r/2},{x:i+s.width/2,y:t-r/2},{x:i+s.width/2,y:t-r/2+s.height+y},{x:i+u/2,y:t-r/2+s.height+y},{x:i+u/2,y:t+r/2},{x:i-u/2,y:t+r/2},{x:i-u/2,y:t-r/2+s.height+y},{x:i-s.width/2,y:t-r/2+s.height+y}]:[{x:i-u/2,y:t-r/2},{x:i+u/2,y:t-r/2},{x:i+u/2,y:t-r/2+c},{x:i+s.width/2,y:t-r/2+c},{x:i+s.width/2/2,y:t+r/2},{x:i-s.width/2,y:t+r/2},{x:i-s.width/2,y:t-r/2+c},{x:i-u/2,y:t-r/2+c}],J.polygon(n,i,e)):J.rect(n,e)},a}var ED=i(()=>{mN(),e(),nc(),lI(),hI(),wD(),BR(),mt(CD,"iconRounded")});async function SD(e,n,{config:{themeVariables:t,flowchart:r}}){var i=ee(n).labelStyles,i=(n.labelStyle=i,n.assetHeight??48),i=Math.max(i,n.assetWidth??48),r=r?.wrappingWidth;n.width=Math.max(i,r??0);let{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await NR(e,n,"icon-shape default"),h="t"===n.pos,c=i+2*o,u=i+2*o,{nodeBorder:d,mainBkg:p}=t,g=tI(n).stylesMap,f=-u/2,m=-c/2,y=n.label?8:0,v=fN.svg(a),x=nI(n,{});"handDrawn"!==n.look&&(x.roughness=0,x.fillStyle="solid");var b,r=g.get("fill");x.stroke=r??p;let T=v.path(TD(f,m,u,c,.1),x),k=Math.max(u,s.width),w=c+s.height+y,C=v.rectangle(-k/2,-w/2,k,w,{...x,fill:"transparent",stroke:"none"}),E=a.insert(()=>T,":first-child"),S=a.insert(()=>C);return n.icon&&((e=a.append("g")).html(`<g>${await rc(n.icon,{height:i,width:i,fallbackPrefix:""})}</g>`),r=(t=e.node().getBBox()).width,i=t.height,b=t.y,e.attr("transform",`translate(${-r/2-t.x},${h?s.height/2+y/2-i/2-b:-s.height/2-y/2-i/2-b})`),e.attr("style",`color: ${g.get("stroke")??d};`)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${h?-w/2:w/2-s.height})`),E.attr("transform",`translate(0,${h?s.height/2+y/2:-s.height/2-y/2})`),MR(n,S),n.intersect=function(e){var t,r,i;return B.info("iconSquare intersect",n,e),n.label?(i=n.x??0,t=n.y??0,r=n.height??0,i=h?[{x:i-s.width/2,y:t-r/2},{x:i+s.width/2,y:t-r/2},{x:i+s.width/2,y:t-r/2+s.height+y},{x:i+u/2,y:t-r/2+s.height+y},{x:i+u/2,y:t+r/2},{x:i-u/2,y:t+r/2},{x:i-u/2,y:t-r/2+s.height+y},{x:i-s.width/2,y:t-r/2+s.height+y}]:[{x:i-u/2,y:t-r/2},{x:i+u/2,y:t-r/2},{x:i+u/2,y:t-r/2+c},{x:i+s.width/2,y:t-r/2+c},{x:i+s.width/2/2,y:t+r/2},{x:i-s.width/2,y:t+r/2},{x:i-s.width/2,y:t-r/2+c},{x:i-u/2,y:t-r/2+c}],J.polygon(n,i,e)):J.rect(n,e)},a}var _D=i(()=>{mN(),e(),nc(),lI(),wD(),hI(),BR(),mt(SD,"iconSquare")});async function AD(e,n,{config:{flowchart:t}}){(i=new Image).src=n?.img??"",await i.decode();var r=Number(i.naturalWidth.toString().replace("px","")),i=Number(i.naturalHeight.toString().replace("px","")),a=(n.imageAspectRatio=r/i,ee(n).labelStyles),a=(n.labelStyle=a,t?.wrappingWidth);n.defaultWidth=t?.wrappingWidth;let s=Math.max(n.label?a??0:0,n?.assetWidth??r),o="on"===n.constraint&&n?.assetHeight?n.assetHeight*n.imageAspectRatio:s,l="on"===n.constraint?o/n.imageAspectRatio:n?.assetHeight??i,{shapeSvg:h,bbox:c,label:u}=(n.width=Math.max(o,a??0),await NR(e,n,"image-shape default")),d="t"===n.pos,p=-o/2,g=-l/2,f=n.label?8:0,m=fN.svg(h),y=nI(n,{}),v=("handDrawn"!==n.look&&(y.roughness=0,y.fillStyle="solid"),m.rectangle(p,g,o,l,y)),x=Math.max(o,c.width),b=l+c.height+f,T=m.rectangle(-x/2,-b/2,x,b,{...y,fill:"none",stroke:"none"}),k=h.insert(()=>v,":first-child"),w=h.insert(()=>T);return n.img&&((t=h.append("image")).attr("href",n.img),t.attr("width",o),t.attr("height",l),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-o/2},${d?b/2-l:-b/2})`)),u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-l/2-c.height/2-f/2:l/2-c.height/2+f/2})`),k.attr("transform",`translate(0,${d?c.height/2+f/2:-c.height/2-f/2})`),MR(n,w),n.intersect=function(e){var t,r,i;return B.info("iconSquare intersect",n,e),n.label?(i=n.x??0,t=n.y??0,r=n.height??0,i=d?[{x:i-c.width/2,y:t-r/2},{x:i+c.width/2,y:t-r/2},{x:i+c.width/2,y:t-r/2+c.height+f},{x:i+o/2,y:t-r/2+c.height+f},{x:i+o/2,y:t+r/2},{x:i-o/2,y:t+r/2},{x:i-o/2,y:t-r/2+c.height+f},{x:i-c.width/2,y:t-r/2+c.height+f}]:[{x:i-o/2,y:t-r/2},{x:i+o/2,y:t-r/2},{x:i+o/2,y:t-r/2+l},{x:i+c.width/2,y:t-r/2+l},{x:i+c.width/2/2,y:t+r/2},{x:i-c.width/2,y:t+r/2},{x:i-c.width/2,y:t-r/2+l},{x:i-o/2,y:t-r/2+l}],J.polygon(n,i,e)):J.rect(n,e)},h}var LD=i(()=>{mN(),e(),lI(),hI(),BR(),mt(AD,"imageSquare")});async function RD(e,n){var{labelStyles:t,nodeStyles:r}=ee(n);n.labelStyle=t;let i=n.padding??0,a=i,s="neo"===n.look?2*i:i,{shapeSvg:o,bbox:l}=await NR(e,n,OR(n)),h=Math.max(l.width+2*(s??0),n?.width??0),c=Math.max(l.height+2*(a??0),n?.height??0),u=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}],d,p=n.cssStyles;if("handDrawn"===n.look){let e=fN.svg(o),t=nI(n,{}),r=AR(u),i=e.path(r,t);d=o.insert(()=>i,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),p&&d.attr("style",p)}else d=wN(o,h,c,u);return r&&d.attr("style",r),n.width=h,n.height=c,MR(n,d),n.intersect=function(e){return J.polygon(n,u,e)},o}var ID=i(()=>{BR(),lI(),hI(),mN(),CN(),mt(RD,"inv_trapezoid")});async function ND(e,i,t){var{labelStyles:r,nodeStyles:n}=ee(i);i.labelStyle=r;let{shapeSvg:a,bbox:s}=await NR(e,i,OR(i)),o=Math.max(s.width+2*t.labelPaddingX,i?.width||0),l=Math.max(s.height+2*t.labelPaddingY,i?.height||0),h=-o/2,c=-l/2,u,{rx:d,ry:p}=i,g=i.cssStyles;if(t?.rx&&t.ry&&(d=t.rx,p=t.ry),"handDrawn"===i.look){let e=fN.svg(a),t=nI(i,{}),r=d||p?e.path(TD(h,c,o,l,d||0),t):e.rectangle(h,c,o,l,t);(u=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",X_(g))}else(u=a.insert("rect",":first-child")).attr("class","basic label-container").attr("style",n).attr("rx",X_(d)).attr("ry",X_(p)).attr("x",h).attr("y",c).attr("width",o).attr("height",l);return MR(i,u),i.calcIntersect=function(e,t){return J.rect(e,t)},i.intersect=function(e){return J.rect(i,e)},a}var DD=i(()=>{BR(),lI(),wD(),hI(),mN(),S7(),mt(ND,"drawRect")});async function MD(e,t){var{shapeSvg:e,bbox:r,label:i}=await NR(e,t,"label"),n=e.insert("rect",":first-child");return n.attr("width",.1).attr("height",.1),e.attr("class","label edgeLabel"),i.attr("transform",`translate(${-r.width/2-(r.x-(r.left??0))}, ${-r.height/2-(r.y-(r.top??0))})`),MR(t,n),t.intersect=function(e){return J.rect(t,e)},e}var OD=i(()=>{DD(),BR(),lI(),mt(MD,"labelRect")});async function BD(e,n){var{labelStyles:t,nodeStyles:r}=ee(n);n.labelStyle=t;let i=n.padding??0,a=i,s="neo"===n.look?2*i:i,{shapeSvg:o,bbox:l}=await NR(e,n,OR(n)),h=(n?.height??l.height)+a,c=(n?.width??l.width)+s,u=[{x:0,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:-3*h/6,y:-h}],d,p=n.cssStyles;if("handDrawn"===n.look){let e=fN.svg(o),t=nI(n,{}),r=AR(u),i=e.path(r,t);d=o.insert(()=>i,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),p&&d.attr("style",p)}else d=wN(o,c,h,u);return r&&d.attr("style",r),n.width=c,n.height=h,MR(n,d),n.intersect=function(e){return J.polygon(n,u,e)},o}var PD=i(()=>{BR(),lI(),hI(),mN(),CN(),mt(BD,"lean_left")});async function $D(e,n){var{labelStyles:t,nodeStyles:r}=ee(n);n.labelStyle=t;let i=n.padding??0,a=i,s="neo"===n.look?2*i:i,{shapeSvg:o,bbox:l}=await NR(e,n,OR(n)),h=(n?.height??l.height)+a,c=(n?.width??l.width)+s,u=[{x:-3*h/6,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:0,y:-h}],d,p=n.cssStyles;if("handDrawn"===n.look){let e=fN.svg(o),t=nI(n,{}),r=AR(u),i=e.path(r,t);d=o.insert(()=>i,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),p&&d.attr("style",p)}else d=wN(o,c,h,u);return r&&d.attr("style",r),n.width=c,n.height=h,MR(n,d),n.intersect=function(e){return J.polygon(n,u,e)},o}var FD=i(()=>{BR(),lI(),hI(),mN(),CN(),mt($D,"lean_right")});function zD(e,t){var{labelStyles:r,nodeStyles:i}=ee(t);t.label="",t.labelStyle=r;let n=e.insert("g").attr("class",OR(t)).attr("id",t.domId??t.id),a=t.cssStyles,s=Math.max(35,t?.width??0),o=Math.max(35,t?.height??0),l=[{x:s,y:0},{x:0,y:o+3.5},{x:s-14,y:o+3.5},{x:0,y:2*o},{x:s,y:o-3.5},{x:14,y:o-3.5}],h=fN.svg(n),c=nI(t,{}),u=("handDrawn"!==t.look&&(c.roughness=0,c.fillStyle="solid"),AR(l)),d=h.path(u,c),p=n.insert(()=>d,":first-child");return p.attr("class","outer-path"),a&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",a),i&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",i),p.attr("transform",`translate(-${s/2},${-o})`),MR(t,p),t.intersect=function(e){return B.info("lightningBolt intersect",t,e),J.polygon(t,l,e)},n}var qD=i(()=>{e(),BR(),hI(),mN(),lI(),BR(),mt(zD,"lightningBolt")});async function WD(e,s){var{labelStyles:t,nodeStyles:r}=ee(s),t=(s.labelStyle=t,s.padding??0),i="neo"===s.look?16:t,t="neo"===s.look?24:t;(s.width||s.height)&&(f=s.width??0,s.width=(s.width??0)-i,s.width<YD&&(s.width=YD),s.height=(s.height??0)-t-f/2/(2.5+f/50)*3,s.height<VD)&&(s.height=VD);let{shapeSvg:o,bbox:n,label:a}=await NR(e,s,OR(s)),l=(s?.width||n.width)+2*i,h=l/2,c=h/(2.5+l/50),u=(s?.height||n.height)+c+2*t,d=.1*u,p,g=s.cssStyles;if("handDrawn"===s.look){let e=fN.svg(o),t=GD(0,0,l,u,h,c,d),r=jD(0,c,l,u,h,c),i=nI(s,{}),n=e.path(t,i),a=e.path(r,i);o.insert(()=>a,":first-child").attr("class","line"),(p=o.insert(()=>n,":first-child")).attr("class","basic label-container"),g&&p.attr("style",g)}else{var f=UD(0,0,l,u,h,c,d);p=o.insert("path",":first-child").attr("d",f).attr("class","basic label-container outer-path").attr("style",X_(g)).attr("style",r)}return p.attr("label-offset-y",c),p.attr("transform",`translate(${-l/2}, ${-(u/2+c)})`),MR(s,p),a.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+c-(n.y-(n.top??0))})`),s.intersect=function(t){var r=J.rect(s,t),i=r.x-(s.x??0);if(0!=h&&(Math.abs(i)<(s.width??0)/2||Math.abs(i)==(s.width??0)/2&&Math.abs(r.y-(s.y??0))>(s.height??0)/2-c)){let e=c*c*(1-i*i/(h*h));0<e&&(e=Math.sqrt(e)),e=c-e,0<t.y-(s.y??0)&&(e=-e),r.y+=e}return r},o}var UD,GD,jD,VD,YD,HD=i(()=>{BR(),lI(),hI(),mN(),S7(),UD=mt((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"),GD=mt((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"),jD=mt((e,t,r,i,n,a)=>[`M${e-r/2},`+-i/2,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),YD=VD=10,mt(WD,"linedCylinder")});async function XD(e,t){var{labelStyles:r,nodeStyles:i}=ee(t),r=(t.labelStyle=r,t.padding??0),n="neo"===t.look?16:r,r="neo"===t.look?12:r,{shapeSvg:a,bbox:e,label:s}=((t.width||t.height)&&(a=t.width,t.width=10*(a??0)/11-2*n,t.width<10&&(t.width=10),t.height=(t?.height??0)-2*r,t.height<10)&&(t.height=10),await NR(e,t,OR(t))),n=(t?.width||e.width)+2*(n??0),r=(t?.height||e.height)+2*(r??0),o="neo"===t.look?r/4:r/8,l=r+o,h=t.cssStyles,c=fN.svg(a),u=nI(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:-n/2-n/2*.1,y:-l/2},{x:-n/2-n/2*.1,y:l/2},...LR(-n/2-n/2*.1,l/2,n/2+n/2*.1,l/2,o,.8),{x:n/2+n/2*.1,y:-l/2},{x:-n/2-n/2*.1,y:-l/2},{x:-n/2,y:-l/2},{x:-n/2,y:l/2*1.1},{x:-n/2,y:-l/2}],p=c.polygon(d.map(e=>[e.x,e.y]),u),g=a.insert(()=>p,":first-child");return g.attr("class","basic label-container outer-path"),h&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",h),i&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(0,${-o/2})`),s.attr("transform",`translate(${-n/2+(t.padding??0)+n/2*.1/2-(e.x-(e.left??0))},${-r/2+(t.padding??0)-o/2-(e.y-(e.top??0))})`),MR(t,g),t.intersect=function(e){return J.polygon(t,d,e)},a}var KD=i(()=>{BR(),lI(),mN(),hI(),mt(XD,"linedWaveEdgedRect")});async function ZD(e,t){var{labelStyles:r,nodeStyles:i}=ee(t),r=(t.labelStyle=r,t.padding??0),n="neo"===t.look?16:r,r="neo"===t.look?12:r,a="neo"===t.look?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-2*n-2*a,10),t.height=Math.max((t?.height??0)-2*r-2*a,10));let{shapeSvg:s,bbox:o,label:l}=await NR(e,t,OR(t)),h=(t?.width||o.width)+2*n+2*a,c=(t?.height||o.height)+2*r+2*a,u=h-2*a,d=c-2*a,p=-u/2,g=-d/2,f=t.cssStyles,m=fN.svg(s),y=nI(t,{}),v=[{x:p-a,y:g+a},{x:p-a,y:g+d+a},{x:p+u-a,y:g+d+a},{x:p+u-a,y:g+d},{x:p+u,y:g+d},{x:p+u,y:g+d-a},{x:p+u+a,y:g+d-a},{x:p+u+a,y:g-a},{x:p+a,y:g-a},{x:p+a,y:g},{x:p,y:g},{x:p,y:g+a}],x=[{x:p,y:g+a},{x:p+u-a,y:g+a},{x:p+u-a,y:g+d},{x:p+u,y:g+d},{x:p+u,y:g},{x:p,y:g}],b=("handDrawn"!==t.look&&(y.roughness=0,y.fillStyle="solid"),AR(v)),T=m.path(b,y),k=AR(x),w=m.path(k,y);return"handDrawn"!==t.look&&(T=IR(T),w=IR(w)),(e=s.insert("g",":first-child")).insert(()=>T),e.insert(()=>w),e.attr("class","basic label-container outer-path"),f&&"handDrawn"!==t.look&&e.selectAll("path").attr("style",f),i&&"handDrawn"!==t.look&&e.selectAll("path").attr("style",i),l.attr("transform",`translate(${-o.width/2-a-(o.x-(o.left??0))}, ${-o.height/2+a-(o.y-(o.top??0))})`),MR(t,e),t.intersect=function(e){return J.polygon(t,v,e)},s}var QD=i(()=>{BR(),hI(),mN(),lI(),mt(ZD,"multiRect")});async function JD(e,t){var{labelStyles:r,nodeStyles:i}=ee(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await NR(e,t,OR(t)),o=t.padding??0,l="neo"===t.look?16:o,h="neo"===t.look?12:o,c=!0,u=((t.width||t.height)&&(c=!1,t.width=(t?.width??0)-2*l,t.height=(t?.height??0)-3*h),Math.max(a.width,t?.width??0)+2*l),d=Math.max(a.height,t?.height??0)+3*h,p="neo"===t.look?d/4:d/8,g=d+(c?p/2:-p/2),f=-u/2,m=-g/2,y=t.cssStyles,v=LR(f-10,m+g+10,f+u-10,m+g+10,p,.8),x=v?.[v.length-1],b=[{x:f-10,y:10+m},{x:f-10,y:m+g+10},...v,{x:f+u-10,y:x.y-10},{x:f+u,y:x.y-10},{x:f+u,y:x.y-20},{x:f+u+10,y:x.y-20},{x:f+u+10,y:m-10},{x:10+f,y:m-10},{x:10+f,y:m},{x:f,y:m},{x:f,y:10+m}],T=[{x:f,y:10+m},{x:f+u-10,y:10+m},{x:f+u-10,y:x.y-10},{x:f+u,y:x.y-10},{x:f+u,y:m},{x:f,y:m}],k=fN.svg(n),w=nI(t,{}),C=("handDrawn"!==t.look&&(w.roughness=0,w.fillStyle="solid"),AR(b)),E=k.path(C,w),S=AR(T),_=k.path(S,w),A=n.insert(()=>E,":first-child");return A.insert(()=>_),A.attr("class","basic label-container outer-path"),y&&"handDrawn"!==t.look&&A.selectAll("path").attr("style",y),i&&"handDrawn"!==t.look&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(0,${-p/2})`),s.attr("transform",`translate(${-a.width/2-10-(a.x-(a.left??0))}, ${-a.height/2+10-p/2-(a.y-(a.top??0))})`),MR(t,A),t.intersect=function(e){return J.polygon(t,b,e)},n}var eM=i(()=>{BR(),lI(),mN(),hI(),mt(JD,"multiWaveEdgedRectangle")});async function tM(e,t,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:n}=ee(t),{shapeSvg:i,bbox:e,label:a}=(t.labelStyle=i,t.useHtmlLabels||Lr(br())||(t.centerLabel=!0),await NR(e,t,OR(t))),s=Math.max(e.width+2*(t.padding??0),t?.width??0),o=Math.max(e.height+2*(t.padding??0),t?.height??0),l=-s/2,h=-o/2,c=t.cssStyles,u=fN.svg(i),r=nI(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==t.look&&(r.roughness=0,r.fillStyle="solid");let d=u.rectangle(l,h,s,o,r),p=i.insert(()=>d,":first-child");return p.attr("class","basic label-container outer-path"),a.attr("class","label noteLabel"),c&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",c),n&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",n),a.attr("transform",`translate(${-e.width/2-(e.x-(e.left??0))}, ${-e.height/2-(e.y-(e.top??0))})`),MR(t,p),t.intersect=function(e){return J.rect(t,e)},i}var rM=i(()=>{mN(),lI(),hI(),BR(),Ei(),Ei(),mt(tM,"note")});async function iM(e,n){var{labelStyles:t,nodeStyles:r}=ee(n);n.labelStyle=t;let{shapeSvg:a,bbox:i}=await NR(e,n,OR(n)),s=i.width+(n.padding??0),o=i.height+(n.padding??0),l=s+o,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}],c,u=n.cssStyles;if("handDrawn"===n.look){let e=fN.svg(a),t=nI(n,{}),r=nM(0,0,l),i=e.path(r,t);c=a.insert(()=>i,":first-child").attr("transform",`translate(${-l/2+.5}, ${l/2})`),u&&c.attr("style",u)}else(c=wN(a,l,l,h)).attr("transform",`translate(${-l/2+.5}, ${l/2})`);return r&&c.attr("style",r),MR(n,c),n.calcIntersect=function(e,t){var r=e.width;return{x:(e=J.polygon(e,[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],t)).x-.5,y:e.y-.5}},n.intersect=function(e){return this.calcIntersect(n,e)},a}var nM,aM=i(()=>{BR(),lI(),hI(),mN(),CN(),nM=mt((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"),mt(iM,"question")});async function sM(e,t){var{labelStyles:r,nodeStyles:i}=ee(t);t.labelStyle=r;let n=t.padding??0,a="neo"===t.look?21:n??0,s="neo"===t.look?12:n??0,{shapeSvg:o,bbox:l,label:h}=await NR(e,t,OR(t)),c=(t?.width??l.width)+("neo"===t.look?2*a:a),u=(t?.height??l.height)+("neo"===t.look?2*s:s),d=-c/2,p=-u/2,g=p/2,f=[{x:d+g,y:p},{x:d,y:0},{x:d+g,y:-p},{x:-d,y:-p},{x:-d,y:p}],m=t.cssStyles,y=fN.svg(o),v=nI(t,{}),x=("handDrawn"!==t.look&&(v.roughness=0,v.fillStyle="solid"),AR(f)),b=y.path(x,v),T=o.insert(()=>b,":first-child");return T.attr("class","basic label-container outer-path"),m&&"handDrawn"!==t.look&&T.selectAll("path").attr("style",m),i&&"handDrawn"!==t.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(${-g/2},0)`),h.attr("transform",`translate(${-g/2-l.width/2-(l.x-(l.left??0))}, ${-l.height/2-(l.y-(l.top??0))})`),MR(t,T),t.intersect=function(e){return J.polygon(t,f,e)},o}var oM,lM,hM=i(()=>{BR(),lI(),hI(),mN(),mt(sM,"rect_left_inv_arrow")}),cM=i(()=>{Ei(),ju(),ER(),oM=mt(async(e,t,r,i=!1,n=!1)=>{let a=t||"";"object"==typeof a&&(a=a[0]);var t=P(),s=Lr(t);return CR(e,a,{style:r,isTitle:i,useHtmlLabels:s,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},t)},"createLabel"),lM=oM});async function uM(n,a){var{labelStyles:e,nodeStyles:t}=ee(a);a.labelStyle=e;let r,s=(r=a.cssClasses?"node "+a.cssClasses:"node default",n.insert("g").attr("class",r).attr("id",a.domId||a.id)),i=s.insert("g"),o=s.insert("g").attr("class","label").attr("style",t),l=a.description,h=a.label,c=await lM(o,h,a.labelStyle,!0,!0),u={width:0,height:0};Lr(P())&&(e=c.children[0],n=Q(c),u=e.getBoundingClientRect(),n.attr("width",u.width),n.attr("height",u.height)),B.info("Text 2",l);var e=l||[],n=c.getBBox(),d=(e=await lM(o,Array.isArray(e)?e.join("<br/>"):e,a.labelStyle,!0,!0)).children[0],p=Q(e),d=(u=d.getBoundingClientRect(),p.attr("width",u.width),p.attr("height",u.height),(a.padding||0)/2);Q(e).attr("transform","translate( "+(u.width>n.width?0:(n.width-u.width)/2)+", "+(n.height+d+5)+")"),Q(c).attr("transform","translate( "+(u.width<n.width?0:-(n.width-u.width)/2)+", 0)"),u=o.node().getBBox(),o.attr("transform","translate("+-u.width/2+", "+(-u.height/2-d+3)+")");let g=u.width+(a.padding||0),f=u.height+(a.padding||0),m=-u.width/2-d,y=-u.height/2-d,v,x;if("handDrawn"===a.look){let e=fN.svg(s),t=nI(a,{}),r=e.path(TD(m,y,g,f,a.rx||0),t),i=e.line(-u.width/2-d,-u.height/2-d+n.height+d,u.width/2+d,-u.height/2-d+n.height+d,t);x=s.insert(()=>(B.debug("Rough node insert CXC",r),i),":first-child"),v=s.insert(()=>(B.debug("Rough node insert CXC",r),r),":first-child")}else v=i.insert("rect",":first-child"),x=i.insert("line"),v.attr("class","outer title-state").attr("style",t).attr("x",-u.width/2-d).attr("y",-u.height/2-d).attr("width",u.width+(a.padding||0)).attr("height",u.height+(a.padding||0)),x.attr("class","divider").attr("x1",-u.width/2-d).attr("x2",u.width/2+d).attr("y1",-u.height/2-d+n.height+d).attr("y2",-u.height/2-d+n.height+d);return MR(a,v),a.intersect=function(e){return J.rect(a,e)},s}var dM=i(()=>{Sk(),BR(),cM(),lI(),hI(),mN(),ju(),wD(),e(),Ei(),mt(uM,"rectWithTitle")});async function pM(e,t,{config:{themeVariables:r}}){return ND(e,t,{rx:r=r?.radius??5,ry:r,classes:"",labelPaddingX:+(t?.padding??0),labelPaddingY:+(t?.padding??0)})}var gM=i(()=>{DD(),mt(pM,"roundedRect")});async function fM(e,t){var{labelStyles:r,nodeStyles:i}=ee(t),r=(t.labelStyle=r,"neo"===t.look?16:t.padding??0),n="neo"===t.look?12:t.padding??0,{shapeSvg:e,bbox:a,label:s}=await NR(e,t,OR(t)),r=(t?.width??a.width)+2*r+("neo"===t.look?mM:2*mM),n=(t?.height??a.height)+2*n,o=r-mM,l=n,r=mM-r/2,n=-n/2,h=t.cssStyles,c=fN.svg(e),u=nI(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:r,y:n},{x:r+o,y:n},{x:r+o,y:n+l},{x:r-mM,y:n+l},{x:r-mM,y:n},{x:r,y:n},{x:r,y:n+l}],p=c.polygon(d.map(e=>[e.x,e.y]),u),g=e.insert(()=>p,":first-child");return g.attr("class","basic label-container outer-path").attr("style",X_(h)),i&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",i),h&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",i),s.attr("transform",`translate(${mM/2-a.width/2-(a.x-(a.left??0))}, ${-a.height/2-(a.y-(a.top??0))})`),MR(t,g),t.intersect=function(e){return J.rect(t,e)},e}var mM,yM=i(()=>{BR(),lI(),hI(),mN(),S7(),mM=8,mt(fM,"shadedProcess")});async function vM(e,t){var{labelStyles:r,nodeStyles:i}=ee(t),r=(t.labelStyle=r,t.padding??0),n="neo"===t.look?16:r,r="neo"===t.look?12:r,{shapeSvg:e,bbox:a,label:s}=((t.width||t.height)&&(t.width=Math.max((t?.width??0)-2*n,10),t.height=Math.max((t?.height??0)/1.5-2*r,10)),await NR(e,t,OR(t))),o=-(n=(t?.width||a.width)+2*n)/2,l=-(r=1.5*((t?.height||a.height)+2*r)/1.5)/2,h=t.cssStyles,c=fN.svg(e),u=nI(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:o,y:l},{x:o,y:l+r},{x:o+n,y:l+r},{x:o+n,y:l-r/2}],p=AR(d),g=c.path(p,u),f=e.insert(()=>g,":first-child");return f.attr("class","basic label-container outer-path"),h&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",h),i&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(0, ${r/4})`),s.attr("transform",`translate(${-n/2+(t.padding??0)-(a.x-(a.left??0))}, ${-r/4+(t.padding??0)-(a.y-(a.top??0))})`),MR(t,f),t.intersect=function(e){return J.polygon(t,d,e)},e}var xM=i(()=>{BR(),lI(),hI(),mN(),mt(vM,"slopedRect")});async function bM(e,t){var r=t.padding??0;return ND(e,t,{rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??("neo"===t.look?16:2*r),labelPaddingY:"neo"===t.look?12:r})}var TM=i(()=>{DD(),mt(bM,"squareRect")});async function kM(e,t){var{labelStyles:r,nodeStyles:i}=ee(t),r=(t.labelStyle=r,t.padding??0),n="neo"===t.look?20:r,r="neo"===t.look?12:r,{shapeSvg:e,bbox:a}=await NR(e,t,OR(t)),r=a.height+("neo"===t.look?2*r:r),a=a.width+r/4+("neo"===t.look?2*n:n),n=r/2,s=t.cssStyles,o=fN.svg(e),l=nI(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");let h=[{x:-a/2+n,y:-r/2},{x:a/2-n,y:-r/2},...RR(-a/2+n,0,n,50,90,270),{x:a/2-n,y:r/2},...RR(a/2-n,0,n,50,270,450)],c=AR(h),u=o.path(c,l),d=e.insert(()=>u,":first-child");return d.attr("class","basic label-container outer-path"),s&&"handDrawn"!==t.look&&d.selectChildren("path").attr("style",s),i&&"handDrawn"!==t.look&&d.selectChildren("path").attr("style",i),MR(t,d),t.intersect=function(e){return J.polygon(t,h,e)},e}var wM=i(()=>{BR(),lI(),hI(),mN(),mt(kM,"stadium")});async function CM(e,t){return ND(e,t,{rx:"neo"===t.look?3:5,ry:"neo"===t.look?3:5,classes:"flowchart-node"})}var EM=i(()=>{DD(),mt(CM,"state")});function SM(e,t,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:n}=ee(t),i=(t.labelStyle=i,t.cssStyles),{lineColor:r,stateBorder:a,nodeBorder:s,nodeShadow:o}=r,l=((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),e.insert("g").attr("class","node default").attr("id",t.domId??t.id)),h=fN.svg(l),c=nI(t,{});"handDrawn"!==t.look&&(c.roughness=0,c.fillStyle="solid");let u=h.circle(0,0,t.width,{...c,stroke:r,strokeWidth:2}),d=a??s,p=5*(t.width??0)/14,g=h.circle(0,0,p,{...c,fill:d,stroke:d,strokeWidth:2,fillStyle:"solid"}),f=l.insert(()=>u,":first-child");return f.insert(()=>g),"handDrawn"!==t.look&&f.attr("class","outer-path"),i&&f.selectAll("path").attr("style",i),n&&f.selectAll("path").attr("style",n),t.width<25&&o&&"handDrawn"!==t.look&&(r=e.node()?.ownerSVGElement?.id??"",f.attr("style",`filter:url(#${r?r+"-drop-shadow-small":"drop-shadow-small"})`)),MR(t,f),t.intersect=function(e){return J.circle(t,(t.width??0)/2,e)},l}var _M=i(()=>{mN(),lI(),hI(),BR(),mt(SM,"stateEnd")});function AM(e,t,{config:{themeVariables:r}}){var{lineColor:r,nodeShadow:i}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14)&&(t.height=14),t.width||(t.width=14),t.height||(t.height=14);let n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),a;if("handDrawn"===t.look){let e=fN.svg(n).circle(0,0,t.width,eI(r));(a=n.insert(()=>e)).attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else(a=n.insert("circle",":first-child")).attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);return t.width<25&&i&&"handDrawn"!==t.look&&(r=e.node()?.ownerSVGElement?.id??"",a.attr("style",`filter:url(#${r?r+"-drop-shadow-small":"drop-shadow-small"})`)),MR(t,a),t.intersect=function(e){return J.circle(t,(t.width??7)/2,e)},n}var LM=i(()=>{mN(),lI(),hI(),BR(),mt(AM,"stateStart")});async function RM(a,s){var{labelStyles:o,nodeStyles:e}=ee(s);s.labelStyle=o;let t=s?.padding??8,r="neo"===s.look?28:t,i="neo"===s.look?12:t,{shapeSvg:l,bbox:n}=await NR(a,s,OR(s)),h=(s?.width??n.width)+2*IM+r,c=(s?.height??n.height)+i,u=h-2*IM,d=c,p=-h/2,g=-c/2,f=[{x:0,y:0},{x:u,y:0},{x:u,y:-d},{x:0,y:-d},{x:0,y:0},{x:-8,y:0},{x:8+u,y:0},{x:8+u,y:-d},{x:-8,y:-d},{x:-8,y:0}];if("handDrawn"===s.look){let e=fN.svg(l),t=nI(s,{}),r=e.rectangle(p,g,16+u,d,t),i=e.line(p+IM,g,p+IM,g+d,t),n=e.line(p+IM+u,g,p+IM+u,g+d,t);l.insert(()=>i,":first-child"),l.insert(()=>n,":first-child"),o=l.insert(()=>r,":first-child"),a=s.cssStyles,o.attr("class","basic label-container").attr("style",X_(a)),MR(s,o)}else a=wN(l,u,d,f),e&&a.attr("style",e),MR(s,a);return s.intersect=function(e){return J.polygon(s,f,e)},l}var IM,NM=i(()=>{BR(),lI(),hI(),mN(),CN(),S7(),IM=8,mt(RM,"subroutine")});async function DM(e,t){var{labelStyles:r,nodeStyles:i}=ee(t),r=(t.labelStyle=r,t.padding??0),n="neo"===t.look?16:r,r="neo"===t.look?12:r;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-2*r,10),t.width=Math.max((t?.width??0)-2*n-MM*(t.height+2*r),10));let{shapeSvg:a,bbox:s}=await NR(e,t,OR(t)),o=(t?.height||s.height)+2*r,l=MM*o,h=MM*o,c=(t?.width||s.width)+2*n+l-l,u=o,d=-c/2,p=-u/2,g=t.cssStyles,f=fN.svg(a),m=nI(t,{}),y=[{x:d-l/2,y:p},{x:d+c+l/2,y:p},{x:d+c+l/2,y:p+u},{x:d-l/2,y:p+u}],v=[{x:d+c-l/2,y:p+u},{x:d+c+l/2,y:p+u},{x:d+c+l/2,y:p+u-h}],x=("handDrawn"!==t.look&&(m.roughness=0,m.fillStyle="solid"),AR(y)),b=f.path(x,m),T=AR(v),k=f.path(T,{...m,fillStyle:"solid"}),w=a.insert(()=>k,":first-child");return w.insert(()=>b,":first-child"),w.attr("class","basic label-container outer-path"),g&&"handDrawn"!==t.look&&w.selectAll("path").attr("style",g),i&&"handDrawn"!==t.look&&w.selectAll("path").attr("style",i),MR(t,w),t.intersect=function(e){return J.polygon(t,y,e)},a}var MM,OM=i(()=>{BR(),hI(),mN(),lI(),MM=.2,mt(DM,"taggedRect")});async function BM(e,t){var{labelStyles:r,nodeStyles:i}=ee(t),{shapeSvg:r,bbox:e,label:n}=(t.labelStyle=r,await NR(e,t,OR(t))),a=Math.max(e.width+2*(t.padding??0),t?.width??0),s=Math.max(e.height+2*(t.padding??0),t?.height??0),o=s/8,l=.2*a,h=.2*s,c=s+o,u=t.cssStyles,d=fN.svg(r),p=nI(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-a/2-a/2*.1,y:c/2},...LR(-a/2-a/2*.1,c/2,a/2+a/2*.1,c/2,o,.8),{x:a/2+a/2*.1,y:-c/2},{x:-a/2-a/2*.1,y:-c/2}],f=-a/2+a/2*.1,m=-c/2-.4*h,y=[{x:f+a-l,y:1.3*(m+s)},{x:f+a,y:m+s-h},{x:f+a,y:.9*(m+s)},...LR(f+a,1.25*(m+s),f+a-l,1.3*(m+s),.02*-s,.5)],v=AR(g),x=d.path(v,p),b=AR(y),T=d.path(b,{...p,fillStyle:"solid"}),k=r.insert(()=>T,":first-child");return k.insert(()=>x,":first-child"),k.attr("class","basic label-container outer-path"),u&&"handDrawn"!==t.look&&k.selectAll("path").attr("style",u),i&&"handDrawn"!==t.look&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-o/2})`),n.attr("transform",`translate(${-a/2+(t.padding??0)-(e.x-(e.left??0))},${-s/2+(t.padding??0)-o/2-(e.y-(e.top??0))})`),MR(t,k),t.intersect=function(e){return J.polygon(t,g,e)},r}var PM=i(()=>{BR(),lI(),mN(),hI(),mt(BM,"taggedWaveEdgedRectangle")});async function $M(e,t){var{labelStyles:r,nodeStyles:i}=ee(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await NR(e,t,OR(t))),n=Math.max(e.width+(t.padding??0),t?.width||0),a=-n/2,s=-(e=Math.max(e.height+(t.padding??0),t?.height||0))/2,o=r.insert("rect",":first-child");return o.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",a).attr("y",s).attr("width",n).attr("height",e),MR(t,o),t.intersect=function(e){return J.rect(t,e)},r}var FM=i(()=>{BR(),lI(),hI(),mt($M,"text")});async function zM(e,a){var{labelStyles:t,nodeStyles:r}=ee(a),t=(a.labelStyle=t,a.padding??0),t="neo"===a.look?12:t/2;(a.width||a.height)&&(p=a.height??0,a.height=(a.height??0)-t,a.height<GM&&(a.height=GM),a.width=(a.width??0)-t-p/2/(2.5+p/50)*3,a.width<jM)&&(a.width=jM);let{shapeSvg:s,bbox:i,label:n}=await NR(e,a,OR(a)),o=(a.height||i.height)+t,l=o/2,h=l/(2.5+o/50),c=(a.width||i.width)+h+t,u=a.cssStyles,d;if("handDrawn"===a.look){let e=fN.svg(s),t=WM(0,0,c,o,h,l),r=UM(0,0,c,o,h,l),i=e.path(t,nI(a,{})),n=e.path(r,nI(a,{fill:"none"}));d=s.insert(()=>n,":first-child"),(d=s.insert(()=>i,":first-child")).attr("class","basic label-container"),u&&d.attr("style",u)}else{var p=qM(0,0,c,o,h,l);(d=s.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",X_(u)).attr("style",r)).attr("class","basic label-container outer-path"),u&&d.selectAll("path").attr("style",u),r&&d.selectAll("path").attr("style",r)}return d.attr("label-offset-x",h),d.attr("transform",`translate(${-c/2}, ${o/2} )`),n.attr("transform",`translate(${-i.width/2-h-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),MR(a,d),a.intersect=function(t){var r=J.rect(a,t),i=r.y-(a.y??0);if(0!=l&&(Math.abs(i)<(a.height??0)/2||Math.abs(i)==(a.height??0)/2&&Math.abs(r.x-(a.x??0))>(a.width??0)/2-h)){let e=h*h*(1-i*i/(l*l));0!=e&&(e=Math.sqrt(Math.abs(e))),e=h-e,0<t.x-(a.x??0)&&(e=-e),r.x+=e}return r},s}var qM,WM,UM,GM,jM,VM=i(()=>{BR(),hI(),mN(),lI(),S7(),qM=mt((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"),WM=mt((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"),UM=mt((e,t,r,i,n,a)=>[`M${e+r/2},`+-i/2,`a${n},${a} 0,0,0 0,`+i].join(" "),"createInnerCylinderPathD"),GM=5,jM=10,mt(zM,"tiltedCylinder")});async function YM(e,n){var{labelStyles:t,nodeStyles:r}=ee(n);n.labelStyle=t;let i=n.padding??0,a=i,s="neo"===n.look?2*i:i,{shapeSvg:o,bbox:l}=await NR(e,n,OR(n)),h=(n?.height??l.height)+a,c=(n?.width??l.width)+s,u=[{x:-3*h/6,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:0,y:-h}],d,p=n.cssStyles;if("handDrawn"===n.look){let e=fN.svg(o),t=nI(n,{}),r=AR(u),i=e.path(r,t);d=o.insert(()=>i,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),p&&d.attr("style",p)}else d=wN(o,c,h,u);return r&&d.attr("style",r),n.width=c,n.height=h,MR(n,d),n.intersect=function(e){return J.polygon(n,u,e)},o}var HM=i(()=>{BR(),lI(),hI(),mN(),CN(),mt(YM,"trapezoid")});async function XM(e,t){var{labelStyles:r,nodeStyles:i}=ee(t),r=(t.labelStyle=r,t.padding??0),n="neo"===t.look?16:r,r="neo"===t.look?12:r,{shapeSvg:e,bbox:a}=((t.width||t.height)&&(t.height=(t.height??0)-2*r,t.height<5&&(t.height=5),t.width=(t.width??0)-2*n,t.width<15)&&(t.width=15),await NR(e,t,OR(t))),n=(t?.width||a.width)+2*n,a=(t?.height||a.height)+2*r,r=t.cssStyles,s=fN.svg(e),o=nI(t,{});"handDrawn"!==t.look&&(o.roughness=0,o.fillStyle="solid");let l=[{x:-n/2*.8,y:-a/2},{x:n/2*.8,y:-a/2},{x:n/2,y:-a/2*.6},{x:n/2,y:a/2},{x:-n/2,y:a/2},{x:-n/2,y:-a/2*.6}],h=AR(l),c=s.path(h,o),u=e.insert(()=>c,":first-child");return u.attr("class","basic label-container outer-path"),r&&"handDrawn"!==t.look&&u.selectChildren("path").attr("style",r),i&&"handDrawn"!==t.look&&u.selectChildren("path").attr("style",i),MR(t,u),t.intersect=function(e){return J.polygon(t,l,e)},e}var KM=i(()=>{BR(),lI(),hI(),mN(),mt(XM,"trapezoidalPentagon")});async function ZM(e,t){var{labelStyles:r,nodeStyles:i}=ee(t),r=(t.labelStyle=r,t.padding??0),r="neo"===t.look?2*r:r;(t.width||t.height)&&(t.width=((t?.width??0)-r)/2,t.width<JM&&(t.width=JM),t.height=t?.height??0,t.height<QM)&&(t.height=QM);let{shapeSvg:n,bbox:a,label:s}=await NR(e,t,OR(t)),o=hr(P().flowchart?.htmlLabels),l=(t?.width||a.width)+r,h=t?.height||l+a.height,c=h,u=[{x:0,y:0},{x:c,y:0},{x:c/2,y:-h}],d=t.cssStyles,p=fN.svg(n),g=nI(t,{}),f=("handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid"),AR(u)),m=p.path(f,g),y=n.insert(()=>m,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return d&&"handDrawn"!==t.look&&y.selectChildren("path").attr("style",d),i&&"handDrawn"!==t.look&&y.selectChildren("path").attr("style",i),t.width=l,t.height=h,MR(t,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${h/2-(a.height+(t.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(e){return B.info("Triangle intersect",t,u,e),J.polygon(t,u,e)},n}var QM,JM,eO=i(()=>{e(),BR(),lI(),hI(),mN(),BR(),ic(),ju(),JM=QM=10,mt(ZM,"triangle")});async function tO(e,t){var{labelStyles:r,nodeStyles:i}=ee(t);t.labelStyle=r;let n=t.padding??0,a="neo"===t.look?16:n,s="neo"===t.look?12:n,o=!0;(t.width||t.height)&&(o=!1,t.width=(t?.width??0)-2*a,t.width<10&&(t.width=10),t.height=(t?.height??0)-2*s,t.height<10)&&(t.height=10);var{shapeSvg:r,bbox:e,label:l}=await NR(e,t,OR(t)),h=(t?.width||e.width)+2*(a??0),c=(t?.height||e.height)+2*(s??0),u="neo"===t.look?c/4:c/8,d=c+(o?u:-u),p=t.cssStyles,g=0<(g=14-h)?g/2:0,f=fN.svg(r),m=nI(t,{});"handDrawn"!==t.look&&(m.roughness=0,m.fillStyle="solid");let y=[{x:-h/2-g,y:d/2},...LR(-h/2-g,d/2,h/2+g,d/2,u,.8),{x:h/2+g,y:-d/2},{x:-h/2-g,y:-d/2}],v=AR(y),x=f.path(v,m),b=r.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),p&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",p),i&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(0,${-u/2})`),l.attr("transform",`translate(${-h/2+(t.padding??0)-(e.x-(e.left??0))},${-c/2+(t.padding??0)-u-(e.y-(e.top??0))})`),MR(t,b),t.intersect=function(e){return J.polygon(t,y,e)},r}var rO=i(()=>{BR(),lI(),mN(),hI(),mt(tO,"waveEdgedRectangle")});async function iO(e,t){var{labelStyles:r,nodeStyles:i}=ee(t),r=(t.labelStyle=r,t.padding??0),n="neo"===t.look?16:r,r="neo"===t.look?20:r,{shapeSvg:a,bbox:e}=((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),a=Math.min(.2*t.height,t.height/4),t.height=Math.ceil(t.height-r-a*(20/9)),t.width=t.width-2*n),await NR(e,t,OR(t))),n=(t?.width||e.width)+2*n,e=(e=(t?.height||e.height)+r)+2*(r=e/8),s=t.cssStyles,o=fN.svg(a),l=nI(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");let h=[{x:-n/2,y:e/2},...LR(-n/2,e/2,n/2,e/2,r,1),{x:n/2,y:-e/2},...LR(n/2,-e/2,-n/2,-e/2,r,-1)],c=AR(h),u=o.path(c,l),d=a.insert(()=>u,":first-child");return d.attr("class","basic label-container"),s&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",s),i&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",i),MR(t,d),t.intersect=function(e){return J.polygon(t,h,e)},a}var nO=i(()=>{BR(),lI(),hI(),mN(),mt(iO,"waveRectangle")});async function aO(e,t){var{labelStyles:r,nodeStyles:i}=ee(t),r=(t.labelStyle=r,"neo"===t.look?16:t.padding??0),n="neo"===t.look?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-2*r-sO,10),t.height=Math.max((t?.height??0)-2*n-sO,10));let{shapeSvg:a,bbox:s,label:o}=await NR(e,t,OR(t)),l=(t?.width||s.width)+2*r+sO,h=(t?.height||s.height)+2*n+sO,c=l-sO,u=h-sO,d=-c/2,p=-u/2,g=t.cssStyles,f=fN.svg(a),m=nI(t,{}),y=[{x:d-sO,y:p-sO},{x:d-sO,y:p+u},{x:d+c,y:p+u},{x:d+c,y:p-sO}],v=`M${d-sO},${p-sO} L${d+c},${p-sO} L${d+c},${p+u} L${d-sO},${p+u} L${d-sO},${p-sO}
M${d-sO},${p} L${d+c},${p}
M${d},${p-sO} L${d},`+(p+u),x=("handDrawn"!==t.look&&(m.roughness=0,m.fillStyle="solid"),f.path(v,m)),b=a.insert(()=>x,":first-child");return b.attr("transform",`translate(${sO/2}, ${sO/2})`),b.attr("class","basic label-container outer-path"),g&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",g),i&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",i),o.attr("transform",`translate(${-s.width/2+sO/2-(s.x-(s.left??0))}, ${-s.height/2+sO/2-(s.y-(s.top??0))})`),MR(t,b),t.intersect=function(e){return J.polygon(t,y,e)},a}var sO,oO=i(()=>{BR(),hI(),mN(),lI(),sO=10,mt(aO,"windowPane")});async function lO(e,t){var r,i=t,{theme:n,themeVariables:a}=(i.alias&&(t.label=i.alias),br()),{rowEven:B,rowOdd:P,nodeBorder:$,borderColorArray:a}=a,s=("handDrawn"===t.look&&(_=(_=br().themeVariables).background,await lO(e,{...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none","fill: "+_]})),br());t.useHtmlLabels=s.htmlLabels;let o=s.er?.diagramPadding??10,l=s.er?.entityPadding??6,h=t.cssStyles,{labelStyles:c,nodeStyles:u}=ee(t);if(0===i.attributes.length&&t.label)return _={rx:0,ry:0,labelPaddingX:o,labelPaddingY:1.5*o,classes:""},V_(t.label,s)+2*_.labelPaddingX<s.er.minEntityWidth&&(t.width=s.er.minEntityWidth),_=await ND(e,t,_),null!=n&&uO.has(n)&&(S=i.colorIndex??0,_.attr("data-color-id","color-"+S%a.length)),hr(s.htmlLabels)||(E=(S=_.select("text")).node()?.getBBox(),S.attr("transform",`translate(${-E.width/2}, 0)`)),_;s.htmlLabels||(o*=1.25,l*=1.25);let d=OR(t),p=(d=d||"node default",e.insert("g").attr("class",d).attr("id",t.domId||t.id)),g=await hO(p,t.label??"",s,0,0,["name"],c),f=(g.height+=l,0),m=[],y=[],v=0,x=0,b=0,T=0,F=!0,z=!0;for(r of i.attributes){var k=await hO(p,r.type,s,0,f,["attribute-type"],c),q=(v=Math.max(v,k.width+o),await hO(p,r.name,s,0,f,["attribute-name"],c)),W=(x=Math.max(x,q.width+o),await hO(p,r.keys.join(),s,0,f,["attribute-keys"],c)),U=(b=Math.max(b,W.width+o),await hO(p,r.comment,s,0,f,["attribute-comment"],c)),k=(T=Math.max(T,U.width+o),Math.max(k.height,q.height,W.height,U.height)+l);y.push({yOffset:f,rowHeight:k}),f+=k}let w=4;b<=o&&(F=!1,b=0,w--),T<=o&&(z=!1,T=0,w--);var G,C,E,j,S=p.node().getBBox(),_=(0<g.width+2*o-(v+x+b+T)&&(E=g.width+2*o-(v+x+b+T),v+=E/w,x+=E/w,0<b&&(b+=E/w),0<T)&&(T+=E/w),v+x+b+T),A=fN.svg(p),L=nI(t,{});"handDrawn"!==t.look&&(L.roughness=0,L.fillStyle="solid");let V=0,R=(0<y.length&&(V=y.reduce((e,t)=>e+(t?.rowHeight??0),0)),Math.max(S.width+2*o,t?.width||0,_)),I=Math.max((V??0)+g.height,t?.height||0),N=-R/2,D=-I/2,Y=(p.selectAll("g:not(:first-child)").each((e,t,r)=>{let i=Q(r[t]),n=i.attr("transform"),a=0,s=0;n&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n))&&(a=parseFloat(r[1]),s=parseFloat(r[2]),i.attr("class").includes("attribute-name")?a+=v:i.attr("class").includes("attribute-keys")?a+=v+x:i.attr("class").includes("attribute-comment")&&(a+=v+x+b)),i.attr("transform",`translate(${N+o/2+a}, ${s+D+g.height+l/2})`)}),p.select(".name").attr("transform","translate("+-g.width/2+", "+(D+l/2)+")"),null!=n&&uO.has(n)&&(e=i.colorIndex??0,p.attr("data-color-id","color-"+e%a.length)),A.rectangle(N,D,R,I,L)),H=p.insert(()=>Y,":first-child").attr("class","outer-path").attr("style",h.join(""));m.push(0);for([G,C]of y.entries()){let e=(G+1)%2==0&&0!==C.yOffset,t=A.rectangle(N,g.height+D+C?.yOffset,R,C?.rowHeight,{...L,fill:e?B:P,stroke:$});p.insert(()=>t,"g.label").attr("style",h.join("")).attr("class","row-rect-"+(e?"even":"odd"))}let M=cO(N,g.height+D,R+N,g.height+D,1e-4),O=A.polygon(M.map(e=>[e.x,e.y]),L);p.insert(()=>O).attr("class","divider"),M=cO(v+N,g.height+D,v+N,I+D,1e-4),O=A.polygon(M.map(e=>[e.x,e.y]),L),p.insert(()=>O).attr("class","divider"),F&&(E=v+x+N,M=cO(E,g.height+D,E,I+D,1e-4),O=A.polygon(M.map(e=>[e.x,e.y]),L),p.insert(()=>O).attr("class","divider")),z&&(S=v+x+b+N,M=cO(S,g.height+D,S,I+D,1e-4),O=A.polygon(M.map(e=>[e.x,e.y]),L),p.insert(()=>O).attr("class","divider"));for(j of m){var X=g.height+D+j;M=cO(N,X,R+N,X,1e-4),O=A.polygon(M.map(e=>[e.x,e.y]),L),p.insert(()=>O).attr("class","divider")}return MR(t,H),u&&"handDrawn"!==t.look&&(null!=n&&dO.has(n)?p.selectAll("path"):(_=u.split(";")?.filter(e=>e.includes("stroke"))?.map(e=>""+e).join("; "),p.selectAll("path").attr("style",_??""),p.selectAll(".row-rect-even path"))).attr("style",u),t.intersect=function(e){return J.rect(t,e)},p}async function hO(e,t,r,i=0,n=0,a=[],s=""){if(e=e.insert("g").attr("class","label "+a.join(" ")).attr("transform",`translate(${i}, ${n})`).attr("style",s),t!==zh(t)&&(t=(t=zh(t)).replaceAll("<","&lt;").replaceAll(">","&gt;")),a=e.node().appendChild(await CR(e,t,{width:V_(t,r)+100,style:s,useHtmlLabels:r.htmlLabels},r)),t.includes("&lt;")||t.includes("&gt;")){let e=a.children[0];for(e.textContent=e.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");e.childNodes[0];)(e=e.childNodes[0]).textContent=e.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let o=a.getBBox();return hr(r.htmlLabels)&&((i=a.children[0]).style.textAlign="start",n=Q(a),o=i.getBoundingClientRect(),n.attr("width",o.width),n.attr("height",o.height)),o}function cO(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}]}var uO,dO,pO=i(()=>{BR(),lI(),hI(),mN(),DD(),Ei(),ER(),ic(),Sk(),S7(),uO=new Set(["redux-color","redux-dark-color"]),dO=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),mt(lO,"erBox"),mt(hO,"addText"),mt(cO,"lineToPolygon")});async function gO(e,t,r,i,n=r.class.padding??12){let a=i?0:3,s=e.insert("g").attr("class",OR(t)).attr("id",t.domId||t.id),o=null,l=null,h=null,c=null,u=0,d,p=0;var g,f;o=s.insert("g").attr("class","annotation-group text"),0<t.annotations.length&&(i=t.annotations[0],await fO(o,{text:`«${i}»`},0),u=o.node().getBBox().height),await fO(l=s.insert("g").attr("class","label-group text"),t,0,["font-weight: bolder"]),d=(e=l.node().getBBox()).height,h=s.insert("g").attr("class","members-group text");let m=0;for(g of t.members){var y=await fO(h,g,m,[g.parseClassifier()]);m+=y+a}(p=h.node().getBBox().height)<=0&&(p=n/2),c=s.insert("g").attr("class","methods-group text");let v=0;for(f of t.methods){var x=await fO(c,f,v,[f.parseClassifier()]);v+=x+a}return s.node().getBBox(),null!==o&&(i=o.node().getBBox(),o.attr("transform",`translate(${-i.width/2})`)),l.attr("transform",`translate(${-e.width/2}, ${u})`),s.node().getBBox(),h.attr("transform",`translate(0, ${u+d+2*n})`),s.node().getBBox(),c.attr("transform",`translate(0, ${u+d+(p?p+4*n:2*n)})`),t=s.node().getBBox(),{shapeSvg:s,bbox:t}}async function fO(e,t,r,i=[]){let n=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=br(),s="useHtmlLabels"in t?t.useHtmlLabels:hr(a.htmlLabels)??!0,o="",l=(o="text"in t?t.text:t.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),Vh(o)&&(s=!0),await CR(n,Hc(C7(o)),{width:V_(o,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a)),h,c=1;if(s){var e=l.children[0],t=Q(l),u=(c=e.innerHTML.split("<br>").length,e.innerHTML.includes("</math>")&&(c+=e.innerHTML.split("<mrow>").length-1),e.getElementsByTagName("img"));if(u){let i=""===o.replace(/<img[^>]*>/g,"").trim();await Promise.all([...u].map(r=>new Promise(t=>{function e(){var e;r.style.display="flex",r.style.flexDirection="column",i?(e=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,e=5*parseInt(e,10)+"px",r.style.minWidth=e,r.style.maxWidth=e):r.style.width="100%",t(r)}mt(e,"setupImage"),setTimeout(()=>{r.complete&&e()}),r.addEventListener("error",e),r.addEventListener("load",e)})))}h=e.getBoundingClientRect(),t.attr("width",h.width),t.attr("height",h.height)}else i.includes("font-weight: bolder")&&Q(l).selectAll("tspan").attr("font-weight",""),c=l.children.length,u=l.children[0],""!==l.textContent&&!l.textContent.includes("&gt")||(u.textContent=o[0]+o.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim()," "!==o[1])||(u.textContent=u.textContent[0]+" "+u.textContent.substring(1)),"undefined"===u.textContent&&(u.textContent=""),h=l.getBBox();return n.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}var mO=i(()=>{Sk(),Ei(),BR(),S7(),ju(),ER(),ic(),mt(gO,"textHelper"),mt(fO,"addText")});async function yO(r,i){let o=P(),e=o.themeVariables,n=e.useGradient,l=o.class.padding??12,h=l,c=i.useHtmlLabels??hr(o.htmlLabels)??!0,u=i,{shapeSvg:d,bbox:t}=(u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[],await gO(r,i,o,c,h)),{labelStyles:a,nodeStyles:s}=ee(i);i.labelStyle=a,i.cssStyles=u.styles||"";var p,r=u.styles?.join(";")||s||"";i.cssStyles||(i.cssStyles=r.replaceAll("!important","").split(";"));let g=0===u.members.length&&0===u.methods.length&&!o.class?.hideEmptyMembersBox,f=fN.svg(d),m=nI(i,{}),y=("handDrawn"!==i.look&&(m.roughness=0,m.fillStyle="solid"),Math.max(i.width??0,t.width)),v=Math.max(i.height??0,t.height),x=(i.height??0)>t.height,b=(0===u.members.length&&0===u.methods.length?v+=h:0<u.members.length&&0===u.methods.length&&(v+=2*h),-y/2),T=-v/2,k=g?2*l:0===u.members.length&&0===u.methods.length?-l:0,w=(x&&(k=2*l),f.rectangle(b-l,T-l-(g?l:0===u.members.length&&0===u.methods.length?-l/2:0),y+2*l,v+2*l+k,m)),C=d.insert(()=>w,":first-child"),E=(C.attr("class","basic label-container outer-path"),C.node().getBBox()),S=d.select(".annotation-group").node().getBBox().height-(g?l/2:0)||0,_=d.select(".label-group").node().getBBox().height-(g?l/2:0)||0,A=d.select(".members-group").node().getBBox().height-(g?l/2:0)||0,L=(S+_+T+l-(T-l-(g?l:0===u.members.length&&0===u.methods.length?-l/2:0)))/2;if(d.selectAll(".text").each((e,t,r)=>{let i=Q(r[t]),n=i.attr("transform"),a=(n=n&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n))?parseFloat(r[2]):0)+T+l-(g?l:0===u.members.length&&0===u.methods.length?-l/2:0),s=(i.attr("class").includes("methods-group")&&(t=Math.max(A,h/2),a=x?Math.max(L,S+_+t+T+2*h+l)+2*h:S+_+t+T+4*h+l),0===u.members.length&&0===u.methods.length&&o.class?.hideEmptyMembersBox&&(a=0<u.annotations.length?n-h:n),c||(a-=4),b);(i.attr("class").includes("label-group")||i.attr("class").includes("annotation-group"))&&(s=-i.node()?.getBBox().width/2||0,d.selectAll("text").each(function(e,t,r){"middle"===window.getComputedStyle(r[t]).textAnchor&&(s=0)})),i.attr("transform",`translate(${s}, ${a})`)}),0<u.members.length||0<u.methods.length||g){let e=S+_+T+l,t=f.line(E.x,e,E.x+E.width,e+.001,m);d.insert(()=>t).attr("class","divider"+("neo"!==i.look||n?"":" neo-line")).attr("style",r)}if(g||0<u.members.length||0<u.methods.length){let e=S+_+A+T+2*h+l,t=f.line(E.x,x?Math.max(L,e):e,E.x+E.width,(x?Math.max(L,e):e)+.001,m);d.insert(()=>t).attr("class","divider"+("neo"!==i.look||n?"":" neo-line")).attr("style",r)}return"handDrawn"!==u.look&&d.selectAll("path").attr("style",r),C.select(":nth-child(2)").attr("style",r),d.selectAll(".divider").select("path").attr("style",r),i.labelStyle?d.selectAll("span").attr("style",i.labelStyle):d.selectAll("span").attr("style",r),c||((r=(p=RegExp(/color\s*:\s*([^;]*)/)).exec(r))?(r=r[0].replace("color","fill"),d.selectAll("tspan").attr("style",r)):a&&(r=p.exec(a))&&(p=r[0].replace("color","fill"),d.selectAll("tspan").attr("style",p))),MR(i,C),i.intersect=function(e){return J.rect(i,e)},d}var vO=i(()=>{BR(),ju(),Sk(),mN(),hI(),lI(),mO(),ic(),mt(yO,"classBox")});async function xO(r,i){var{labelStyles:e,nodeStyles:t}=ee(i);i.labelStyle=e;let n=i,a=i,s="verifyMethod"in i,o=OR(i),l=P().themeVariables,{borderColorArray:h,requirementEdgeLabelBackground:c}=l,u=r.insert("g").attr("class",o).attr("id",i.domId??i.id),d,p=d=s?await bO(u,`&lt;&lt;${n.type}&gt;&gt;`,0,i.labelStyle):await bO(u,"&lt;&lt;Element&gt;&gt;",0,i.labelStyle),g=await bO(u,n.name,p,i.labelStyle+"; font-weight: bold;"),f=(p+=g+20,s?(e=await bO(u,n.requirementId?"ID: "+n.requirementId:"",p,i.labelStyle),p+=e,r=await bO(u,n.text?"Text: "+n.text:"",p,i.labelStyle),p+=r,e=await bO(u,n.risk?"Risk: "+n.risk:"",p,i.labelStyle),p+=e,await bO(u,n.verifyMethod?"Verification: "+n.verifyMethod:"",p,i.labelStyle)):(r=await bO(u,a.type?"Type: "+a.type:"",p,i.labelStyle),p+=r,await bO(u,a.docRef?"Doc Ref: "+a.docRef:"",p,i.labelStyle)),(u.node()?.getBBox().width??200)+20),m=(u.node()?.getBBox().height??200)+20,y=-f/2,v=-m/2,x=fN.svg(u),b=nI(i,{}),T=("handDrawn"!==i.look&&(b.roughness=0,b.fillStyle="solid"),x.rectangle(y,v,f,m,b)),k=u.insert(()=>T,":first-child");if(k.attr("class","basic label-container outer-path").attr("style",t),h?.length&&(e=i.colorIndex??0,u.attr("data-color-id","color-"+e%h.length)),u.selectAll(".label").each((e,t,r)=>{let i=Q(r[t]),n=i.attr("transform"),a=0,s=0,o=(n&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n))&&(a=parseFloat(r[1]),s=parseFloat(r[2])),s-m/2),l=10+y;0!==t&&1!==t||(l=a),i.attr("transform",`translate(${l}, ${20+o})`)}),p>d+g+20){let e=v+d+g+20,t;t="neo"===i.look?(r=[[y,e],[y+f,e],[y+f,e+.001],[y,e+.001]],x.polygon(r,b)):x.line(y,e,y+f,e,b),u.insert(()=>t).attr("class","divider")}return MR(i,k),i.intersect=function(e){return J.rect(i,e)},t&&"handDrawn"!==i.look&&(c||h?.length)&&u.selectAll("path").attr("style",t),u}async function bO(e,t,r,i=""){if(""===t)return 0;let n=e.insert("g").attr("class","label").attr("style",i),a=P(),s=a.htmlLabels??!0,o=await CR(n,Hc(C7(t)),{width:V_(t,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},a),l;if(s)e=o.children[0],t=Q(o),l=e.getBoundingClientRect(),t.attr("width",l.width),t.attr("height",l.height);else{var h;for(h of o.children[0].children)i&&h.setAttribute("style",i);(l=o.getBBox()).height+=6}return n.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}var TO=i(()=>{BR(),lI(),hI(),mN(),S7(),ju(),ER(),Sk(),mt(xO,"requirementBox"),mt(bO,"addText")});async function kO(e,i,{config:t}){var{labelStyles:n,nodeStyles:r}=ee(i),n=(i.labelStyle=n||"",i.width);i.width=(i.width??200)-10;let{shapeSvg:a,bbox:s,label:o}=await NR(e,i,OR(i)),l=i.padding||10,h,c,u=("ticket"in i&&i.ticket&&t?.kanban?.ticketBaseUrl&&(h=t?.kanban?.ticketBaseUrl.replace("#TICKET#",i.ticket),c=a.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",h).attr("target","_blank")),{useHtmlLabels:i.useHtmlLabels,labelStyle:i.labelStyle||"",width:i.width,img:i.img,padding:i.padding||8,centerLabel:!1}),d,p;c?{label:d,bbox:p}=await DR(c,"ticket"in i&&i.ticket||"",u):{label:d,bbox:p}=await DR(a,"ticket"in i&&i.ticket||"",u);var{label:e,bbox:t}=await DR(a,"assigned"in i&&i.assigned||"",u),n=(i.width=n,i?.width||0),g=Math.max(p.height,t.height)/2,f=Math.max(s.height+20,i?.height||0)+g,m=-n/2,y=-f/2;o.attr("transform","translate("+(l-n/2)+", "+(-g-s.height/2)+")"),d.attr("transform","translate("+(l-n/2)+", "+(-g+s.height/2)+")"),e.attr("transform","translate("+(l+n/2-t.width-20)+", "+(-g+s.height/2)+")");let v,{rx:x,ry:b}=i,T=i.cssStyles;if("handDrawn"===i.look){let e=fN.svg(a),t=nI(i,{}),r=x||b?e.path(TD(m,y,n,f,x||0),t):e.rectangle(m,y,n,f,t);(v=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",T||null)}else(v=a.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",r).attr("rx",x??5).attr("ry",b??5).attr("x",m).attr("y",y).attr("width",n).attr("height",f),(e="priority"in i&&i.priority)&&(t=a.append("line"),g=2+m,r=y+Math.floor((x??0)/2),n=y+f-Math.floor((x??0)/2),t.attr("x1",g).attr("y1",r).attr("x2",g).attr("y2",n).attr("stroke-width","4").attr("stroke",wO(e)));return MR(i,v),i.height=f,i.intersect=function(e){return J.rect(i,e)},a}var wO,CO=i(()=>{BR(),lI(),wD(),hI(),mN(),wO=mt(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"),mt(kO,"kanbanItem")});async function EO(e,i){var{labelStyles:n,nodeStyles:t}=ee(i),{shapeSvg:n,bbox:e,halfPadding:r,label:a}=(i.labelStyle=n,await NR(e,i,OR(i))),s=e.width+10*r,r=e.height+8*r,o=.15*s,l=i.cssStyles,h=e.height+20,s=Math.max(s,e.width+20),r=Math.max(r,h);a.attr("transform",`translate(${-e.width/2}, ${-e.height/2})`);let c,u=`M0 0
a${o},${o} 1 0,0 ${.25*s},${-1*r*.1}
a${o},${o} 1 0,0 ${.25*s},0
a${o},${o} 1 0,0 ${.25*s},0
a${o},${o} 1 0,0 ${.25*s},${.1*r}
a${o},${o} 1 0,0 ${.15*s},${.33*r}
a${.8*o},${.8*o} 1 0,0 0,${.34*r}
a${o},${o} 1 0,0 ${-1*s*.15},${.33*r}
a${o},${o} 1 0,0 ${-1*s*.25},${.15*r}
a${o},${o} 1 0,0 ${-1*s*.25},0
a${o},${o} 1 0,0 ${-1*s*.25},0
a${o},${o} 1 0,0 ${-1*s*.25},${-1*r*.15}
a${o},${o} 1 0,0 ${-1*s*.1},${-1*r*.33}
a${.8*o},${.8*o} 1 0,0 0,${-1*r*.34}
a${o},${o} 1 0,0 ${.1*s},${-1*r*.33}
H0 V0 Z`;if("handDrawn"===i.look){let e=fN.svg(n),t=nI(i,{}),r=e.path(u,t);(c=n.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",X_(l))}else c=n.insert("path",":first-child").attr("class","basic label-container").attr("style",t).attr("d",u);return c.attr("transform",`translate(${-s/2}, ${-r/2})`),MR(i,c),i.calcIntersect=function(e,t){return J.rect(e,t)},i.intersect=function(e){return B.info("Bang intersect",i,e),J.rect(i,e)},n}var SO=i(()=>{e(),BR(),lI(),hI(),mN(),S7(),mt(EO,"bang")});async function _O(e,i){var{labelStyles:t,nodeStyles:r}=ee(i);i.labelStyle=t;let{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await NR(e,i,OR(i)),l=a.width+2*s,h=a.height+2*s,c=.15*l,u=.25*l,d=.35*l,p=.2*l,g=i.cssStyles,f,m=`M0 0
a${c},${c} 0 0,1 ${.25*l},${-1*l*.1}
a${d},${d} 1 0,1 ${.4*l},${-1*l*.1}
a${u},${u} 1 0,1 ${.35*l},${.2*l}
a${c},${c} 1 0,1 ${.15*l},${.35*h}
a${p},${p} 1 0,1 ${-1*l*.15},${.65*h}
a${u},${c} 1 0,1 ${-1*l*.25},${.15*l}
a${d},${d} 1 0,1 ${-1*l*.5},0
a${c},${c} 1 0,1 ${-1*l*.25},${-1*l*.15}
a${c},${c} 1 0,1 ${-1*l*.1},${-1*h*.35}
a${p},${p} 1 0,1 ${.1*l},${-1*h*.65}
H0 V0 Z`;if("handDrawn"===i.look){let e=fN.svg(n),t=nI(i,{}),r=e.path(m,t);(f=n.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",X_(g))}else f=n.insert("path",":first-child").attr("class","basic label-container").attr("style",r).attr("d",m);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),f.attr("transform",`translate(${-l/2}, ${-h/2})`),MR(i,f),i.calcIntersect=function(e,t){return J.rect(e,t)},i.intersect=function(e){return B.info("Cloud intersect",i,e),J.rect(i,e)},n}var AO=i(()=>{mN(),e(),S7(),lI(),hI(),BR(),mt(_O,"cloud")});async function LO(e,t){var{labelStyles:r,nodeStyles:i}=ee(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await NR(e,t,OR(t)),l=a.width+8*s,h=a.height+2*s,c="neo"===t.look?`
M${-l/2} ${h/2-5}
v${10-h}
q0,-5 5,-5
h${l-10}
q5,0 5,5
v${h-5}
H${-l/2}
Z
`:`
M${-l/2} ${h/2-5}
v${10-h}
q0,-5 5,-5
h${l-10}
q5,0 5,5
v${h-10}
q0,5 -5,5
h${-(l-10)}
q-5,0 -5,-5
Z
`;if(t.domId)return r=n.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",c),n.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",h/2).attr("x2",l/2).attr("y2",h/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),n.append(()=>o.node()),MR(t,r),t.calcIntersect=function(e,t){return J.rect(e,t)},t.intersect=function(e){return J.rect(t,e)},n;throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`)}var RO=i(()=>{lI(),hI(),BR(),mt(LO,"defaultMindmapNode")});async function IO(e,t){return RN(e,t,{padding:t.padding??0})}var NO=i(()=>{IN(),mt(IO,"mindmapCircle")});function DO(e){return e in BO}var MO,OO,BO,PO,$O,FO,zO,qO,WO,UO,GO,jO,VO,YO,HO,XO,KO=i(()=>{vN(),kN(),_N(),LN(),IN(),MN(),PN(),zN(),UN(),jN(),QN(),eD(),rD(),nD(),lD(),cD(),dD(),fD(),yD(),xD(),kD(),ED(),_D(),LD(),ID(),OD(),PD(),FD(),qD(),HD(),KD(),QD(),eM(),rM(),aM(),hM(),dM(),gM(),yM(),xM(),TM(),wM(),EM(),_M(),LM(),NM(),OM(),PM(),FM(),VM(),HM(),KM(),eO(),rO(),nO(),oO(),pO(),vO(),TO(),CO(),SO(),AO(),RO(),NO(),MO=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:bM},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:pM},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:kM},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:RM},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:VN},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:RN},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:EO},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:_O},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:iM},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:pD},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:$D},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:BD},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:YM},{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:RD},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:tD},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:$M},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:EN},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:fM},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:AM},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:SM},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:hD},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:mD},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:BN},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:FN},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:WN},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:zD},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:tO},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:uD},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:zM},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:WD},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:GN},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:JN},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ZM},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:aO},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:iD},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:XM},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:aD},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:vM},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:JD},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:ZD},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:TN},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:DN},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:BM},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:DM},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:iO},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:sM},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:XD}],OO=mt(()=>{var e=[...Object.entries({state:CM,choice:AN,note:tM,rectWithTitle:uM,labelRect:MD,iconSquare:SD,iconCircle:bD,icon:vD,iconRounded:CD,imageSquare:AD,anchor:yN,kanbanItem:kO,mindmapCircle:IO,defaultMindmapNode:LO,classBox:yO,erBox:lO,requirementBox:xO}),...MO.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap"),BO=OO(),mt(DO,"isValidShape")}),ZO=i(()=>{Sk(),lL(),ju(),e(),KO(),S7(),ic(),Gu(),Lk(),Rn(),PO=class{constructor(){this.vertexCounter=0,this.config=P(),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=$c,this.setAccDescription=zc,this.setDiagramTitle=Wc,this.getAccTitle=Fc,this.getAccDescription=qc,this.getDiagramTitle=Uc,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{mt(this,"FlowDB")}sanitizeText(e){return I.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(var 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(i,n,a,s,o,l,h={},e){if(i&&0!==i.trim().length){let r;var t;if(void 0!==e&&(t=e.includes(`
`)?e+`
`:`{
`+e+`
}`,r=oL(t,{schema:sL})),e=this.edges.find(e=>e.id===i))void 0!==(t=r)?.animate&&(e.animate=t.animate),void 0!==t?.animation&&(e.animation=t.animation),void 0!==t?.curve&&(e.interpolate=t.curve);else{let e,t=this.vertices.get(i);if(void 0===t&&(void 0===n&&void 0===a&&null!=s&&B.warn(`Style applied to unknown node "${i}". This may indicate a typo. The node will be created automatically.`),t={id:i,labelType:"text",domId:"flowchart-"+i+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(i,t)),this.vertexCounter++,void 0!==n?(this.config=P(),e=this.sanitizeText(n.text.trim()),t.labelType=n.type,e.startsWith('"')&&e.endsWith('"')&&(e=e.substring(1,e.length-1)),t.text=e):void 0===t.text&&(t.text=i),void 0!==a&&(t.type=a),s?.forEach(e=>{t.styles.push(e)}),o?.forEach(e=>{t.classes.push(e)}),void 0!==l&&(t.dir=l),void 0===t.props?t.props=h:void 0!==h&&Object.assign(t.props,h),void 0!==r){if(r.shape){if(r.shape!==r.shape.toLowerCase()||r.shape.includes("_"))throw new Error(`No such shape: ${r.shape}. Shape names should be lowercase.`);if(!DO(r.shape))throw new Error(`No such shape: ${r.shape}.`);t.type=r?.shape}r?.label&&(t.text=r?.label,t.labelType=this.sanitizeNodeLabelType(r?.labelType)),r?.icon&&(t.icon=r?.icon,!r.label?.trim())&&t.text===i&&(t.text=""),r?.form&&(t.form=r?.form),r?.pos&&(t.pos=r?.pos),r?.img&&(t.img=r?.img,!r.label?.trim())&&t.text===i&&(t.text=""),r?.constraint&&(t.constraint=r.constraint),r.w&&(t.assetWidth=Number(r.w)),r.h&&(t.assetHeight=Number(r.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};if(B.info("abc78 Got edge...",n),void 0!==(e=r.text)&&(n.text=this.sanitizeText(e.text.trim()),n.text.startsWith('"')&&n.text.endsWith('"')&&(n.text=n.text.substring(1,n.text.length-1)),n.labelType=this.sanitizeNodeLabelType(e.type)),void 0!==r&&(n.type=r.type,n.stroke=r.stroke,n.length=10<r.length?10:r.length),i&&!this.edges.some(e=>e.id===i)?(n.id=i,n.isUserDefinedId=!0):0===(t=this.edges.filter(e=>e.start===n.start&&e.end===n.end)).length?n.id=E7(n.start,n.end,{counter:0,prefix:"L"}):n.id=E7(n.start,n.end,{counter:t.length+1,prefix:"L"}),!(this.edges.length<(this.config.maxEdges??500)))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.`);B.info("Pushing edge..."),this.edges.push(n)}isLinkData(e){return null!==e&&"object"==typeof e&&"id"in e&&"string"==typeof e.id}addLink(e,t,r){var i,n=this.isLinkData(r)?r.id.replace("@",""):void 0;B.info("addLink",e,t,n);for(i of e)for(var a of t){var s=i===e[e.length-1],o=a===t[0];s&&o?this.addSingleLink(i,a,r,n):this.addSingleLink(i,a,r,void 0)}}updateLinkInterpolate(e,t){e.forEach(e=>{"default"===e?this.edges.defaultInterpolate=t:this.edges[e].interpolate=t})}updateLink(e,t){e.forEach(e=>{if("number"==typeof e&&e>=this.edges.length)throw new Error(`The index ${e} 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.)`);"default"===e?this.edges.defaultStyle=t:(this.edges[e].style=t,0<(this.edges[e]?.style?.length??0)&&!this.edges[e]?.style?.some(e=>e?.startsWith("fill"))&&this.edges[e]?.style?.push("fill:none"))})}addClass(e,t){let i=t.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach(e=>{let r=this.classes.get(e);void 0===r&&(r={id:e,styles:[],textStyles:[]},this.classes.set(e,r)),i?.forEach(e=>{var t;/color/.exec(e)&&(t=e.replace("fill","bgFill"),r.textStyles.push(t)),r.styles.push(e)})})}setDirection(e){this.direction=e.trim(),/.*</.exec(this.direction)&&(this.direction="RL"),/.*\^/.exec(this.direction)&&(this.direction="BT"),/.*>/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),"TD"===this.direction&&(this.direction="TB")}setClass(e,r){for(let t of e.split(",")){var i=this.vertices.get(t);i&&i.classes.push(r),(i=this.edges.find(e=>e.id===t))&&i.classes.push(r),(i=this.subGraphLookup.get(t))&&i.classes.push(r)}}setTooltip(e,t){if(void 0!==t){t=this.sanitizeText(t);for(var r of e.split(","))this.tooltips.set("gen-1"===this.version?this.lookUpDomId(r):r,t)}}setClickFun(t,i,e){if("loose"===P().securityLevel&&void 0!==i){let r=[];if("string"==typeof e){r=e.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<r.length;t++){let e=r[t].trim();e.startsWith('"')&&e.endsWith('"')&&(e=e.substr(1,e.length-2)),r[t]=e}}0===r.length&&r.push(t),(e=this.vertices.get(t))&&(e.haveCallback=!0,this.funs.push(()=>{var e=this.lookUpDomId(t);null!==(e=document.querySelector(`[id="${e}"]`))&&e.addEventListener("click",()=>{k7.runFunc(i,...r)},!1)}))}}setLink(e,t,r){e.split(",").forEach(e=>{void 0!==(e=this.vertices.get(e))&&(e.link=k7.formatUrl(t,this.config),e.linkTarget=r)}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,t,r){e.split(",").forEach(e=>{this.setClickFun(e,t,r)}),this.setClass(e,"clickable")}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(e){let i=JT();Q(e).select("svg").selectAll("g.node").on("mouseover",e=>{var t=Q(e.currentTarget),r=t.attr("title");null!==r&&(e=e.currentTarget?.getBoundingClientRect(),i.transition().duration(200).style("opacity",".9"),i.text(t.attr("title")).style("left",window.scrollX+e.left+(e.right-e.left)/2+"px").style("top",window.scrollY+e.bottom+"px"),i.html(Ln.sanitize(r)),t.classed("hover",!0))}).on("mouseout",e=>{i.transition().duration(500).style("opacity",0),Q(e.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=P(),Pc()}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);var a=(e=mt(e=>{let r={boolean:{},number:{},string:{}},i=[],n;return{nodeList:e.filter(function(e){var t=typeof e;return e.stmt&&"dir"===e.stmt?(n=e.value,!1):""!==e.trim()&&(t in r?!r[t].hasOwnProperty(e)&&(r[t][e]=!0):!i.includes(e)&&i.push(e))}),dir:n}},"uniq")(t.flat())).nodeList,t=e.dir,e=P().flowchart??{},t=t??(e.inheritDir?this.getDirection()??P().direction??void 0:void 0);if("gen-1"===this.version)for(let e=0;e<a.length;e++)a[e]=this.lookUpDomId(a[e]);return i=i??"subGraph"+this.subCount,n=this.sanitizeText(n=n||""),this.subCount=this.subCount+1,e={id:i,nodes:a,title:n.trim(),classes:[],dir:t,labelType:this.sanitizeNodeLabelType(r?.type)},B.info("Adding",e.id,e.nodes,e.dir),e.nodes=this.makeUniq(e,this.subGraphs).nodes,this.subGraphs.push(e),this.subGraphLookup.set(i,e),i}getPosForId(e){for(var[t,r]of this.subGraphs.entries())if(r.id===e)return t;return-1}indexNodes2(e,t){var r=this.subGraphs[t].nodes;if(this.secCount=this.secCount+1,2e3<this.secCount)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<r.length;){var a=this.getPosForId(r[i]);if(0<=a){if((a=this.indexNodes2(e,a)).result)return{result:!0,count:n+a.count};n+=a.count}i+=1}return{result:!1,count:n}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){this.secCount=-1,0<this.subGraphs.length&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return!!this.firstGraphFlag&&!(this.firstGraphFlag=!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)}let i="normal";return t.includes("=")&&(i="thick"),t.includes(".")&&(i="dotted"),{type:r,stroke:i}}countChar(t,r){let i=r.length,n=0;for(let e=0;e<i;++e)r[e]===t&&++n;return n}destructEndLink(e){let t=e.trim(),r=t.slice(0,-1),i="arrow_open";switch(t.slice(-1)){case"x":i="arrow_cross",t.startsWith("x")&&(i="double_"+i,r=r.slice(1));break;case">":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))}let n="normal",a=r.length-1;return r.startsWith("=")&&(n="thick"),r.startsWith("~")&&(n="invisible"),(e=this.countChar(".",r))&&(n="dotted",a=e),{type:i,stroke:n,length:a}}destructLink(e,t){if(e=this.destructEndLink(e),t){if((t=this.destructStartLink(t)).stroke!==e.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===t.type)t.type=e.type;else{if(t.type!==e.type)return{type:"INVALID",stroke:"INVALID"};t.type="double_"+t.type}return"double_arrow"===t.type&&(t.type="double_arrow_point"),t.length=e.length,t}return e}exists(e,t){for(var r of e)if(r.nodes.includes(t))return!0;return!1}makeUniq(r,i){let n=[];return r.nodes.forEach((e,t)=>{this.exists(i,e)||n.push(r.nodes[t])}),{nodes:n}}getTypeFromVertex(e){if(e.img)return"imageSquare";if(e.icon)return"circle"===e.form?"iconCircle":"square"===e.form?"iconSquare":"rounded"===e.form?"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(e=>e.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}return{arrowTypeStart:t,arrowTypeEnd:r}}addNodeFromVertex(e,t,r,i,n,a){var r=r.get(e.id),i=i.get(e.id)??!1,s=this.findNode(t,e.id);s?(s.cssStyles=e.styles,s.cssCompiledStyles=this.getCompiledStyles(e.classes),s.cssClasses=e.classes.join(" ")):(s={id:e.id,label:e.text,labelType:e.labelType,labelStyle:"",parentId:r,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},i?t.push({...s,isGroup:!0,shape:"rect"}):t.push({...s,isGroup:!1,shape:this.getTypeFromVertex(e)}))}getCompiledStyles(e){let t=[];for(var r of e)(r=this.classes.get(r))?.styles&&(t=[...t,...r.styles??[]].map(e=>e.trim())),r?.textStyles&&(t=[...t,...r.textStyles??[]].map(e=>e.trim()));return t}getData(){let a=P(),t=[],s=[],r=this.getSubGraphs(),i=new Map,n=new Map;for(let e=r.length-1;0<=e;e--){var o,l=r[e];0<l.nodes.length&&n.set(l.id,!0);for(o of l.nodes)i.set(o,l.id)}for(let e=r.length-1;0<=e;e--){var h=r[e];t.push({id:h.id,label:h.title,labelStyle:"",labelType:h.labelType,parentId:i.get(h.id),padding:8,cssCompiledStyles:this.getCompiledStyles(h.classes),cssClasses:h.classes.join(" "),shape:"rect",dir:h.dir,isGroup:!0,look:a.look})}this.getVertices().forEach(e=>{this.addNodeFromVertex(e,t,i,n,a,a.look||"classic")});let c=this.getEdges();return c.forEach((e,t)=>{var{arrowTypeStart:r,arrowTypeEnd:i}=this.destructEdgeType(e.type),n=[...c.defaultStyle??[]],t=(e.style&&n.push(...e.style),{id:E7(e.start,e.end,{counter:t,prefix:"L"},e.id),isUserDefinedId:e.isUserDefinedId,start:e.start,end:e.end,type:e.type??"normal",label:e.text,labelType:e.labelType,labelpos:"c",thickness:e.stroke,minlen:e.length,classes:"invisible"===e?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":r,arrowTypeEnd:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":i,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(e.classes),labelStyle:n,style:n,pattern:e.stroke,look:a.look,animate:e.animate,animation:e.animation,curve:e.interpolate||this.edges.defaultInterpolate||a.flowchart?.curve});s.push(t)}),{nodes:t,edges:s,other:{},config:a}}defaultConfig(){return Yc.flowchart}}}),QO=i(()=>{Sk(),$O=mt((e,t)=>{let r;return"sandbox"===t&&(r=Q("#i"+e)),Q("sandbox"===t?r.nodes()[0].contentDocument.body:"body").select(`[id="${e}"]`)},"getDiagramElement")}),JO=i(()=>{FO=mt(({flowchart:e})=>{var t=e?.subGraphTitleMargin?.top??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:e=e?.subGraphTitleMargin?.bottom??0,subGraphTitleTotalMargin:t+e}},"getSubGraphTitleMargins")}),eB=i(()=>{ju(),Ei(),e(),JO(),Sk(),mN(),ER(),oI(),cM(),wD(),hI(),zO=mt(async(i,n)=>{B.info("Creating subgraph rect for ",n.id,n);let e=P(),{themeVariables:t,handDrawnSeed:a}=e,{clusterBkg:s,clusterBorder:o}=t,{labelStyles:r,nodeStyles:l,borderStyles:h,backgroundStyles:c}=ee(n),u=i.insert("g").attr("class","cluster "+n.cssClasses).attr("id",n.domId).attr("data-look",n.look),d=Lr(e),p=u.insert("g").attr("class","cluster-label "),g,f=(g="markdown"===n.labelType?await CR(p,n.label,{style:n.labelStyle,useHtmlLabels:d,isNode:!0,width:n.width}):await lM(p,n.label,n.labelStyle||"",!1,!0)).getBBox();Lr(e)&&(i=g.children[0],m=Q(g),f=i.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height));var i=n.width<=f.width+n.padding?f.width+n.padding:n.width,m=(n.width<=f.width+n.padding?n.diff=(i-n.width)/2-n.padding:n.diff=-n.padding,n.height),y=n.x-i/2,v=n.y-m/2;B.trace("Data ",n,JSON.stringify(n));let x;if("handDrawn"===n.look){let e=fN.svg(u),t=nI(n,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),r=e.path(TD(y,v,i,m,0),t);(x=u.insert(()=>(B.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",h.join(";")),x.select("path").attr("style",c.join(";").replace("fill","stroke"))}else(x=u.insert("rect",":first-child")).attr("style",l).attr("rx",n.rx).attr("ry",n.ry).attr("x",y).attr("y",v).attr("width",i).attr("height",m);return y=FO(e).subGraphTitleTopMargin,p.attr("transform",`translate(${n.x-f.width/2}, ${n.y-n.height/2+y})`),r&&(v=p.select("span"))&&v.attr("style",r),i=x.node().getBBox(),n.offsetX=0,n.width=i.width,n.height=i.height,n.offsetY=f.height-n.padding/2,n.intersect=function(e){return JR(n,e)},{cluster:u,labelBBox:f}},"rect"),qO=mt((e,t)=>{var r=(e=e.insert("g").attr("class","note-cluster").attr("id",t.domId)).insert("rect",":first-child"),i=0*t.padding,n=i/2,n=(r.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-n).attr("y",t.y-t.height/2-n).attr("width",t.width+i).attr("height",t.height+i).attr("fill","none"),r.node().getBBox());return t.width=n.width,t.height=n.height,t.intersect=function(e){return JR(t,e)},{cluster:e,labelBBox:{width:0,height:0}}},"noteGroup"),WO=mt(async(n,a)=>{let e=P(),{themeVariables:t,handDrawnSeed:s}=e,{altBackground:o,compositeBackground:l,compositeTitleBackground:h,nodeBorder:c}=t,u=n.insert("g").attr("class",a.cssClasses).attr("id",a.domId).attr("data-id",a.id).attr("data-look",a.look),r=u.insert("g",":first-child"),i=u.insert("g").attr("class","cluster-label"),d=u.append("rect"),p=await lM(i,a.label,a.labelStyle,void 0,!0),g=p.getBBox();Lr(e)&&(n=p.children[0],f=Q(p),g=n.getBoundingClientRect(),f.attr("width",g.width),f.attr("height",g.height));var f=(n=0*a.padding)/2,m=(a.width<=g.width+a.padding?g.width+a.padding:a.width)+n,y=(a.width<=g.width+a.padding?a.diff=(m-a.width)/2-a.padding:a.diff=-a.padding,a.height+n),n=a.height+n-g.height-6,v=a.x-m/2,x=a.y-y/2;a.width=m;let b=a.y-a.height/2-f+g.height+2,T;if("handDrawn"===a.look){let e=a.cssClasses.includes("statediagram-cluster-alt"),t=fN.svg(u),r=a.rx||a.ry?t.path(TD(v,x,m,y,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:c,seed:s}):t.rectangle(v,x,m,y,{seed:s}),i=(T=u.insert(()=>r,":first-child"),t.rectangle(v,b,m,n,{fill:e?o:l,fillStyle:e?"hachure":"solid",stroke:c,seed:s}));T=u.insert(()=>r,":first-child"),d=u.insert(()=>i)}else(T=r.insert("rect",":first-child")).attr("class","outer").attr("x",v).attr("y",x).attr("width",m).attr("height",y).attr("data-look",a.look),d.attr("class","inner").attr("x",v).attr("y",b).attr("width",m).attr("height",n);return i.attr("transform",`translate(${a.x-g.width/2}, ${1+x-(Lr(e)?0:3)})`),f=T.node().getBBox(),a.height=f.height,a.offsetX=0,a.offsetY=g.height-a.padding/2,a.labelBBox=g,a.intersect=function(e){return JR(a,e)},{cluster:u,labelBBox:g}},"roundedWithTitle"),UO=mt(async(i,n)=>{B.info("Creating subgraph rect for ",n.id,n);let e=P(),{themeVariables:t,handDrawnSeed:a}=e,{clusterBkg:s,clusterBorder:o}=t,{labelStyles:r,nodeStyles:l,borderStyles:h,backgroundStyles:c}=ee(n),u=i.insert("g").attr("class","cluster "+n.cssClasses).attr("id",n.domId).attr("data-look",n.look),d=Lr(e),p=u.insert("g").attr("class","cluster-label "),g=await CR(p,n.label,{style:n.labelStyle,useHtmlLabels:d,isNode:!0,width:n.width}),f=g.getBBox();Lr(e)&&(i=g.children[0],m=Q(g),f=i.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height));var i=n.width<=f.width+n.padding?f.width+n.padding:n.width,m=(n.width<=f.width+n.padding?n.diff=(i-n.width)/2-n.padding:n.diff=-n.padding,n.height),y=n.x-i/2,v=n.y-m/2;B.trace("Data ",n,JSON.stringify(n));let x;if("handDrawn"===n.look){let e=fN.svg(u),t=nI(n,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:a}),r=e.path(TD(y,v,i,m,n.rx),t);(x=u.insert(()=>(B.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",h.join(";")),x.select("path").attr("style",c.join(";").replace("fill","stroke"))}else(x=u.insert("rect",":first-child")).attr("style",l).attr("rx",n.rx).attr("ry",n.ry).attr("x",y).attr("y",v).attr("width",i).attr("height",m);return y=FO(e).subGraphTitleTopMargin,p.attr("transform",`translate(${n.x-f.width/2}, ${n.y-n.height/2+y})`),r&&(v=p.select("span"))&&v.attr("style",r),i=x.node().getBBox(),n.offsetX=0,n.width=i.width,n.height=i.height,n.offsetY=f.height-n.padding/2,n.intersect=function(e){return JR(n,e)},{cluster:u,labelBBox:f}},"kanbanSection"),GO=mt((t,r)=>{var{themeVariables:i,handDrawnSeed:n}=P(),i=i.nodeBorder,e=(t=t.insert("g").attr("class",r.cssClasses).attr("id",r.domId).attr("data-look",r.look)).insert("g",":first-child"),a=0*r.padding,s=r.width+a,a=(r.diff=-r.padding,r.height+a),o=r.x-s/2,l=r.y-a/2;r.width=s;let h;if("handDrawn"===r.look){let e=fN.svg(t).rectangle(o,l,s,a,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:i,seed:n});h=t.insert(()=>e,":first-child")}else h=e.insert("rect",":first-child"),r.look,h.attr("class","divider").attr("x",o).attr("y",l).attr("width",s).attr("height",a).attr("data-look",r.look);return i=h.node().getBBox(),r.height=i.height,r.offsetX=0,r.offsetY=0,r.intersect=function(e){return JR(r,e)},{cluster:t,labelBBox:{}}},"divider"),jO={rect:zO,squareRect:zO,roundedWithTitle:WO,noteGroup:qO,divider:GO,kanbanSection:UO},VO=new Map,YO=mt(async(e,t)=>{var r=t.shape||"rect",r=await jO[r](e,t);return VO.set(t.id,r),r},"insertCluster"),HO=mt(()=>{VO=new Map},"clear")}),tB=i(()=>{XO=mt((e,t)=>t?"translate("+-e.width/2+", "+-e.height/2+")":"translate("+-((e.x??0)+e.width/2)+", "+-((e.y??0)+e.height/2)+")","computeLabelTransform")});function rB(e,t){if(void 0===e||void 0===t)return{angle:0,deltaX:0,deltaY:0};e=aB(e),t=aB(t);var[e,r]=[e.x,e.y],[t,i]=[t.x,t.y],t=t-e,e=i-r;return{angle:Math.atan(e/t),deltaX:t,deltaY:e}}var iB,nB,aB,sB,oB,lB,hB,cB,uB=i(()=>{iB={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},nB={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5},mt(rB,"calculateDeltaAndAngle"),aB=mt(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),sB=mt(h=>({x:mt(function(e,t,r){let i=0,n=aB(r[0]).x<aB(r[r.length-1]).x?"left":"right";0===t&&Object.hasOwn(iB,h.arrowTypeStart)?({angle:a,deltaX:s}=rB(r[0],r[1]),i=iB[h.arrowTypeStart]*Math.cos(a)*(0<=s?1:-1)):t===r.length-1&&Object.hasOwn(iB,h.arrowTypeEnd)&&({angle:a,deltaX:s}=rB(r[r.length-1],r[r.length-2]),i=iB[h.arrowTypeEnd]*Math.cos(a)*(0<=s?1:-1));var t=Math.abs(aB(e).x-aB(r[r.length-1]).x),a=Math.abs(aB(e).y-aB(r[r.length-1]).y),s=Math.abs(aB(e).x-aB(r[0]).x),r=Math.abs(aB(e).y-aB(r[0]).y),o=iB[h.arrowTypeStart],l=iB[h.arrowTypeEnd];return t<l&&0<t&&a<l&&(a=l+1-t,a*="right"==n?-1:1,i-=a),s<o&&0<s&&r<o&&(l=o+1-s,l*="right"==n?-1:1,i+=l),aB(e).x+i},"x"),y:mt(function(e,t,r){let i=0,n=aB(r[0]).y<aB(r[r.length-1]).y?"down":"up";0===t&&Object.hasOwn(iB,h.arrowTypeStart)?({angle:a,deltaY:s}=rB(r[0],r[1]),i=iB[h.arrowTypeStart]*Math.abs(Math.sin(a))*(0<=s?1:-1)):t===r.length-1&&Object.hasOwn(iB,h.arrowTypeEnd)&&({angle:a,deltaY:s}=rB(r[r.length-1],r[r.length-2]),i=iB[h.arrowTypeEnd]*Math.abs(Math.sin(a))*(0<=s?1:-1));var t=Math.abs(aB(e).y-aB(r[r.length-1]).y),a=Math.abs(aB(e).x-aB(r[r.length-1]).x),s=Math.abs(aB(e).y-aB(r[0]).y),r=Math.abs(aB(e).x-aB(r[0]).x),o=iB[h.arrowTypeStart],l=iB[h.arrowTypeEnd];return t<l&&0<t&&a<l&&(a=l+1-t,a*="up"==n?-1:1,i-=a),s<o&&0<s&&r<o&&(l=o+1-s,l*="up"==n?-1:1,i+=l),aB(e).y+i},"y")}),"getLineFunctionsWithOffset")}),dB=i(()=>{e(),oB=mt((e,t,r,i,n,a=!1,s)=>{t.arrowTypeStart&&cB(e,"start",t.arrowTypeStart,r,i,n,a,s),t.arrowTypeEnd&&cB(e,"end",t.arrowTypeEnd,r,i,n,a,s)},"addEdgeMarkers"),lB={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}},hB=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],cB=mt((e,t,r,i,n,a,s=!1,o)=>{let l=lB[r],h=l&&hB.includes(l.type),c;l?(n=n+`_${a}-`+l.type+("start"===t?"Start":"End")+(s&&h?"-margin":""),o&&""!==o.trim()?(a=n+"_"+o.replace(/[^\dA-Za-z]/g,"_"),document.getElementById(a)||(s=document.getElementById(n))&&((c=s.cloneNode(!0)).id=a,c.querySelectorAll("path, circle, line").forEach(e=>{e.setAttribute("stroke",o),l.fill&&e.setAttribute("fill",o)}),s.parentNode?.appendChild(c)),e.attr("marker-"+t,`url(${i}#${a})`)):e.attr("marker-"+t,`url(${i}#${n})`)):B.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function pB(e,t){Lr(P())&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}function gB(t){var r=[],i=[];for(let e=1;e<t.length-1;e++){var n=t[e-1],a=t[e],s=t[e+1];(n.x===a.x&&a.y===s.y&&5<Math.abs(a.x-s.x)&&5<Math.abs(a.y-n.y)||n.y===a.y&&a.x===s.x&&5<Math.abs(a.x-n.x)&&5<Math.abs(a.y-s.y))&&(r.push(a),i.push(e))}return{cornerPoints:r,cornerPointPositions:i}}function fB(t,r){if(t.length<2)return"";let i="",n=t.length;for(let e=0;e<n;e++){var a,s,o,l,h,c=t[e],u=t[e-1],d=t[e+1];0===e?i+=`M${c.x},`+c.y:e===n-1||(h=c.x-u.x,u=c.y-u.y,a=d.x-c.x,d=d.y-c.y,o=Math.hypot(h,u),l=Math.hypot(a,d),o<1e-5)||l<1e-5||(h/=o,u/=o,a/=l,d/=l,s=Math.max(-1,Math.min(1,h*a+u*d)),(s=Math.acos(s))<1e-5)||Math.abs(Math.PI-s)<1e-5?i+=`L${c.x},`+c.y:(s=Math.min(r/Math.sin(s/2),o/2,l/2),o=c.x-h*s,l=c.y-u*s,h=c.x+a*s,u=c.y+d*s,i=(i+=`L${o},`+l)+`Q${c.x},${c.y} ${h},`+u)}return i}function mB(e,t){var r;return e&&t?(r=t.x-e.x,t=t.y-e.y,{angle:Math.atan2(t,r),deltaX:r,deltaY:t}):{angle:0,deltaX:0,deltaY:0}}function yB(e,t){var r,i,n,a=e.map(e=>({...e})),s=(2<=e.length&&iB[t.arrowTypeStart]&&(n=iB[t.arrowTypeStart],s=mB(i=e[0],e[1]).angle,r=n*Math.cos(s),n*=Math.sin(s),a[0].x=i.x+r,a[0].y=i.y+n),e.length);return 2<=s&&iB[t.arrowTypeEnd]&&(r=iB[t.arrowTypeEnd],i=e[s-1],n=mB(e[s-2],i).angle,t=r*Math.cos(n),e=r*Math.sin(n),a[s-1].x=i.x-t,a[s-1].y=i.y-e),a}var vB,xB,bB,TB,kB,wB,CB,EB,SB,_B,AB,LB,RB,IB,NB,DB,MB,OB,BB,PB,$B,FB,zB,qB,WB,UB,GB,jB,VB,YB,HB,XB,KB,ZB,QB,JB,eP,tP,rP,iP=i(()=>{ju(),Ei(),e(),ER(),tB(),S7(),uB(),JO(),Sk(),mN(),cM(),dB(),hI(),vB=mt(e=>"string"==typeof e?e:P()?.flowchart?.curve,"resolveEdgeCurveType"),xB=new Map,bB=new Map,TB=mt(()=>{xB.clear(),bB.clear()},"clear"),kB=mt(e=>e?"string"==typeof e?e:e.reduce((e,t)=>e+";"+t,""):"","getLabelStyles"),wB=mt(async(t,r)=>{var i=P(),n=Lr(i),a=ee(r).labelStyles,s=(r.labelStyle=a,(a=t.insert("g").attr("class","edgeLabel")).insert("g").attr("class","label").attr("data-id",r.id)),e="markdown"===r.labelType,e=await CR(t,r.label,{style:kB(r.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1,markdown:e,width:void 0},i);s.node().appendChild(e),B.info("abc82",r,r.labelType);let o=e.getBBox(),l=o;n?(i=e.children[0],c=Q(e),o=i.getBoundingClientRect(),l=o,c.attr("width",o.width),c.attr("height",o.height)):(i=Q(e).select("text").node())&&"function"==typeof i.getBBox&&(l=i.getBBox()),s.attr("transform",XO(l,n)),xB.set(r.id,a),r.width=o.width,r.height=o.height;let h;if(r.startLabelLeft){var c=t.insert("g").attr("class","edgeTerminals"),i=c.insert("g").attr("class","inner"),s=await lM(i,r.startLabelLeft,kB(r.labelStyle)||"",!1,!1);let e=(h=s).getBBox();n&&(a=s.children[0],s=Q(s),e=a.getBoundingClientRect(),s.attr("width",e.width),s.attr("height",e.height)),i.attr("transform",XO(e,n)),bB.get(r.id)||bB.set(r.id,{}),bB.get(r.id).startLeft=c,pB(h,r.startLabelLeft)}if(r.startLabelRight){s=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),i=await lM(s,r.startLabelRight,kB(r.labelStyle)||"",!1,!1),h=i,s.node().appendChild(i);let e=i.getBBox();n&&(c=i.children[0],i=Q(i),e=c.getBoundingClientRect(),i.attr("width",e.width),i.attr("height",e.height)),s.attr("transform",XO(e,n)),bB.get(r.id)||bB.set(r.id,{}),bB.get(r.id).startRight=a,pB(h,r.startLabelRight)}if(r.endLabelLeft){i=(c=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),s=await lM(i,r.endLabelLeft,kB(r.labelStyle)||"",!1,!1);let e=(h=s).getBBox();n&&(a=s.children[0],u=Q(s),e=a.getBoundingClientRect(),u.attr("width",e.width),u.attr("height",e.height)),i.attr("transform",XO(e,n)),c.node().appendChild(s),bB.get(r.id)||bB.set(r.id,{}),bB.get(r.id).endLeft=c,pB(h,r.endLabelLeft)}if(r.endLabelRight){var u=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),i=await lM(u,r.endLabelRight,kB(r.labelStyle)||"",!1,!1);let e=(h=i).getBBox();n&&(s=i.children[0],c=Q(i),e=s.getBoundingClientRect(),c.attr("width",e.width),c.attr("height",e.height)),u.attr("transform",XO(e,n)),a.node().appendChild(i),bB.get(r.id)||bB.set(r.id,{}),bB.get(r.id).endRight=a,pB(h,r.endLabelRight)}return e},"insertEdgeLabel"),mt(pB,"setTerminalWidth"),CB=mt((i,n)=>{B.debug("Moving label abc88 ",i.id,i.label,xB.get(i.id),n);var a,s=n.updatedPath||n.originalPath,o=P(),o=FO(o).subGraphTitleTotalMargin;if(i.label){let e=xB.get(i.id),t=i.x,r=i.y;s&&(a=k7.calcLabelPosition(s),B.debug("Moving label "+i.label+" from (",t,",",r,") to (",a.x,",",a.y,") abc88"),n.updatedPath)&&(t=a.x,r=a.y),e.attr("transform",`translate(${t}, ${r+o/2})`)}if(i.startLabelLeft){let e=bB.get(i.id).startLeft,t=i.x,r=i.y;s&&(n=k7.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_left",s),t=n.x,r=n.y),e.attr("transform",`translate(${t}, ${r})`)}if(i.startLabelRight){let e=bB.get(i.id).startRight,t=i.x,r=i.y;s&&(a=k7.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_right",s),t=a.x,r=a.y),e.attr("transform",`translate(${t}, ${r})`)}if(i.endLabelLeft){let e=bB.get(i.id).endLeft,t=i.x,r=i.y;s&&(o=k7.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_left",s),t=o.x,r=o.y),e.attr("transform",`translate(${t}, ${r})`)}if(i.endLabelRight){let e=bB.get(i.id).endRight,t=i.x,r=i.y;s&&(n=k7.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_right",s),t=n.x,r=n.y),e.attr("transform",`translate(${t}, ${r})`)}},"positionEdgeLabel"),EB=mt((e,t)=>{var r=e.x,i=e.y,r=Math.abs(t.x-r),t=Math.abs(t.y-i);return e.width/2<=r||e.height/2<=t},"outsideNode"),SB=mt((e,i,n)=>{B.debug(`intersection calc abc89:
outsidePoint: ${JSON.stringify(i)}
insidePoint : ${JSON.stringify(n)}
node : x:${e.x} y:${e.y} w:${e.width} h:`+e.height);let a=e.x,t=e.y,r=Math.abs(a-n.x),s=e.width/2,o=n.x<i.x?s-r:s+r,l=e.height/2,h=Math.abs(i.y-n.y),c=Math.abs(i.x-n.x),u;if(Math.abs(t-i.y)*s>Math.abs(a-i.x)*l)return e=n.y<i.y?i.y-l-t:t-l-i.y,o=c*e/h,u={x:n.x<i.x?n.x+o:n.x-c+o,y:n.y<i.y?n.y+h-e:n.y-h+e},0===o&&(u.x=i.x,u.y=i.y),0===c&&(u.x=i.x),0===h&&(u.y=i.y),B.debug(`abc89 top/bottom calc, Q ${h}, q ${e}, R ${c}, r `+o,u),u;{let e=h*(o=n.x<i.x?i.x-s-a:a-s-i.x)/c,t=n.x<i.x?n.x+c-o:n.x-c+o,r=n.y<i.y?n.y+e:n.y-e;return B.debug(`sides calc abc89, Q ${h}, q ${e}, R ${c}, r `+o,{_x:t,_y:r}),0===o&&(t=i.x,r=i.y),0===c&&(t=i.x),0===h&&(r=i.y),{x:t,y:r}}},"intersection"),_B=mt((e,i)=>{B.warn("abc88 cutPathAtIntersect",e,i);let n=[],a=e[0],s=!1;return e.forEach(e=>{if(B.info("abc88 checking point",e,i),EB(i,e)||s)B.warn("abc88 outside",e,a),a=e,s||n.push(e);else{let t=SB(i,a,e),r=(B.debug("abc88 inside",e,a,t),B.debug("abc88 intersection",t,i),!1);n.forEach(e=>{r=r||e.x===t.x&&e.y===t.y}),n.some(e=>e.x===t.x&&e.y===t.y)?B.warn("abc88 no intersect",t,n):n.push(t),s=!0}}),B.debug("returning points",n),n},"cutPathAtIntersect"),mt(gB,"extractCornerPoints"),AB=mt(function(e,t,r){var i=t.x-e.x,e=t.y-e.y,r=r/Math.sqrt(i*i+e*e);return{x:t.x-r*i,y:t.y-r*e}},"findAdjacentPoint"),LB=mt(function(i){var e=gB(i).cornerPointPositions,n=[];for(let r=0;r<i.length;r++)if(e.includes(r)){var a=i[r-1],s=i[r+1],o=i[r],l=AB(a,o,5),h=AB(s,o,5),c=h.x-l.x,u=h.y-l.y;n.push(l);let e=2*Math.sqrt(2),t={x:o.x,y:o.y};10<Math.abs(s.x-a.x)&&10<=Math.abs(s.y-a.y)?(B.debug("Corner point fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y)),t=o.x===l.x?{x:c<0?l.x-5+e:l.x+5-e,y:u<0?l.y-e:l.y+e}:{x:c<0?l.x-e:l.x+e,y:u<0?l.y-5+e:l.y+5-e}):B.debug("Corner point skipping fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y)),n.push(t,h)}else n.push(i[r]);return n},"fixCorners"),RB=mt((e,t,r)=>(e=Math.floor((e-t-r)/4),`0 ${t} ${Array(e).fill("2 2").join(" ")} `+r),"generateDashArray"),IB=mt(function(t,e,r,i,n,a,s,o=!1){if(!s)throw new Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);let l=P().handDrawnSeed,h=e.points,c=!1,u=n,d=a;var p,g=[];for(p in e.cssCompiledStyles)iI(p)||g.push(e.cssCompiledStyles[p]);B.debug("UIO intersect check",e.points,d.x,u.x),d.intersect&&u.intersect&&!o&&((h=h.slice(1,e.points.length-1)).unshift(u.intersect(h[0])),B.debug("Last point UIO",e.start,"--\x3e",e.end,h[h.length-1],d,d.intersect(h[h.length-1])),h.push(d.intersect(h[h.length-1]))),n=btoa(JSON.stringify(h)),e.toCluster&&(B.info("to cluster abc88",r.get(e.toCluster)),h=_B(e.points,r.get(e.toCluster).node),c=!0),e.fromCluster&&(B.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(h,null,2)),h=_B(h.reverse(),r.get(e.fromCluster).node).reverse(),c=!0);let f=h.filter(e=>!Number.isNaN(e.y)),m=vB(e.curve),y=("rounded"!==m&&(f=LB(f)),x3);switch(m){case"linear":y=x3;break;case"basis":y=z3;break;case"cardinal":y=J3;break;case"bumpX":y=N3;break;case"bumpY":y=D3;break;case"catmullRom":y=hT;break;case"monotoneX":y=_T;break;case"monotoneY":y=AT;break;case"natural":y=NT;break;case"step":y=OT;break;case"stepAfter":y=PT;break;case"stepBefore":y=BT;break;case"rounded":y=x3;break;default:y=z3}let{x:v,y:x}=sB(e),b=C3().x(v).y(x).curve(y),T;switch(e.thickness){case"normal":T="edge-thickness-normal";break;case"thick":T="edge-thickness-thick";break;case"invisible":T="edge-thickness-invisible";break;default:T="edge-thickness-normal"}switch(e.pattern){case"solid":T+=" edge-pattern-solid";break;case"dotted":T+=" edge-pattern-dotted";break;case"dashed":T+=" edge-pattern-dashed";break;default:T+=" edge-pattern-solid"}let k,w="rounded"===m?fB(yB(f,e),5):b(f),C=Array.isArray(e.style)?e.style:[e.style],E=C.find(e=>e?.startsWith("stroke:")),S="",_=(e.animate&&(S="edge-animation-fast"),e.animation&&(S="edge-animation-"+e.animation),!1),A=("handDrawn"===e.look?(a=fN.svg(t),Object.assign([],f),o=a.path(w,{roughness:.3,seed:l}),T+=" transition",r=(k=Q(o).select("path").attr("id",s+"-"+e.id).attr("class"," "+T+(e.classes?" "+e.classes:"")+(S?" "+S:"")).attr("style",C?C.reduce((e,t)=>e+";"+t,""):"")).attr("d"),k.attr("d",r),t.node().appendChild(k.node())):(a=g.join(";"),o=C?C.reduce((e,t)=>e+t+";",""):"",r=(a?a+";"+o+";":o)+";"+(C?C.reduce((e,t)=>e+";"+t,""):""),k=t.append("path").attr("d",w).attr("id",s+"-"+e.id).attr("class"," "+T+(e.classes?" "+e.classes:"")+(S?" "+S:"")).attr("style",r),E=r.match(/stroke:([^;]+)/)?.[1],_=!0===e.animate||!!e.animation||a.includes("animation"),r="function"==typeof(o=k.node()).getTotalLength?o.getTotalLength():0,a=nB[e.arrowTypeStart]||0,o=nB[e.arrowTypeEnd]||0,"neo"!==e.look||_||(r=`stroke-dasharray: ${"dotted"===e.pattern||"dashed"===e.pattern?RB(r,a,o):`0 ${a} ${r-a-o} `+o}; stroke-dashoffset: 0;`,k.attr("style",r+k.attr("style")))),k.attr("data-edge",!0),k.attr("data-et","edge"),k.attr("data-id",e.id),k.attr("data-points",n),k.attr("data-look",X_(e.look)),e.showPoints&&f.forEach(e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)}),"");return(P().flowchart.arrowMarkerAbsolute||P().state.arrowMarkerAbsolute)&&(A=(A=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(").replace(/\)/g,"\\)")),B.info("arrowTypeStart",e.arrowTypeStart),B.info("arrowTypeEnd",e.arrowTypeEnd),a=!_&&"neo"===e?.look,oB(k,e,A,s,i,a,E),o=Math.floor(h.length/2),r=h[o],n={},(c=!k7.isLabelCoordinateInPath(r,k.attr("d"))||c)&&(n.updatedPath=h),n.originalPath=e.points,n},"insertEdge"),mt(fB,"generateRoundedPath"),mt(mB,"calculateDeltaAndAngle"),mt(yB,"applyMarkerOffsetsToPoints")}),nP=i(()=>{e(),Ei(),NB=mt((t,e,r,i)=>{e.forEach(e=>{tP[e](t,r,i)})},"insertMarkers"),DB=mt((e,t,r)=>{B.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").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"),MB=mt((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"),OB=mt((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"),BB=mt((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"),PB=mt((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"),$B=mt((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"),FB=mt((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"),zB=mt((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"),qB=mt((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"),WB=mt((e,t,r)=>{var i=br().themeVariables.transitionColor;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",""+i)},"barbNeo"),UB=mt((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"),GB=mt((e,t,r)=>{var 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"),(i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),jB=mt((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"),VB=mt((e,t,r)=>{var 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"),(i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),YB=mt((e,t,r)=>{var i=br().themeVariables.strokeWidth;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",""+i),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",""+i)},"only_one_neo"),HB=mt((e,t,r)=>{var{strokeWidth:i,mainBkg:n}=br().themeVariables,a=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");a.append("circle").attr("fill",n??"white").attr("cx",21).attr("cy",9).attr("stroke-width",""+i).attr("r",6),a.append("path").attr("d","M9,0 L9,18").attr("stroke-width",""+i),(a=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")).append("circle").attr("fill",n??"white").attr("cx",9).attr("cy",9).attr("stroke-width",""+i).attr("r",6),a.append("path").attr("d","M21,0 L21,18").attr("stroke-width",""+i)},"zero_or_one_neo"),XB=mt((e,t,r)=>{var i=br().themeVariables.strokeWidth;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",""+i),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",""+i)},"one_or_more_neo"),KB=mt((e,t,r)=>{var{strokeWidth:i,mainBkg:n}=br().themeVariables,a=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");a.append("circle").attr("fill",n??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",""+i),a.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",""+i),(a=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")).append("circle").attr("fill",n??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",""+i),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",""+i)},"zero_or_more_neo"),ZB=mt((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"),QB=mt((e,t,r)=>{var i=br().themeVariables.strokeWidth;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",""+i).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"),JB=mt((e,t,r)=>{(e=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")).append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),e.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),e.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),eP=mt((e,t,r)=>{var i=br().themeVariables.strokeWidth;(e=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")).append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),e.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),e.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),e.selectAll("*").attr("stroke-width",""+i)},"requirement_contains_neo"),tP={extension:DB,composition:MB,aggregation:OB,dependency:BB,lollipop:PB,point:$B,circle:FB,cross:zB,barb:qB,barbNeo:WB,only_one:UB,zero_or_one:GB,one_or_more:jB,zero_or_more:VB,only_one_neo:YB,zero_or_one_neo:HB,one_or_more_neo:XB,zero_or_more_neo:KB,requirement_arrow:ZB,requirement_contains:JB,requirement_arrow_neo:QB,requirement_contains_neo:eP},rP=NB});async function aP(t,r,i){let n,a;"rect"===r.shape&&(r.rx&&r.ry?r.shape="roundedRect":r.shape="squareRect");var s=r.shape?BO[r.shape]:void 0;if(!s)throw new Error(`No such shape: ${r.shape}. Please check your syntax.`);if(r.link){let e;"sandbox"===i.config.securityLevel?e="_top":r.linkTarget&&(e=r.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",r.link).attr("target",e??null),a=await s(n,r,i)}else a=await s(t,r,i),n=a;return n.attr("data-look",X_(r.look)),r.tooltip&&a.attr("title",r.tooltip),sP.set(r.id,n),r.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var sP,oP,lP,hP,cP,uP=i(()=>{e(),KO(),S7(),sP=new Map,mt(aP,"insertNode"),oP=mt((e,t)=>{sP.set(t.id,e)},"setNodeElem"),lP=mt(()=>{sP.clear()},"clear"),hP=mt(e=>{var t=sP.get(e.id),r=(B.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")"),e.diff||0);return e.clusterNode?t.attr("transform","translate("+(e.x+r-e.width/2)+", "+(e.y-e.height/2-8)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),r},"positionNode")}),dP=i(()=>{Ei(),ic(),e(),eB(),iP(),nP(),uP(),BR(),S7(),cP={common:I,getConfig:br,insertCluster:YO,insertEdge:IB,insertEdgeLabel:wB,insertMarkers:rP,insertNode:aP,interpolateToCurve:P_,labelHelper:NR,log:B,positionEdgeLabel:CB}});function pP(e){return"symbol"==typeof e||mE(e)&&"[object Symbol]"==Hk(e)}var gP,fP=i(()=>{Xk(),yE(),mt(pP,"isSymbol"),gP=pP});function mP(e,t){for(var r=-1,i=null==e?0:e.length,n=Array(i);++r<i;)n[r]=t(e[r],r,e);return n}var yP,vP=i(()=>{mt(mP,"arrayMap"),yP=mP});function xP(e){var t;return"string"==typeof e?e:EE(e)?yP(e,xP)+"":gP(e)?kP?kP.call(e):"":"0"==(t=e+"")&&1/e==-bP?"-0":t}var bP,TP,kP,wP,CP=i(()=>{Dk(),vP(),AE(),fP(),bP=1/0,TP=Tk?Tk.prototype:void 0,kP=TP?TP.toString:void 0,mt(xP,"baseToString"),wP=xP});function EP(e){for(var t=e.length;t--&&SP.test(e.charAt(t)););return t}var SP,_P,AP=i(()=>{SP=/\s/,mt(EP,"trimmedEndIndex"),_P=EP});function LP(e){return e&&e.slice(0,_P(e)+1).replace(RP,"")}var RP,IP,NP=i(()=>{AP(),RP=/^\s+/,mt(LP,"baseTrim"),IP=LP});function DP(e){if("number"==typeof e)return e;if(gP(e))return MP;if(Zk(e)&&(t="function"==typeof e.valueOf?e.valueOf():e,e=Zk(t)?t+"":t),"string"!=typeof e)return 0===e?e:+e;e=IP(e);var t=BP.test(e);return t||PP.test(e)?$P(e.slice(2),t?2:8):OP.test(e)?MP:+e}var MP,OP,BP,PP,$P,FP,zP=i(()=>{NP(),Qk(),fP(),MP=NaN,OP=/^[-+]0x[0-9a-f]+$/i,BP=/^0b[01]+$/i,PP=/^0o[0-7]+$/i,$P=parseInt,mt(DP,"toNumber"),FP=DP});function qP(e){return e?(e=FP(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}var WP,UP=i(()=>{zP(),mt(qP,"toFinite"),WP=qP});function GP(e){var t=(e=WP(e))%1;return e==e?t?e-t:e:0}var jP,VP,YP,HP=i(()=>{UP(),mt(GP,"toInteger"),jP=GP}),XP=i(()=>{Lw(),Nk(),VP=Sw(xk,"WeakMap"),YP=VP});function KP(){}var ZP,QP=i(()=>{mt(KP,"noop"),ZP=KP});function JP(e,t){for(var r=-1,i=null==e?0:e.length;++r<i&&!1!==t(e[r],r,e););return e}var e$,t$=i(()=>{mt(JP,"arrayEach"),e$=JP});function r$(e,t,r,i){for(var n=e.length,a=r+(i?1:-1);i?a--:++a<n;)if(t(e[a],a,e))return a;return-1}var i$,n$=i(()=>{mt(r$,"baseFindIndex"),i$=r$});function a$(e){return e!=e}var s$,o$=i(()=>{mt(a$,"baseIsNaN"),s$=a$});function l$(e,t,r){for(var i=r-1,n=e.length;++i<n;)if(e[i]===t)return i;return-1}var h$,c$=i(()=>{mt(l$,"strictIndexOf"),h$=l$});function u$(e,t,r){return t==t?h$(e,t,r):i$(e,s$,r)}var d$,p$=i(()=>{n$(),o$(),c$(),mt(u$,"baseIndexOf"),d$=u$});function g$(e,t){return!(null==e||!e.length)&&-1<d$(e,t,0)}var f$,m$,y$,v$=i(()=>{p$(),mt(g$,"arrayIncludes"),f$=g$}),x$=i(()=>{sE(),m$=iE(Object.keys,Object),y$=m$});function b$(e){if(!cE(e))return y$(e);var t,r=[];for(t in Object(e))k$.call(e,t)&&"constructor"!=t&&r.push(t);return r}var T$,k$,w$,C$=i(()=>{uE(),x$(),T$=Object.prototype,k$=T$.hasOwnProperty,mt(b$,"baseKeys"),w$=b$});function E$(e){return(DE(e)?OS:w$)(e)}var S$,_$,A$,L$,R$=i(()=>{BS(),C$(),ME(),mt(E$,"keys"),S$=E$}),I$=i(()=>{TS(),CS(),O_(),ME(),uE(),R$(),A$=Object.prototype,_$=A$.hasOwnProperty,A$=N_(function(e,t){if(cE(t)||DE(t))wS(t,S$(t),e);else for(var r in t)_$.call(t,r)&&bS(e,r,t[r])}),L$=A$});function N$(e,t){var r;return!EE(e)&&(!("number"!=(r=typeof e)&&"symbol"!=r&&"boolean"!=r&&null!=e&&!gP(e))||M$.test(e)||!D$.test(e)||null!=t&&e in Object(t))}var D$,M$,O$,B$=i(()=>{AE(),fP(),D$=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,M$=/^\w*$/,mt(N$,"isKey"),O$=N$});function P$(e){var t=(e=e6(e,function(e){return 500===t.size&&t.clear(),e})).cache;return e}var $$,F$,z$,q$,W$,U$=i(()=>{t6(),mt(P$,"memoizeCapped"),$$=P$}),G$=i(()=>{U$(),F$=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,z$=/\\(\\)?/g,q$=$$(function(e){var n=[];return 46===e.charCodeAt(0)&&n.push(""),e.replace(F$,function(e,t,r,i){n.push(r?i.replace(z$,"$1"):t||e)}),n}),W$=q$});function j$(e){return null==e?"":wP(e)}var V$,Y$=i(()=>{CP(),mt(j$,"toString"),V$=j$});function H$(e,t){return EE(e)?e:O$(e,t)?[e]:W$(V$(e))}var X$,K$=i(()=>{AE(),B$(),G$(),Y$(),mt(H$,"castPath"),X$=H$});function Z$(e){var t;return"string"==typeof e||gP(e)?e:"0"==(t=e+"")&&1/e==-1/0?"-0":t}var Q$,J$=i(()=>{fP(),mt(Z$,"toKey"),Q$=Z$});function eF(e,t){for(var r=0,i=(t=X$(t,e)).length;null!=e&&r<i;)e=e[Q$(t[r++])];return r&&r==i?e:void 0}var tF,rF=i(()=>{K$(),J$(),mt(eF,"baseGet"),tF=eF});function iF(e,t,r){return void 0===(e=null==e?void 0:tF(e,t))?r:e}var nF,aF=i(()=>{rF(),mt(iF,"get"),nF=iF});function sF(e,t){for(var r=-1,i=t.length,n=e.length;++r<i;)e[n+r]=t[r];return e}var oF,lF=i(()=>{mt(sF,"arrayPush"),oF=sF});function hF(e){return EE(e)||wE(e)||!!(cF&&e&&e[cF])}var cF,uF,dF=i(()=>{Dk(),_E(),AE(),cF=Tk?Tk.isConcatSpreadable:void 0,mt(hF,"isFlattenable"),uF=hF});function pF(e,t,r,i,n){var a=-1,s=e.length;for(r=r||uF,n=n||[];++a<s;){var o=e[a];0<t&&r(o)?1<t?pF(o,t-1,r,i,n):oF(n,o):i||(n[n.length]=o)}return n}var gF,fF=i(()=>{lF(),dF(),mt(pF,"baseFlatten"),gF=pF});function mF(e){return null!=e&&e.length?gF(e,1):[]}var yF,vF=i(()=>{fF(),mt(mF,"flatten"),yF=mF});function xF(e){return k_(u_(e,void 0,yF),e+"")}var bF,TF=i(()=>{vF(),d_(),C_(),mt(xF,"flatRest"),bF=xF});function kF(e,t,r){var i=-1,n=e.length;(r=n<r?n:r)<0&&(r+=n),n=r<(t=t<0?n<-t?0:n+t:t)?0:r-t>>>0,t>>>=0;for(var a=Array(n);++i<n;)a[i]=e[i+t];return a}var wF,CF=i(()=>{mt(kF,"baseSlice"),wF=kF});function EF(e){return SF.test(e)}var SF,_F,AF=i(()=>{SF=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),mt(EF,"hasUnicode"),_F=EF});function LF(e,t,r,i){var n=-1,a=null==e?0:e.length;for(i&&a&&(r=e[++n]);++n<a;)r=t(r,e[n],n,e);return r}var RF,IF=i(()=>{mt(LF,"arrayReduce"),RF=LF});function NF(e,t){return e&&wS(t,S$(t),e)}var DF,MF=i(()=>{CS(),R$(),mt(NF,"baseAssign"),DF=NF});function OF(e,t){return e&&wS(t,VS(t),e)}var BF,PF=i(()=>{CS(),YS(),mt(OF,"baseAssignIn"),BF=OF});function $F(e,t){for(var r=-1,i=null==e?0:e.length,n=0,a=[];++r<i;){var s=e[r];t(s,r,e)&&(a[n++]=s)}return a}var FF,zF=i(()=>{mt($F,"arrayFilter"),FF=$F});function qF(){return[]}var WF,UF,GF,jF,VF,YF=i(()=>{mt(qF,"stubArray"),WF=qF}),HF=i(()=>{zF(),YF(),UF=Object.prototype,GF=UF.propertyIsEnumerable,VF=(jF=Object.getOwnPropertySymbols)?function(t){return null==t?[]:(t=Object(t),FF(jF(t),function(e){return GF.call(t,e)}))}:WF});function XF(e,t){return wS(e,VF(e),t)}var KF,ZF,QF,JF=i(()=>{CS(),HF(),mt(XF,"copySymbols"),KF=XF}),ez=i(()=>{lF(),oE(),HF(),YF(),ZF=Object.getOwnPropertySymbols,QF=ZF?function(e){for(var t=[];e;)oF(t,VF(e)),e=aE(e);return t}:WF});function tz(e,t){return wS(e,QF(e),t)}var rz,iz=i(()=>{CS(),ez(),mt(tz,"copySymbolsIn"),rz=tz});function nz(e,t,r){return t=t(e),EE(e)?t:oF(t,r(e))}var az,sz=i(()=>{lF(),AE(),mt(nz,"baseGetAllKeys"),az=nz});function oz(e){return az(e,S$,VF)}var lz,hz=i(()=>{sz(),HF(),R$(),mt(oz,"getAllKeys"),lz=oz});function cz(e){return az(e,VS,QF)}var uz,dz,pz,gz,fz,mz,yz,vz,xz,bz,Tz,kz,wz,Cz,Ez,Sz,_z,Az,Lz,Rz=i(()=>{sz(),ez(),YS(),mt(cz,"getAllKeysIn"),uz=cz}),Iz=i(()=>{Lw(),Nk(),dz=Sw(xk,"DataView"),pz=dz}),Nz=i(()=>{Lw(),Nk(),gz=Sw(xk,"Promise"),fz=gz}),Dz=i(()=>{Lw(),Nk(),mz=Sw(xk,"Set"),yz=mz}),Mz=i(()=>{Iz(),_C(),Nz(),Dz(),XP(),Xk(),pw(),vz="[object Map]",xz="[object Promise]",bz="[object Set]",Tz="[object WeakMap]",kz="[object DataView]",wz=dw(pz),Cz=dw(EC),Ez=dw(fz),Sz=dw(yz),_z=dw(YP),Az=Hk,(pz&&Az(new pz(new ArrayBuffer(1)))!=kz||EC&&Az(new EC)!=vz||fz&&Az(fz.resolve())!=xz||yz&&Az(new yz)!=bz||YP&&Az(new YP)!=Tz)&&(Az=mt(function(e){var t=Hk(e);if(e=(e="[object Object]"==t?e.constructor:void 0)?dw(e):"")switch(e){case wz:return kz;case Cz:return vz;case Ez:return xz;case Sz:return bz;case _z:return Tz}return t},"getTag")),Lz=Az});function Oz(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Pz.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Bz,Pz,$z,Fz=i(()=>{Bz=Object.prototype,Pz=Bz.hasOwnProperty,mt(Oz,"initCloneArray"),$z=Oz});function zz(e,t){return t=t?j6(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.byteLength)}var qz,Wz=i(()=>{V6(),mt(zz,"cloneDataView"),qz=zz});function Uz(e){var t=new e.constructor(e.source,Gz.exec(e));return t.lastIndex=e.lastIndex,t}var Gz,jz,Vz=i(()=>{Gz=/\w*$/,mt(Uz,"cloneRegExp"),jz=Uz});function Yz(e){return Xz?Object(Xz.call(e)):{}}var Hz,Xz,Kz,Zz=i(()=>{Dk(),Hz=Tk?Tk.prototype:void 0,Xz=Hz?Hz.valueOf:void 0,mt(Yz,"cloneSymbol"),Kz=Yz});function Qz(e,t,r){var i=e.constructor;switch(t){case"[object ArrayBuffer]":return j6(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return qz(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return H6(e,r);case"[object Map]":return new i;case"[object Number]":case"[object String]":return new i(e);case"[object RegExp]":return jz(e);case"[object Set]":return new i;case"[object Symbol]":return Kz(e)}}var Jz,eq=i(()=>{V6(),Wz(),Vz(),Zz(),X6(),mt(Qz,"initCloneByTag"),Jz=Qz});function tq(e){return mE(e)&&"[object Map]"==Lz(e)}var rq,iq,nq,aq=i(()=>{Mz(),yE(),mt(tq,"baseIsMap"),rq=tq}),sq=i(()=>{aq(),uS(),dS(),iq=(iq=lS&&lS.isMap)?nS(iq):rq,nq=iq});function oq(e){return mE(e)&&"[object Set]"==Lz(e)}var lq,hq,cq,uq=i(()=>{Mz(),yE(),mt(oq,"baseIsSet"),lq=oq}),dq=i(()=>{uq(),uS(),dS(),hq=(hq=lS&&lS.isSet)?nS(hq):lq,cq=hq});function pq(r,i,n,e,t,a){var s,o=i&gq,l=i&fq,h=i&mq;if(void 0===(s=n?t?n(r,e,t,a):n(r):s)){if(!Zk(r))return r;if(e=EE(r)){if(s=$z(r),!o)return Z6(r,s)}else{var c=Lz(r),u=c==vq||c==xq;if(WE(r))return F6(r,o);if(c==bq||c==yq||u&&!t){if(s=l||u?{}:pE(r),!o)return l?rz(r,BF(s,r)):KF(r,DF(s,r))}else{if(!Tq[c])return t?r:{};s=Jz(r,c,o)}}if(u=(a=a||new v6).get(r))return u;a.set(r,s),cq(r)?r.forEach(function(e){s.add(pq(e,i,n,e,r,a))}):nq(r)&&r.forEach(function(e,t){s.set(t,pq(e,i,n,t,r,a))});var d=e?void 0:(h?l?uz:lz:l?VS:S$)(r);e$(d||r,function(e,t){d&&(e=r[t=e]),bS(s,t,pq(e,i,n,t,r,a))})}return s}var gq,fq,mq,yq,vq,xq,bq,Tq,kq,wq=i(()=>{T6(),t$(),TS(),MF(),PF(),W6(),eE(),JF(),iz(),hz(),Rz(),Mz(),Fz(),eq(),gE(),AE(),GE(),sq(),Qk(),dq(),R$(),YS(),gq=1,fq=2,mq=4,vq="[object Function]",xq="[object GeneratorFunction]",bq="[object Object]",(Tq={})[yq="[object Arguments]"]=Tq["[object Array]"]=Tq["[object ArrayBuffer]"]=Tq["[object DataView]"]=Tq["[object Boolean]"]=Tq["[object Date]"]=Tq["[object Float32Array]"]=Tq["[object Float64Array]"]=Tq["[object Int8Array]"]=Tq["[object Int16Array]"]=Tq["[object Int32Array]"]=Tq["[object Map]"]=Tq["[object Number]"]=Tq[bq]=Tq["[object RegExp]"]=Tq["[object Set]"]=Tq["[object String]"]=Tq["[object Symbol]"]=Tq["[object Uint8Array]"]=Tq["[object Uint8ClampedArray]"]=Tq["[object Uint16Array]"]=Tq["[object Uint32Array]"]=!0,Tq["[object Error]"]=Tq[vq]=Tq["[object WeakMap]"]=!1,mt(pq,"baseClone"),kq=pq});function Cq(e){return kq(e,4)}var Eq,Sq=i(()=>{wq(),mt(Cq,"clone"),Eq=Cq});function _q(e){return kq(e,5)}var Aq,Lq=i(()=>{wq(),mt(_q,"cloneDeep"),Aq=_q});function Rq(e){for(var t=-1,r=null==e?0:e.length,i=0,n=[];++t<r;){var a=e[t];a&&(n[i++]=a)}return n}var Iq,Nq=i(()=>{mt(Rq,"compact"),Iq=Rq});function Dq(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}var Mq,Oq=i(()=>{mt(Dq,"setCacheAdd"),Mq=Dq});function Bq(e){return this.__data__.has(e)}var Pq,$q=i(()=>{mt(Bq,"setCacheHas"),Pq=Bq});function Fq(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new KC;++t<r;)this.add(e[t])}var zq,qq=i(()=>{ZC(),Oq(),$q(),mt(Fq,"SetCache"),Fq.prototype.add=Fq.prototype.push=Mq,Fq.prototype.has=Pq,zq=Fq});function Wq(e,t){for(var r=-1,i=null==e?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}var Uq,Gq=i(()=>{mt(Wq,"arraySome"),Uq=Wq});function jq(e,t){return e.has(t)}var Vq,Yq=i(()=>{mt(jq,"cacheHas"),Vq=jq});function Hq(e,t,r,i,n,a){var s=1&r,o=e.length;if(o!=(l=t.length)&&!(s&&o<l))return!1;var l=a.get(e),h=a.get(t);if(l&&h)return l==t&&h==e;var c=-1,u=!0,d=2&r?new zq:void 0;for(a.set(e,t),a.set(t,e);++c<o;){var p,g=e[c],f=t[c];if(void 0!==(p=i?s?i(f,g,c,t,e,a):i(g,f,c,e,t,a):p)){if(p)continue;u=!1;break}if(d){if(!Uq(t,function(e,t){if(!Vq(d,t)&&(g===e||n(g,e,r,i,a)))return d.push(t)})){u=!1;break}}else if(g!==f&&!n(g,f,r,i,a)){u=!1;break}}return a.delete(e),a.delete(t),u}var Xq,Kq=i(()=>{qq(),Gq(),Yq(),mt(Hq,"equalArrays"),Xq=Hq});function Zq(e){var r=-1,i=Array(e.size);return e.forEach(function(e,t){i[++r]=[t,e]}),i}var Qq,Jq=i(()=>{mt(Zq,"mapToArray"),Qq=Zq});function eW(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var tW,rW=i(()=>{mt(eW,"setToArray"),tW=eW});function iW(e,t,r,i,n,a,s){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new q6(e),new q6(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return iC(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var o=Qq;case"[object Set]":var l,o=o||tW;return!!(e.size==t.size||1&i)&&((l=s.get(e))?l==t:(i|=2,s.set(e,t),l=Xq(o(e),o(t),i,n,a,s),s.delete(e),l));case"[object Symbol]":if(aW)return aW.call(e)==aW.call(t)}return!1}var nW,aW,sW,oW=i(()=>{Dk(),U6(),nC(),Kq(),Jq(),rW(),nW=Tk?Tk.prototype:void 0,aW=nW?nW.valueOf:void 0,mt(iW,"equalByTag"),sW=iW});function lW(e,t,r,i,n,a){var s=1&r,o=lz(e),l=o.length;if(l!=lz(t).length&&!s)return!1;for(var h=l;h--;){var c=o[h];if(!(s?c in t:cW.call(t,c)))return!1}var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var p=!0;a.set(e,t),a.set(t,e);for(var g=s;++h<l;){var f,m=e[c=o[h]],y=t[c];if(!(void 0===(f=i?s?i(y,m,c,t,e,a):i(m,y,c,e,t,a):f)?m===y||n(m,y,r,i,a):f)){p=!1;break}g=g||"constructor"==c}return p&&!g&&(u=e.constructor)!=(d=t.constructor)&&"constructor"in e&&"constructor"in t&&!("function"==typeof u&&u instanceof u&&"function"==typeof d&&d instanceof d)&&(p=!1),a.delete(e),a.delete(t),p}var hW,cW,uW,dW=i(()=>{hz(),hW=Object.prototype,cW=hW.hasOwnProperty,mt(lW,"equalObjects"),uW=lW});function pW(e,t,r,i,n,a){var s=EE(e),o=EE(t),l=s?fW:Lz(e),o=o?fW:Lz(t),h=(l=l==gW?mW:l)==mW,c=(o=o==gW?mW:o)==mW;if((o=l==o)&&WE(e)){if(!WE(t))return!1;h=!(s=!0)}return o&&!h?(a=a||new v6,s||cS(e)?Xq(e,t,r,i,n,a):sW(e,t,l,r,i,n,a)):1&r||(s=h&&vW.call(e,"__wrapped__"),l=c&&vW.call(t,"__wrapped__"),!s&&!l)?o&&(a=a||new v6,uW(e,t,r,i,n,a)):n(s?e.value():e,l?t.value():t,r,i,a=a||new v6)}var gW,fW,mW,yW,vW,xW,bW=i(()=>{T6(),Kq(),oW(),dW(),Mz(),AE(),GE(),pS(),gW="[object Arguments]",fW="[object Array]",mW="[object Object]",yW=Object.prototype,vW=yW.hasOwnProperty,mt(pW,"baseIsEqualDeep"),xW=pW});function TW(e,t,r,i,n){return e===t||(null==e||null==t||!mE(e)&&!mE(t)?e!=e&&t!=t:xW(e,t,r,i,TW,n))}var kW,wW=i(()=>{bW(),yE(),mt(TW,"baseIsEqual"),kW=TW});function CW(e,t,r,i){var n=r.length,a=n,s=!i;if(null==e)return!a;for(e=Object(e);n--;){var o=r[n];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++n<a;){var l=(o=r[n])[0],h=e[l],c=o[1];if(s&&o[2]){if(void 0===h&&!(l in e))return!1}else{var u,d=new v6;if(!(void 0===(u=i?i(h,c,l,e,t,d):u)?kW(c,h,3,i,d):u))return!1}}return!0}var EW,SW=i(()=>{T6(),wW(),mt(CW,"baseIsMatch"),EW=CW});function _W(e){return e==e&&!Zk(e)}var AW,LW=i(()=>{Qk(),mt(_W,"isStrictComparable"),AW=_W});function RW(e){for(var t=S$(e),r=t.length;r--;){var i=t[r],n=e[i];t[r]=[i,n,AW(n)]}return t}var IW,NW=i(()=>{LW(),R$(),mt(RW,"getMatchData"),IW=RW});function DW(t,r){return function(e){return null!=e&&e[t]===r&&(void 0!==r||t in Object(e))}}var MW,OW=i(()=>{mt(DW,"matchesStrictComparable"),MW=DW});function BW(t){var r=IW(t);return 1==r.length&&r[0][2]?MW(r[0][0],r[0][1]):function(e){return e===t||EW(e,t,r)}}var PW,$W=i(()=>{SW(),NW(),OW(),mt(BW,"baseMatches"),PW=BW});function FW(e,t){return null!=e&&t in Object(e)}var zW,qW=i(()=>{mt(FW,"baseHasIn"),zW=FW});function WW(e,t,r){for(var i=-1,n=(t=X$(t,e)).length,a=!1;++i<n;){var s=Q$(t[i]);if(!(a=null!=e&&r(e,s)))break;e=e[s]}return a||++i!=n?a:!!(n=null==e?0:e.length)&&RE(n)&&RS(s,n)&&(EE(e)||wE(e))}var UW,GW=i(()=>{K$(),_E(),AE(),IS(),IE(),J$(),mt(WW,"hasPath"),UW=WW});function jW(e,t){return null!=e&&UW(e,t,zW)}var VW,YW=i(()=>{qW(),GW(),mt(jW,"hasIn"),VW=jW});function HW(r,i){return O$(r)&&AW(i)?MW(Q$(r),i):function(e){var t=nF(e,r);return void 0===t&&t===i?VW(e,r):kW(i,t,3)}}var XW,KW=i(()=>{wW(),aF(),YW(),B$(),LW(),OW(),J$(),mt(HW,"baseMatchesProperty"),XW=HW});function ZW(t){return function(e){return e?.[t]}}var QW,JW=i(()=>{mt(ZW,"baseProperty"),QW=ZW});function eU(t){return function(e){return tF(e,t)}}var tU,rU=i(()=>{rF(),mt(eU,"basePropertyDeep"),tU=eU});function iU(e){return O$(e)?QW(Q$(e)):tU(e)}var nU,aU=i(()=>{JW(),rU(),B$(),J$(),mt(iU,"property"),nU=iU});function sU(e){return"function"==typeof e?e:null==e?n_:"object"==typeof e?EE(e)?XW(e[0],e[1]):PW(e):nU(e)}var oU,lU=i(()=>{$W(),KW(),a_(),AE(),aU(),mt(sU,"baseIteratee"),oU=sU});function hU(e,t,r,i){for(var n=-1,a=null==e?0:e.length;++n<a;){var s=e[n];t(i,s,r(s),e)}return i}var cU,uU=i(()=>{mt(hU,"arrayAggregator"),cU=hU});function dU(e,t){return e&&N6(e,t,S$)}var pU,gU=i(()=>{M6(),R$(),mt(dU,"baseForOwn"),pU=dU});function fU(a,s){return function(e,t){if(null!=e){if(!DE(e))return a(e,t);for(var r=e.length,i=s?r:-1,n=Object(e);(s?i--:++i<r)&&!1!==t(n[i],i,n););}return e}}var mU,yU,vU,xU=i(()=>{ME(),mt(fU,"createBaseEach"),mU=fU}),bU=i(()=>{gU(),xU(),yU=mU(pU),vU=yU});function TU(e,i,n,a){return vU(e,function(e,t,r){i(a,e,n(e),r)}),a}var kU,wU=i(()=>{bU(),mt(TU,"baseAggregator"),kU=TU});function CU(n,a){return function(e,t){var r=EE(e)?cU:kU,i=a?a():{};return r(e,n,oU(t,2),i)}}var EU,SU,_U,AU,LU,RU,IU,NU=i(()=>{uU(),wU(),lU(),AE(),mt(CU,"createAggregator"),EU=CU}),DU=i(()=>{Nk(),SU=mt(function(){return xk.Date.now()},"now"),_U=SU}),MU=i(()=>{__(),nC(),R_(),YS(),AU=Object.prototype,LU=AU.hasOwnProperty,RU=S_(function(e,t){e=Object(e);var r=-1,i=t.length,n=2<i?t[2]:void 0;for(n&&L_(t[0],t[1],n)&&(i=1);++r<i;)for(var a=t[r],s=VS(a),o=-1,l=s.length;++o<l;){var h=s[o],c=e[h];(void 0===c||iC(c,AU[h])&&!LU.call(e,h))&&(e[h]=a[h])}return e}),IU=RU});function OU(e,t,r){for(var i=-1,n=null==e?0:e.length;++i<n;)if(r(t,e[i]))return!0;return!1}var BU,PU=i(()=>{mt(OU,"arrayIncludesWith"),BU=OU});function $U(e,t,r,i){var n=-1,a=f$,s=!0,o=e.length,l=[],h=t.length;if(o){r&&(t=yP(t,nS(r))),i?(a=BU,s=!1):200<=t.length&&(a=Vq,s=!1,t=new zq(t));e:for(;++n<o;){var c=e[n],u=null==r?c:r(c),c=i||0!==c?c:0;if(s&&u==u){for(var d=h;d--;)if(t[d]===u)continue e;l.push(c)}else a(t,u,i)||l.push(c)}}return l}var FU,zU,qU,WU=i(()=>{qq(),v$(),PU(),vP(),uS(),Yq(),mt($U,"baseDifference"),FU=$U}),UU=i(()=>{WU(),fF(),__(),PE(),zU=S_(function(e,t){return BE(e)?FU(e,gF(t,1,BE,!0)):[]}),qU=zU});function GU(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var jU,VU=i(()=>{mt(GU,"last"),jU=GU});function YU(e,t,r){var i=null==e?0:e.length;return i?(t=r||void 0===t?1:jP(t),wF(e,t<0?0:t,i)):[]}var HU,XU=i(()=>{CF(),HP(),mt(YU,"drop"),HU=YU});function KU(e,t,r){var i=null==e?0:e.length;return i?(t=r||void 0===t?1:jP(t),wF(e,0,(t=i-t)<0?0:t)):[]}var ZU,QU=i(()=>{CF(),HP(),mt(KU,"dropRight"),ZU=KU});function JU(e){return"function"==typeof e?e:n_}var eG,tG=i(()=>{a_(),mt(JU,"castFunction"),eG=JU});function rG(e,t){return(EE(e)?e$:vU)(e,eG(t))}var v,iG=i(()=>{t$(),bU(),tG(),AE(),mt(rG,"forEach"),v=rG}),nG=i(()=>{iG()});function aG(e,t){for(var r=-1,i=null==e?0:e.length;++r<i;)if(!t(e[r],r,e))return!1;return!0}var sG,oG=i(()=>{mt(aG,"arrayEvery"),sG=aG});function lG(e,i){var n=!0;return vU(e,function(e,t,r){return n=!!i(e,t,r)}),n}var hG,cG=i(()=>{bU(),mt(lG,"baseEvery"),hG=lG});function uG(e,t,r){var i=EE(e)?sG:hG;return r&&L_(e,t,r)&&(t=void 0),i(e,oU(t,3))}var dG,pG=i(()=>{oG(),cG(),lU(),AE(),R_(),mt(uG,"every"),dG=uG});function gG(e,i){var n=[];return vU(e,function(e,t,r){i(e,t,r)&&n.push(e)}),n}var fG,mG=i(()=>{bU(),mt(gG,"baseFilter"),fG=gG});function yG(e,t){return(EE(e)?FF:fG)(e,oU(t,3))}var vG,xG=i(()=>{zF(),mG(),lU(),AE(),mt(yG,"filter"),vG=yG});function bG(a){return function(e,t,r){var i,n=Object(e);return DE(e)||(i=oU(t,3),e=S$(e),t=mt(function(e){return i(n[e],e,n)},"predicate")),-1<(t=a(e,t,r))?n[i?e[t]:t]:void 0}}var TG,kG=i(()=>{lU(),ME(),R$(),mt(bG,"createFind"),TG=bG});function wG(e,t,r){var i=null==e?0:e.length;return i?((r=null==r?0:jP(r))<0&&(r=CG(i+r,0)),i$(e,oU(t,3),r)):-1}var CG,EG,SG,_G,AG=i(()=>{n$(),lU(),HP(),CG=Math.max,mt(wG,"findIndex"),EG=wG}),LG=i(()=>{kG(),AG(),SG=TG(EG),_G=SG});function RG(e){return e&&e.length?e[0]:void 0}var IG,NG=i(()=>{mt(RG,"head"),IG=RG}),DG=i(()=>{NG()});function MG(e,i){var n=-1,a=DE(e)?Array(e.length):[];return vU(e,function(e,t,r){a[++n]=i(e,t,r)}),a}var OG,BG=i(()=>{bU(),ME(),mt(MG,"baseMap"),OG=MG});function PG(e,t){return(EE(e)?yP:OG)(e,oU(t,3))}var x,$G=i(()=>{vP(),lU(),BG(),AE(),mt(PG,"map"),x=PG});function FG(e,t){return gF(x(e,t),1)}var zG,qG=i(()=>{fF(),$G(),mt(FG,"flatMap"),zG=FG});function WG(e,t){return null==e?e:N6(e,eG(t),VS)}var UG,GG=i(()=>{M6(),tG(),YS(),mt(WG,"forIn"),UG=WG});function jG(e,t){return e&&pU(e,eG(t))}var VG,YG,HG,XG,KG=i(()=>{gU(),tG(),mt(jG,"forOwn"),VG=jG}),ZG=i(()=>{E6(),NU(),HG=Object.prototype,YG=HG.hasOwnProperty,HG=EU(function(e,t,r){YG.call(e,r)?e[r].push(t):C6(e,r,[t])}),XG=HG});function QG(e,t){return t<e}var JG,ej=i(()=>{mt(QG,"baseGt"),JG=QG});function tj(e,t){return null!=e&&ij.call(e,t)}var rj,ij,nj,aj=i(()=>{rj=Object.prototype,ij=rj.hasOwnProperty,mt(tj,"baseHas"),nj=tj});function sj(e,t){return null!=e&&UW(e,t,nj)}var oj,lj=i(()=>{aj(),GW(),mt(sj,"has"),oj=sj});function hj(e){return"string"==typeof e||!EE(e)&&mE(e)&&"[object String]"==Hk(e)}var cj,uj=i(()=>{Xk(),AE(),yE(),mt(hj,"isString"),cj=hj});function dj(t,e){return yP(e,function(e){return t[e]})}var pj,gj=i(()=>{vP(),mt(dj,"baseValues"),pj=dj});function fj(e){return null==e?[]:pj(e,S$(e))}var mj,yj=i(()=>{gj(),R$(),mt(fj,"values"),mj=fj});function vj(e,t,r,i){return e=DE(e)?e:mj(e),r=r&&!i?jP(r):0,i=e.length,r<0&&(r=xj(i+r,0)),cj(e)?r<=i&&-1<e.indexOf(t,r):!!i&&-1<d$(e,t,r)}var xj,bj,Tj=i(()=>{p$(),ME(),uj(),HP(),yj(),xj=Math.max,mt(vj,"includes"),bj=vj});function kj(e,t,r){var i=null==e?0:e.length;return i?((r=null==r?0:jP(r))<0&&(r=wj(i+r,0)),d$(e,t,r)):-1}var wj,Cj,Ej=i(()=>{p$(),HP(),wj=Math.max,mt(kj,"indexOf"),Cj=kj});function Sj(e){if(null!=e){if(DE(e)&&(EE(e)||"string"==typeof e||"function"==typeof e.splice||WE(e)||cS(e)||wE(e)))return!e.length;var t,r=Lz(e);if("[object Map]"==r||"[object Set]"==r)return!e.size;if(cE(e))return!w$(e).length;for(t in e)if(Aj.call(e,t))return!1}return!0}var _j,Aj,Lj,Rj=i(()=>{C$(),Mz(),_E(),AE(),ME(),GE(),uE(),pS(),_j=Object.prototype,Aj=_j.hasOwnProperty,mt(Sj,"isEmpty"),Lj=Sj});function Ij(e){return mE(e)&&"[object RegExp]"==Hk(e)}var Nj,Dj,Mj,Oj=i(()=>{Xk(),yE(),mt(Ij,"baseIsRegExp"),Nj=Ij}),Bj=i(()=>{Oj(),uS(),dS(),Dj=(Dj=lS&&lS.isRegExp)?nS(Dj):Nj,Mj=Dj});function Pj(e){return void 0===e}var $j,Fj=i(()=>{mt(Pj,"isUndefined"),$j=Pj});function zj(e,t){return e<t}var qj,Wj=i(()=>{mt(zj,"baseLt"),qj=zj});function Uj(e,i){var n={};return i=oU(i,3),pU(e,function(e,t,r){C6(n,t,i(e,t,r))}),n}var Gj,jj=i(()=>{E6(),gU(),lU(),mt(Uj,"mapValues"),Gj=Uj});function Vj(e,t,r){for(var i=-1,n=e.length;++i<n;){var a,s,o=e[i],l=t(o);null!=l&&(void 0===a?l==l&&!gP(l):r(l,a))&&(a=l,s=o)}return s}var Yj,Hj=i(()=>{fP(),mt(Vj,"baseExtremum"),Yj=Vj});function Xj(e){return e&&e.length?Yj(e,n_,JG):void 0}var Kj,Zj=i(()=>{Hj(),ej(),a_(),mt(Xj,"max"),Kj=Xj});function Qj(e){return e&&e.length?Yj(e,n_,qj):void 0}var Jj,eV=i(()=>{Hj(),Wj(),a_(),mt(Qj,"min"),Jj=Qj});function tV(e,t){return e&&e.length?Yj(e,oU(t,2),qj):void 0}var rV,iV=i(()=>{Hj(),lU(),Wj(),mt(tV,"minBy"),rV=tV});function nV(t){if("function"!=typeof t)throw new TypeError("Expected a function");return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}var aV,sV=i(()=>{mt(nV,"negate"),aV=nV});function oV(e,t,r,i){if(Zk(e))for(var n=-1,a=(t=X$(t,e)).length,s=a-1,o=e;null!=o&&++n<a;){var l,h=Q$(t[n]),c=r;if("__proto__"===h||"constructor"===h||"prototype"===h)return e;n!=s&&(l=o[h],void 0===(c=i?i(l,h,o):void 0))&&(c=Zk(l)?l:RS(t[n+1])?[]:{}),bS(o,h,c),o=o[h]}return e}var lV,hV=i(()=>{TS(),K$(),IS(),Qk(),J$(),mt(oV,"baseSet"),lV=oV});function cV(e,t,r){for(var i=-1,n=t.length,a={};++i<n;){var s=t[i],o=tF(e,s);r(o,s)&&lV(a,X$(s,e),o)}return a}var uV,dV=i(()=>{rF(),hV(),K$(),mt(cV,"basePickBy"),uV=cV});function pV(e,r){var t;return null==e?{}:(t=yP(uz(e),function(e){return[e]}),r=oU(r),uV(e,t,function(e,t){return r(e,t[0])}))}var gV,fV=i(()=>{vP(),lU(),dV(),Rz(),mt(pV,"pickBy"),gV=pV});function mV(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var yV,vV=i(()=>{mt(mV,"baseSortBy"),yV=mV});function xV(e,t){if(e!==t){var r=void 0!==e,i=null===e,n=e==e,a=gP(e),s=void 0!==t,o=null===t,l=t==t,h=gP(t);if(!o&&!h&&!a&&t<e||a&&s&&l&&!o&&!h||i&&s&&l||!r&&l||!n)return 1;if(!i&&!a&&!h&&e<t||h&&r&&n&&!i&&!a||o&&r&&n||!s&&n||!l)return-1}return 0}var bV,TV=i(()=>{fP(),mt(xV,"compareAscending"),bV=xV});function kV(e,t,r){for(var i=-1,n=e.criteria,a=t.criteria,s=n.length,o=r.length;++i<s;){var l=bV(n[i],a[i]);if(l)return o<=i?l:l*("desc"==r[i]?-1:1)}return e.index-t.index}var wV,CV=i(()=>{TV(),mt(kV,"compareMultiple"),wV=kV});function EV(e,i,r){i=i.length?yP(i,function(t){return EE(t)?function(e){return tF(e,1===t.length?t[0]:t)}:t}):[n_];var n=-1,e=(i=yP(i,nS(oU)),OG(e,function(t,e,r){return{criteria:yP(i,function(e){return e(t)}),index:++n,value:t}}));return yV(e,function(e,t){return wV(e,t,r)})}var SV,_V,AV,LV=i(()=>{vP(),rF(),lU(),BG(),vV(),uS(),CV(),a_(),AE(),mt(EV,"baseOrderBy"),SV=EV}),RV=i(()=>{JW(),_V=QW("length"),AV=_V});function IV(e){for(var t=FV.lastIndex=0;FV.test(e);)++t;return t}var NV,DV,MV,OV,BV,PV,$V,FV,zV,qV=i(()=>{NV="["+(OV="\\ud800-\\udfff")+"]",DV="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",MV="\\ud83c[\\udffb-\\udfff]",$V="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",PV="[\\ufe0e\\ufe0f]?",BV="(?:\\u200d(?:"+[OV="[^"+OV+"]","(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]"].join("|")+")"+PV+$V+")*",PV=PV+$V+BV,$V="(?:"+[OV+DV+"?",DV,"(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]",NV].join("|")+")",FV=RegExp(MV+"(?="+MV+")|"+$V+PV,"g"),mt(IV,"unicodeSize"),zV=IV});function WV(e){return(_F(e)?zV:AV)(e)}var UV,GV=i(()=>{RV(),AF(),qV(),mt(WV,"stringSize"),UV=WV});function jV(r,e){return uV(r,e,function(e,t){return VW(r,t)})}var VV,YV,HV,XV=i(()=>{dV(),YW(),mt(jV,"basePick"),VV=jV}),KV=i(()=>{XV(),TF(),YV=bF(function(e,t){return null==e?{}:VV(e,t)}),HV=YV});function ZV(e,t,r,i){for(var n=-1,a=JV(QV((t-e)/(r||1)),0),s=Array(a);a--;)s[i?a:++n]=e,e+=r;return s}var QV,JV,eY,tY=i(()=>{QV=Math.ceil,JV=Math.max,mt(ZV,"baseRange"),eY=ZV});function rY(i){return function(e,t,r){return r&&"number"!=typeof r&&L_(e,t,r)&&(t=r=void 0),e=WP(e),void 0===t?(t=e,e=0):t=WP(t),r=void 0===r?e<t?1:-1:WP(r),eY(e,t,r,i)}}var iY,nY,aY,sY=i(()=>{tY(),R_(),UP(),mt(rY,"createRange"),iY=rY}),oY=i(()=>{sY(),nY=iY(),aY=nY});function lY(e,i,n,a,t){return t(e,function(e,t,r){n=a?(a=!1,e):i(n,e,t,r)}),n}var hY,cY=i(()=>{mt(lY,"baseReduce"),hY=lY});function uY(e,t,r){var i=EE(e)?RF:hY,n=arguments.length<3;return i(e,oU(t,4),r,n,vU)}var dY,pY=i(()=>{IF(),bU(),lU(),cY(),AE(),mt(uY,"reduce"),dY=uY});function gY(e,t){return(EE(e)?FF:fG)(e,aV(oU(t,3)))}var fY,mY=i(()=>{zF(),mG(),lU(),AE(),sV(),mt(gY,"reject"),fY=gY});function yY(e){var t;return null==e?0:DE(e)?cj(e)?UV(e):e.length:"[object Map]"==(t=Lz(e))||"[object Set]"==t?e.size:w$(e).length}var vY,xY=i(()=>{C$(),Mz(),ME(),uj(),GV(),mt(yY,"size"),vY=yY});function bY(e,i){var n;return vU(e,function(e,t,r){return!(n=i(e,t,r))}),!!n}var TY,kY=i(()=>{bU(),mt(bY,"baseSome"),TY=bY});function wY(e,t,r){var i=EE(e)?Uq:TY;return r&&L_(e,t,r)&&(t=void 0),i(e,oU(t,3))}var CY,EY,SY,_Y,AY,LY=i(()=>{Gq(),lU(),kY(),AE(),R_(),mt(wY,"some"),CY=wY}),RY=i(()=>{fF(),LV(),__(),R_(),EY=S_(function(e,t){var r;return null==e?[]:(1<(r=t.length)&&L_(e,t[0],t[1])?t=[]:2<r&&L_(t[0],t[1],t[2])&&(t=[t[0]]),SV(e,gF(t,1),[]))}),SY=EY}),IY=i(()=>{Dz(),QP(),rW(),_Y=yz&&1/tW(new yz([,-0]))[1]==1/0?function(e){return new yz(e)}:ZP,AY=_Y});function NY(e,t,r){var i=-1,n=f$,a=e.length,s=!0,o=[],l=o;if(r)s=!1,n=BU;else if(200<=a){var h=t?null:AY(e);if(h)return tW(h);s=!1,n=Vq,l=new zq}else l=t?[]:o;e:for(;++i<a;){var c=e[i],u=t?t(c):c,c=r||0!==c?c:0;if(s&&u==u){for(var d=l.length;d--;)if(l[d]===u)continue e;t&&l.push(u),o.push(c)}else n(l,u,r)||(l!==o&&l.push(u),o.push(c))}return o}var DY,MY,OY,BY=i(()=>{qq(),v$(),PU(),Yq(),IY(),rW(),mt(NY,"baseUniq"),DY=NY}),PY=i(()=>{fF(),__(),BY(),PE(),MY=S_(function(e){return DY(gF(e,1,BE,!0))}),OY=MY});function $Y(e){return e&&e.length?DY(e):[]}var FY,zY=i(()=>{BY(),mt($Y,"uniq"),FY=$Y});function qY(e,t){return e&&e.length?DY(e,oU(t,2)):[]}var WY,UY=i(()=>{lU(),BY(),mt(qY,"uniqBy"),WY=qY});function GY(e){var t=++jY;return V$(e)+t}var jY,VY,YY=i(()=>{Y$(),jY=0,mt(GY,"uniqueId"),VY=GY});function HY(e,t,r){for(var i=-1,n=e.length,a=t.length,s={};++i<n;){var o=i<a?t[i]:void 0;r(s,e[i],o)}return s}var XY,KY=i(()=>{mt(HY,"baseZipObject"),XY=HY});function ZY(e,t){return XY(e||[],t||[],bS)}var QY,JY=i(()=>{TS(),KY(),mt(ZY,"zipObject"),QY=ZY}),eH=i(()=>{I$(),Sq(),Lq(),Nq(),m_(),MU(),UU(),XU(),QU(),nG(),pG(),xG(),LG(),DG(),qG(),vF(),iG(),GG(),KG(),ZG(),lj(),a_(),Tj(),Ej(),AE(),Rj(),iw(),Qk(),Bj(),uj(),Fj(),R$(),VU(),$G(),jj(),Zj(),B_(),eV(),iV(),QP(),DU(),KV(),fV(),oY(),pY(),mY(),xY(),LY(),RY(),PY(),zY(),YY(),yj(),JY()});function tH(e,t){e[t]?e[t]++:e[t]=1}function rH(e,t){--e[t]||delete e[t]}function iH(e,t,r,i){return t=""+t,r=""+r,!e&&r<t&&(e=t,t=r,r=e),t+""+r+""+($j(i)?"\0":i)}function nH(e,t,r,i){return t=""+t,r=""+r,!e&&r<t&&(e=t,t=r,r=e),e={v:t,w:r},i&&(e.name=i),e}function aH(e,t){return iH(e,t.v,t.w,t.name)}var sH,oH=i(()=>{eH(),(sH=class{static{mt(this,"Graph")}constructor(e={}){this._isDirected=!Object.prototype.hasOwnProperty.call(e,"directed")||e.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(e,"multigraph")&&e.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=g_(void 0),this._defaultEdgeLabelFn=g_(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),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 ew(e)||(e=g_(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return S$(this._nodes)}sources(){var t=this;return vG(this.nodes(),function(e){return Lj(t._in[e])})}sinks(){var t=this;return vG(this.nodes(),function(e){return Lj(t._out[e])})}setNodes(e,t){var r=arguments,i=this;return v(e,function(e){1<r.length?i.setNode(e,t):i.setNode(e)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?1<arguments.length&&(this._nodes[e]=t):(this._nodes[e]=1<arguments.length?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][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){var t;return Object.prototype.hasOwnProperty.call(this._nodes,e)&&(t=mt(e=>this.removeEdge(this._edgeObjs[e]),"removeEdge"),delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],v(this.children(e),e=>{this.setParent(e)}),delete this._children[e]),v(S$(this._in[e]),t),delete this._in[e],delete this._preds[e],v(S$(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount),this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if($j(t))t="\0";else{for(var r=t+="";!$j(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&&"\0"!==(e=this._parent[e]))return e}children(e){var t;return $j(e)&&(e="\0"),this._isCompound?(t=this._children[e])?S$(t):void 0:"\0"===e?this.nodes():this.hasNode(e)?[]:void 0}predecessors(e){if(e=this._preds[e])return S$(e)}successors(e){if(e=this._sucs[e])return S$(e)}neighbors(e){var t=this.predecessors(e);if(t)return OY(t,this.successors(e))}isLeaf(e){return 0===(e=this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(r){var i=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound}),n=(i.setGraph(this.graph()),this),a=(v(this._nodes,function(e,t){r(t)&&i.setNode(t,e)}),v(this._edgeObjs,function(e){i.hasNode(e.v)&&i.hasNode(e.w)&&i.setEdge(e,n.edge(e))}),{});function s(e){var t=n.parent(e);return void 0===t||i.hasNode(t)?a[e]=t:t in a?a[t]:s(t)}return mt(s,"findParent"),this._isCompound&&v(i.nodes(),function(e){i.setParent(e,s(e))}),i}setDefaultEdgeLabel(e){return ew(e)||(e=g_(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return mj(this._edgeObjs)}setPath(e,r){var i=this,n=arguments;return dY(e,function(e,t){return 1<n.length?i.setEdge(e,t,r):i.setEdge(e,t),t}),this}setEdge(){var e,t,r=!1,i=("object"==typeof(i=arguments[0])&&null!==i&&"v"in i?(n=i.v,a=i.w,e=i.name,2===arguments.length&&(t=arguments[1],r=!0)):(n=i,a=arguments[1],e=arguments[3],2<arguments.length&&(t=arguments[2],r=!0)),n=""+n,a=""+a,$j(e)||(e=""+e),iH(this._isDirected,n,a,e));if(Object.prototype.hasOwnProperty.call(this._edgeLabels,i))r&&(this._edgeLabels[i]=t);else{if(!$j(e)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(n),this.setNode(a),this._edgeLabels[i]=r?t:this._defaultEdgeLabelFn(n,a,e);var n=(r=nH(this._isDirected,n,a,e)).v,a=r.w;Object.freeze(r),this._edgeObjs[i]=r,tH(this._preds[a],n),tH(this._sucs[n],a),this._in[a][i]=r,this._out[n][i]=r,this._edgeCount++}return this}edge(e,t,r){return e=1===arguments.length?aH(this._isDirected,e):iH(this._isDirected,e,t,r),this._edgeLabels[e]}hasEdge(e,t,r){return e=1===arguments.length?aH(this._isDirected,e):iH(this._isDirected,e,t,r),Object.prototype.hasOwnProperty.call(this._edgeLabels,e)}removeEdge(e,t,r){var r=1===arguments.length?aH(this._isDirected,arguments[0]):iH(this._isDirected,e,t,r),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],rH(this._preds[t],e),rH(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){if(e=this._in[e])return e=mj(e),t?vG(e,function(e){return e.v===t}):e}outEdges(e,t){if(e=this._out[e])return e=mj(e),t?vG(e,function(e){return e.w===t}):e}nodeEdges(e,t){var r=this.inEdges(e,t);if(r)return r.concat(this.outEdges(e,t))}}).prototype._nodeCount=0,sH.prototype._edgeCount=0,mt(tH,"incrementOrInitEntry"),mt(rH,"decrementOrRemoveEntry"),mt(iH,"edgeArgsToId"),mt(nH,"edgeArgsToObj"),mt(aH,"edgeObjToId")}),lH=i(()=>{oH()});function hH(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function cH(e,t){if("_next"!==e&&"_prev"!==e)return t}var uH,dH=i(()=>{uH=class{static{mt(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 hH(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&hH(e),e._next=t._next,t._next._prev=e,(t._next=e)._prev=t}toString(){for(var e=[],t=this._sentinel,r=t._prev;r!==t;)e.push(JSON.stringify(r,cH)),r=r._prev;return"["+e.join(", ")+"]"}},mt(hH,"unlink"),mt(cH,"filterOutLinks")});function pH(t,e){return t.nodeCount()<=1?[]:(e=gH((e=mH(t,e||vH)).graph,e.buckets,e.zeroIdx),yF(x(e,function(e){return t.outEdges(e.v,e.w)})))}function gH(e,t,r){for(var i,n=[],a=t[t.length-1],s=t[0];e.nodeCount();){for(;i=s.dequeue();)fH(e,t,r,i);for(;i=a.dequeue();)fH(e,t,r,i);if(e.nodeCount())for(var o=t.length-2;0<o;--o)if(i=t[o].dequeue()){n=n.concat(fH(e,t,r,i,!0));break}}return n}function fH(i,n,a,e,s){var o=s?[]:void 0;return v(i.inEdges(e.v),function(e){var t=i.edge(e),r=i.node(e.v);s&&o.push({v:e.v,w:e.w}),r.out-=t,yH(n,a,r)}),v(i.outEdges(e.v),function(e){var t=i.edge(e),e=e.w;(e=i.node(e)).in-=t,yH(n,a,e)}),i.removeNode(e.v),o}function mH(e,i){var n=new sH,a=0,s=0,t=(v(e.nodes(),function(e){n.setNode(e,{v:e,in:0,out:0})}),v(e.edges(),function(e){var t=n.edge(e.v,e.w)||0,r=i(e);n.setEdge(e.v,e.w,t+r),s=Math.max(s,n.node(e.v).out+=r),a=Math.max(a,n.node(e.w).in+=r)}),aY(s+a+3).map(function(){return new uH})),r=a+1;return v(n.nodes(),function(e){yH(t,r,n.node(e))}),{graph:n,buckets:t,zeroIdx:r}}function yH(e,t,r){(r.out?r.in?e[r.out-r.in+t]:e[e.length-1]:e[0]).enqueue(r)}var vH,xH=i(()=>{eH(),lH(),dH(),vH=g_(1),mt(pH,"greedyFAS"),mt(gH,"doGreedyFAS"),mt(fH,"removeNode"),mt(mH,"buildState"),mt(yH,"assignBucket")});function bH(r){var e="greedy"===r.graph().acyclicer?pH(r,t(r)):TH(r);function t(t){return function(e){return t.edge(e).weight}}v(e,function(e){var t=r.edge(e);r.removeEdge(e),t.forwardName=e.name,t.reversed=!0,r.setEdge(e.w,e.v,t,VY("rev"))}),mt(t,"weightFn")}function TH(t){var r=[],i={},n={};function a(e){Object.prototype.hasOwnProperty.call(n,e)||(n[e]=!0,i[e]=!0,v(t.outEdges(e),function(e){Object.prototype.hasOwnProperty.call(i,e.w)?r.push(e):a(e.w)}),delete i[e])}return mt(a,"dfs"),v(t.nodes(),a),r}function kH(i){v(i.edges(),function(e){var t,r=i.edge(e);r.reversed&&(i.removeEdge(e),t=r.forwardName,delete r.reversed,delete r.forwardName,i.setEdge(e.w,e.v,r,t))})}var wH=i(()=>{eH(),xH(),mt(bH,"run"),mt(TH,"dfsFAS"),mt(kH,"undo")});function CH(e,t,r,i){for(var n;n=VY(i),e.hasNode(n););return r.dummy=t,e.setNode(n,r),n}function EH(i){var n=(new sH).setGraph(i.graph());return v(i.nodes(),function(e){n.setNode(e,i.node(e))}),v(i.edges(),function(e){var t=n.edge(e.v,e.w)||{weight:0,minlen:1},r=i.edge(e);n.setEdge(e.v,e.w,{weight:t.weight+r.weight,minlen:Math.max(t.minlen,r.minlen)})}),n}function SH(t){var r=new sH({multigraph:t.isMultigraph()}).setGraph(t.graph());return v(t.nodes(),function(e){t.children(e).length||r.setNode(e,t.node(e))}),v(t.edges(),function(e){r.setEdge(e,t.edge(e))}),r}function _H(e,t){var r,i=e.x,n=e.y,a=t.x-i,t=t.y-n,s=e.width/2,e=e.height/2;if(a||t)return e=Math.abs(t)*s>Math.abs(a)*e?(r=(e=t<0?-e:e)*a/t,e):(r=a<0?-s:s)*t/a,{x:i+r,y:n+e};throw new Error("Not possible to find intersection inside of the rectangle")}function AH(i){var n=x(aY(NH(i)+1),function(){return[]});return v(i.nodes(),function(e){var t=i.node(e),r=t.rank;$j(r)||(n[r][t.order]=e)}),n}function LH(t){var r=Jj(x(t.nodes(),function(e){return t.node(e).rank}));v(t.nodes(),function(e){e=t.node(e),oj(e,"rank")&&(e.rank-=r)})}function RH(r){var i=Jj(x(r.nodes(),function(e){return r.node(e).rank})),n=[],a=(v(r.nodes(),function(e){var t=r.node(e).rank-i;n[t]||(n[t]=[]),n[t].push(e)}),0),s=r.graph().nodeRankFactor;v(n,function(e,t){$j(e)&&t%s!=0?--a:a&&v(e,function(e){r.node(e).rank+=a})})}function IH(e,t,r,i){var n={width:0,height:0};return 4<=arguments.length&&(n.rank=r,n.order=i),CH(e,"border",n,t)}function NH(t){return Kj(x(t.nodes(),function(e){if(e=t.node(e).rank,!$j(e))return e}))}function DH(e,t){var r={lhs:[],rhs:[]};return v(e,function(e){(t(e)?r.lhs:r.rhs).push(e)}),r}function MH(e,t){var r=_U();try{return t()}finally{console.log(e+" time: "+(_U()-r)+"ms")}}function OH(e,t){return t()}var BH=i(()=>{eH(),lH(),mt(CH,"addDummyNode"),mt(EH,"simplify"),mt(SH,"asNonCompoundGraph"),mt(_H,"intersectRect"),mt(AH,"buildLayerMatrix"),mt(LH,"normalizeRanks"),mt(RH,"removeEmptyRanks"),mt(IH,"addBorderNode"),mt(NH,"maxRank"),mt(DH,"partition"),mt(MH,"time"),mt(OH,"notime")});function PH(a){function s(e){var t=a.children(e),r=a.node(e);if(t.length&&v(t,s),Object.prototype.hasOwnProperty.call(r,"minRank")){r.borderLeft=[],r.borderRight=[];for(var i=r.minRank,n=r.maxRank+1;i<n;++i)$H(a,"borderLeft","_bl",e,r,i),$H(a,"borderRight","_br",e,r,i)}}mt(s,"dfs"),v(a.children(),s)}function $H(e,t,r,i,n,a){var s=n[t][a-1],r=CH(e,"border",{width:0,height:0,rank:a,borderType:t},r);n[t][a]=r,e.setParent(r,i),s&&e.setEdge(s,r,{weight:1})}var FH=i(()=>{eH(),BH(),mt(PH,"addBorderSegments"),mt($H,"addBorderNode")});function zH(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||WH(e)}function qH(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||GH(e),"lr"!==t&&"rl"!==t||(VH(e),WH(e))}function WH(t){v(t.nodes(),function(e){UH(t.node(e))}),v(t.edges(),function(e){UH(t.edge(e))})}function UH(e){var t=e.width;e.width=e.height,e.height=t}function GH(t){v(t.nodes(),function(e){jH(t.node(e))}),v(t.edges(),function(e){e=t.edge(e),v(e.points,jH),Object.prototype.hasOwnProperty.call(e,"y")&&jH(e)})}function jH(e){e.y=-e.y}function VH(t){v(t.nodes(),function(e){YH(t.node(e))}),v(t.edges(),function(e){e=t.edge(e),v(e.points,YH),Object.prototype.hasOwnProperty.call(e,"x")&&YH(e)})}function YH(e){var t=e.x;e.x=e.y,e.y=t}var HH=i(()=>{eH(),mt(zH,"adjust"),mt(qH,"undo"),mt(WH,"swapWidthHeight"),mt(UH,"swapWidthHeightOne"),mt(GH,"reverseY"),mt(jH,"reverseYOne"),mt(VH,"swapXY"),mt(YH,"swapXYOne")});function XH(t){t.graph().dummyChains=[],v(t.edges(),function(e){KH(t,e)})}function KH(e,t){var r=t.v,i=e.node(r).rank,n=t.w,a=e.node(n).rank,s=t.name,o=e.edge(t),l=o.labelRank;if(a!==i+1){e.removeEdge(t);var h,c=void 0,u=0;for(++i;i<a;++u,++i)o.points=[],h=CH(e,"edge",c={width:0,height:0,edgeLabel:o,edgeObj:t,rank:i},"_d"),i===l&&(c.width=o.width,c.height=o.height,c.dummy="edge-label",c.labelpos=o.labelpos),e.setEdge(r,h,{weight:o.weight},s),0===u&&e.graph().dummyChains.push(h),r=h;e.setEdge(r,n,{weight:o.weight},s)}}function ZH(n){v(n.graph().dummyChains,function(e){var t,r=n.node(e),i=r.edgeLabel;for(n.setEdge(r.edgeObj,i);r.dummy;)t=n.successors(e)[0],n.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),r=n.node(e=t)})}var QH=i(()=>{eH(),BH(),mt(XH,"run"),mt(KH,"normalizeEdge"),mt(ZH,"undo")});function JH(r){var i={};function n(e){var t=r.node(e);return Object.prototype.hasOwnProperty.call(i,e)?t.rank:(i[e]=!0,(e=Jj(x(r.outEdges(e),function(e){return n(e.w)-r.edge(e).minlen})))!==Number.POSITIVE_INFINITY&&null!=e||(e=0),t.rank=e)}mt(n,"dfs"),v(r.sources(),n)}function eX(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var tX=i(()=>{eH(),mt(JH,"longestPath"),mt(eX,"slack")});function rX(e){var t,r=new sH({directed:!1}),i=e.nodes()[0],n=e.nodeCount();for(r.setNode(i,{});iX(r,e)<n;)t=nX(r,e),t=r.hasNode(t.v)?eX(e,t):-eX(e,t),aX(r,e,t);return r}function iX(i,n){function a(r){v(n.nodeEdges(r),function(e){var t=e.v,t=r===t?e.w:t;i.hasNode(t)||eX(n,e)||(i.setNode(t,{}),i.setEdge(r,t,{}),a(t))})}return mt(a,"dfs"),v(i.nodes(),a),i.nodeCount()}function nX(t,r){return rV(r.edges(),function(e){if(t.hasNode(e.v)!==t.hasNode(e.w))return eX(r,e)})}function aX(e,t,r){v(e.nodes(),function(e){t.node(e).rank+=r})}var sX=i(()=>{eH(),lH(),tX(),mt(rX,"feasibleTree"),mt(iX,"tightTree"),mt(nX,"findMinSlackEdge"),mt(aX,"shiftRanks")}),oX=i(()=>{}),lX=i(()=>{}),hX=i(()=>{eH(),lX(),g_(1)}),cX=i(()=>{hX()}),uX=i(()=>{}),dX=i(()=>{uX()}),pX=i(()=>{eH(),g_(1)});function gX(t){var r={},i={},n=[];function a(e){if(Object.prototype.hasOwnProperty.call(i,e))throw new fX;Object.prototype.hasOwnProperty.call(r,e)||(i[e]=!0,r[e]=!0,v(t.predecessors(e),a),delete i[e],n.push(e))}if(mt(a,"visit"),v(t.sinks(),a),vY(r)!==t.nodeCount())throw new fX;return n}function fX(){}var mX=i(()=>{eH(),gX.CycleException=fX,mt(gX,"topsort"),mt(fX,"CycleException"),fX.prototype=new Error}),yX=i(()=>{mX()});function vX(t,e,r){EE(e)||(e=[e]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),n=[],a={};return v(e,function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);xX(t,e,"post"===r,a,i,n)}),n}function xX(t,e,r,i,n,a){Object.prototype.hasOwnProperty.call(i,e)||(i[e]=!0,r||a.push(e),v(n(e),function(e){xX(t,e,r,i,n,a)}),r&&a.push(e))}var bX=i(()=>{eH(),mt(vX,"dfs"),mt(xX,"doDfs")});function TX(e,t){return vX(e,t,"post")}var kX=i(()=>{bX(),mt(TX,"postorder")});function wX(e,t){return vX(e,t,"pre")}var CX=i(()=>{bX(),mt(wX,"preorder")}),EX=i(()=>{lX(),oH()}),SX=i(()=>{oX(),hX(),cX(),dX(),pX(),yX(),kX(),CX(),EX(),uX(),mX()});function _X(e){JH(e=EH(e));var t,r=rX(e);for(IX(r),AX(r,e);t=DX(r);)OX(r,e,t,MX(r,e,t))}function AX(t,r){var e=(e=TX(t,t.nodes())).slice(0,e.length-1);v(e,function(e){LX(t,r,e)})}function LX(e,t,r){var i=e.node(r).parent;e.edge(r,i).cutvalue=RX(e,t,r)}function RX(i,n,a){var s=i.node(a).parent,o=!0,e=n.edge(a,s),l=0;return e||(o=!1,e=n.edge(s,a)),l=e.weight,v(n.nodeEdges(a),function(e){var t=e.v===a,r=t?e.w:e.v;r!==s&&(t=t===o,e=n.edge(e).weight,l+=t?e:-e,PX(i,a,r))&&(e=i.edge(a,r).cutvalue,l+=t?-e:e)}),l}function IX(e,t){arguments.length<2&&(t=e.nodes()[0]),NX(e,{},1,t)}function NX(t,r,i,n,e){var a=i,s=t.node(n);return r[n]=!0,v(t.neighbors(n),function(e){Object.prototype.hasOwnProperty.call(r,e)||(i=NX(t,r,i,e,n))}),s.low=a,s.lim=i++,e?s.parent=e:delete s.parent,i}function DX(t){return _G(t.edges(),function(e){return t.edge(e).cutvalue<0})}function MX(t,r,e){var i=e.v,n=e.w,e=(r.hasEdge(i,n)||(i=e.w,n=e.v),t.node(i)),i=t.node(n),a=e,s=!1,n=(e.lim>i.lim&&(a=i,s=!0),vG(r.edges(),function(e){return s===$X(0,t.node(e.v),a)&&s!==$X(0,t.node(e.w),a)}));return rV(n,function(e){return eX(r,e)})}function OX(e,t,r,i){var n=r.v;e.removeEdge(n,r.w),e.setEdge(i.v,i.w,{}),IX(e),AX(e,t),BX(e,t)}function BX(n,a){var e=_G(n.nodes(),function(e){return!a.node(e).parent}),e=(e=wX(n,e)).slice(1);v(e,function(e){var t=n.node(e).parent,r=a.edge(e,t),i=!1;r||(r=a.edge(t,e),i=!0),a.node(e).rank=a.node(t).rank+(i?r.minlen:-r.minlen)})}function PX(e,t,r){return e.hasEdge(t,r)}function $X(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var FX=i(()=>{eH(),SX(),BH(),sX(),tX(),_X.initLowLimValues=IX,_X.initCutValues=AX,_X.calcCutValue=RX,_X.leaveEdge=DX,_X.enterEdge=MX,_X.exchangeEdges=OX,mt(_X,"networkSimplex"),mt(AX,"initCutValues"),mt(LX,"assignCutValue"),mt(RX,"calcCutValue"),mt(IX,"initLowLimValues"),mt(NX,"dfsAssignLowLim"),mt(DX,"leaveEdge"),mt(MX,"enterEdge"),mt(OX,"exchangeEdges"),mt(BX,"updateRanks"),mt(PX,"isTreeEdge"),mt($X,"isDescendant")});function zX(e){switch(e.graph().ranker){case"network-simplex":WX(e);break;case"tight-tree":qX(e);break;case"longest-path":UX(e);break;default:WX(e)}}function qX(e){JH(e),rX(e)}function WX(e){_X(e)}var UX,GX=i(()=>{sX(),FX(),tX(),mt(zX,"rank"),UX=JH,mt(qX,"tightTreeRanker"),mt(WX,"networkSimplexRanker")});function jX(t){var r=CH(t,"root",{},"_root"),i=YX(t),n=Kj(mj(i))-1,a=2*n+1,s=(t.graph().nestingRoot=r,v(t.edges(),function(e){t.edge(e).minlen*=a}),HX(t)+1);v(t.children(),function(e){VX(t,r,a,s,n,i,e)}),t.graph().nodeRankFactor=a}function VX(n,a,s,o,l,h,c){var u,d,e,t=n.children(c);t.length?(u=IH(n,"_bt"),d=IH(n,"_bb"),e=n.node(c),n.setParent(u,c),e.borderTop=u,n.setParent(d,c),e.borderBottom=d,v(t,function(e){VX(n,a,s,o,l,h,e);var t=n.node(e),r=t.borderTop||e,i=r!==(e=t.borderBottom||e)?1:l-h[c]+1;n.setEdge(u,r,{weight:t=t.borderTop?o:2*o,minlen:i,nestingEdge:!0}),n.setEdge(e,d,{weight:t,minlen:i,nestingEdge:!0})}),n.parent(c)||n.setEdge(a,u,{weight:0,minlen:l+h[c]})):c!==a&&n.setEdge(a,c,{weight:0,minlen:s})}function YX(i){var n={};function a(e,t){var r=i.children(e);r&&r.length&&v(r,function(e){a(e,t+1)}),n[e]=t}return mt(a,"dfs"),v(i.children(),function(e){a(e,1)}),n}function HX(r){return dY(r.edges(),function(e,t){return e+r.edge(t).weight},0)}function XX(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,v(t.edges(),function(e){t.edge(e).nestingEdge&&t.removeEdge(e)})}var KX=i(()=>{eH(),BH(),mt(jX,"run"),mt(VX,"dfs"),mt(YX,"treeDepths"),mt(HX,"sumWeights"),mt(XX,"cleanup")});function ZX(n,a,e){var s,o={};v(e,function(e){for(var t,r,i=n.parent(e);i;){if((t=n.parent(i))?(r=o[t],o[t]=i):(r=s,s=i),r&&r!==i)return void a.setEdge(r,i);i=t}})}var QX=i(()=>{eH(),mt(ZX,"addSubgraphConstraints")});function JX(n,r,a){var s=eK(n),o=new sH({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(e){return n.node(e)});return v(n.nodes(),function(i){var e=n.node(i),t=n.parent(i);(e.rank===r||e.minRank<=r&&r<=e.maxRank)&&(o.setNode(i),o.setParent(i,t||s),v(n[a](i),function(e){var t=e.v===i?e.w:e.v,r=o.edge(t,i),r=$j(r)?0:r.weight;o.setEdge(t,i,{weight:n.edge(e).weight+r})}),Object.prototype.hasOwnProperty.call(e,"minRank"))&&o.setNode(i,{borderLeft:e.borderLeft[r],borderRight:e.borderRight[r]})}),o}function eK(e){for(var t;e.hasNode(t=VY("_root")););return t}var tK=i(()=>{eH(),lH(),mt(JX,"buildLayerGraph"),mt(eK,"createRootNode")});function rK(e,t){for(var r=0,i=1;i<t.length;++i)r+=iK(e,t[i-1],t[i]);return r}function iK(t,e,r){for(var i=QY(r,x(r,function(e,t){return t})),e=yF(x(e,function(e){return SY(x(t.outEdges(e),function(e){return{pos:i[e.w],weight:t.edge(e).weight}}),"pos")})),n=1;n<r.length;)n<<=1;var a=2*n-1,s=(--n,x(new Array(a),function(){return 0})),o=0;return v(e.forEach(function(e){var t=e.pos+n;s[t]+=e.weight;for(var r=0;0<t;)t%2&&(r+=s[t+1]),s[t=t-1>>1]+=e.weight;o+=e.weight*r})),o}var nK=i(()=>{eH(),mt(rK,"crossCount"),mt(iK,"twoLayerCrossCount")});function aK(r){var i={},e=vG(r.nodes(),function(e){return!r.children(e).length}),t=Kj(x(e,function(e){return r.node(e).rank})),n=x(aY(t+1),function(){return[]});function a(e){var t;oj(i,e)||(i[e]=!0,t=r.node(e),n[t.rank].push(e),v(r.successors(e),a))}return mt(a,"dfs"),t=SY(e,function(e){return r.node(e).rank}),v(t,a),n}var sK=i(()=>{eH(),mt(aK,"initOrder")});function oK(i,e){return x(e,function(e){var t=i.inEdges(e);return t.length?{v:e,barycenter:(t=dY(t,function(e,t){var r=i.edge(t),t=i.node(t.v);return{sum:e.sum+r.weight*t.order,weight:e.weight+r.weight}},{sum:0,weight:0})).sum/t.weight,weight:t.weight}:{v:e}})}var lK=i(()=>{eH(),mt(oK,"barycenter")});function hK(e,t){var i={};return v(e,function(e,t){t=i[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t},$j(e.barycenter)||(t.barycenter=e.barycenter,t.weight=e.weight)}),v(t.edges(),function(e){var t=i[e.v],r=i[e.w];$j(t)||$j(r)||(r.indegree++,t.out.push(i[e.w]))}),cK(vG(i,function(e){return!e.indegree}))}function cK(r){var e=[];function t(t){return function(e){e.merged||($j(e.barycenter)||$j(t.barycenter)||e.barycenter>=t.barycenter)&&uK(t,e)}}function i(t){return function(e){e.in.push(t),0==--e.indegree&&r.push(e)}}for(mt(t,"handleIn"),mt(i,"handleOut");r.length;){var n=r.pop();e.push(n),v(n.in.reverse(),t(n)),v(n.out,i(n))}return x(vG(e,function(e){return!e.merged}),function(e){return HV(e,["vs","i","barycenter","weight"])})}function uK(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}var dK=i(()=>{eH(),mt(hK,"resolveConflicts"),mt(cK,"doResolveConflicts"),mt(uK,"mergeEntries")});function pK(e,t){var r=(e=DH(e,function(e){return Object.prototype.hasOwnProperty.call(e,"barycenter")})).lhs,i=SY(e.rhs,function(e){return-e.i}),n=[],a=0,s=0,o=0,e=(r.sort(fK(!!t)),o=gK(n,i,o),v(r,function(e){o+=e.vs.length,n.push(e.vs),a+=e.barycenter*e.weight,s+=e.weight,o=gK(n,i,o)}),{vs:yF(n)});return s&&(e.barycenter=a/s,e.weight=s),e}function gK(e,t,r){for(var i;t.length&&(i=jU(t)).i<=r;)t.pop(),e.push(i.vs),r++;return r}function fK(r){return function(e,t){return e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:r?t.i-e.i:e.i-t.i}}var mK=i(()=>{eH(),BH(),mt(pK,"sort"),mt(gK,"consumeUnsortable"),mt(fK,"compareWithBias")});function yK(r,e,i,n){var t,a=r.children(e),s=(e=r.node(e))?e.borderLeft:void 0,o=e?e.borderRight:void 0,l={},e=(s&&(a=vG(a,function(e){return e!==s&&e!==o})),oK(r,a));return v(e,function(e){var t;r.children(e.v).length&&(t=yK(r,e.v,i,n),l[e.v]=t,Object.prototype.hasOwnProperty.call(t,"barycenter"))&&xK(e,t)}),vK(a=hK(e,i),l),e=pK(a,n),s&&(e.vs=yF([s,e.vs,o]),r.predecessors(s).length)&&(a=r.node(r.predecessors(s)[0]),t=r.node(r.predecessors(o)[0]),Object.prototype.hasOwnProperty.call(e,"barycenter")||(e.barycenter=0,e.weight=0),e.barycenter=(e.barycenter*e.weight+a.order+t.order)/(e.weight+2),e.weight+=2),e}function vK(e,t){v(e,function(e){e.vs=yF(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}function xK(e,t){$j(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var bK=i(()=>{eH(),lK(),dK(),mK(),mt(yK,"sortSubgraph"),mt(vK,"expandSubgraphs"),mt(xK,"mergeBarycenters")});function TK(e){var t=NH(e),r=kK(e,aY(1,t+1),"inEdges"),i=kK(e,aY(t-1,-1,-1),"outEdges");CK(e,aK(e));for(var n,a=Number.POSITIVE_INFINITY,s=0,o=0;o<4;++s,++o){wK(s%2?r:i,2<=s%4);var l,h=rK(e,l=AH(e));h<a&&(o=0,n=Aq(l),a=h)}CK(e,n)}function kK(t,e,r){return x(e,function(e){return JX(t,e,r)})}function wK(e,t){var i=new sH;v(e,function(r){var e=r.graph().root,e=yK(r,e,i,t);v(e.vs,function(e,t){r.node(e).order=t}),ZX(r,i,e.vs)})}function CK(r,e){v(e,function(e){v(e,function(e,t){r.node(e).order=t})})}var EK=i(()=>{eH(),lH(),BH(),QX(),tK(),nK(),sK(),bK(),mt(TK,"order"),mt(kK,"buildLayerGraphs"),mt(wK,"sweepLayerGraphs"),mt(CK,"assignOrder")});function SK(h){var c=AK(h);v(h.graph().dummyChains,function(e){for(var t,r=h.node(e).edgeObj,i=_K(h,c,r.v,r.w),n=i.path,a=i.lca,s=0,o=n[s],l=!0;e!==r.w;){if(t=h.node(e),l){for(;(o=n[s])!==a&&h.node(o).maxRank<t.rank;)s++;o===a&&(l=!1)}if(!l){for(;s<n.length-1&&h.node(o=n[s+1]).minRank<=t.rank;)s++;o=n[s]}h.setParent(e,o),e=h.successors(e)[0]}})}function _K(e,t,r,i){for(var n,a=[],s=[],o=Math.min(t[r].low,t[i].low),l=Math.max(t[r].lim,t[i].lim),h=r;h=e.parent(h),a.push(h),h&&(t[h].low>o||l>t[h].lim););for(n=h,h=i;(h=e.parent(h))!==n;)s.push(h);return{path:a.concat(s.reverse()),lca:n}}function AK(r){var i={},n=0;function a(e){var t=n;v(r.children(e),a),i[e]={low:t,lim:n++}}return mt(a,"dfs"),v(r.children(),a),i}var LK=i(()=>{eH(),mt(SK,"parentDummyChains"),mt(_K,"findPath"),mt(AK,"postorder")});function RK(h,e){var c={};function t(e,i){var a=0,s=0,o=e.length,l=jU(i);return v(i,function(e,t){var r=NK(h,e),n=r?h.node(r).order:o;!r&&e!==l||(v(i.slice(s,t+1),function(i){v(h.predecessors(i),function(e){var t=h.node(e),r=t.order;!(r<a||n<r)||t.dummy&&h.node(i).dummy||DK(c,e,i)})}),s=t+1,a=n)}),i}return mt(t,"visitLayer"),dY(e,t),c}function IK(o,e){var s={};function l(t,e,r,i,n){var a;v(aY(e,r),function(e){a=t[e],o.node(a).dummy&&v(o.predecessors(a),function(e){var t=o.node(e);t.dummy&&(t.order<i||t.order>n)&&DK(s,e,a)})})}function t(r,i){var n,a=-1,s=0;return v(i,function(e,t){"border"===o.node(e).dummy&&(e=o.predecessors(e)).length&&(n=o.node(e[0]).order,l(i,s,t,a,n),s=t,a=n),l(i,s,i.length,n,r.length)}),i}return mt(l,"scan"),mt(t,"visitLayer"),dY(e,t),s}function NK(t,e){if(t.node(e).dummy)return _G(t.predecessors(e),function(e){return t.node(e).dummy})}function DK(e,t,r){r<t&&(i=t,t=r,r=i),Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[t];Object.defineProperty(i,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function MK(e,t,r){var i;return r<t&&(i=t,t=r,r=i),!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],r)}function OK(e,t,o,l){var h={},c={},u={};return v(t,function(e){v(e,function(e,t){u[c[h[e]=e]=e]=t})}),v(t,function(e){var s=-1;v(e,function(e){var t=l(e);if(t.length)for(var r=((t=SY(t,function(e){return u[e]})).length-1)/2,i=Math.floor(r),n=Math.ceil(r);i<=n;++i){var a=t[i];c[e]===e&&s<u[a]&&!MK(o,e,a)&&(c[a]=e,c[e]=h[e]=h[a],s=u[a])}})}),{root:h,align:c}}function BK(i,e,t,r,n){var a={},s=PK(i,e,t,n),o=n?"borderLeft":"borderRight";function l(e,t){for(var r=s.nodes(),i=r.pop(),n={};i;)n[i]?e(i):(n[i]=!0,r.push(i),r=r.concat(t(i))),i=r.pop()}function h(e){a[e]=s.inEdges(e).reduce(function(e,t){return Math.max(e,a[t.v]+s.edge(t))},0)}function c(e){var t=s.outEdges(e).reduce(function(e,t){return Math.min(e,a[t.w]-s.edge(t))},Number.POSITIVE_INFINITY),r=i.node(e);t!==Number.POSITIVE_INFINITY&&r.borderType!==o&&(a[e]=Math.max(a[e],t))}return mt(l,"iterate"),mt(h,"pass1"),mt(c,"pass2"),l(h,s.predecessors.bind(s)),l(c,s.successors.bind(s)),v(r,function(e){a[e]=a[t[e]]}),a}function PK(a,e,s,t){var o=new sH,r=a.graph(),l=WK(r.nodesep,r.edgesep,t);return v(e,function(e){var n;v(e,function(e){var t,r,i=s[e];o.setNode(i),n&&(t=s[n],r=o.edge(t,i),o.setEdge(t,i,Math.max(l(a,e,n),r||0))),n=e})}),o}function $K(n,e){return rV(mj(e),function(e){var r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return UG(e,function(e,t){t=UK(n,t)/2,r=Math.max(e+t,r),i=Math.min(e-t,i)}),r-i})}function FK(s,o){var e=mj(o),l=Jj(e),h=Kj(e);v(["u","d"],function(a){v(["l","r"],function(e){var t,r,i=a+e,n=s[i];n!==o&&(t=mj(n),r="l"===e?l-Jj(t):h-Kj(t))&&(s[i]=Gj(n,function(e){return e+r}))})})}function zK(r,i){return Gj(r.ul,function(e,t){return i?r[i.toLowerCase()][t]:((t=SY(x(r,t)))[1]+t[2])/2})}function qK(i){var n,e=AH(i),a=M_(RK(i,e),IK(i,e)),s={},t=(v(["u","d"],function(r){n="u"===r?e:mj(e).reverse(),v(["l","r"],function(e){"r"===e&&(n=x(n,function(e){return mj(e).reverse()}));var t=("u"===r?i.predecessors:i.successors).bind(i),t=OK(0,n,a,t),t=BK(i,n,t.root,t.align,"r"===e);"r"===e&&(t=Gj(t,function(e){return-e})),s[r+e]=t})}),$K(i,s));return FK(s,t),zK(s,i.graph().align)}function WK(s,o,l){return function(e,t,r){var i,n=e.node(t),a=e.node(r),t=0;if(t+=n.width/2,Object.prototype.hasOwnProperty.call(n,"labelpos"))switch(n.labelpos.toLowerCase()){case"l":i=-n.width/2;break;case"r":i=n.width/2}if(i&&(t+=l?i:-i),i=0,t=(t=(t+=(n.dummy?o:s)/2)+(a.dummy?o:s)/2)+a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":i=a.width/2;break;case"r":i=-a.width/2}return i&&(t+=l?i:-i),i=0,t}}function UK(e,t){return e.node(t).width}var GK=i(()=>{eH(),lH(),BH(),mt(RK,"findType1Conflicts"),mt(IK,"findType2Conflicts"),mt(NK,"findOtherInnerSegmentNode"),mt(DK,"addConflict"),mt(MK,"hasConflict"),mt(OK,"verticalAlignment"),mt(BK,"horizontalCompaction"),mt(PK,"buildBlockGraph"),mt($K,"findSmallestWidthAlignment"),mt(FK,"alignCoordinates"),mt(zK,"balance"),mt(qK,"positionX"),mt(WK,"sep"),mt(UK,"width")});function jK(r){VK(r=SH(r)),VG(qK(r),function(e,t){r.node(t).x=e})}function VK(r){var e=AH(r),i=r.graph().ranksep,n=0;v(e,function(e){var t=Kj(x(e,function(e){return r.node(e).height}));v(e,function(e){r.node(e).y=n+t/2}),n+=t+i})}var YK=i(()=>{eH(),BH(),GK(),mt(jK,"position"),mt(VK,"positionY")});function HK(t,e){var r=e&&e.debugTiming?MH:OH;r("layout",()=>{var e=r(" buildLayoutGraph",()=>ZK(t));r(" runLayout",()=>XK(e,r)),r(" updateInputGraph",()=>KK(t,e))})}function XK(e,t){t(" makeSpaceForEdgeLabels",()=>QK(e)),t(" removeSelfEdges",()=>oZ(e)),t(" acyclic",()=>bH(e)),t(" nestingGraph.run",()=>jX(e)),t(" rank",()=>zX(SH(e))),t(" injectEdgeLabelProxies",()=>JK(e)),t(" removeEmptyRanks",()=>RH(e)),t(" nestingGraph.cleanup",()=>XX(e)),t(" normalizeRanks",()=>LH(e)),t(" assignRankMinMax",()=>eZ(e)),t(" removeEdgeLabelProxies",()=>tZ(e)),t(" normalize.run",()=>XH(e)),t(" parentDummyChains",()=>SK(e)),t(" addBorderSegments",()=>PH(e)),t(" order",()=>TK(e)),t(" insertSelfEdges",()=>lZ(e)),t(" adjustCoordinateSystem",()=>zH(e)),t(" position",()=>jK(e)),t(" positionSelfEdges",()=>hZ(e)),t(" removeBorderNodes",()=>sZ(e)),t(" normalize.undo",()=>ZH(e)),t(" fixupEdgeLabelCoords",()=>nZ(e)),t(" undoCoordinateSystem",()=>qH(e)),t(" translateGraph",()=>rZ(e)),t(" assignNodeIntersects",()=>iZ(e)),t(" reversePoints",()=>aZ(e)),t(" acyclic.undo",()=>kH(e))}function KK(i,n){v(i.nodes(),function(e){var t=i.node(e),r=n.node(e);t&&(t.x=r.x,t.y=r.y,n.children(e).length)&&(t.width=r.width,t.height=r.height)}),v(i.edges(),function(e){var t=i.edge(e),e=n.edge(e);t.points=e.points,Object.prototype.hasOwnProperty.call(e,"x")&&(t.x=e.x,t.y=e.y)}),i.graph().width=n.graph().width,i.graph().height=n.graph().height}function ZK(r){var i=new sH({multigraph:!0,compound:!0}),e=uZ(r.graph());return i.setGraph(M_({},pZ,cZ(e,dZ),HV(e,gZ))),v(r.nodes(),function(e){var t=uZ(r.node(e));i.setNode(e,IU(cZ(t,fZ),mZ)),i.setParent(e,r.parent(e))}),v(r.edges(),function(e){var t=uZ(r.edge(e));i.setEdge(e,M_({},vZ,cZ(t,yZ),HV(t,xZ)))}),i}function QK(t){var r=t.graph();r.ranksep/=2,v(t.edges(),function(e){(e=t.edge(e)).minlen*=2,"c"!==e.labelpos.toLowerCase()&&("TB"===r.rankdir||"BT"===r.rankdir?e.width+=e.labeloffset:e.height+=e.labeloffset)})}function JK(r){v(r.edges(),function(e){var t=r.edge(e);t.width&&t.height&&(t=r.node(e.v),t={rank:(r.node(e.w).rank-t.rank)/2+t.rank,e:e},CH(r,"edge-proxy",t,"_ep"))})}function eZ(t){var r=0;v(t.nodes(),function(e){(e=t.node(e)).borderTop&&(e.minRank=t.node(e.borderTop).rank,e.maxRank=t.node(e.borderBottom).rank,r=Kj(r,e.maxRank))}),t.graph().maxRank=r}function tZ(r){v(r.nodes(),function(e){var t=r.node(e);"edge-proxy"===t.dummy&&(r.edge(t.e).labelRank=t.rank,r.removeNode(e))})}function rZ(t){var n=Number.POSITIVE_INFINITY,a=0,s=Number.POSITIVE_INFINITY,o=0,e=t.graph(),r=e.marginx||0,i=e.marginy||0;function l(e){var t=e.x,r=e.y,i=e.width,e=e.height;n=Math.min(n,t-i/2),a=Math.max(a,t+i/2),s=Math.min(s,r-e/2),o=Math.max(o,r+e/2)}mt(l,"getExtremes"),v(t.nodes(),function(e){l(t.node(e))}),v(t.edges(),function(e){e=t.edge(e),Object.prototype.hasOwnProperty.call(e,"x")&&l(e)}),n-=r,s-=i,v(t.nodes(),function(e){(e=t.node(e)).x-=n,e.y-=s}),v(t.edges(),function(e){e=t.edge(e),v(e.points,function(e){e.x-=n,e.y-=s}),Object.prototype.hasOwnProperty.call(e,"x")&&(e.x-=n),Object.prototype.hasOwnProperty.call(e,"y")&&(e.y-=s)}),e.width=a-n+r,e.height=o-s+i}function iZ(a){v(a.edges(),function(e){var t,r=a.edge(e),i=a.node(e.v),e=a.node(e.w),n=r.points?(t=r.points[0],r.points[r.points.length-1]):(r.points=[],t=e,i);r.points.unshift(_H(i,t)),r.points.push(_H(e,n))})}function nZ(r){v(r.edges(),function(e){var t=r.edge(e);if(Object.prototype.hasOwnProperty.call(t,"x"))switch("l"!==t.labelpos&&"r"!==t.labelpos||(t.width-=t.labeloffset),t.labelpos){case"l":t.x-=t.width/2+t.labeloffset;break;case"r":t.x+=t.width/2+t.labeloffset}})}function aZ(t){v(t.edges(),function(e){(e=t.edge(e)).reversed&&e.points.reverse()})}function sZ(a){v(a.nodes(),function(e){var t,r,i,n;a.children(e).length&&(e=a.node(e),t=a.node(e.borderTop),r=a.node(e.borderBottom),i=a.node(jU(e.borderLeft)),n=a.node(jU(e.borderRight)),e.width=Math.abs(n.x-i.x),e.height=Math.abs(r.y-t.y),e.x=i.x+e.width/2,e.y=t.y+e.height/2)}),v(a.nodes(),function(e){"border"===a.node(e).dummy&&a.removeNode(e)})}function oZ(r){v(r.edges(),function(e){var t;e.v===e.w&&((t=r.node(e.v)).selfEdges||(t.selfEdges=[]),t.selfEdges.push({e:e,label:r.edge(e)}),r.removeEdge(e))})}function lZ(n){var e=AH(n);v(e,function(e){var i=0;v(e,function(e,t){var r=n.node(e);r.order=t+i,v(r.selfEdges,function(e){CH(n,"selfedge",{width:e.label.width,height:e.label.height,rank:r.rank,order:t+ ++i,e:e.e,label:e.label},"_se")}),delete r.selfEdges})})}function hZ(s){v(s.nodes(),function(e){var t,r,i,n,a=s.node(e);"selfedge"===a.dummy&&(t=(n=s.node(a.e.v)).x+n.width/2,r=n.y,i=a.x-t,n=n.height/2,s.setEdge(a.e,a.label),s.removeNode(e),a.label.points=[{x:t+2*i/3,y:r-n},{x:t+5*i/6,y:r-n},{x:t+i,y:r},{x:t+5*i/6,y:r+n},{x:t+2*i/3,y:r+n}],a.label.x=a.x,a.label.y=a.y)})}function cZ(e,t){return Gj(HV(e,t),Number)}function uZ(e){var r={};return v(e,function(e,t){r[t.toLowerCase()]=e}),r}var dZ,pZ,gZ,fZ,mZ,yZ,vZ,xZ,bZ=i(()=>{eH(),lH(),FH(),HH(),wH(),QH(),GX(),KX(),EK(),LK(),YK(),BH(),mt(HK,"layout"),mt(XK,"runLayout"),mt(KK,"updateInputGraph"),dZ=["nodesep","edgesep","ranksep","marginx","marginy"],pZ={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},gZ=["acyclicer","ranker","rankdir","align"],fZ=["width","height"],mZ={width:0,height:0},yZ=["minlen","weight","width","height","labeloffset"],vZ={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},xZ=["labelpos"],mt(ZK,"buildLayoutGraph"),mt(QK,"makeSpaceForEdgeLabels"),mt(JK,"injectEdgeLabelProxies"),mt(eZ,"assignRankMinMax"),mt(tZ,"removeEdgeLabelProxies"),mt(rZ,"translateGraph"),mt(iZ,"assignNodeIntersects"),mt(nZ,"fixupEdgeLabelCoords"),mt(aZ,"reversePointsForReversedEdges"),mt(sZ,"removeBorderNodes"),mt(oZ,"removeSelfEdges"),mt(lZ,"insertSelfEdges"),mt(hZ,"positionSelfEdges"),mt(cZ,"selectNumberAttrs"),mt(uZ,"canonicalize")}),TZ=i(()=>{wH(),bZ(),QH(),GX()});function kZ(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:wZ(e),edges:CZ(e)};return $j(e.graph())||(t.value=Eq(e.graph())),t}function wZ(i){return x(i.nodes(),function(e){var t=i.node(e),r=i.parent(e),e={v:e};return $j(t)||(e.value=t),$j(r)||(e.parent=r),e})}function CZ(i){return x(i.edges(),function(e){var t=i.edge(e),r={v:e.v,w:e.w};return $j(e.name)||(r.name=e.name),$j(t)||(r.value=t),r})}var EZ,SZ,_Z,AZ,LZ,RZ,IZ,NZ,DZ,MZ,OZ,BZ,PZ,$Z,FZ,zZ=i(()=>{eH(),oH(),mt(kZ,"write"),mt(wZ,"writeNodes"),mt(CZ,"writeEdges")}),qZ=i(()=>{e(),lH(),zZ(),EZ=new Map,SZ=new Map,_Z=new Map,AZ=mt(()=>{SZ.clear(),_Z.clear(),EZ.clear()},"clear"),LZ=mt((e,t)=>{var r=SZ.get(t)||[];return B.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),RZ=mt((e,t)=>{var r=SZ.get(t)||[];return B.info("Descendants of ",t," is ",r),B.info("Edge is ",e),e.v!==t&&e.w!==t&&(r?r.includes(e.v)||LZ(e.v,t)||LZ(e.w,t)||r.includes(e.w):(B.debug("Tilt, ",t,",not in descendants"),!1))},"edgeInCluster"),IZ=mt((r,i,n,a)=>{B.warn("Copying children of ",r,"root",a,"data",i.node(r),a);var e=i.children(r)||[];r!==a&&e.push(r),B.warn("Copying (nodes) clusterId",r,"nodes",e),e.forEach(e=>{var t;0<i.children(e).length?IZ(e,i,n,a):(t=i.node(e),B.info("cp ",e," to ",a," with parent ",r),n.setNode(e,t),a!==i.parent(e)&&(B.warn("Setting parent",e,i.parent(e)),n.setParent(e,i.parent(e))),r!==a&&e!==r?(B.debug("Setting parent",e,r),n.setParent(e,r)):(B.info("In copy ",r,"root",a,"data",i.node(r),a),B.debug("Not Setting parent for node=",e,"cluster!==rootId",r!==a,"node!==clusterId",e!==r)),t=i.edges(e),B.debug("Copying Edges",t),t.forEach(e=>{B.info("Edge",e);var t=i.edge(e.v,e.w,e.name);B.info("Edge data",t,a);try{RZ(e,a)?(B.info("Copying as ",e.v,e.w,t,e.name),n.setEdge(e.v,e.w,t,e.name),B.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):B.info("Skipping copy of edge ",e.v,"--\x3e",e.w," rootId: ",a," clusterId:",r)}catch(e){B.error(e)}})),B.debug("Removing node",e),i.removeNode(e)})},"copy"),NZ=mt((e,t)=>{let r=t.children(e),i=[...r];for(var n of r)_Z.set(n,e),i=[...i,...NZ(n,t)];return i},"extractDescendants"),DZ=mt((e,t,r)=>{let i=e.edges().filter(e=>e.v===t||e.w===t),n=e.edges().filter(e=>e.v===r||e.w===r),a=i.map(e=>({v:e.v===t?r:e.v,w:e.w===t?t:e.w})),s=n.map(e=>({v:e.v,w:e.w}));return a.filter(t=>s.some(e=>t.v===e.v&&t.w===e.w))},"findCommonEdges"),MZ=mt((e,t,r)=>{var i,n=t.children(e);if(B.trace("Searching children of id ",e,n),n.length<1)return e;let a;for(i of n){var s=MZ(i,t,r),o=DZ(t,r,s);if(s){if(!(0<o.length))return s;a=s}}return a},"findNonClusterChild"),OZ=mt(e=>EZ.has(e)&&EZ.get(e).externalConnections&&EZ.has(e)?EZ.get(e).id:e,"getAnchorId"),BZ=mt((a,e)=>{if(!a||10<e)B.debug("Opting out, no graph ");else{B.debug("Opting in, graph "),a.nodes().forEach(function(e){0<a.children(e).length&&(B.warn("Cluster identified",e," Replacement id in edges: ",MZ(e,a,e)),SZ.set(e,NZ(e,a)),EZ.set(e,{id:MZ(e,a,e),clusterData:a.node(e)}))}),a.nodes().forEach(function(t){var e=a.children(t),r=a.edges();0<e.length?(B.debug("Cluster identified",t,SZ),r.forEach(e=>{LZ(e.v,t)^LZ(e.w,t)&&(B.warn("Edge: ",e," leaves cluster ",t),B.warn("Descendants of XXX ",t,": ",SZ.get(t)),EZ.get(t).externalConnections=!0)})):B.debug("Not a cluster ",t,SZ)});for(var t of EZ.keys()){var r=EZ.get(t).id;(r=a.parent(r))!==t&&EZ.has(r)&&!EZ.get(r).externalConnections&&(EZ.get(t).id=r)}a.edges().forEach(function(e){var t,r,i,n=a.edge(e);B.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),B.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(a.edge(e))),e.v,B.warn("Fix XXX",EZ,"ids:",e.v,e.w,"Translating: ",EZ.get(e.v)," --- ",EZ.get(e.w)),(EZ.get(e.v)||EZ.get(e.w))&&(B.warn("Fixing and trying - removing XXX",e.v,e.w,e.name),t=OZ(e.v),r=OZ(e.w),a.removeEdge(e.v,e.w,e.name),t!==e.v&&(i=a.parent(t),EZ.get(i).externalConnections=!0,n.fromCluster=e.v),r!==e.w&&(i=a.parent(r),EZ.get(i).externalConnections=!0,n.toCluster=e.w),B.warn("Fix Replacing with XXX",t,r,e.name),a.setEdge(t,r,n,e.name))}),B.warn("Adjusted Graph",kZ(a)),PZ(a,0),B.trace(EZ)}},"adjustClustersAndEdges"),PZ=mt((r,i)=>{if(B.warn("extractor - ",i,kZ(r),r.children("D")),10<i)B.error("Bailing out");else{let e=r.nodes(),t=!1;for(var n of e)n=r.children(n),t=t||0<n.length;if(t){B.debug("Nodes = ",e,i);for(var a of e)if(B.debug("Extracting node",a,EZ,EZ.has(a)&&!EZ.get(a).externalConnections,!r.parent(a),r.node(a),r.children("D")," Depth ",i),EZ.has(a))if(!EZ.get(a).externalConnections&&r.children(a)&&0<r.children(a).length){B.warn("Cluster without external connections, without a parent and with children",a,i);let e="TB"===r.graph().rankdir?"LR":"TB";EZ.get(a)?.clusterData?.dir&&(e=EZ.get(a).clusterData.dir,B.warn("Fixing dir",EZ.get(a).clusterData.dir,e));var s=new sH({multigraph:!0,compound:!0}).setGraph({rankdir:e,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});B.warn("Old graph before copy",kZ(r)),IZ(a,r,s,a),r.setNode(a,{clusterNode:!0,id:a,clusterData:EZ.get(a).clusterData,label:EZ.get(a).label,graph:s}),B.warn("New graph after copy node: (",a,")",kZ(s)),B.debug("Old graph after copy",kZ(r))}else B.warn("Cluster ** ",a," **not meeting the criteria !externalConnections:",!EZ.get(a).externalConnections," no parent: ",!r.parent(a)," children ",r.children(a)&&0<r.children(a).length,r.children("D"),i),B.debug(EZ);else B.debug("Not a cluster",a,i);e=r.nodes(),B.warn("New list of nodes",e);for(var o of e){var l=r.node(o);B.warn(" Now next level",o,l),l?.clusterNode&&PZ(l.graph,i+1)}}else B.debug("Done, no node has children",r.nodes())}},"extractor"),$Z=mt((t,e)=>{if(0===e.length)return[];let r=Object.assign([],e);return e.forEach(e=>{e=t.children(e),e=$Z(t,e),r=[...r,...e]}),r},"sorter"),FZ=mt(e=>$Z(e,e.children()),"sortNodesByHierarchy")}),WZ={};sYe(WZ,{render:()=>GZ});var UZ,GZ,jZ=i(()=>{TZ(),zZ(),lH(),nP(),BR(),qZ(),uP(),eB(),iP(),e(),JO(),ju(),UZ=mt(async(e,n,a,s,o,l)=>{B.warn("Graph in recursive render:XAX",kZ(n),o);let h=n.graph().rankdir,i=(B.trace("Dir in recursive render - dir:",h),e=e.insert("g").attr("class","root"),n.nodes()?B.info("Recursive render XXX",n.nodes()):B.info("No nodes found for",n),0<n.edges().length&&B.info("Recursive edges",n.edge(n.edges()[0])),e.insert("g").attr("class","clusters")),c=e.insert("g").attr("class","edgePaths"),r=e.insert("g").attr("class","edgeLabels"),u=e.insert("g").attr("class","nodes"),d=(await Promise.all(n.nodes().map(async function(e){var t,r,i=n.node(e);void 0!==o&&(t=JSON.parse(JSON.stringify(o.clusterData)),B.trace(`Setting data for parent cluster XXX
Node.id = `,e,`
data=`,t.height,`
Parent cluster`,o.height),n.setNode(o.id,t),n.parent(e)||(B.trace("Setting parent",e,o.id),n.setParent(e,o.id,t))),B.info("(Insert) Node XXX"+e+": "+JSON.stringify(n.node(e))),i?.clusterNode?(B.info("Cluster identified XBX",e,i.width,n.node(e)),{ranksep:t,nodesep:r}=n.graph(),i.graph.setGraph({...i.graph.graph(),ranksep:t+25,nodesep:r}),r=(t=await UZ(u,i.graph,a,s,n.node(e),l)).elem,MR(i,r),i.diff=t.diff||0,B.info("New compound node after recursive render XAX",e,"width",i.width,"height",i.height),oP(r,i)):0<n.children(e).length?(B.trace("Cluster - the non recursive path XBX",e,i.id,i,i.width,"Graph:",n),B.trace(MZ(i.id,n)),EZ.set(i.id,{id:MZ(i.id,n),node:i})):(B.trace("Node - the non recursive path XAX",e,u,n.node(e),h),await aP(u,n.node(e),{config:l,dir:h}))})),await mt(async()=>{var e=n.edges().map(async function(e){var t=n.edge(e.v,e.w,e.name);B.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),B.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(n.edge(e))),B.info("Fix",EZ,"ids:",e.v,e.w,"Translating: ",EZ.get(e.v),EZ.get(e.w)),await wB(r,t)});await Promise.all(e)},"processEdges")(),B.info("Graph before layout:",JSON.stringify(kZ(n))),B.info("############################################# XXX"),B.info("### Layout ### XXX"),B.info("############################################# XXX"),HK(n),B.info("Graph after layout:",JSON.stringify(kZ(n))),0),p=FO(l).subGraphTitleTotalMargin;return await Promise.all(FZ(n).map(async function(e){var t,r=n.node(e);B.info("Position XBX => "+e+": ("+r.x,","+r.y,") width: ",r.width," height: ",r.height),r?.clusterNode?(r.y+=p,B.info("A tainted cluster node XBX1",e,r.id,r.width,r.height,r.x,r.y,n.parent(e)),EZ.get(r.id).node=r,hP(r)):0<n.children(e).length?(B.info("A pure cluster node XBX1",e,r.id,r.x,r.y,r.width,r.height,n.parent(e)),r.height+=p,n.node(r.parentId),e=r?.padding/2||0,t=r?.labelBBox?.height||0,B.debug("OffsetY",t-e||0,"labelHeight",t,"halfPadding",e),await YO(i,r),EZ.get(r.id).node=r):(t=n.node(r.parentId),r.y+=p/2,B.info("A regular node XBX1 - using the padding",r.id,"parent",r.parentId,r.width,r.height,r.x,r.y,"offsetY",r.offsetY,"parent",t,t?.offsetY,r),hP(r))})),n.edges().forEach(function(e){var t=n.edge(e),r=(B.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t),t),t.points.forEach(e=>e.y+=p/2),n.node(e.v)),e=n.node(e.w),r=IB(c,t,EZ,a,r,e,s);CB(t,r)}),n.nodes().forEach(function(e){var t=n.node(e);B.info(e,t.type,t.diff),t.isGroup&&(d=t.diff)}),B.warn("Returning from recursive render XAX",e,d),{elem:e,diff:d}},"recursiveRender"),GZ=mt(async(e,t)=>{let l=new sH({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{}}),r=t.select("g");rP(r,e.markers,e.type,e.diagramId),lP(),TB(),HO(),AZ(),e.nodes.forEach(e=>{l.setNode(e.id,{...e}),e.parentId&&l.setParent(e.id,e.parentId)}),B.debug("Edges:",e.edges),e.edges.forEach(e=>{var t,r,i,n,a,s,o;e.start===e.end?(r=(t=e.start)+"---"+t+"---1",i=t+"---"+t+"---2",n=l.node(t),l.setNode(r,{domId:r,id:r,parentId:n.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),l.setParent(r,n.parentId),l.setNode(i,{domId:i,id:i,parentId:n.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),l.setParent(i,n.parentId),a=structuredClone(e),s=structuredClone(e),o=structuredClone(e),a.label="",a.arrowTypeEnd="none",a.id=t+"-cyclic-special-1",s.arrowTypeStart="none",s.arrowTypeEnd="none",s.id=t+"-cyclic-special-mid",o.label="",n.isGroup&&(a.fromCluster=t,o.toCluster=t),o.id=t+"-cyclic-special-2",o.arrowTypeStart="none",l.setEdge(t,r,a,t+"-cyclic-special-0"),l.setEdge(r,i,s,t+"-cyclic-special-1"),l.setEdge(i,t,o,t+"-cyc<lic-special-2")):l.setEdge(e.start,e.end,{...e},e.id)}),B.warn("Graph at first:",JSON.stringify(kZ(l))),BZ(l),B.warn("Graph after XAX:",JSON.stringify(kZ(l))),t=P(),await UZ(r,l,e.type,e.diagramId,void 0,t)},"render")});function VZ(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function YZ(e){if(Array.isArray(e))return e}function HZ(e){if(Array.isArray(e))return VZ(e)}function XZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KZ(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,oQ(i.key),i)}}function ZZ(e,t,r){return t&&KZ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function QZ(e,t){var r,i,n,a,s=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(s)return n=!(i=!0),{s:mt(function(){s=s.call(e)},"s"),n:mt(function(){var e=s.next();return i=e.done,e},"n"),e:mt(function(e){n=!0,r=e},"e"),f:mt(function(){try{i||null==s.return||s.return()}finally{if(n)throw r}},"f")};if(Array.isArray(e)||(s=hQ(e))||t)return s&&(e=s),a=0,{s:t=mt(function(){},"F"),n:mt(function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},"n"),e:mt(function(e){throw e},"e"),f:t};throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JZ(e,t,r){return(t=oQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eQ(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function tQ(e,t){var r=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var i,n,a,s,o=[],l=!0,h=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=a.call(r)).done)&&(o.push(i.value),o.length!==t);l=!0);}catch(e){h=!0,n=e}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(h)throw n}}return o}}function rQ(){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 iQ(){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 nQ(e,t){return YZ(e)||tQ(e,t)||hQ(e,t)||rQ()}function aQ(e){return HZ(e)||eQ(e)||hQ(e)||iQ()}function sQ(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return String(e);if("object"!=typeof(r=r.call(e,t)))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}function oQ(e){return"symbol"==typeof(e=sQ(e,"string"))?e:e+""}function lQ(e){return(lQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hQ(e,t){var r;if(e)return"string"==typeof e?VZ(e,t):"Map"===(r="Object"===(r={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?VZ(e,t):void 0}function cQ(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function uQ(){return hre||(hre=1,mt(e,"isObject"),lre=e),lre;function e(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}}function dQ(){var e;return ure||(ure=1,e="object"==typeof ore&&ore&&ore.Object===Object&&ore,cre=e),cre}function pQ(){var e,t;return pre||(pre=1,t=dQ(),e="object"==typeof self&&self&&self.Object===Object&&self,t=t||e||Function("return this")(),dre=t),dre}function gQ(){var e,t;return fre||(fre=1,e=pQ(),t=mt(function(){return e.Date.now()},"now"),gre=t),gre}function fQ(){var r;return yre||(yre=1,r=/\s/,mt(e,"trimmedEndIndex"),mre=e),mre;function e(e){for(var t=e.length;t--&&r.test(e.charAt(t)););return t}}function mQ(){var t,r;return xre||(xre=1,t=fQ(),r=/^\s+/,mt(e,"baseTrim"),vre=e),vre;function e(e){return e&&e.slice(0,t(e)+1).replace(r,"")}}function yQ(){var e;return Tre||(Tre=1,e=pQ().Symbol,bre=e),bre}function vQ(){var e,t,a,s,o;return wre||(wre=1,e=yQ(),t=Object.prototype,a=t.hasOwnProperty,s=t.toString,o=e?e.toStringTag:void 0,mt(r,"getRawTag"),kre=r),kre;function r(e){var t=a.call(e,o),r=e[o];try{var i=!(e[o]=void 0)}catch{}var n=s.call(e);return i&&(t?e[o]=r:delete e[o]),n}}function xQ(){var t;return Ere||(Ere=1,t=Object.prototype.toString,mt(e,"objectToString"),Cre=e),Cre;function e(e){return t.call(e)}}function bQ(){var e,t,r,i;return _re||(_re=1,e=yQ(),t=vQ(),r=xQ(),i=e?e.toStringTag:void 0,mt(n,"baseGetTag"),Sre=n),Sre;function n(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":(i&&i in Object(e)?t:r)(e)}}function TQ(){return Lre||(Lre=1,mt(e,"isObjectLike"),Are=e),Are;function e(e){return null!=e&&"object"==typeof e}}function kQ(){var t,r;return Ire||(Ire=1,t=bQ(),r=TQ(),mt(e,"isSymbol"),Rre=e),Rre;function e(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==t(e)}}function wQ(){var r,i,n,a,s,o,l;return Dre||(Dre=1,r=mQ(),i=uQ(),n=kQ(),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt,mt(e,"toNumber"),Nre=e),Nre;function e(e){if("number"==typeof e)return e;if(n(e))return NaN;if(i(e)&&(t="function"==typeof e.valueOf?e.valueOf():e,e=i(t)?t+"":t),"string"!=typeof e)return 0===e?e:+e;e=r(e);var t=s.test(e);return t||o.test(e)?l(e.slice(2),t?2:8):a.test(e)?NaN:+e}}function CQ(){var k,w,C,E,S;return Ore||(Ore=1,k=uQ(),w=gQ(),C=wQ(),E=Math.max,S=Math.min,mt(e,"debounce"),Mre=e),Mre;function e(i,r,e){var n,a,s,o,l,h,c=0,t=!1,u=!1,d=!0;if("function"!=typeof i)throw new TypeError("Expected a function");function p(e){var t=n,r=a;return n=a=void 0,c=e,o=i.apply(r,t)}function g(e){return c=e,l=setTimeout(y,r),t?p(e):o}function f(e){var t=r-(e-h);return u?S(t,s-(e-c)):t}function m(e){var t=e-h;return void 0===h||r<=t||t<0||u&&s<=e-c}function y(){var e=w();if(m(e))return v(e);l=setTimeout(y,f(e))}function v(e){return l=void 0,d&&n?p(e):(n=a=void 0,o)}function x(){void 0!==l&&clearTimeout(l),n=h=a=l=void(c=0)}function b(){return void 0===l?o:v(w())}function T(){var e=w(),t=m(e);if(n=arguments,a=this,h=e,t){if(void 0===l)return g(h);if(u)return clearTimeout(l),l=setTimeout(y,r),p(h)}return void 0===l&&(l=setTimeout(y,r)),o}return r=C(r)||0,k(e)&&(t=!!e.leading,u="maxWait"in e,s=u?E(C(e.maxWait)||0,r):s,d="trailing"in e?!!e.trailing:d),mt(p,"invokeFunc"),mt(g,"leadingEdge"),mt(f,"remainingWait"),mt(m,"shouldInvoke"),mt(y,"timerExpired"),mt(v,"trailingEdge"),mt(x,"cancel"),mt(b,"flush"),mt(T,"debounced"),T.cancel=x,T.flush=b,T}}function EQ(e,t,r,i,n){return n=n*Math.PI/180,{x:Math.cos(n)*(e-r)-Math.sin(n)*(t-i)+r,y:Math.sin(n)*(e-r)+Math.cos(n)*(t-i)+i}}function SQ(e,t,r){var i,n,a;return 0===r?e:(i=(t.x1+t.x2)/2,a=1/(n=t.w/t.h),t=EQ(e.x,e.y,i,e=(t.y1+t.y2)/2,r),{x:(r=Qre(t.x,t.y,i,e,n,a)).x,y:r.y})}function _Q(){return Sie||(Sie=1,s=Cie,function(){var d,l,p,g,t,h,r,f,m,e,i,n,c,u;function a(e){this.cmp=e??d,this.nodes=[]}l=Math.floor,m=Math.min,d=mt(function(e,t){return e<t?-1:t<e?1:0},"defaultCmp"),f=mt(function(e,t,r,i,n){var a;if(null==n&&(n=d),(r=null==r?0:r)<0)throw new Error("lo must be non-negative");for(null==i&&(i=e.length);r<i;)n(t,e[a=l((r+i)/2)])<0?i=a:r=a+1;return[].splice.apply(e,[r,r-r].concat(t)),t},"insort"),t=mt(function(e,t,r){return null==r&&(r=d),e.push(t),c(e,0,e.length-1,r)},"heappush"),g=mt(function(e,t){var r,i;return null==t&&(t=d),r=e.pop(),e.length?(i=e[0],e[0]=r,u(e,0,t)):i=r,i},"heappop"),r=mt(function(e,t,r){var i;return null==r&&(r=d),i=e[0],e[0]=t,u(e,0,r),i},"heapreplace"),h=mt(function(e,t,r){var i;return null==r&&(r=d),e.length&&r(e[0],t)<0&&(t=(i=[e[0],t])[0],e[0]=i[1],u(e,0,r)),t},"heappushpop"),p=mt(function(r,e){var t,i,n,a,s,o;for(null==e&&(e=d),s=[],i=0,n=(a=function(){o=[];for(var e=0,t=l(r.length/2);0<=t?e<t:t<e;0<=t?e++:e--)o.push(e);return o}.apply(this).reverse()).length;i<n;i++)t=a[i],s.push(u(r,t,e));return s},"heapify"),n=mt(function(e,t,r){if(null==r&&(r=d),-1!==(t=e.indexOf(t)))return c(e,0,t,r),u(e,t,r)},"updateItem"),e=mt(function(e,t,r){var i,n,a,s,o;if(null==r&&(r=d),!(n=e.slice(0,t)).length)return n;for(p(n,r),a=0,s=(o=e.slice(t)).length;a<s;a++)i=o[a],h(n,i,r);return n.sort(r).reverse()},"nlargest"),i=mt(function(e,t,r){var i,n,a,s,o,l,h,c,u;if(null==r&&(r=d),10*t<=e.length){if((a=e.slice(0,t).sort(r)).length)for(n=a[a.length-1],s=0,l=(h=e.slice(t)).length;s<l;s++)r(i=h[s],n)<0&&(f(a,i,0,null,r),a.pop(),n=a[a.length-1]);return a}for(p(e,r),u=[],o=0,c=m(t,e.length);0<=c?o<c:c<o;0<=c?++o:--o)u.push(g(e,r));return u},"nsmallest"),c=mt(function(e,t,r,i){var n,a,s;for(null==i&&(i=d),n=e[r];t<r&&i(n,a=e[s=r-1>>1])<0;)e[r]=a,r=s;return e[r]=n},"_siftdown"),u=mt(function(e,t,r){var i,n,a,s,o;for(null==r&&(r=d),n=e.length,a=e[o=t],i=2*t+1;i<n;)(s=i+1)<n&&!(r(e[i],e[s])<0)&&(i=s),e[t]=e[i],i=2*(t=i)+1;return e[t]=a,c(e,o,t,r)},"_siftup"),a.push=t,a.pop=g,a.replace=r,a.pushpop=h,a.heapify=p,a.updateItem=n,a.nlargest=e,a.nsmallest=i,mt(a,"Heap"),a.prototype.push=function(e){return t(this.nodes,e,this.cmp)},a.prototype.pop=function(){return g(this.nodes,this.cmp)},a.prototype.peek=function(){return this.nodes[0]},a.prototype.contains=function(e){return-1!==this.nodes.indexOf(e)},a.prototype.replace=function(e){return r(this.nodes,e,this.cmp)},a.prototype.pushpop=function(e){return h(this.nodes,e,this.cmp)},a.prototype.heapify=function(){return p(this.nodes,this.cmp)},a.prototype.updateItem=function(e){return n(this.nodes,e,this.cmp)},a.prototype.clear=function(){return this.nodes=[]},a.prototype.empty=function(){return 0===this.nodes.length},a.prototype.size=function(){return this.nodes.length},a.prototype.clone=function(){var e=new a;return e.nodes=this.nodes.slice(0),e},a.prototype.toArray=function(){return this.nodes.slice(0)},a.prototype.insert=a.prototype.push,a.prototype.top=a.prototype.peek,a.prototype.front=a.prototype.peek,a.prototype.has=a.prototype.contains,a.prototype.copy=a.prototype.clone,s.exports=a}.call(Eie)),Cie.exports;var s}function AQ(){return Aie||(Aie=1,_ie=_Q()),_ie}function LQ(e,r){if(e.length<3)throw new Error("Need at least 3 vertices");var a=mt(function(e,t){return{x:e.x+t.x,y:e.y+t.y}},"add"),s=mt(function(e,t){return{x:e.x-t.x,y:e.y-t.y}},"sub"),o=mt(function(e,t){return{x:e.x*t,y:e.y*t}},"scale"),l=mt(function(e,t){return e.x*t.y-e.y*t.x},"cross"),t=mt(function(e){var t=gne(e.x,e.y);return 0===t?{x:0,y:0}:{x:e.x/t,y:e.y/t}},"normalize"),i=mt(function(e){for(var t=0,r=0;r<e.length;r++){var i=e[r],n=e[(r+1)%e.length];t+=i.x*n.y-n.x*i.y}return t/2},"signedArea"),n=mt(function(e,t,r,i){var t=s(t,e),i=s(i,r),n=l(t,i);return Math.abs(n)<1e-9?a(e,o(t,.5)):(r=l(s(r,e),i)/n,a(e,o(t,r)))},"intersectLines"),h=e.map(function(e){return{x:e.x,y:e.y}});i(h)<0&&h.reverse();for(var c=h.length,u=[],d=0;d<c;d++){var p=h[d],g=h[(d+1)%c],p=t({x:(g=s(g,p)).y,y:-g.x});u.push(p)}for(var f=u.map(function(e,t){return{p1:a(h[t],o(e,r)),p2:a(h[(t+1)%c],o(e,r))}}),m=[],y=0;y<c;y++){var v=f[(y-1+c)%c],x=f[y],v=n(v.p1,v.p2,x.p1,x.p2);m.push(v)}return m}function RQ(e,t,r,i,n,a){var e=LQ(Nne(e,t,r,i,n),a),s=rne();return e.forEach(function(e){return sne(s,e.x,e.y)}),s}function IQ(e,t){function r(e){for(var t=[],r=0;r<e.length;r++){var i=-(n={x:(n=e[(r+1)%e.length]).x-(i=e[r]).x,y:n.y-i.y}).y,n=n.x,a=Math.sqrt(i*i+n*n);t.push({x:i/a,y:n/a})}return t}function i(e,t){var r,i=1/0,n=-1/0,a=QZ(e);try{for(a.s();!(r=a.n()).done;)var s=r.value,o=s.x*t.x+s.y*t.y,i=Math.min(i,o),n=Math.max(n,o)}catch(e){a.e(e)}finally{a.f()}return{min:i,max:n}}function n(e,t){return!(e.max<t.min||t.max<e.min)}mt(r,"getAxes"),mt(i,"project"),mt(n,"overlaps");var a,s=QZ([].concat(aQ(r(e)),aQ(r(t))));try{for(s.s();!(a=s.n()).done;){var o=a.value;if(!n(i(e,o),i(t,o)))return!1}}catch(e){s.e(e)}finally{s.f()}return!0}function NQ(e,t,r,i,n,a){var s=Ste(e)?e:pae[e]||pae.euclidean;return 0===t&&Ste(e)?s(n,a):s(t,r,i,n,a)}function DQ(){var e;return Jae||(Jae=1,e=Array.isArray,Qae=e),Qae}function MQ(){var i,n,a,s;return tse||(tse=1,i=DQ(),n=kQ(),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/,mt(e,"isKey"),ese=e),ese;function e(e,t){var r;return!i(e)&&(!("number"!=(r=typeof e)&&"symbol"!=r&&"boolean"!=r&&null!=e&&!n(e))||s.test(e)||!a.test(e)||null!=t&&e in Object(t))}}function OQ(){var t,r;return ise||(ise=1,t=bQ(),r=uQ(),mt(e,"isFunction"),rse=e),rse;function e(e){return!!r(e)&&("[object Function]"==(e=t(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}}function BQ(){var e;return ase||(ase=1,e=pQ()["__core-js_shared__"],nse=e),nse}function PQ(){var t,e;return ose||(ose=1,e=BQ(),t=(e=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"",mt(r,"isMasked"),sse=r),sse;function r(e){return!!t&&t in e}}function $Q(){var t;return hse||(hse=1,t=Function.prototype.toString,mt(e,"toSource"),lse=e),lse;function e(e){if(null!=e){try{return t.call(e)}catch{}try{return e+""}catch{}}return""}}function FQ(){var t,r,i,n,a,e,s,o;return use||(use=1,t=OQ(),r=PQ(),i=uQ(),n=$Q(),a=/^\[object .+?Constructor\]$/,e=Function.prototype,s=Object.prototype,e=e.toString,s=s.hasOwnProperty,o=RegExp("^"+e.call(s).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt(l,"baseIsNative"),cse=l),cse;function l(e){return!(!i(e)||r(e))&&(t(e)?o:a).test(n(e))}}function zQ(){return pse||(pse=1,mt(e,"getValue"),dse=e),dse;function e(e,t){return e?.[t]}}function qQ(){var r,i;return fse||(fse=1,r=FQ(),i=zQ(),mt(e,"getNative"),gse=e),gse;function e(e,t){return e=i(e,t),r(e)?e:void 0}}function WQ(){var e;return yse||(yse=1,e=qQ()(Object,"create"),mse=e),mse}function UQ(){var e;return xse||(xse=1,e=WQ(),mt(t,"hashClear"),vse=t),vse;function t(){this.__data__=e?e(null):{},this.size=0}}function GQ(){return Tse||(Tse=1,mt(e,"hashDelete"),bse=e),bse;function e(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e}}function jQ(){var i,n;return wse||(wse=1,i=WQ(),n=Object.prototype.hasOwnProperty,mt(e,"hashGet"),kse=e),kse;function e(e){var t,r=this.__data__;return i?"__lodash_hash_undefined__"===(t=r[e])?void 0:t:n.call(r,e)?r[e]:void 0}}function VQ(){var r,i;return Ese||(Ese=1,r=WQ(),i=Object.prototype.hasOwnProperty,mt(e,"hashHas"),Cse=e),Cse;function e(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}}function YQ(){var i;return _se||(_se=1,i=WQ(),mt(e,"hashSet"),Sse=e),Sse;function e(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=i&&void 0===t?"__lodash_hash_undefined__":t,this}}function HQ(){var e,t,r,i,n;return Lse||(Lse=1,e=UQ(),t=GQ(),r=jQ(),i=VQ(),n=YQ(),mt(a,"Hash"),a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=i,a.prototype.set=n,Ase=a),Ase;function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}}function XQ(){return Ise||(Ise=1,mt(e,"listCacheClear"),Rse=e),Rse;function e(){this.__data__=[],this.size=0}}function KQ(){return Dse||(Dse=1,mt(e,"eq"),Nse=e),Nse;function e(e,t){return e===t||e!=e&&t!=t}}function ZQ(){var i;return Ose||(Ose=1,i=KQ(),mt(e,"assocIndexOf"),Mse=e),Mse;function e(e,t){for(var r=e.length;r--;)if(i(e[r][0],t))return r;return-1}}function QQ(){var r,i;return Pse||(Pse=1,r=ZQ(),i=Array.prototype.splice,mt(e,"listCacheDelete"),Bse=e),Bse;function e(e){var t=this.__data__;return!((e=r(t,e))<0||(e==t.length-1?t.pop():i.call(t,e,1),--this.size,0))}}function JQ(){var r;return Fse||(Fse=1,r=ZQ(),mt(e,"listCacheGet"),$se=e),$se;function e(e){var t=this.__data__;return(e=r(t,e))<0?void 0:t[e][1]}}function eJ(){var t;return qse||(qse=1,t=ZQ(),mt(e,"listCacheHas"),zse=e),zse;function e(e){return-1<t(this.__data__,e)}}function tJ(){var n;return Use||(Use=1,n=ZQ(),mt(e,"listCacheSet"),Wse=e),Wse;function e(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}}function rJ(){var e,t,r,i,n;return jse||(jse=1,e=XQ(),t=QQ(),r=JQ(),i=eJ(),n=tJ(),mt(a,"ListCache"),a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=i,a.prototype.set=n,Gse=a),Gse;function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}}function iJ(){var e;return Yse||(Yse=1,e=qQ()(pQ(),"Map"),Vse=e),Vse}function nJ(){var e,t,r;return Xse||(Xse=1,e=HQ(),t=rJ(),r=iJ(),mt(i,"mapCacheClear"),Hse=i),Hse;function i(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}}function aJ(){return Zse||(Zse=1,mt(e,"isKeyable"),Kse=e),Kse;function e(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}}function sJ(){var r;return Jse||(Jse=1,r=aJ(),mt(e,"getMapData"),Qse=e),Qse;function e(e,t){return e=e.__data__,r(t)?e["string"==typeof t?"string":"hash"]:e.map}}function oJ(){var t;return toe||(toe=1,t=sJ(),mt(e,"mapCacheDelete"),eoe=e),eoe;function e(e){return e=t(this,e).delete(e),this.size-=e?1:0,e}}function lJ(){var t;return ioe||(ioe=1,t=sJ(),mt(e,"mapCacheGet"),roe=e),roe;function e(e){return t(this,e).get(e)}}function hJ(){var t;return aoe||(aoe=1,t=sJ(),mt(e,"mapCacheHas"),noe=e),noe;function e(e){return t(this,e).has(e)}}function cJ(){var n;return ooe||(ooe=1,n=sJ(),mt(e,"mapCacheSet"),soe=e),soe;function e(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}}function uJ(){var e,t,r,i,n;return hoe||(hoe=1,e=nJ(),t=oJ(),r=lJ(),i=hJ(),n=cJ(),mt(a,"MapCache"),a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=i,a.prototype.set=n,loe=a),loe;function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}}function dJ(){var e;return uoe||(uoe=1,e=uJ(),mt(t,"memoize"),t.Cache=e,coe=t),coe;function t(i,n){if("function"!=typeof i||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var a=mt(function(){var e=arguments,t=n?n.apply(this,e):e[0],r=a.cache;return r.has(t)?r.get(t):(e=i.apply(this,e),a.cache=r.set(t,e)||r,e)},"memoized");return a.cache=new(t.Cache||e),a}}function pJ(){var r;return poe||(poe=1,r=dJ(),mt(e,"memoizeCapped"),doe=e),doe;function e(e){var t=(e=r(e,function(e){return 500===t.size&&t.clear(),e})).cache;return e}}function gJ(){var t,a,e;return foe||(foe=1,e=pJ(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,e=e(function(e){var n=[];return 46===e.charCodeAt(0)&&n.push(""),e.replace(t,function(e,t,r,i){n.push(r?i.replace(a,"$1"):t||e)}),n}),goe=e),goe}function fJ(){return yoe||(yoe=1,mt(e,"arrayMap"),moe=e),moe;function e(e,t){for(var r=-1,i=null==e?0:e.length,n=Array(i);++r<i;)n[r]=t(e[r],r,e);return n}}function mJ(){var r,i,n,e,a;return xoe||(xoe=1,e=yQ(),r=fJ(),i=DQ(),n=kQ(),e=e?e.prototype:void 0,a=e?e.toString:void 0,mt(s,"baseToString"),voe=s),voe;function s(e){var t;return"string"==typeof e?e:i(e)?r(e,s)+"":n(e)?a?a.call(e):"":"0"==(t=e+"")&&1/e==-1/0?"-0":t}}function yJ(){var t;return Toe||(Toe=1,t=mJ(),mt(e,"toString"),boe=e),boe;function e(e){return null==e?"":t(e)}}function vJ(){var r,i,n,a;return woe||(woe=1,r=DQ(),i=MQ(),n=gJ(),a=yJ(),mt(e,"castPath"),koe=e),koe;function e(e,t){return r(e)?e:i(e,t)?[e]:n(a(e))}}function xJ(){var r;return Eoe||(Eoe=1,r=kQ(),mt(e,"toKey"),Coe=e),Coe;function e(e){var t;return"string"==typeof e||r(e)?e:"0"==(t=e+"")&&1/e==-1/0?"-0":t}}function bJ(){var n,a;return _oe||(_oe=1,n=vJ(),a=xJ(),mt(e,"baseGet"),Soe=e),Soe;function e(e,t){for(var r=0,i=(t=n(t,e)).length;null!=e&&r<i;)e=e[a(t[r++])];return r&&r==i?e:void 0}}function TJ(){var i;return Loe||(Loe=1,i=bJ(),mt(e,"get"),Aoe=e),Aoe;function e(e,t,r){return void 0===(e=null==e?void 0:i(e,t))?r:e}}function kJ(){var t,e;return Noe||(Noe=1,t=qQ(),e=(()=>{try{var e=t(Object,"defineProperty");return e({},"",{}),e}catch{}})(),Ioe=e),Ioe}function wJ(){var i;return Moe||(Moe=1,i=kJ(),mt(e,"baseAssignValue"),Doe=e),Doe;function e(e,t,r){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}}function CJ(){var n,a,s;return Boe||(Boe=1,n=wJ(),a=KQ(),s=Object.prototype.hasOwnProperty,mt(e,"assignValue"),Ooe=e),Ooe;function e(e,t,r){var i=e[t];s.call(e,t)&&a(i,r)&&(void 0!==r||t in e)||n(e,t,r)}}function EJ(){var i;return $oe||($oe=1,i=/^(?:0|[1-9]\d*)$/,mt(e,"isIndex"),Poe=e),Poe;function e(e,t){var r=typeof e;return!!(t=t??9007199254740991)&&("number"==r||"symbol"!=r&&i.test(e))&&-1<e&&e%1==0&&e<t}}function SJ(){var u,d,p,g,f;return zoe||(zoe=1,u=CJ(),d=vJ(),p=EJ(),g=uQ(),f=xJ(),mt(e,"baseSet"),Foe=e),Foe;function e(e,t,r,i){if(g(e))for(var n=-1,a=(t=d(t,e)).length,s=a-1,o=e;null!=o&&++n<a;){var l,h=f(t[n]),c=r;if("__proto__"===h||"constructor"===h||"prototype"===h)return e;n!=s&&(l=o[h],void 0===(c=i?i(l,h,o):void 0))&&(c=g(l)?l:p(t[n+1])?[]:{}),u(o,h,c),o=o[h]}return e}}function _J(){var i;return Woe||(Woe=1,i=SJ(),mt(e,"set"),qoe=e),qoe;function e(e,t,r){return null==e?e:i(e,t,r)}}function AJ(){return joe||(joe=1,mt(e,"copyArray"),Goe=e),Goe;function e(e,t){var r=-1,i=e.length;for(t=t||Array(i);++r<i;)t[r]=e[r];return t}}function LJ(){var t,r,i,n,a,s,o;return Yoe||(Yoe=1,t=fJ(),r=AJ(),i=DQ(),n=kQ(),a=gJ(),s=xJ(),o=yJ(),mt(e,"toPath"),Voe=e),Voe;function e(e){return i(e)?t(e,s):n(e)?[e]:r(a(o(e)))}}function RJ(e,t,r,i){for(var n=[],a=new kie,s=e.cy().hasCompoundNodes(),o=0;o<e.length;o++){var l=e[o];r?n.push(l):s&&i(n,a,l)}for(;0<n.length;){var h=n.shift();t(h),a.add(h.id()),s&&i(n,a,h)}return e}function IJ(e,t,r){if(r.isParent())for(var i=r._private.children,n=0;n<i.length;n++){var a=i[n];t.has(a.id())||e.push(a)}}function NJ(e,t,r){r.isChild()&&(r=r._private.parent,t.has(r.id())||e.push(r))}function DJ(e,t,r){NJ(e,t,r),IJ(e,t,r)}function MJ(s){return function(e){if(void 0===e&&(e=!0),0!==this.length&&this.isNode()&&!this.removed()){for(var t=0,r=this[0],i=r._private.edges,n=0;n<i.length;n++){var a=i[n];!e&&a.isLoop()||(t+=s(r,a))}return t}}}function OJ(a,s){return function(e){for(var t,r=this.nodes(),i=0;i<r.length;i++){var n=r[i][a](e);void 0===n||void 0!==t&&!s(n,t)||(t=n)}return t}}function BJ(){return!1}function PJ(){return!0}function $J(){for(var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Ule,t=1<arguments.length?arguments[1]:void 0,r=0;r<Wle.length;r++){var i=Wle[r];this[i]=e[i]||qle[i]}this.context=t||this.context,this.listeners=[],this.emitting=0}function FJ(e,t,r){var i,n=r._private;return null==(i=(n=n.styleCache=n.styleCache||[])[e])?n[e]=t(r):i}function zJ(t,r){return t=Xre(t),mt(function(e){return FJ(t,r,e)},"cachedStyleFunction")}function qJ(t,r){t=Xre(t);var i=mt(function(e){return r.call(e)},"selfFn");return mt(function(){var e=this[0];if(e)return FJ(t,i,e)},"cachedPrototypeStyleFunction")}function WJ(e,t){var r=e._private.data.parent?e.parents():null;if(r)for(var i=0;i<r.length;i++)if(!t(r[i]))return!1;return!0}function UJ(e){var i=e.ok,n=e.edgeOkViaNode||e.ok,a=e.parentOk||e.ok;return function(){var e,t,r=this.cy();return!r.styleEnabled()||(e=this[0],r=r.hasCompoundNodes(),e?(t=e._private,!!i(e)&&(e.isNode()?!r||WJ(e,a):(e=t.source,t=t.target,n(e)&&(!r||WJ(e,n))&&(e===t||n(t)&&(!r||WJ(t,n)))))):void 0)}}function GJ(l){return function(){var e=[];if(2===(t=arguments).length)this.on(l.event,t[0],t[1]);else if(1===t.length&&Ste(t[0]))this.on(l.event,t[0]);else if(0===t.length||1===t.length&&_te(t[0])){for(var t=1===t.length?t[0]:null,r=0;r<this.length;r++){var i=this[r],n=!l.ableField||i._private[l.ableField],a=i._private[l.field]!=l.value;if(l.overrideAble){var s=l.overrideAble(i);if(void 0!==s&&!(n=s))return this}n&&(i._private[l.field]=l.value,a)&&e.push(i)}var o=this.spawn(e);o.updateStyle(),o.emit(l.event),t&&o.emit(t)}return this}}function jJ(r){Jle[r.field]=function(){var e=this[0];if(e){if(r.overrideField){var t=r.overrideField(e);if(void 0!==t)return t}return e._private[r.field]}},Jle[r.on]=GJ({event:r.on,field:r.field,ableField:r.ableField,overrideAble:r.overrideAble,value:!0}),Jle[r.off]=GJ({event:r.off,field:r.field,ableField:r.ableField,overrideAble:r.overrideAble,value:!1})}function VJ(n){return mt(function(e){for(var t=[],r=0;r<this.length;r++){var i=this[r]._private[n.attr];i&&t.push(i)}return this.spawn(t,!0).filter(e)},"sourceImpl")}function YJ(c){return mt(function(e){var t=[],r=this._private.cy,i=c||{};Ete(e)&&(e=r.$(e));for(var n=0;n<e.length;n++)for(var a=e[n]._private.edges,s=0;s<a.length;s++){var o=a[s],l=o._private.data,h=this.hasElementWithId(l.source)&&e.hasElementWithId(l.target),l=e.hasElementWithId(l.source)&&this.hasElementWithId(l.target);!h&&!l||(i.thisIsSrc||i.thisIsTgt)&&(i.thisIsSrc&&!h||i.thisIsTgt&&!l)||t.push(o)}return this.spawn(t,!0)},"edgesWithImpl")}function HJ(f){return f=Qte({},{codirected:!1},f),mt(function(e){for(var t=[],r=this.edges(),i=f,n=0;n<r.length;n++)for(var a=r[n]._private,s=a.source,o=s._private.data.id,l=a.data.target,h=s._private.edges,c=0;c<h.length;c++){var u=h[c],d=(p=u._private.data).target,p=p.source,g=d===l&&p===o;(i.codirected&&g||!i.codirected&&(g||o===d&&l===p))&&t.push(u)}return this.spawn(t,!0).filter(e)},"parallelEdgesImpl")}function XJ(s,t,o,r){var e=typeof Float32Array<"u";if(4!==arguments.length)return!1;for(var i=0;i<4;++i)if("number"!=typeof arguments[i]||isNaN(arguments[i])||!isFinite(arguments[i]))return!1;s=Math.min(s,1),o=Math.min(o,1),s=Math.max(s,0),o=Math.max(o,0);var a=new(e?Float32Array:Array)(11);function n(e,t){return 1-3*t+3*e}function l(e,t,r){return((n(t,r)*e+(3*r-6*t))*e+3*t)*e}function h(e,t,r){return 3*n(t,r)*e*e+2*(3*r-6*t)*e+3*t}function c(e,t){for(var r=0;r<4;++r){var i=h(t,s,o);if(0===i)return t;t-=(l(t,s,o)-e)/i}return t}function u(){for(var e=0;e<11;++e)a[e]=l(.1*e,s,o)}function d(e,t,r){for(var i,n,a=0;0<(i=l(n=t+(r-t)/2,s,o)-e)?r=n:t=n,1e-7<Math.abs(i)&&++a<10;);return n}function p(e){for(var t=0,r=1;10!==r&&a[r]<=e;++r)t+=.1;var i=t+(e-a[--r])/(a[r+1]-a[r])*.1,n=h(i,s,o);return.001<=n?c(e,i):0===n?i:d(e,t,t+.1)}mt(n,"A"),mt(function(e,t){return 3*t-6*e},"B"),mt(function(e){return 3*e},"C"),mt(l,"calcBezier"),mt(h,"getSlope"),mt(c,"newtonRaphsonIterate"),mt(u,"calcSampleValues"),mt(d,"binarySubdivide"),mt(p,"getTForX");var g=!1;function f(){g=!0,s===t&&o===r||u()}mt(f,"precompute"),(e=mt(function(e){return g||f(),s===t&&o===r?e:0===e?0:1===e?1:l(p(e),t,r)},"f")).getControlPoints=function(){return[{x:s,y:t},{x:o,y:r}]};var m="generateBezier("+[s,t,o,r]+")";return e.toString=function(){return m},e}function KJ(e,t,r,i,n){return 1===i||t===r?r:(n=n(t,r,i),null!=e&&((e.roundValue||e.color)&&(n=Math.round(n)),void 0!==e.min&&(n=Math.max(n,e.min)),void 0!==e.max)?Math.min(n,e.max):n)}function ZJ(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function QJ(e,t,r,i,n){var a=null!=n?n.type:null,s=(r<0?r=0:1<r&&(r=1),ZJ(e,n)),o=ZJ(t,n);if(ce(s)&&ce(o))return KJ(a,s,o,r,i);if(_te(s)&&_te(o)){for(var l=[],h=0;h<o.length;h++){var c=s[h],u=o[h];null!=c&&null!=u?(c=KJ(a,c,u,r,i),l.push(c)):l.push(u)}return l}}function JJ(e,t,r,i){var n=!i,a=e._private,s=t._private,t=s.easing,o=s.startTime,l=(i?e:e.cy()).style(),h=(s.easingImpl||(null==t?s.easingImpl=ihe.linear:(t=Ete(t)?l.parse("transition-timing-function",t).value:t,0<(t=Ete(t)?(u=t,[]):(u=t[1],t.slice(2).map(function(e){return+e}))).length?("spring"===u&&t.push(s.duration),s.easingImpl=ihe[u].apply(null,t)):s.easingImpl=ihe[u])),s.easingImpl),c=0===s.duration?1:(r-o)/s.duration;if((c=s.applying?s.progress:c)<0?c=0:1<c&&(c=1),null==s.delay){var t=s.startPosition,o=((u=s.position)&&n&&!e.locked()&&(r={},eee(t.x,u.x)&&(r.x=QJ(t.x,u.x,c,h)),eee(t.y,u.y)&&(r.y=QJ(t.y,u.y,c,h)),e.position(r)),s.startPan),t=s.pan,u=a.pan,u=((r=null!=t&&i)&&(eee(o.x,t.x)&&(u.x=QJ(o.x,t.x,c,h)),eee(o.y,t.y)&&(u.y=QJ(o.y,t.y,c,h)),e.emit("pan")),s.startZoom),d=((t=null!=(o=s.zoom)&&i)&&(eee(u,o)&&(a.zoom=tne(a.minZoom,QJ(u,o,c,h),a.maxZoom)),e.emit("zoom")),(r||t)&&e.emit("viewport"),s.style);if(d&&0<d.length&&n){for(var p=0;p<d.length;p++){var g=(m=d[p]).name,f=s.startStyle[g],m=QJ(f,m,c,h,l.properties[f.name]);l.overrideBypass(e,g,m)}e.emit("style")}}return s.progress=c}function eee(e,t){return!(null==e||null==t||!(ce(e)&&ce(t)||e&&t))}function tee(e,t,r,i){(t=t._private).started=!0,t.startTime=r-t.progress*t.duration}function ree(c,e){var t=e._private.aniEles,u=[];function r(e,t){var r,i=(n=e._private).animation.current,n=n.animation.queue,a=!1;0===i.length&&(r=n.shift())&&i.push(r);for(var s=mt(function(e){for(var t=e.length-1;0<=t;t--)(0,e[t])();e.splice(0,e.length)},"callbacks"),o=i.length-1;0<=o;o--){var l=i[o],h=l._private;h.stopped?(i.splice(o,1),h.hooked=!1,h.playing=!1,h.started=!1,s(h.frames)):(h.playing||h.applying)&&(h.playing&&h.applying&&(h.applying=!1),h.started||tee(0,l,c),JJ(e,l,c,t),h.applying&&(h.applying=!1),s(h.frames),null!=h.step&&h.step(c),l.completed()&&(i.splice(o,1),h.hooked=!1,h.playing=!1,h.started=!1,s(h.completes)),a=!0)}return t||0!==i.length||0!==n.length||u.push(e),a}mt(r,"stepOne");for(var i=!1,n=0;n<t.length;n++)var a=r(t[n]),i=i||a;var s=r(e,!0);(i||s)&&(0<t.length?e.notify("draw",t):e.notify("draw")),t.unmerge(u),e.emit("step")}function iee(e){this.options=Qte({},dhe,phe,e)}function nee(e){this.options=Qte({},mhe,e)}function aee(e){this.options=Qte({},yhe,e)}function see(e){this.options=Qte({},xhe,e);var n=(this.options.layout=this).options.eles.nodes(),e=this.options.eles.edges().filter(function(e){var t=e.source().data("id"),r=e.target().data("id"),e=n.some(function(e){return e.data("id")===t}),i=n.some(function(e){return e.data("id")===r});return!e||!i});this.options.eles=this.options.eles.not(e)}function oee(e){this.options=Qte({},Fhe,e)}function lee(e){this.options=Qte({},zhe,e)}function hee(e){this.options=Qte({},qhe,e)}function cee(e){this.options=Qte({},Whe,e)}function uee(e){this.options=e,this.notifications=0}function dee(e,t){0===t.radius?e.lineTo(t.cx,t.cy):e.arc(t.cx,t.cy,t.radius,t.startAngle,t.endAngle,t.counterClockwise)}function pee(e,t,r,i){return 0===i||0===t.radius?{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}:(lce(e,t,r,i,!(4<arguments.length&&void 0!==arguments[4])||arguments[4]),{cx:Ghe,cy:jhe,radius:Zhe,startX:tce,startY:rce,stopX:ice,stopY:nce,startAngle:Vhe.ang+Math.PI/2*Hhe,endAngle:Yhe.ang-Math.PI/2*Hhe,counterClockwise:Xhe})}function gee(e){var t=[];if(null!=e){for(var r=0;r<e.length;r+=2)t.push({x:e[r],y:e[r+1]});return t}}function fee(e,t,r){for(var i=mt(function(e,t,r,i){return Qie(e,t,r,i)},"qbezierAt$1"),n=t._private.rstyle.bezierPts,a=0;a<e.bezierProjPcts.length;a++){var s=e.bezierProjPcts[a];n.push({x:i(r[0],r[2],r[4],s),y:i(r[1],r[3],r[5],s)})}}function mee(e,t){for(var r=0;r<t.length;r++){var i=t[r];e.lineTo(i.x,i.y)}}function yee(e,t,r){for(var i,n=0;n<t.length;n++){var a=t[n];0===n&&(i=a),e.lineTo(a.x,a.y)}e.quadraticCurveTo(r.x,r.y,i.x,i.y)}function vee(e,t,r){e.beginPath&&e.beginPath();for(var i=t,n=0;n<i.length;n++){var a=i[n];e.lineTo(a.x,a.y)}var s=r,t=r[0];for(e.moveTo(t.x,t.y),n=1;n<s.length;n++)a=s[n],e.lineTo(a.x,a.y);e.closePath&&e.closePath()}function xee(e,t,r,i,n){e.beginPath&&e.beginPath(),e.arc(r,i,n,0,2*Math.PI,!1);var a=t,r=a[0];e.moveTo(r.x,r.y);for(var s=0;s<a.length;s++){var o=a[s];e.lineTo(o.x,o.y)}e.closePath&&e.closePath()}function bee(e,t,r,i){e.arc(t,r,i,0,2*Math.PI,!1)}function Tee(e,t,r,i,n){var a=Math.min(i,n)/2,t=t+i/2,i=r+n/2;e.beginPath(),e.arc(t,i,a,0,2*Math.PI),e.closePath()}function kee(e,t,r,i,n){var a=Math.min(5<arguments.length&&void 0!==arguments[5]?arguments[5]:5,i/2,n/2);e.beginPath(),e.moveTo(t+a,r),e.lineTo(t+i-a,r),e.quadraticCurveTo(t+i,r,t+i,r+a),e.lineTo(t+i,r+n-a),e.quadraticCurveTo(t+i,r+n,t+i-a,r+n),e.lineTo(t+a,r+n),e.quadraticCurveTo(t,r+n,t,r+n-a),e.lineTo(t,r+a),e.quadraticCurveTo(t,r,t+a,r),e.closePath()}function wee(e,t,r){if(t=e.createShader(t),e.shaderSource(t,r),e.compileShader(t),e.getShaderParameter(t,e.COMPILE_STATUS))return t;throw new Error(e.getShaderInfoLog(t))}function Cee(e,t,r){var t=wee(e,e.VERTEX_SHADER,t),r=wee(e,e.FRAGMENT_SHADER,r),i=e.createProgram();if(e.attachShader(i,t),e.attachShader(i,r),e.linkProgram(i),e.getProgramParameter(i,e.LINK_STATUS))return i;throw new Error("Could not initialize shaders")}function Eee(e,t,r){var i=e.makeOffscreenCanvas(t,r=void 0===r?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 See(e){var t=e.pixelRatio;return{zoom:e.cy.zoom()*t,pan:{x:(e=e.cy.pan()).x*t,y:e.y*t}}}function _ee(e){var t=e.pixelRatio;return e.cy.zoom()*t}function Aee(e,t,r,i,n){return i=i*r+t.x,n=n*r+t.y,[i,Math.round(e.canvasHeight-n)]}function Lee(e){return"solid"===e.pstyle("background-fill").value&&"none"===e.pstyle("background-image").strValue&&(0===e.pstyle("border-width").value||0===e.pstyle("border-opacity").value||"solid"===e.pstyle("border-style").value)}function Ree(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function Iee(e,t,r){var i=e[0]/255,n=e[1]/255,e=e[2]/255;return(r=r||new Array(4))[0]=i*t,r[1]=n*t,r[2]=e*t,r[3]=t,r}function Nee(e,t){return(t=t||new Array(4))[0]=(e>>0&255)/255,t[1]=(e>>8&255)/255,t[2]=(e>>16&255)/255,t[3]=(e>>24&255)/255,t}function Dee(e){return e[0]+(e[1]<<8)+(e[2]<<16)+(e[3]<<24)}function Mee(t,e){var r=t.createTexture();return r.buffer=function(e){t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_NEAREST),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e),t.generateMipmap(t.TEXTURE_2D),t.bindTexture(t.TEXTURE_2D,null)},r.deleteTexture=function(){t.deleteTexture(r)},r}function Oee(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 Bee(e,t,r){switch(t){case e.FLOAT:return new Float32Array(r);case e.INT:return new Int32Array(r)}}function Pee(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 $ee(e,t,r,i){var n=(t=nQ(Oee(e,t),2))[0],i=Bee(e,t=t[1],i),a=e.createBuffer();return e.bindBuffer(e.ARRAY_BUFFER,a),e.bufferData(e.ARRAY_BUFFER,i,e.STATIC_DRAW),t===e.FLOAT?e.vertexAttribPointer(r,n,t,!1,0,0):t===e.INT&&e.vertexAttribIPointer(r,n,t,0,0),e.enableVertexAttribArray(r),e.bindBuffer(e.ARRAY_BUFFER,null),a}function Fee(t,e,r,i){var n=(r=nQ(Oee(t,r),3))[0],a=r[1],r=r[2],s=Bee(t,a,e*n),o=n*r,l=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,l),t.bufferData(t.ARRAY_BUFFER,e*o,t.DYNAMIC_DRAW),t.enableVertexAttribArray(i),a===t.FLOAT?t.vertexAttribPointer(i,n,a,!1,o,0):a===t.INT&&t.vertexAttribIPointer(i,n,a,o,0),t.vertexAttribDivisor(i,1),t.bindBuffer(t.ARRAY_BUFFER,null);for(var h=new Array(e),c=0;c<e;c++)h[c]=Pee(t,a,s,o,n,c);return l.dataArray=s,l.stride=o,l.size=n,l.getView=function(e){return h[e]},l.setPoint=function(e,t,r){(e=h[e])[0]=t,e[1]=r},l.bufferSubData=function(e){t.bindBuffer(t.ARRAY_BUFFER,l),e?t.bufferSubData(t.ARRAY_BUFFER,0,s,0,e*n):t.bufferSubData(t.ARRAY_BUFFER,0,s)},l}function zee(e,t,r){for(var i=new Float32Array(9*t),n=new Array(t),a=0;a<t;a++)n[a]=new Float32Array(i.buffer,9*a*4,9);var s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,i.byteLength,e.DYNAMIC_DRAW);for(var o=0;o<3;o++){var l=r+o;e.enableVertexAttribArray(l),e.vertexAttribPointer(l,3,e.FLOAT,!1,36,12*o),e.vertexAttribDivisor(l,1)}return e.bindBuffer(e.ARRAY_BUFFER,null),s.getMatrixView=function(e){return n[e]},s.setData=function(e,t){n[t].set(e,0)},s.bufferSubData=function(){e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferSubData(e.ARRAY_BUFFER,0,i)},s}function qee(r){var e=r.createFramebuffer(),i=(r.bindFramebuffer(r.FRAMEBUFFER,e),r.createTexture());return r.bindTexture(r.TEXTURE_2D,i),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),r.bindFramebuffer(r.FRAMEBUFFER,null),e.setFramebufferAttachmentSizes=function(e,t){r.bindTexture(r.TEXTURE_2D,i),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,e,t,0,r.RGBA,r.UNSIGNED_BYTE,null)},e}function Wee(){var e=new Wce(9);return Wce!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function Uee(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Gee(e,t,r){var i=t[0],n=t[1],a=t[2],s=t[3],o=t[4],l=t[5],h=t[6],c=t[7],t=t[8],u=r[0],d=r[1],p=r[2],g=r[3],f=r[4],m=r[5],y=r[6],v=r[7],r=r[8];return e[0]=u*i+d*s+p*h,e[1]=u*n+d*o+p*c,e[2]=u*a+d*l+p*t,e[3]=g*i+f*s+m*h,e[4]=g*n+f*o+m*c,e[5]=g*a+f*l+m*t,e[6]=y*i+v*s+r*h,e[7]=y*n+v*o+r*c,e[8]=y*a+v*l+r*t,e}function jee(e,t,r){var i=t[0],n=t[1],a=t[2],s=t[3],o=t[4],l=t[5],h=t[6],c=t[7],t=t[8],u=r[0],r=r[1];return e[0]=i,e[1]=n,e[2]=a,e[3]=s,e[4]=o,e[5]=l,e[6]=u*i+r*s+h,e[7]=u*n+r*o+c,e[8]=u*a+r*l+t,e}function Vee(e,t,r){var i=t[0],n=t[1],a=t[2],s=t[3],o=t[4],l=t[5],h=t[6],c=t[7],t=t[8],u=Math.sin(r),r=Math.cos(r);return e[0]=r*i+u*s,e[1]=r*n+u*o,e[2]=r*a+u*l,e[3]=r*s-u*i,e[4]=r*o-u*n,e[5]=r*l-u*a,e[6]=h,e[7]=c,e[8]=t,e}function Yee(e,t,r){var i=r[0],r=r[1];return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=r*t[3],e[4]=r*t[4],e[5]=r*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function Hee(e,t,r){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/r,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e}function Xee(e,t){return e.intersection?e.intersection(t):new Set(aQ(e).filter(function(e){return t.has(e)}))}function Kee(e){return e=(e=e.cy.container())&&e.style&&e.style.backgroundColor||"white",ire(e)}function Zee(e,t){return e=e._private.rscratch,xie(e,"labelWrapCachedLines",t)||[]}function Qee(n){var r=n.render,t=(n.render=function(e){e=e||{};var t=n.cy;n.webgl&&(7.99<t.zoom()?(Jee(n),r.call(n,e)):(ete(n),hte(n,e,Yce.SCREEN)))},n.matchCanvasSize),e=(n.matchCanvasSize=function(e){t.call(n,e),n.pickingFrameBuffer.setFramebufferAttachmentSizes(n.canvasWidth,n.canvasHeight),n.pickingFrameBuffer.needsDraw=!0},n.findNearestElements=function(e,t,r,i){return ote(n,e,t)},n.invalidateCachedZSortedEles),i=(n.invalidateCachedZSortedEles=function(){e.call(n),n.pickingFrameBuffer.needsDraw=!0},n.notify);n.notify=function(e,t){i.call(n,e,t),"viewport"===e||"bounds"===e?n.pickingFrameBuffer.needsDraw=!0:"background"===e&&n.drawing.invalidate(t,{type:"node-body"})}}function Jee(e){(e=e.data.contexts[e.WEBGL]).clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function ete(t){var e=mt(function(e){e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,t.canvasWidth,t.canvasHeight),e.restore()},"clear");e(t.data.contexts[t.NODE]),e(t.data.contexts[t.DRAG])}function tte(e){var t=e.canvasWidth,r=e.canvasHeight,i=(e=See(e)).pan,e=e.zoom,n=Wee();return jee(n,n,[i.x,i.y]),Yee(n,n,[e,e]),Hee(i=Wee(),t,r),Gee(e=Wee(),i,n),e}function rte(e,t){var r=e.canvasWidth,i=e.canvasHeight,n=(e=See(e)).pan,e=e.zoom;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,r,i),t.translate(n.x,n.y),t.scale(e,e)}function ite(t,e){t.drawSelectionRectangle(e,function(e){return rte(t,e)})}function nte(e){var t=e.data.contexts[e.NODE];t.save(),rte(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(u){var e=mt(function(e,t,r){for(var e=e.atlasManager.getAtlasCollection(t),i=u.data.contexts[u.NODE],n=e.atlases,a=0;a<n.length;a++){var s,o,l,h,c=n[a].canvas;c&&(s=c.width,o=c.height,l=s*a,h=c.height*r,i.save(),i.scale(.4,.4),i.drawImage(c,l,h),i.strokeStyle="black",i.rect(l,h,s,o),i.stroke(),i.restore())}},"draw");e(u.drawing,"node",0),e(u.drawing,"label",1)}function ste(e,t,r,i,n){var a=See(e),t=(a=nQ(Aee(e,a.pan,a.zoom,t,r),2))[0]-3,r=a[1]-3,s=((a=e.data.contexts[e.WEBGL]).bindFramebuffer(a.FRAMEBUFFER,e.pickingFrameBuffer),e.pickingFrameBuffer.needsDraw&&(a.viewport(0,0,a.canvas.width,a.canvas.height),hte(e,null,Yce.PICKING),e.pickingFrameBuffer.needsDraw=!1),new Uint8Array(144));a.readPixels(t,r,6,6,a.RGBA,a.UNSIGNED_BYTE,s),a.bindFramebuffer(a.FRAMEBUFFER,null);for(var o=new Set,l=0;l<36;l++){var h=Dee(s.slice(4*l,4*l+4))-1;0<=h&&o.add(h)}return o}function ote(e,t,r){var i,n,a,t=ste(e,t,r),s=e.getCachedZSortedEles(),o=QZ(t);try{for(o.s();!(a=o.n()).done;){var l=s[a.value];if(!i&&l.isNode()&&(i=l),!n&&l.isEdge()&&(n=l),i&&n)break}}catch(e){o.e(e)}finally{o.f()}return[i,n].filter(Boolean)}function lte(e,t,r){e=e.drawing,t+=1,r.isNode()?(e.drawNode(r,t,"node-underlay"),e.drawNode(r,t,"node-body"),e.drawTexture(r,t,"label"),e.drawNode(r,t,"node-overlay")):(e.drawEdgeLine(r,t),e.drawEdgeArrow(r,t,"source"),e.drawEdgeArrow(r,t,"target"),e.drawTexture(r,t,"label"),e.drawTexture(r,t,"edge-source-label"),e.drawTexture(r,t,"edge-target-label"))}function hte(e,t,r){e.webglDebug&&(h=performance.now());var i=e.drawing,n=0;if(r.screen&&e.data.canvasNeedsRedraw[e.SELECT_BOX]&&ite(e,t),e.data.canvasNeedsRedraw[e.NODE]||r.picking){var t=e.data.contexts[e.WEBGL],t=(r.screen?(t.clearColor(0,0,0,0),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA)):t.disable(t.BLEND),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),t.viewport(0,0,t.canvas.width,t.canvas.height),tte(e)),a=e.getCachedZSortedEles(),n=a.length;if(i.startFrame(t,r),r.screen){for(var s=0;s<a.nondrag.length;s++)lte(e,s,a.nondrag[s]);for(var o=0;o<a.drag.length;o++)lte(e,o,a.drag[o])}else if(r.picking)for(var l=0;l<a.length;l++)lte(e,l,a[l]);i.endFrame(),r.screen&&e.webglDebugShowAtlases&&(nte(e),ate(e)),e.data.canvasNeedsRedraw[e.NODE]=!1,e.data.canvasNeedsRedraw[e.DRAG]=!1}if(e.webglDebug){var t=performance.now(),t=Math.ceil(t-h),h=i.getDebugInfo(),n=["".concat(n," elements"),"".concat(h.totalInstances," instances"),"".concat(h.batchCount," batches"),"".concat(h.totalAtlases," atlases"),"".concat(h.wrappedCount," wrapped textures"),"".concat(h.simpleCount," simple shapes")].join(", ");console.log("WebGL (".concat(r.name,") - frame time ").concat(t,"ms")),console.log("Totals:"),console.log(" ".concat(n)),console.log("Texture Atlases Used:");var c,u=QZ(h.atlasInfo);try{for(u.s();!(c=u.n()).done;){var d=c.value;console.log(" ".concat(d.type,": ").concat(d.keyCount," keys, ").concat(d.atlasCount," atlases"))}}catch(e){u.e(e)}finally{u.f()}console.log("")}e.data.gc&&(console.log("Garbage Collect!"),e.data.gc=!1,i.gc())}function cte(e,t){for(var r=atob(e),e=new ArrayBuffer(r.length),i=new Uint8Array(e),n=0;n<r.length;n++)i[n]=r.charCodeAt(n);return new Blob([e],{type:t})}function ute(e){var t=e.indexOf(",");return e.substr(t+1)}function dte(e,i,n){var t=mt(function(){return i.toDataURL(n,e.quality)},"getB64Uri");switch(e.output){case"blob-promise":return new Kae(function(t,r){try{i.toBlob(function(e){null!=e?t(e):r(new Error("`canvas.toBlob()` sent a null value in its callback"))},n,e.quality)}catch(e){r(e)}});case"blob":return cte(ute(t()),n);case"base64":return ute(t());default:return t()}}function pte(e){var a=this,t=a.cy.window().document,r=(e.webgl&&(hue.CANVAS_LAYERS=a.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),a.data={canvases:new Array(hue.CANVAS_LAYERS),contexts:new Array(hue.CANVAS_LAYERS),canvasNeedsRedraw:new Array(hue.CANVAS_LAYERS),bufferCanvases:new Array(hue.BUFFER_COUNT),bufferContexts:new Array(hue.CANVAS_LAYERS)},"-webkit-tap-highlight-color"),i="rgba(0,0,0,0)",n=(a.data.canvasContainer=t.createElement("div"),a.data.canvasContainer.style),s=(a.data.canvasContainer.style[r]=i,n.position="relative",n.zIndex="0",n.overflow="hidden",(n=e.cy.container()).appendChild(a.data.canvasContainer),n.style[r]=i,{"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"});Wte()&&(s["-ms-touch-action"]="none",s["touch-action"]="none");for(var o=0;o<hue.CANVAS_LAYERS;o++){var l=a.data.canvases[o]=t.createElement("canvas"),h=hue.CANVAS_TYPES[o];a.data.contexts[o]=l.getContext(h),a.data.contexts[o]||oie("Could not create canvas of type "+h),Object.keys(s).forEach(function(e){l.style[e]=s[e]}),l.style.position="absolute",l.setAttribute("data-id","layer"+o),l.style.zIndex=String(hue.CANVAS_LAYERS-o),a.data.canvasContainer.appendChild(l),a.data.canvasNeedsRedraw[o]=!1}for(a.data.topCanvas=a.data.canvases[0],a.data.canvases[hue.NODE].setAttribute("data-id","layer"+hue.NODE+"-node"),a.data.canvases[hue.SELECT_BOX].setAttribute("data-id","layer"+hue.SELECT_BOX+"-selectbox"),a.data.canvases[hue.DRAG].setAttribute("data-id","layer"+hue.DRAG+"-drag"),a.data.canvases[hue.WEBGL]&&a.data.canvases[hue.WEBGL].setAttribute("data-id","layer"+hue.WEBGL+"-webgl"),o=0;o<hue.BUFFER_COUNT;o++)a.data.bufferCanvases[o]=t.createElement("canvas"),a.data.bufferContexts[o]=a.data.bufferCanvases[o].getContext("2d"),a.data.bufferCanvases[o].style.position="absolute",a.data.bufferCanvases[o].setAttribute("data-id","buffer"+o),a.data.bufferCanvases[o].style.zIndex=String(-o-1),a.data.bufferCanvases[o].style.visibility="hidden";a.pathsEnabled=!0;var c=rne(),B=mt(function(e){return{x:(e.x1+e.x2)/2,y:(e.y1+e.y2)/2}},"getBoxCenter"),u=mt(function(e){return{x:-e.w/2,y:-e.h/2}},"getCenterOffset"),n=mt(function(e){return!((e=e[0]._private).oldBackgroundTimestamp===e.backgroundTimestamp)},"backgroundTimestampHasChanged"),r=mt(function(e){return e[0]._private.nodeKey},"getStyleKey"),i=mt(function(e){return e[0]._private.labelStyleKey},"getLabelKey"),d=mt(function(e){return e[0]._private.sourceLabelStyleKey},"getSourceLabelKey"),p=mt(function(e){return e[0]._private.targetLabelStyleKey},"getTargetLabelKey"),g=mt(function(e,t,r,i,n){return a.drawElement(e,t,r,!1,!1,n)},"drawElement"),f=mt(function(e,t,r,i,n){return a.drawElementText(e,t,r,i,"main",n)},"drawLabel"),m=mt(function(e,t,r,i,n){return a.drawElementText(e,t,r,i,"source",n)},"drawSourceLabel"),y=mt(function(e,t,r,i,n){return a.drawElementText(e,t,r,i,"target",n)},"drawTargetLabel"),v=mt(function(e){return e.boundingBox(),e[0]._private.bodyBounds},"getElementBox"),x=mt(function(e){return e.boundingBox(),e[0]._private.labelBounds.main||c},"getLabelBox"),b=mt(function(e){return e.boundingBox(),e[0]._private.labelBounds.source||c},"getSourceLabelBox"),T=mt(function(e){return e.boundingBox(),e[0]._private.labelBounds.target||c},"getTargetLabelBox"),k=mt(function(e,t){return t},"isLabelVisibleAtScale"),w=mt(function(e){return B(v(e))},"getElementRotationPoint"),C=mt(function(e,t,r){return{x:t.x+r.pstyle((e=e?e+"-":"")+"text-margin-x").pfValue,y:t.y+r.pstyle(e+"text-margin-y").pfValue}},"addTextMargin"),E=mt(function(e,t,r){return{x:(e=e[0]._private.rscratch)[t],y:e[r]}},"getRsPt"),S=mt(function(e){return C("",E(e,"labelX","labelY"),e)},"getLabelRotationPoint"),_=mt(function(e){return C("source",E(e,"sourceLabelX","sourceLabelY"),e)},"getSourceLabelRotationPoint"),A=mt(function(e){return C("target",E(e,"targetLabelX","targetLabelY"),e)},"getTargetLabelRotationPoint"),L=mt(function(e){return u(v(e))},"getElementRotationOffset"),R=mt(function(e){return u(b(e))},"getSourceLabelRotationOffset"),I=mt(function(e){return u(T(e))},"getTargetLabelRotationOffset"),N=mt(function(e){var t=x(e),r=u(x(e));if(e.isNode()){switch(e.pstyle("text-halign").value){case"left":r.x=-t.w-(t.leftPad||0);break;case"right":r.x=-(t.rightPad||0)}switch(e.pstyle("text-valign").value){case"top":r.y=-t.h-(t.topPad||0);break;case"bottom":r.y=-(t.botPad||0)}}return r},"getLabelRotationOffset"),D=a.data.eleTxrCache=new Tce(a,{getKey:r,doesEleInvalidateKey:n,drawElement:g,getBoundingBox:v,getRotationPoint:w,getRotationOffset:L,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),M=a.data.lblTxrCache=new Tce(a,{getKey:i,drawElement:f,getBoundingBox:x,getRotationPoint:S,getRotationOffset:N,isVisible:k}),O=a.data.slbTxrCache=new Tce(a,{getKey:d,drawElement:m,getBoundingBox:b,getRotationPoint:_,getRotationOffset:R,isVisible:k}),P=a.data.tlbTxrCache=new Tce(a,{getKey:p,drawElement:y,getBoundingBox:T,getRotationPoint:A,getRotationOffset:I,isVisible:k}),$=a.data.lyrTxrCache=new kce(a),n=(a.onUpdateEleCalcs(mt(function(e,t){D.invalidateElements(t),M.invalidateElements(t),O.invalidateElements(t),P.invalidateElements(t),$.invalidateElements(t);for(var r=0;r<t.length;r++){var i=t[r]._private;i.oldBackgroundTimestamp=i.backgroundTimestamp}},"invalidateTextureCaches")),mt(function(e){for(var t=0;t<e.length;t++)$.enqueueElementRefinement(e[t].ele)},"refineInLayers"));D.onDequeue(n),M.onDequeue(n),O.onDequeue(n),P.onDequeue(n),e.webgl&&a.initWebgl(e,{getStyleKey:r,getLabelKey:i,getSourceLabelKey:d,getTargetLabelKey:p,drawElement:g,drawLabel:f,drawSourceLabel:m,drawTargetLabel:y,getElementBox:v,getLabelBox:x,getSourceLabelBox:b,getTargetLabelBox:T,getElementRotationPoint:w,getElementRotationOffset:L,getLabelRotationPoint:S,getSourceLabelRotationPoint:_,getTargetLabelRotationPoint:A,getLabelRotationOffset:N,getSourceLabelRotationOffset:R,getTargetLabelRotationOffset:I})}function gte(t,r,i){var e=i,n=mt(function(e){hie("Can not register `"+r+"` for `"+t+"` since `"+e+"` already exists in the prototype and can not be overridden")},"overrideErr");if("core"===t){if(che.prototype[r])return n(r);che.prototype[r]=i}else if("collection"===t){if(ehe.prototype[r])return n(r);ehe.prototype[r]=i}else if("layout"===t){for(var a=(g=mt(function(e){this.options=e,i.call(this,e),Ate(this._private)||(this._private={}),this._private.cy=e.cy,this._private.listeners=[],this.createEmitter()},"Layout")).prototype=Object.create(i.prototype),s=[],o=0;o<s.length;o++){var l=s[o];a[l]=a[l]||function(){return this}}a.start&&!a.run?a.run=function(){return this.start(),this}:!a.start&&a.run&&(a.start=function(){return this.run(),this});var h=i.prototype.stop,c=(a.stop=function(){var e=this.options;if(e&&e.animate){var t=this.animations;if(t)for(var r=0;r<t.length;r++)t[r].stop()}return h?h.call(this):this.emit("layoutstop"),this},a.destroy||(a.destroy=function(){return this}),a.cy=function(){return this._private.cy},mt(function(e){return e._private.cy},"getCy")),u={addEventFields:mt(function(e,t){t.layout=e,t.cy=c(e),t.target=e},"addEventFields"),bubble:mt(function(){return!0},"bubble"),parent:mt(function(e){return c(e)},"parent")};Qte(a,{createEmitter:mt(function(){return this._private.emitter=new $J(u,this),this},"createEmitter"),emitter:mt(function(){return this._private.emitter},"emitter"),on:mt(function(e,t){return this.emitter().on(e,t),this},"on"),one:mt(function(e,t){return this.emitter().one(e,t),this},"one"),once:mt(function(e,t){return this.emitter().one(e,t),this},"once"),removeListener:mt(function(e,t){return this.emitter().removeListener(e,t),this},"removeListener"),removeAllListeners:mt(function(){return this.emitter().removeAllListeners(),this},"removeAllListeners"),emit:mt(function(e,t){return this.emitter().emit(e,t),this},"emit")}),Xoe.eventAliasesOn(a),e=g}else if("renderer"===t&&"null"!==r&&"base"!==r){var d,p,g,f=fte("renderer","base"),m=f.prototype,y=i,v=i.prototype,x=(g=mt(function(){f.apply(this,arguments),y.apply(this,arguments)},"Renderer")).prototype;for(d in m){var b=m[d];if(null!=v[d])return n(d);x[d]=b}for(p in v)x[p]=v[p];m.clientFunctions.forEach(function(e){x[e]=x[e]||function(){oie("Renderer does not implement `renderer."+e+"()` on its prototype")}}),e=g}else if("__proto__"===t||"constructor"===t||"prototype"===t)return oie(t+" is an illegal type to be registered, possibly lead to prototype pollutions");return are({map:due,keys:[t,r],value:e})}function fte(e,t){return sre({map:due,keys:[e,t]})}function mte(e,t,r,i,n){return are({map:pue,keys:[e,t,r,i],value:n})}function yte(e,t,r,i){return sre({map:pue,keys:[e,t,r,i]})}var vte,xte,bte,Tte,kte,wte,Cte,Ete,Ste,_te,Ate,Lte,ce,Rte,Ite,Nte,Dte,Mte,Ote,Bte,Pte,$te,Fte,zte,qte,Wte,Ute,Gte,jte,Vte,Yte,Hte,Xte,Kte,Zte,Qte,Jte,ere,tre,rre,ire,nre,are,sre,ore,lre,hre,cre,ure,dre,pre,gre,fre,mre,yre,vre,xre,bre,Tre,kre,wre,Cre,Ere,Sre,_re,Are,Lre,Rre,Ire,Nre,Dre,Mre,Ore,Bre,Pre,$re,Fre,zre,qre,Wre,Ure,Gre,jre,Vre,Yre,Hre,Xre,Kre,Zre,Qre,Jre,eie,tie,rie,iie,nie,aie,sie,oie,lie,hie,cie,uie,die,pie,gie,fie,mie,yie,vie,xie,bie,Tie,kie,wie,Cie,Eie,Sie,_ie,Aie,Lie,Rie,Iie,Nie,Die,Mie,Oie,Bie,Pie,$ie,Fie,zie,qie,Wie,Uie,Gie,jie,Vie,Yie,Hie,Xie,Kie,Zie,Qie,Jie,ene,tne,rne,ine,nne,ane,sne,one,lne,hne,cne,une,dne,pne,gne,fne,mne,yne,vne,xne,bne,Tne,kne,wne,Cne,Ene,Sne,_ne,Ane,Lne,Rne,Ine,Nne,Dne,Mne,One,Bne,Pne,$ne,Fne,zne,qne,Wne,Une,Gne,jne,Vne,Yne,Hne,Xne,Kne,Zne,Qne,Jne,eae,tae,rae,iae,nae,aae,sae,oae,lae,hae,cae,uae,dae,pae,gae,fae,mae,yae,vae,xae,bae,Tae,kae,wae,Cae,Eae,Sae,_ae,Aae,Lae,Rae,Iae,Nae,Dae,Mae,Oae,Bae,Pae,$ae,Fae,zae,qae,Wae,Uae,Gae,jae,Vae,Yae,Hae,Xae,Kae,Zae,Qae,Jae,ese,tse,rse,ise,nse,ase,sse,ose,lse,hse,cse,use,dse,pse,gse,fse,mse,yse,vse,xse,bse,Tse,kse,wse,Cse,Ese,Sse,_se,Ase,Lse,Rse,Ise,Nse,Dse,Mse,Ose,Bse,Pse,$se,Fse,zse,qse,Wse,Use,Gse,jse,Vse,Yse,Hse,Xse,Kse,Zse,Qse,Jse,eoe,toe,roe,ioe,noe,aoe,soe,ooe,loe,hoe,coe,uoe,doe,poe,goe,foe,moe,yoe,voe,xoe,boe,Toe,koe,woe,Coe,Eoe,Soe,_oe,Aoe,Loe,Roe,Ioe,Noe,Doe,Moe,Ooe,Boe,Poe,$oe,Foe,zoe,qoe,Woe,Uoe,Goe,joe,Voe,Yoe,Hoe,Xoe,Koe,Zoe,Qoe,Joe,ele,tle,rle,ile,nle,ale,sle,ole,lle,hle,cle,ule,dle,ple,gle,fle,mle,yle,vle,xle,ble,Tle,kle,wle,Cle,Ele,Sle,_le,Ale,Lle,Rle,Ile,Nle,Dle,Mle,Ole,Ble,Ple,$le,Fle,zle,qle,Wle,Ule,Gle,jle,Vle,Yle,Hle,Xle,Kle,Zle,Qle,Jle,ehe,the,rhe,ihe,nhe,ahe,she,ohe,lhe,hhe,che,uhe,dhe,phe,ghe,fhe,mhe,yhe,vhe,xhe,bhe,The,khe,whe,Che,Ehe,She,_he,Ahe,Lhe,Rhe,Ihe,Nhe,Dhe,Mhe,Ohe,Bhe,Phe,$he,Fhe,zhe,qhe,Whe,Uhe,Ghe,jhe,Vhe,Yhe,Hhe,Xhe,Khe,Zhe,Qhe,Jhe,ece,tce,rce,ice,nce,ace,sce,oce,lce,hce,cce,uce,dce,pce,gce,fce,mce,yce,te,vce,xce,bce,Tce,kce,wce,Cce,Ece,Sce,_ce,Ace,Lce,Rce,Ice,Nce,Dce,Mce,Oce,Bce,Pce,$ce,Fce,zce,qce,Wce,Uce,Gce,jce,Vce,Yce,Hce,Xce,Kce,Zce,Qce,Jce,eue,tue,rue,iue,nue,aue,sue,oue,lue,hue,cue,uue,due,pue,gue,fue,mue,yue,vue=i(()=>{function i(e){if(XZ(this,i),this._obj=Object.create(null),this.size=0,null!=e)for(var t=null!=e.instanceString&&e.instanceString()===this.instanceString()?e.toArray():e,r=0;r<t.length;r++)this.add(t[r])}function e(){XZ(this,e),this._obj={}}mt(VZ,"_arrayLikeToArray"),mt(YZ,"_arrayWithHoles"),mt(HZ,"_arrayWithoutHoles"),mt(XZ,"_classCallCheck"),mt(KZ,"_defineProperties"),mt(ZZ,"_createClass"),mt(QZ,"_createForOfIteratorHelper"),mt(JZ,"_defineProperty$1"),mt(eQ,"_iterableToArray"),mt(tQ,"_iterableToArrayLimit"),mt(rQ,"_nonIterableRest"),mt(iQ,"_nonIterableSpread"),mt(nQ,"_slicedToArray"),mt(aQ,"_toConsumableArray"),mt(sQ,"_toPrimitive"),mt(oQ,"_toPropertyKey"),mt(lQ,"_typeof"),mt(hQ,"_unsupportedIterableToArray"),vte="u"<typeof window?null:window,xte=vte?vte.navigator:null,vte&&vte.document,bte=lQ(""),Tte=lQ({}),kte=lQ(function(){}),wte="u"<typeof HTMLElement?"undefined":lQ(HTMLElement),Cte=mt(function(e){return e&&e.instanceString&&Ste(e.instanceString)?e.instanceString():null},"instanceStr"),Ete=mt(function(e){return null!=e&&lQ(e)==bte},"string"),Ste=mt(function(e){return null!=e&&lQ(e)===kte},"fn"),_te=mt(function(e){return!Nte(e)&&(Array.isArray?Array.isArray(e):null!=e&&e instanceof Array)},"array"),Ate=mt(function(e){return null!=e&&lQ(e)===Tte&&!_te(e)&&e.constructor===Object},"plainObject"),Lte=mt(function(e){return null!=e&&lQ(e)===Tte},"object"),ce=mt(function(e){return null!=e&&lQ(e)===lQ(1)&&!isNaN(e)},"number"),Rte=mt(function(e){return ce(e)&&Math.floor(e)===e},"integer"),Ite=mt(function(e){if("undefined"!==wte)return null!=e&&e instanceof HTMLElement},"htmlElement"),Nte=mt(function(e){return Dte(e)||Mte(e)},"elementOrCollection"),Dte=mt(function(e){return"collection"===Cte(e)&&e._private.single},"element"),Mte=mt(function(e){return"collection"===Cte(e)&&!e._private.single},"collection"),Ote=mt(function(e){return"core"===Cte(e)},"core"),Bte=mt(function(e){return"stylesheet"===Cte(e)},"stylesheet"),Pte=mt(function(e){return"event"===Cte(e)},"event"),$te=mt(function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},"emptyString"),Fte=mt(function(e){return!("u"<typeof HTMLElement)&&e instanceof HTMLElement},"domElement"),zte=mt(function(e){return Ate(e)&&ce(e.x1)&&ce(e.x2)&&ce(e.y1)&&ce(e.y2)},"boundingBox"),qte=mt(function(e){return Lte(e)&&Ste(e.then)},"promise"),Wte=mt(function(){return xte&&xte.userAgent.match(/msie|trident|edge/i)},"ms"),Ute=mt(function(i,n){n=n||mt(function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);return e.join("$")},"keyFn");var a=mt(function(){var e=arguments,t=n.apply(this,e),r=a.cache;return r[t]||(r[t]=i.apply(this,e))},"memoizedFn");return a.cache={},a},"memoize"),Gte=Ute(function(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),jte=Ute(function(e){return e.replace(/(-\w)/g,function(e){return e[1].toUpperCase()})}),Vte=Ute(function(e,t){return e+t[0].toUpperCase()+t.substring(1)},function(e,t){return e+"$"+t}),Yte=mt(function(e){return $te(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},"capitalize"),Hte=mt(function(e,t){return e.slice(-1*t.length)===t},"endsWith"),Xte="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",Kte=mt(function(e,t){return e<t?-1:t<e?1:0},"ascending"),Zte=mt(function(e,t){return-1*Kte(e,t)},"descending"),Qte=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,r=1;r<t.length;r++){var i=t[r];if(null!=i)for(var n=Object.keys(i),a=0;a<n.length;a++){var s=n[a];e[s]=i[s]}}return e},Jte=mt(function(e){var t,r;if((4===e.length||7===e.length)&&"#"===e[0])return e=4===e.length?(t=parseInt(e[1]+e[1],16),r=parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)):(t=parseInt(e[1]+e[2],16),r=parseInt(e[3]+e[4],16),parseInt(e[5]+e[6],16)),[t,r,e]},"hex2tuple"),ere=mt(function(e){var t,r,i,n,a,s,o;function l(e,t,r){return r<0&&(r+=1),1<r&&--r,r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(mt(l,"hue2rgb"),e=new RegExp("^hsl[a]?\\(((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?)))\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])(?:\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)$").exec(e)){if((t=parseInt(e[1]))<0?t=(360- -1*t%360)%360:360<t&&(t%=360),t/=360,(r=parseFloat(e[2]))<0||100<r||(r/=100,(n=parseFloat(e[3]))<0)||100<n||(n/=100,void 0!==(i=e[4])&&((i=parseFloat(i))<0||1<i)))return;0===r?a=s=o=Math.round(255*n):(n=2*n-(e=n<.5?n*(1+r):n+r-n*r),a=Math.round(255*l(n,e,t+1/3)),s=Math.round(255*l(n,e,t)),o=Math.round(255*l(n,e,t-1/3))),r=[a,s,o,i]}return r},"hsl2tuple"),tre=mt(function(e){var t=new RegExp("^rgb[a]?\\(((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)(?:\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)$").exec(e);if(t){for(var r=[],i=[],n=1;n<=3;n++){var a=t[n];if("%"===a[a.length-1]&&(i[n]=!0),a=parseFloat(a),(a=i[n]?a/100*255:a)<0||255<a)return;r.push(Math.floor(a))}if((i[1]||i[2]||i[3])&&!(i[1]&&i[2]&&i[3]))return;if(void 0!==(e=t[4])){if((e=parseFloat(e))<0||1<e)return;r.push(e)}}return r},"rgb2tuple"),rre=mt(function(e){return nre[e.toLowerCase()]},"colorname2tuple"),ire=mt(function(e){return(_te(e)?e:null)||rre(e)||Jte(e)||tre(e)||ere(e)},"color2tuple"),nre={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]},are=mt(function(e){for(var t=e.map,r=e.keys,i=r.length,n=0;n<i;n++){var a=r[n];if(Ate(a))throw Error("Tried to set map with object key");n<r.length-1?(null==t[a]&&(t[a]={}),t=t[a]):t[a]=e.value}},"setMap"),sre=mt(function(e){for(var t=e.map,r=e.keys,i=r.length,n=0;n<i;n++){var a=r[n];if(Ate(a))throw Error("Tried to get map with object key");if(null==(t=t[a]))return t}return t},"getMap"),ore=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},mt(cQ,"getDefaultExportFromCjs"),mt(uQ,"requireIsObject"),mt(dQ,"require_freeGlobal"),mt(pQ,"require_root"),mt(gQ,"requireNow"),mt(fQ,"require_trimmedEndIndex"),mt(mQ,"require_baseTrim"),mt(yQ,"require_Symbol"),mt(vQ,"require_getRawTag"),mt(xQ,"require_objectToString"),mt(bQ,"require_baseGetTag"),mt(TQ,"requireIsObjectLike"),mt(kQ,"requireIsSymbol"),mt(wQ,"requireToNumber"),mt(CQ,"requireDebounce"),iie=CQ(),Bre=cQ(iie),Pre=vte?vte.performance:null,$re=Pre&&Pre.now?function(){return Pre.now()}:function(){return Date.now()},Fre=(()=>{if(vte){if(vte.requestAnimationFrame)return function(e){vte.requestAnimationFrame(e)};if(vte.mozRequestAnimationFrame)return function(e){vte.mozRequestAnimationFrame(e)};if(vte.webkitRequestAnimationFrame)return function(e){vte.webkitRequestAnimationFrame(e)};if(vte.msRequestAnimationFrame)return function(e){vte.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout(function(){e($re())},1e3/60)}})(),zre=mt(function(e){return Fre(e)},"requestAnimationFrame"),qre=$re,Wre=mt(function(e){for(var t,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:9261;!(t=e.next()).done;)r=65599*r+t.value|0;return r},"hashIterableInts"),Ure=mt(function(e){return 65599*(1<arguments.length&&void 0!==arguments[1]?arguments[1]:9261)+e|0},"hashInt"),Gre=mt(function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:5381;return(t<<5)+t+e|0},"hashIntAlt"),jre=mt(function(e,t){return 2097152*e+t},"combineHashes"),Vre=mt(function(e){return 2097152*e[0]+e[1]},"combineHashesArray"),Yre=mt(function(e,t){return[Ure(e[0],t[0]),Gre(e[1],t[1])]},"hashArrays"),Hre=mt(function(e,t){var r={value:0,done:!1},i=0,n=e.length,a={next:mt(function(){return i<n?r.value=e[i++]:r.done=!0,r},"next")};return Wre(a,t)},"hashIntsArray"),Xre=mt(function(e,t){var r={value:0,done:!1},i=0,n=e.length,a={next:mt(function(){return i<n?r.value=e.charCodeAt(i++):r.done=!0,r},"next")};return Wre(a,t)},"hashString"),Kre=mt(function(){return Zre(arguments)},"hashStrings"),Zre=mt(function(e){for(var t=0;t<e.length;t++)var r=e[t],i=0===t?Xre(r):Xre(r,i);return i},"hashStringsArray"),mt(EQ,"rotatePoint"),Qre=mt(function(e,t,r,i,n,a){return{x:(e-r)*n+r,y:(t-i)*a+i}},"movePointByBoxAspect"),mt(SQ,"rotatePosAndSkewByBox"),Jre=!0,eie=null!=console.warn,tie=null!=console.trace,rie=Number.MAX_SAFE_INTEGER||9007199254740991,iie=mt(function(){return!0},"trueify"),nie=mt(function(){return!1},"falsify"),aie=mt(function(){return 0},"zeroify"),sie=mt(function(){},"noop"),oie=mt(function(e){throw new Error(e)},"error"),lie=mt(function(e){if(void 0===e)return Jre;Jre=!!e},"warnings"),hie=mt(function(e){lie()&&(eie?console.warn(e):(console.log(e),tie&&console.trace()))},"warn"),cie=mt(function(e){return Qte({},e)},"clone"),uie=mt(function(e){return null==e?e:_te(e)?e.slice():Ate(e)?cie(e):e},"copy"),die=mt(function(e){return e.slice()},"copyArray"),pie=mt(function(e,t){for(t=e="";e++<36;t+=51*e&52?(15^e?8^Math.random()*(20^e?16:4):4).toString(16):"-");return t},"uuid"),gie={},fie=mt(function(){return gie},"staticEmptyObject"),lue=mt(function(a){var s=Object.keys(a);return function(e){for(var t={},r=0;r<s.length;r++){var i=s[r],n=e?.[i];t[i]=void 0===n?a[i]:n}return t}},"defaults"),mie=mt(function(e,t,r){for(var i=e.length-1;0<=i;i--)e[i]===t&&e.splice(i,1)},"removeFromArray"),yie=mt(function(e){e.splice(0,e.length)},"clearArray"),vie=mt(function(e,t){for(var r=0;r<t.length;r++)e.push(t[r])},"push"),xie=mt(function(e,t,r){return e[t=r?Vte(r,t):t]},"getPrefixedProperty"),bie=mt(function(e,t,r,i){e[t=r?Vte(r,t):t]=i},"setPrefixedProperty"),mt(e,"ObjectMap"),Fce=ZZ(e,[{key:"set",value:mt(function(e,t){return this._obj[e]=t,this},"set")},{key:"delete",value:mt(function(e){return this._obj[e]=void 0,this},"_delete")},{key:"clear",value:mt(function(){this._obj={}},"clear")},{key:"has",value:mt(function(e){return void 0!==this._obj[e]},"has")},{key:"get",value:mt(function(e){return this._obj[e]},"get")}]),Tie=typeof Map<"u"?Map:Fce,mt(i,"ObjectSet"),Fce=ZZ(i,[{key:"instanceString",value:mt(function(){return"set"},"instanceString")},{key:"add",value:mt(function(e){var t=this._obj;1!==t[e]&&(t[e]=1,this.size++)},"add")},{key:"delete",value:mt(function(e){var t=this._obj;1===t[e]&&(t[e]=0,this.size--)},"_delete")},{key:"clear",value:mt(function(){this._obj=Object.create(null)},"clear")},{key:"has",value:mt(function(e){return 1===this._obj[e]},"has")},{key:"toArray",value:mt(function(){var t=this;return Object.keys(this._obj).filter(function(e){return t.has(e)})},"toArray")},{key:"forEach",value:mt(function(e,t){return this.toArray().forEach(e,t)},"forEach")}]),kie="undefined"!==("u"<typeof Set?"undefined":lQ(Set))?Set:Fce,wie=mt(function(e,t){var r=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];if(void 0!==e&&void 0!==t&&Ote(e)){var i=t.group;if("nodes"!==(i=null==i?t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes":i)&&"edges"!==i)oie("An element must be of type `nodes` or `edges`; you specified `"+i+"`");else{this.length=1;var n,a=(this[0]=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:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,pannable:void 0===t.pannable?"edges"===i:!!t.pannable,active:!1,classes:new kie,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}},s=(null==a.position.x&&(a.position.x=0),null==a.position.y&&(a.position.y=0),t.renderedPosition&&(i=t.renderedPosition,n=e.pan(),e=e.zoom(),a.position={x:(i.x-n.x)/e,y:(i.y-n.y)/e}),[]);_te(t.classes)?s=t.classes:Ete(t.classes)&&(s=t.classes.split(/\s+/));for(var o=0,l=s.length;o<l;o++){var h=s[o];h&&""!==h&&a.classes.add(h)}this.createEmitter(),void 0!==r&&!r||this.restore(),(i=t.style||t.css)&&(hie("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(i))}}else oie("An element must have a core reference and parameters set")},"Element"),(Fce={breadthFirstSearch:(Fce=mt(function(w){return w={bfs:w.bfs||!w.dfs,dfs:w.dfs||!w.bfs},mt(function(e,u,d){Ate(e)&&!Nte(e)&&(e=(t=e).roots||t.root,u=t.visit,d=t.directed),d=2!==arguments.length||Ste(u)?d:u,u=Ste(u)?u:function(){};for(var p,t=this._private.cy,r=e=Ete(e)?this.filter(e):e,g=[],f=[],m={},y={},v={},x=0,e=this.byGroup(),b=e.nodes,T=e.edges,i=0;i<r.length;i++){var n=r[i],a=n.id();n.isNode()&&(g.unshift(n),w.bfs&&(v[a]=!0,f.push(n)),y[a]=0)}for(var s,o=mt(function(){var t=w.bfs?g.shift():g.pop(),e=t.id();if(w.dfs){if(v[e])return 0;v[e]=!0,f.push(t)}var r=y[e],i=m[e],n=null!=i?i.source():null,a=null!=i?i.target():null,a=null==i?void 0:(t.same(n)?a:n)[0];if(!0===(n=u(t,i,a,x++,r)))return p=t,1;if(!1===n)return 1;for(var s=t.connectedEdges().filter(function(e){return(!d||e.source().same(t))&&T.has(e)}),o=0;o<s.length;o++){var l=s[o],h=l.connectedNodes().filter(function(e){return!e.same(t)&&b.has(e)}),c=h.id();0===h.length||v[c]||(h=h[0],g.push(h),w.bfs&&(v[c]=!0,f.push(h)),m[c]=l,y[c]=y[e]+1)}},"_loop");0!==g.length&&(0===(s=o())||1!==s););for(var l=t.collection(),h=0;h<f.length;h++){var c=f[h],k=m[c.id()];null!=k&&l.push(k),l.push(c)}return{path:t.collection(l),found:t.collection(p)}},"searchFn")},"defineSearch"))({bfs:!0}),depthFirstSearch:Fce({dfs:!0})}).bfs=Fce.breadthFirstSearch,Fce.dfs=Fce.depthFirstSearch,Eie=(Cie={exports:{}}).exports,mt(_Q,"requireHeap$1"),mt(AQ,"requireHeap"),mue=AQ(),Lie=cQ(mue),Rie=lue({root:null,weight:mt(function(e){return 1},"weight"),directed:!1}),mue={dijkstra:mt(function(e){Ate(e)||(e={root:(t=arguments)[0],weight:t[1],directed:t[2]});var t=Rie(e),e=t.root,l=t.directed,a=this,h=t.weight,r=(Ete(e)?this.filter(e):e)[0],i={},s={},n={},o=(t=this.byGroup()).nodes,c=t.edges;c.unmergeBy(function(e){return e.isLoop()});for(var u=mt(function(e){return i[e.id()]},"getDist"),d=mt(function(e,t){i[e.id()]=t,p.updateItem(e)},"setDist"),p=new Lie(function(e,t){return u(e)-u(t)}),g=0;g<o.length;g++){var f=o[g];i[f.id()]=f.same(r)?0:1/0,p.push(f)}for(var m=mt(function(e,t){for(var r,i=(l?e.edgesTo(t):e.edgesWith(t)).intersect(c),n=1/0,a=0;a<i.length;a++){var s=i[a],o=h(s);(o<n||!r)&&(n=o,r=s)}return{edge:r,dist:n}},"distBetween");0<p.size();){var y=p.pop(),v=u(y),x=y.id();if((n[x]=v)!==1/0)for(var b=y.neighborhood().intersect(o),T=0;T<b.length;T++){var k=b[T],w=k.id(),C=m(y,k),E=v+C.dist;E<u(k)&&(d(k,E),s[w]={node:y,edge:C.edge})}}return{distanceTo:mt(function(e){return e=(Ete(e)?o.filter(e):e)[0],n[e.id()]},"distanceTo"),pathTo:mt(function(e){var t=[],r=e=(Ete(e)?o.filter(e):e)[0],i=r.id();if(0<e.length)for(t.unshift(e);s[i];){var n=s[i];t.unshift(n.edge),t.unshift(n.node),i=(r=n.node).id()}return a.spawn(t)},"pathTo")}},"dijkstra")},zce={kruskal:mt(function(r){r=r||function(e){return 1};for(var e=(t=this.byGroup()).nodes,t=t.edges,i=e.length,n=new Array(i),a=e,s=mt(function(e){for(var t=0;t<n.length;t++)if(n[t].has(e))return t},"findSetIndex"),o=0;o<i;o++)n[o]=this.spawn(e[o]);for(var l=t.sort(function(e,t){return r(e)-r(t)}),h=0;h<l.length;h++){var c=l[h],u=c.source()[0],d=c.target()[0],u=s(u),d=s(d),p=n[u],g=n[d];u!==d&&(a.merge(c),p.merge(g),n.splice(d,1))}return a},"kruskal")},Iie=lue({root:null,goal:null,weight:mt(function(e){return 1},"weight"),heuristic:mt(function(e){return 0},"heuristic"),directed:!1}),Pce={aStar:mt(function(e){var t,r,i=this.cy(),n=(e=Iie(e)).root,a=e.goal,s=e.heuristic,o=e.directed,l=e.weight,n=i.collection(n)[0],a=i.collection(a)[0],e=n.id(),h=a.id(),c={},u={},d={},p=new Lie(function(e,t){return u[e.id()]-u[t.id()]}),g=new kie,f={},m={},y=mt(function(e,t){p.push(e),g.add(t)},"addToOpenSet"),v=mt(function(){t=p.pop(),r=t.id(),g.delete(r)},"popFromOpenSet"),x=mt(function(e){return g.has(e)},"isInOpenSet");y(n,e),c[e]=0,u[e]=s(n);for(var b=0;0<p.size();){if(v(),b++,r===h){for(var T=[],k=a,w=h,C=m[w];T.unshift(k),null!=C&&T.unshift(C),null!=(k=f[w]);)C=m[w=k.id()];return{found:!0,distance:c[r],path:this.spawn(T),steps:b}}d[r]=!0;for(var E=t._private.edges,S=0;S<E.length;S++){var _,A,L,R=E[S];!this.hasElementWithId(R.id())||o&&R.data("source")!==r||(_=R.source(),A=R.target(),A=(_=_.id()!==r?_:A).id(),this.hasElementWithId(A)&&!d[A]&&(L=c[r]+l(R),x(A)?L<c[A]&&(u[A]=(c[A]=L)+s(_),f[A]=t,m[A]=R):(u[A]=(c[A]=L)+s(_),y(_,A),f[A]=t,m[A]=R)))}}return{found:!1,distance:void 0,path:void 0,steps:b}},"aStar")},Nie=lue({weight:mt(function(e){return 1},"weight"),directed:!1}),Uhe={floydWarshall:mt(function(e){for(var s=this.cy(),t=(e=Nie(e)).weight,r=e.directed,i=t,n=(e=this.byGroup()).nodes,a=e.edges,o=n.length,l=o*o,h=mt(function(e){return n.indexOf(e)},"indexOf"),c=mt(function(e){return n[e]},"atIndex"),u=new Array(l),d=0;d<l;d++){var p=d%o;u[d]=(d-p)/o==p?0:1/0}for(var g=new Array(l),f=new Array(l),m=0;m<a.length;m++){var y,v,x=a[m],b=x.source()[0],T=x.target()[0];b!==T&&(b=h(b),T=h(T),v=b*o+T,y=i(x),u[v]>y&&(u[v]=y,g[v]=T,f[v]=x),r||(v=T*o+b,!r&&u[v]>y&&(u[v]=y,g[v]=b,f[v]=x)))}for(var k=0;k<o;k++)for(var w=0;w<o;w++)for(var C=w*o+k,E=0;E<o;E++){var S=w*o+E,_=k*o+E;u[C]+u[_]<u[S]&&(u[S]=u[C]+u[_],g[S]=g[C])}var A=mt(function(e){return(Ete(e)?s.filter(e):e)[0]},"getArgEle"),L=mt(function(e){return h(A(e))},"indexOfArgEle");return{distance:mt(function(e,t){return e=L(e),t=L(t),u[e*o+t]},"distance"),path:mt(function(e,t){var r=L(e),i=L(t),e=c(r);if(r===i)return e.collection();if(null==g[r*o+i])return s.collection();var n,a=s.collection();for(a.merge(e);r!==i;)r=g[(n=r)*o+i],n=f[n*o+r],a.merge(n),a.merge(c(r));return a},"path")}},"floydWarshall")},Die=lue({weight:mt(function(e){return 1},"weight"),directed:!1,root:null}),_ce={bellmanFord:mt(function(e){var B=this,t=(m=Die(e)).weight,r=m.directed,s=m.root,i=t,o=this,n=this.cy(),a=(m=this.byGroup()).edges,l=m.nodes,h=l.length,c=new Tie,u=!1,d=[],s=n.collection(s)[0];a.unmergeBy(function(e){return e.isLoop()});for(var p=a.length,g=mt(function(e){var t=c.get(e.id());return t||(t={},c.set(e.id(),t)),t},"getInfo"),f=mt(function(e){return(Ete(e)?n.$(e):e)[0]},"getNodeFromTo"),t=mt(function(e){return g(f(e)).dist},"distanceTo"),m=mt(function(e){for(var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:s,r=[],i=f(e);;){if(null==i)return B.spawn();var n=(a=g(i)).edge,a=a.pred;if(r.unshift(i[0]),i.same(t)&&0<r.length)break;null!=n&&r.unshift(n),i=a}return o.spawn(r)},"pathTo"),y=0;y<h;y++){var v=l[y],x=g(v);v.same(s)?x.dist=0:x.dist=1/0,x.pred=null,x.edge=null}for(var b=!1,P=mt(function(e,t,r,i,n,a){(a=i.dist+a)<n.dist&&!r.same(i.edge)&&(n.dist=a,n.pred=e,n.edge=r,b=!0)},"checkForEdgeReplacement"),$=1;$<h;$++){for(var b=!1,T=0;T<p;T++){var k=a[T],w=k.source(),C=k.target(),F=i(k),z=g(w),q=g(C);P(w,C,k,z,q,F),r||P(C,w,k,q,z,F)}if(!b)break}if(b)for(var W=[],E=0;E<p;E++){var U=(S=a[E]).source(),G=S.target(),S=i(S),_=g(U).dist,A=g(G).dist;if(_+S<A||!r&&A+S<_){if(u||(hie("Graph contains a negative weight cycle for Bellman-Ford"),u=!0),!1===e.findNegativeWeightCycles)break;var L=[];_+S<A&&L.push(U),!r&&A+S<_&&L.push(G);for(var j=L.length,R=0;R<j;R++){var I=L[R],N=[I];N.push(g(I).edge);for(var D=g(I).pred;-1===N.indexOf(D);)N.push(D),N.push(g(D).edge),D=g(D).pred;for(var V=(N=N.slice(N.indexOf(D)))[0].id(),M=0,O=2;O<N.length;O+=2)N[O].id()<V&&(V=N[O].id(),M=O);(N=N.slice(M).concat(N.slice(0,M))).push(N[0]),I=N.map(function(e){return e.id()}).join(","),-1===W.indexOf(I)&&(d.push(o.spawn(N)),W.push(I))}}}return{distanceTo:t,pathTo:m,hasNegativeWeightCycle:u,negativeWeightCycles:d}},"bellmanFord")},Mie=Math.sqrt(2),Oie=mt(function(e,t,r){0===r.length&&oie("Karger-Stein must be run on a connected (sub)graph");for(var i=t[(e=r[e])[1]],n=t[e[2]],a=r,s=a.length-1;0<=s;s--){var o=(l=a[s])[1],l=l[2];(t[o]===i&&t[l]===n||t[o]===n&&t[l]===i)&&a.splice(s,1)}for(var h=0;h<a.length;h++){var c=a[h];c[1]===n?(a[h]=c.slice(),a[h][1]=i):c[2]===n&&(a[h]=c.slice(),a[h][2]=i)}for(var u=0;u<t.length;u++)t[u]===n&&(t[u]=i);return a},"collapse"),Bie=mt(function(e,t,r,i){for(;i<r;){var n=Math.floor(Math.random()*t.length);t=Oie(n,e,t),r--}return t},"contractUntil"),Mce={kargerStein:mt(function(){var r=this,e=this.byGroup(),t=e.nodes,i=e.edges,n=(i.unmergeBy(function(e){return e.isLoop()}),t.length),a=i.length,s=Math.ceil(Math.pow(Math.log(n)/Math.LN2,2)),o=Math.floor(n/Mie);if(!(n<2)){for(var l=[],h=0;h<a;h++){var c=i[h];l.push([h,t.indexOf(c.source()),t.indexOf(c.target())])}for(var u=1/0,d=[],p=new Array(n),g=new Array(n),f=new Array(n),m=mt(function(e,t){for(var r=0;r<n;r++)t[r]=e[r]},"copyNodesMap"),y=0;y<=s;y++){for(var v=0;v<n;v++)g[v]=v;var x=(b=Bie(g,l.slice(),n,o)).slice(),b=(m(g,f),Bie(g,b,o,2)),x=Bie(f,x,o,2);b.length<=x.length&&b.length<u?(u=b.length,d=b,m(g,p)):x.length<=b.length&&x.length<u&&(u=x.length,d=x,m(f,p))}for(var T=this.spawn(d.map(function(e){return i[e[0]]})),k=this.spawn(),w=this.spawn(),C=p[0],E=0;E<p.length;E++){var S=p[E],_=t[E];(S===C?k:w).merge(_)}return e=[(e=mt(function(e){var t=r.spawn();return e.forEach(function(e){t.merge(e),e.connectedEdges().forEach(function(e){r.contains(e)&&!T.contains(e)&&t.merge(e)})}),t},"constructComponent"))(k),e(w)],{cut:T,components:e,partition1:k,partition2:w}}oie("At least 2 nodes are required for Karger-Stein algorithm")},"kargerStein")},Pie=mt(function(e){return{x:e.x,y:e.y}},"copyPosition"),$ie=mt(function(e,t,r){return{x:e.x*t+r.x,y:e.y*t+r.y}},"modelToRenderedPosition"),Fie=mt(function(e,t,r){return{x:(e.x-r.x)/t,y:(e.y-r.y)/t}},"renderedToModelPosition"),zie=mt(function(e){return{x:e[0],y:e[1]}},"array2point"),qie=mt(function(e){for(var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:e.length,i=1/0,n=t;n<r;n++){var a=e[n];isFinite(a)&&(i=Math.min(a,i))}return i},"min"),Wie=mt(function(e){for(var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:e.length,i=-1/0,n=t;n<r;n++){var a=e[n];isFinite(a)&&(i=Math.max(a,i))}return i},"max"),Uie=mt(function(e){for(var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:e.length,i=0,n=0,a=t;a<r;a++){var s=e[a];isFinite(s)&&(i+=s,n++)}return i/n},"mean"),Gie=mt(function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:e.length,i=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],n=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],a=!(5<arguments.length&&void 0!==arguments[5])||arguments[5];i?e=e.slice(t,r):(r<e.length&&e.splice(r,e.length-r),0<t&&e.splice(0,t));for(var s=0,o=e.length-1;0<=o;o--){var l=e[o];a?isFinite(l)||(e[o]=-1/0,s++):e.splice(o,1)}return n&&e.sort(function(e,t){return e-t}),i=e.length,r=Math.floor(i/2),i%2!=0?e[r+1+s]:(e[r-1+s]+e[r+s])/2},"median"),jie=mt(function(e){return Math.PI*e/180},"deg2rad"),Vie=mt(function(e,t){return Math.atan2(t,e)-Math.PI/2},"getAngleFromDisp"),Yie=Math.log2||function(e){return Math.log(e)/Math.log(2)},Hie=mt(function(e){return 0<e?1:e<0?-1:0},"signum"),Xie=mt(function(e,t){return Math.sqrt(Kie(e,t))},"dist"),Kie=mt(function(e,t){var r=t.x-e.x;return r*r+(t=t.y-e.y)*t},"sqdist"),Zie=mt(function(e){for(var t=e.length,r=0,i=0;i<t;i++)r+=e[i];for(var n=0;n<t;n++)e[n]=e[n]/r;return e},"inPlaceSumNormalize"),Qie=mt(function(e,t,r,i){return(1-i)*(1-i)*e+2*(1-i)*i*t+i*i*r},"qbezierAt"),Jie=mt(function(e,t,r,i){return{x:Qie(e.x,t.x,r.x,i),y:Qie(e.y,t.y,r.y,i)}},"qbezierPtAt"),ene=mt(function(e,t,r,i){var n=t.x-e.x,a=t.y-e.y,t=Xie(e,t);return r=r??0,{x:e.x+n/t*(i=i??r*t),y:e.y+a/t*i}},"lineAt"),tne=mt(function(e,t,r){return Math.max(e,Math.min(r,t))},"bound"),rne=mt(function(e){return null==e?{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0}:null!=e.x1&&null!=e.y1?null!=e.x2&&null!=e.y2&&e.x2>=e.x1&&e.y2>=e.y1?{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1}:null!=e.w&&null!=e.h&&0<=e.w&&0<=e.h?{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}:void 0:void 0},"makeBoundingBox"),ine=mt(function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},"copyBoundingBox"),nne=mt(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"),ane=mt(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"),sne=mt(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"),one=mt(function(e){var t=1<arguments.length&&void 0!==arguments[1]?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"),lne=mt(function(e){var t,r,i,n,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[0];return 1===a.length?t=r=i=n=a[0]:2===a.length?(t=i=a[0],n=r=a[1]):4===a.length&&(t=(a=nQ(a,4))[0],r=a[1],i=a[2],n=a[3]),e.x1-=n,e.x2+=r,e.y1-=t,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},"expandBoundingBoxSides"),hne=mt(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"),cne=mt(function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2<t.x1||t.x2<e.x1||e.y2<t.y1||t.y2<e.y1||e.y1>t.y2||t.y1>e.y2)},"boundingBoxesIntersect"),une=mt(function(e,t,r){return e.x1<=t&&t<=e.x2&&e.y1<=r&&r<=e.y2},"inBoundingBox"),dne=mt(function(e,t){return une(e,t.x,t.y)},"pointInBoundingBox"),pne=mt(function(e,t){return une(e,t.x1,t.y1)&&une(e,t.x2,t.y2)},"boundingBoxInBoundingBox"),gne=null!=(Jce=Math.hypot)?Jce:function(e,t){return Math.sqrt(e*e+t*t)},mt(LQ,"inflatePolygon"),mt(RQ,"miterBox"),fne=mt(function(e,t,r,i,n,a,s){var o,l="auto"===(l=7<arguments.length&&void 0!==arguments[7]?arguments[7]:"auto")?Fne(n,a):l,n=n/2,a=a/2,h=(l=Math.min(l,n,a))!==n,c=l!==a;if(h){var u=i-a-s;if(0<(u=Ine(e,t,r,i,r-n+l-s,u,r+n-l+s,u,!1)).length)return u}return c&&0<(u=Ine(e,t,r,i,o=r+n+s,i-a+l-s,o,i+a-l+s,!1)).length||h&&0<(u=Ine(e,t,r,i,r-n+l-s,o=i+a+s,r+n-l+s,o,!1)).length||c&&0<(u=Ine(e,t,r,i,h=r-n-s,i-a+l-s,h,i+a-l+s,!1)).length?u:0<(h=Lne(e,t,r,i,o=r-n+l,c=i-a+l,l+s)).length&&h[0]<=o&&h[1]<=c||0<(h=Lne(e,t,r,i,u=r+n-l,o=i-a+l,l+s)).length&&h[0]>=u&&h[1]<=o||0<(h=Lne(e,t,r,i,c=r+n-l,u=i+a-l,l+s)).length&&h[0]>=c&&h[1]>=u||0<(h=Lne(e,t,r,i,o=r-n+l,c=i+a-l,l+s)).length&&h[0]<=o&&h[1]>=c?[h[0],h[1]]:[]},"roundRectangleIntersectLine"),mne=mt(function(e,t,r,i,n,a,s){var o=Math.min(r,n),r=Math.max(r,n),n=Math.min(i,a),i=Math.max(i,a);return o-s<=e&&e<=r+s&&n-s<=t&&t<=i+s},"inLineVicinity"),yne=mt(function(e,t,r,i,n,a,s,o,l){var h=Math.min(r,s,n)-l,r=Math.max(r,s,n)+l,s=Math.min(i,o,a)-l,n=Math.max(i,o,a)+l;return!(e<h||r<e||t<s||n<t)},"inBezierVicinity"),vne=mt(function(e,t,r,i){return(i=t*t-4*e*(r-=i))<0?[]:[(-t+(r=Math.sqrt(i)))/(i=2*e),(-t-r)/i]},"solveQuadratic"),xne=mt(function(e,t,r,i,n){var a,s,o;i=-27*(i/=e=0===e?1e-5:e)+(t/=e)*(9*(r/=e)-t*t*2),r=(e=(3*r-t*t)/9)*e*e+(i/=54)*i,t/=3,(n[1]=0)<r?(a=(a=i+Math.sqrt(r))<0?-Math.pow(-a,1/3):Math.pow(a,1/3),s=(s=i-Math.sqrt(r))<0?-Math.pow(-s,1/3):Math.pow(s,1/3),n[0]=-t+a+s,n[4]=n[2]=-(t+=(a+s)/2),t=Math.sqrt(3)*(-s+a)/2,n[3]=t,n[5]=-t):(n[5]=n[3]=0)==r?(o=i<0?-Math.pow(-i,1/3):Math.pow(i,1/3),n[0]=2*o-t,n[4]=n[2]=-(o+t)):(e=-e,s=Math.acos(i/Math.sqrt(e*e*e)),o=2*Math.sqrt(e),n[0]=-t+o*Math.cos(s/3),n[2]=-t+o*Math.cos((s+2*Math.PI)/3),n[4]=-t+o*Math.cos((s+4*Math.PI)/3))},"solveCubic"),bne=mt(function(e,t,r,i,n,a,s,o){var l=[];xne(+r*r-4*r*n+2*r*s+4*n*n-4*n*s+s*s+i*i-4*i*a+2*i*o+4*a*a-4*a*o+o*o,9*r*n-3*r*r-3*r*s-6*n*n+3*n*s+9*i*a-3*i*i-3*i*o-6*a*a+3*a*o,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*o-i*t+2*a*a+2*a*t-o*t,+r*n-r*r+r*e-n*e+i*a-i*i+i*t-a*t,l);for(var h=[],c=0;c<6;c+=2)Math.abs(l[c+1])<1e-7&&0<=l[c]&&l[c]<=1&&h.push(l[c]);h.push(1),h.push(0);for(var u,d,p=-1,g=0;g<h.length;g++)d=Math.pow(1-h[g],2)*r+2*(1-h[g])*h[g]*n+h[g]*h[g]*s,u=Math.pow(1-h[g],2)*i+2*(1-h[g])*h[g]*a+h[g]*h[g]*o,d=Math.pow(d-e,2)+Math.pow(u-t,2),0<=p&&!(d<p)||(p=d);return p},"sqdistToQuadraticBezier"),Tne=mt(function(e,t,r,i,n,a){var s=[e-r,t-i],i=(r=[n-r,a-i])[0]*r[0]+r[1]*r[1],o=s[0]*s[0]+s[1]*s[1],r=(s=s[0]*r[0]+s[1]*r[1])*s/i;return s<0?o:i<r?(e-n)*(e-n)+(t-a)*(t-a):o-r},"sqdistToFiniteLine"),kne=mt(function(e,t,r){for(var i,n,a,s,o=0,l=0;l<r.length/2;l++)if(n=r[2*l+1],s=l+1<r.length/2?(a=r[2*(l+1)],r[2*(l+1)+1]):(a=r[2*(l+1-r.length/2)],r[2*(l+1-r.length/2)+1]),(i=r[2*l])!=e||a!=e){if(!(e<=i&&a<=e||i<=e&&e<=a))continue;t<(e-i)/(a-i)*(s-n)+n&&o++}return o%2!=0},"pointInsidePolygonPoints"),wne=mt(function(e,t,r,i,n,a,s,o,l){var h=new Array(r.length);null!=o[0]?(c=Math.atan(o[1]/o[0]),o[0]<0?c+=Math.PI/2:c=-c-Math.PI/2):c=o;for(var c,u=Math.cos(-c),d=Math.sin(-c),p=0;p<h.length/2;p++)h[2*p]=a/2*(r[2*p]*u-r[2*p+1]*d),h[2*p+1]=s/2*(r[2*p+1]*u+r[2*p]*d),h[2*p]+=i,h[2*p+1]+=n;return c=0<l?(o=Sne(h,-l),Ene(o)):h,kne(e,t,c)},"pointInsidePolygon"),Cne=mt(function(e,t,r,i,n,a,s,o){for(var l=new Array(2*r.length),h=0;h<o.length;h++){var c=o[h];if(l[4*h+0]=c.startX,l[4*h+1]=c.startY,l[4*h+2]=c.stopX,l[4*h+3]=c.stopY,Math.pow(c.cx-e,2)+Math.pow(c.cy-t,2)<=Math.pow(c.radius,2))return!0}return kne(e,t,l)},"pointInsideRoundPolygon"),Ene=mt(function(e){for(var t,r,i,n=new Array(e.length/2),a=0;a<e.length/4;a++){var s=a<e.length/4-1?(t=e[4*(a+1)],r=e[4*(a+1)+1],i=e[4*(a+1)+2],e[4*(a+1)+3]):(t=e[0],r=e[1],i=e[2],e[3]),s=Ine(e[4*a],e[4*a+1],e[4*a+2],e[4*a+3],t,r,i,s,!0);n[2*a]=s[0],n[2*a+1]=s[1]}return n},"joinLines"),Sne=mt(function(e,t){for(var r,i=new Array(2*e.length),n=0;n<e.length/2;n++){var a,s,o,l=(o=n<e.length/2-1?(r=e[2*(n+1)],e[2*(n+1)+1]):(r=e[0],e[1]))-(s=e[2*n+1]),h=-(r-(a=e[2*n])),c=Math.sqrt(l*l+h*h),h=h/c;i[4*n]=a+(l/=c)*t,i[4*n+1]=s+h*t,i[4*n+2]=r+l*t,i[4*n+3]=o+h*t}return i},"expandPolygon"),_ne=mt(function(e,t,r,i,n,a){var s=r-e,o=i-t;return s/=n,o/=a,(a=(n=Math.sqrt(s*s+o*o))-1)<0?[]:[(r-e)*(s=a/n)+e,(i-t)*s+t]},"intersectLineEllipse"),Ane=mt(function(e,t,r,i,n,a,s){return(e=(e-n)/(r/2+s))*e+(t=(t-a)/(i/2+s))*t<=1},"checkInEllipse"),Lne=mt(function(e,t,r,i,n,a,s){return r=[r-e,i-t],i=[e-n,t-a],n=r[0]*r[0]+r[1]*r[1],(i=(a=2*(i[0]*r[0]+i[1]*r[1]))*a-4*n*(i[0]*i[0]+i[1]*i[1]-s*s))<0||(s=(-a+Math.sqrt(i))/(2*n),a=(-a-Math.sqrt(i))/(2*n),i=Math.min(s,a),n=Math.max(s,a),s=[],0<=i&&i<=1&&s.push(i),0<=n&&n<=1&&s.push(n),0===s.length)?[]:(a=s[0]*r[0]+e,i=s[0]*r[1]+t,1<s.length&&s[0]!=s[1]?[a,i,s[1]*r[0]+e,s[1]*r[1]+t]:[a,i])},"intersectLineCircle"),Rne=mt(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"),Ine=mt(function(e,t,r,i,n,a,s,o,l){var h=e-n,c=r-e,u=s-n,d=i-t,p=o-a,g=u*(f=t-a)-p*h,f=c*f-d*h;return 0!=(h=p*c-u*d)?(p=f/h,-.001<=(u=g/h)&&u<=1.001&&-.001<=p&&p<=1.001||l?[e+u*c,t+u*d]:[]):0==g||0==f?Rne(e,r,s)===s?[s,o]:Rne(e,r,n)===n?[n,a]:Rne(n,s,r)===r?[r,i]:[]:[]},"finiteLinesIntersect"),Nne=mt(function(e,t,r,i,n){var a=[],s=i/2,o=n/2,l=t,h=r;a.push({x:l+s*e[0],y:h+o*e[1]});for(var c=1;c<e.length/2;c++)a.push({x:l+s*e[2*c],y:h+o*e[2*c+1]});return a},"transformPoints"),Dne=mt(function(e,t,r,i,n,a,s,o){var l=[],h=new Array(r.length);if(null!=a){for(var c,u=0;u<h.length/2;u++)h[2*u]=r[2*u]*a+i,h[2*u+1]=r[2*u+1]*s+n;c=0<o?(o=Sne(h,-o),Ene(o)):h}else c=r;for(var d,p,g,f,m=0;m<c.length/2;m++)d=c[2*m],p=c[2*m+1],f=m<c.length/2-1?(g=c[2*(m+1)],c[2*(m+1)+1]):(g=c[0],c[1]),0!==(d=Ine(e,t,i,n,d,p,g,f)).length&&l.push(d[0],d[1]);return l},"polygonIntersectLine"),Mne=mt(function(r,i,e,n,a,t,s,o,l){var h,c=[],u=new Array(2*e.length);l.forEach(function(e,t){0===t?(u[u.length-2]=e.startX,u[u.length-1]=e.startY):(u[4*t-2]=e.startX,u[4*t-1]=e.startY),u[4*t]=e.stopX,u[4*t+1]=e.stopY,0!==(h=Lne(r,i,n,a,e.cx,e.cy,e.radius)).length&&c.push(h[0],h[1])});for(var d=0;d<u.length/4;d++)0!==(h=Ine(r,i,n,a,u[4*d],u[4*d+1],u[4*d+2],u[4*d+3],!1)).length&&c.push(h[0],h[1]);if(2<c.length){for(var p=[c[0],c[1]],g=Math.pow(p[0]-r,2)+Math.pow(p[1]-i,2),f=1;f<c.length/2;f++){var m=Math.pow(c[2*f]-r,2)+Math.pow(c[2*f+1]-i,2);m<=g&&(p[0]=c[2*f],p[1]=c[2*f+1],g=m)}return p}return c},"roundPolygonIntersectLine"),One=mt(function(e,t,r){var e=[e[0]-t[0],e[1]-t[1]],i=Math.sqrt(e[0]*e[0]+e[1]*e[1]),r=(i-r)/i;return[t[0]+(r=r<0?1e-5:r)*e[0],t[1]+r*e[1]]},"shortenIntersection"),Bne=mt(function(e,t){return e=$ne(e,t),Pne(e)},"generateUnitNgonPointsFitToSquare"),Pne=mt(function(e){for(var t,r,i=e.length/2,n=1/0,a=1/0,s=-1/0,o=-1/0,l=0;l<i;l++)t=e[2*l],r=e[2*l+1],n=Math.min(n,t),s=Math.max(s,t),a=Math.min(a,r),o=Math.max(o,r);for(var h=2/(s-n),c=2/(o-a),u=0;u<i;u++)t=e[2*u]=e[2*u]*h,r=e[2*u+1]=e[2*u+1]*c,n=Math.min(n,t),s=Math.max(s,t),a=Math.min(a,r),o=Math.max(o,r);if(a<-1)for(var d=0;d<i;d++)r=e[2*d+1]=e[2*d+1]+(-1-a);return e},"fitPolygonToSquare"),$ne=mt(function(e,t){var r=1/e*2*Math.PI,i=e%2==0?Math.PI/2+r/2:Math.PI/2;i+=t;for(var n,a=new Array(2*e),s=0;s<e;s++)n=s*r+i,a[2*s]=Math.cos(n),a[2*s+1]=Math.sin(-n);return a},"generateUnitNgonPoints"),Fne=mt(function(e,t){return Math.min(e/4,t/4,8)},"getRoundRectangleRadius"),zne=mt(function(e,t){return Math.min(e/10,t/10,8)},"getRoundPolygonRadius"),qne=mt(function(){return 8},"getCutRectangleCornerLength"),Wne=mt(function(e,t,r){return[e-2*t+r,2*(t-e),e]},"bezierPtsToQuadCoeff"),Une=mt(function(e,t){return{heightOffset:Math.min(15,.05*t),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05}},"getBarrelCurveConstants"),mt(IQ,"satPolygonIntersection"),Gne=lue({dampingFactor:.8,precision:1e-6,iterations:200,weight:mt(function(e){return 1},"weight")}),Jce={pageRank:mt(function(e){for(var t=(e=Gne(e)).dampingFactor,r=e.precision,i=e.iterations,n=e.weight,a=this._private.cy,s=(e=this.byGroup()).nodes,o=e.edges,l=s.length,h=o.length,c=new Array(l*l),u=new Array(l),d=(1-t)/l,p=0;p<l;p++){for(var g=0;g<l;g++)c[p*l+g]=0;u[p]=0}for(var f=0;f<h;f++){var m=o[f],y=m.data("source"),v=m.data("target");y!==v&&(y=s.indexOfId(y),v=s.indexOfId(v),m=n(m),c[v*l+y]+=m,u[y]+=m)}for(var x=1/l+d,b=0;b<l;b++)if(0===u[b])for(var T=0;T<l;T++)c[T*l+b]=x;else for(var k=0;k<l;k++){var w=k*l+b;c[w]=c[w]/u[b]+d}for(var C=new Array(l),E=new Array(l),S=0;S<l;S++)C[S]=1;for(var _=0;_<i;_++){for(var A=0;A<l;A++)E[A]=0;for(var L=0;L<l;L++)for(var R=0;R<l;R++)E[L]+=c[L*l+R]*C[R];Zie(E);for(var I=C,C=E,E=I,N=0,D=0;D<l;D++){var M=I[D]-C[D];N+=M*M}if(N<r)break}return{rank:mt(function(e){return e=a.collection(e)[0],C[s.indexOf(e)]},"rank")}},"pageRank")},jne=lue({root:null,weight:mt(function(e){return 1},"weight"),directed:!1,alpha:0}),(sue={degreeCentralityNormalized:mt(function(e){e=jne(e);var t=this.cy(),r=this.nodes(),i=r.length;if(e.directed){for(var n={},a={},s=0,o=0,l=0;l<i;l++){var h=(c=r[l]).id(),c=(e.root=c,this.degreeCentrality(e));s<c.indegree&&(s=c.indegree),o<c.outdegree&&(o=c.outdegree),n[h]=c.indegree,a[h]=c.outdegree}return{indegree:mt(function(e){return 0==s?0:(Ete(e)&&(e=t.filter(e)),n[e.id()]/s)},"indegree"),outdegree:mt(function(e){return 0===o?0:(Ete(e)&&(e=t.filter(e)),a[e.id()]/o)},"outdegree")}}for(var u={},d=0,p=0;p<i;p++){var g=r[p],f=(e.root=g,this.degreeCentrality(e));d<f.degree&&(d=f.degree),u[g.id()]=f.degree}return{degree:mt(function(e){return 0===d?0:(Ete(e)&&(e=t.filter(e)),u[e.id()]/d)},"degree")}},"degreeCentralityNormalized"),degreeCentrality:mt(function(e){e=jne(e);var t=this.cy(),r=this,i=e.root,n=e.weight,a=e.directed,e=e.alpha,i=t.collection(i)[0];if(a){for(var s=(t=i.connectedEdges()).filter(function(e){return e.target().same(i)&&r.has(e)}),o=t.filter(function(e){return e.source().same(i)&&r.has(e)}),a=s.length,t=o.length,l=0,h=0,c=0;c<s.length;c++)l+=n(s[c]);for(var u=0;u<o.length;u++)h+=n(o[u]);return{indegree:Math.pow(a,1-e)*Math.pow(l,e),outdegree:Math.pow(t,1-e)*Math.pow(h,e)}}for(var d=i.connectedEdges().intersection(r),a=d.length,p=0,g=0;g<d.length;g++)p+=n(d[g]);return{degree:Math.pow(a,1-e)*Math.pow(p,e)}},"degreeCentrality")}).dc=sue.degreeCentrality,sue.dcn=sue.degreeCentralityNormalised=sue.degreeCentralityNormalized,Vne=lue({harmonic:!0,weight:mt(function(){return 1},"weight"),directed:!1,root:null}),(te={closenessCentralityNormalized:mt(function(e){for(var t=(e=Vne(e)).harmonic,r=e.weight,e=e.directed,i=this.cy(),n={},a=0,s=this.nodes(),o=this.floydWarshall({weight:r,directed:e}),l=0;l<s.length;l++){for(var h,c=0,u=s[l],d=0;d<s.length;d++)l!==d&&(h=o.distance(u,s[d]),c+=t?1/h:h);a<(c=t?c:1/c)&&(a=c),n[u.id()]=c}return{closeness:mt(function(e){return 0==a?0:(e=(Ete(e)?i.filter(e)[0]:e).id(),n[e]/a)},"closeness")}},"closenessCentralityNormalized"),closenessCentrality:mt(function(e){for(var t=(e=Vne(e)).root,r=e.weight,i=e.directed,n=e.harmonic,t=this.filter(t)[0],a=this.dijkstra({root:t,weight:r,directed:i}),s=0,o=this.nodes(),l=0;l<o.length;l++){var h=o[l];h.same(t)||(h=a.distanceTo(h),s+=n?1/h:h)}return n?s:1/s},"closenessCentrality")}).cc=te.closenessCentrality,te.ccn=te.closenessCentralityNormalised=te.closenessCentralityNormalized,Yne=lue({weight:null,directed:!1}),(mce={betweennessCentrality:mt(function(e){for(var t=(e=Yne(e)).directed,b=e.weight,T=null!=b,k=this.cy(),w=this.nodes(),C={},r={},i=0,E={set:mt(function(e,t){i<(r[e]=t)&&(i=t)},"set"),get:mt(function(e){return r[e]},"get")},n=0;n<w.length;n++){var a=w[n],s=a.id();C[s]=(t?a.outgoers():a.openNeighborhood()).nodes(),E.set(s,0)}for(var o=mt(function(){for(var e=w[S].id(),t=[],r={},i={},n={},a=new Lie(function(e,t){return n[e]-n[t]}),s=0;s<w.length;s++){var o=w[s].id();r[o]=[],n[o]=1/(i[o]=0)}for(i[e]=1,n[e]=0,a.push(e);!a.empty();){var l=a.pop();if(t.push(l),T)for(var h=0;h<C[l].length;h++){var c=C[l][h],u=(0<(d=k.getElementById(l)).edgesTo(c).length?d.edgesTo(c):c.edgesTo(d))[0],d=b(u),c=c.id();n[l]+d<n[c]&&(n[c]=n[l]+d,a.nodes.indexOf(c)<0?a.push(c):a.updateItem(c),i[c]=0,r[c]=[]),n[c]==n[l]+d&&(i[c]=i[c]+i[l],r[c].push(l))}else for(var p=0;p<C[l].length;p++){var g=C[l][p].id();n[g]==1/0&&(a.push(g),n[g]=n[l]+1),n[g]==n[l]+1&&(i[g]=i[g]+i[l],r[g].push(l))}}for(var f={},m=0;m<w.length;m++)f[w[m].id()]=0;for(;0<t.length;){for(var y=t.pop(),v=0;v<r[y].length;v++){var x=r[y][v];f[x]=f[x]+i[x]/i[y]*(1+f[y])}y!=w[S].id()&&E.set(y,E.get(y)+f[y])}},"_loop"),S=0;S<w.length;S++)o();return(e={betweenness:mt(function(e){return e=k.collection(e).id(),E.get(e)},"betweenness"),betweennessNormalized:mt(function(e){return 0==i?0:(e=k.collection(e).id(),E.get(e)/i)},"betweennessNormalized")}).betweennessNormalised=e.betweennessNormalized,e},"betweennessCentrality")}).bc=mce.betweennessCentrality,Hne=lue({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(e){return 1}]}),Xne=mt(function(e){return Hne(e)},"setOptions"),Kne=mt(function(e,t){for(var r=0,i=0;i<t.length;i++)r+=t[i](e);return r},"getSimilarity"),Zne=mt(function(e,t,r){for(var i=0;i<t;i++)e[i*t+i]=r},"addLoops"),Qne=mt(function(e,t){for(var r=0;r<t;r++){for(var i=0,n=0;n<t;n++)i+=e[n*t+r];for(var a=0;a<t;a++)e[a*t+r]=e[a*t+r]/i}},"normalize"),Jne=mt(function(e,t,r){for(var i=new Array(r*r),n=0;n<r;n++){for(var a=0;a<r;a++)i[n*r+a]=0;for(var s=0;s<r;s++)for(var o=0;o<r;o++)i[n*r+o]+=e[n*r+s]*t[s*r+o]}return i},"mmult"),eae=mt(function(e,t,r){for(var i=e.slice(0),n=1;n<r;n++)e=Jne(e,i,t);return e},"expand"),tae=mt(function(e,t,r){for(var i=new Array(t*t),n=0;n<t*t;n++)i[n]=Math.pow(e[n],r);return Qne(i,t),i},"inflate"),rae=mt(function(e,t,r,i){for(var n=0;n<r;n++)if(Math.round(e[n]*Math.pow(10,i))/Math.pow(10,i)!=Math.round(t[n]*Math.pow(10,i))/Math.pow(10,i))return!1;return!0},"hasConverged"),iae=mt(function(e,t,r,i){for(var n=[],a=0;a<t;a++){for(var s=[],o=0;o<t;o++)0<Math.round(1e3*e[a*t+o])/1e3&&s.push(r[o]);0!==s.length&&n.push(i.collection(s))}return n},"assign"),nae=mt(function(e,t){for(var r=0;r<e.length;r++)if(!t[r]||e[r].id()!==t[r].id())return!1;return!0},"isDuplicate"),aae=mt(function(e){for(var t=0;t<e.length;t++)for(var r=0;r<e.length;r++)t!=r&&nae(e[t],e[r])&&e.splice(r,1);return e},"removeDuplicates"),$ce={markovClustering:$ce=mt(function(e){for(var t=this.nodes(),r=this.edges(),i=this.cy(),n=Xne(e),a={},s=0;s<t.length;s++)a[t[s].id()]=s;for(var o,l=t.length,h=l*l,c=new Array(h),u=0;u<h;u++)c[u]=0;for(var d=0;d<r.length;d++){var p=a[(f=r[d]).source().id()],g=a[f.target().id()],f=Kne(f,n.attributes);c[p*l+g]+=f,c[g*l+p]+=f}Zne(c,l,n.multFactor),Qne(c,l);for(var m=!0,y=0;m&&y<n.maxIterations;)m=!1,o=eae(c,l,n.expandFactor),c=tae(o,l,n.inflateFactor),rae(c,o,h,4)||(m=!0),y++;return e=iae(c,l,t,i),aae(e)},"markovClustering"),mcl:$ce},sae=mt(function(e){return e},"identity"),oae=mt(function(e,t){return Math.abs(t-e)},"absDiff"),lae=mt(function(e,t,r){return e+oae(t,r)},"addAbsDiff"),hae=mt(function(e,t,r){return e+Math.pow(r-t,2)},"addSquaredDiff"),cae=mt(function(e){return Math.sqrt(e)},"sqrt"),uae=mt(function(e,t,r){return Math.max(e,oae(t,r))},"maxAbsDiff"),dae=mt(function(e,t,r,i,n){for(var a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:sae,s=i,o=0;o<e;o++)s=n(s,t(o),r(o));return a(s)},"getDistance"),(pae={euclidean:mt(function(e,t,r){return 2<=e?dae(e,t,r,0,hae,cae):dae(e,t,r,0,lae)},"euclidean"),squaredEuclidean:mt(function(e,t,r){return dae(e,t,r,0,hae)},"squaredEuclidean"),manhattan:mt(function(e,t,r){return dae(e,t,r,0,lae)},"manhattan"),max:mt(function(e,t,r){return dae(e,t,r,-1/0,uae)},"max")})["squared-euclidean"]=pae.squaredEuclidean,pae.squaredeuclidean=pae.squaredEuclidean,mt(NQ,"clusteringDistance"),gae=lue({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),fae=mt(function(e){return gae(e)},"setOptions"),mae=mt(function(e,t,r,i,n){var n="kMedoids"!==n?function(e){return r[e]}:function(e){return i[e](r)},a=mt(function(e){return i[e](t)},"getQ");return NQ(e,i.length,n,a,r,t)},"getDist"),yae=mt(function(e,t,r){for(var i=r.length,n=new Array(i),a=new Array(i),s=new Array(t),o=null,l=0;l<i;l++)n[l]=e.min(r[l]).value,a[l]=e.max(r[l]).value;for(var h=0;h<t;h++){for(var o=[],c=0;c<i;c++)o[c]=Math.random()*(a[c]-n[c])+n[c];s[h]=o}return s},"randomCentroids"),vae=mt(function(e,t,r,i,n){for(var a=1/0,s=0,o=0;o<t.length;o++){var l=mae(r,e,t[o],i,n);l<a&&(a=l,s=o)}return s},"classify"),xae=mt(function(e,t,r){for(var i=[],n=null,a=0;a<t.length;a++)r[(n=t[a]).id()]===e&&i.push(n);return i},"buildCluster"),bae=mt(function(e,t,r){return Math.abs(t-e)<=r},"haveValuesConverged"),Tae=mt(function(e,t,r){for(var i=0;i<e.length;i++)for(var n=0;n<e[i].length;n++)if(r<Math.abs(e[i][n]-t[i][n]))return!1;return!0},"haveMatricesConverged"),kae=mt(function(e,t,r){for(var i=0;i<r;i++)if(e===t[i])return!0;return!1},"seenBefore"),wae=mt(function(e,t){var r=new Array(t);if(e.length<50)for(var i=0;i<t;i++){for(var n=e[Math.floor(Math.random()*e.length)];kae(n,r,i);)n=e[Math.floor(Math.random()*e.length)];r[i]=n}else for(var a=0;a<t;a++)r[a]=e[Math.floor(Math.random()*e.length)];return r},"randomMedoids"),Cae=mt(function(e,t,r){for(var i=0,n=0;n<t.length;n++)i+=mae("manhattan",t[n],e,r,"kMedoids");return i},"findCost"),Bce=mt(function(e){for(var t=this.cy(),r=this.nodes(),i=null,n=fae(e),a=new Array(n.k),s={},o=n.testMode?"number"==typeof n.testCentroids?(n.testCentroids,yae(r,n.k,n.attributes)):"object"===lQ(n.testCentroids)?n.testCentroids:yae(r,n.k,n.attributes):yae(r,n.k,n.attributes),l=!0,h=0;l&&h<n.maxIterations;){for(var c=0;c<r.length;c++)s[(i=r[c]).id()]=vae(i,o,n.distance,n.attributes,"kMeans");for(var l=!1,u=0;u<n.k;u++){var d=xae(u,r,s);if(0!==d.length){for(var p=n.attributes.length,g=o[u],f=new Array(p),m=new Array(p),y=0;y<p;y++){for(var v=m[y]=0;v<d.length;v++)i=d[v],m[y]+=n.attributes[y](i);f[y]=m[y]/d.length,bae(f[y],g[y],n.sensitivityThreshold)||(l=!0)}o[u]=f,a[u]=t.collection(d)}}h++}return a},"kMeans"),Oce=mt(function(e){var t,r,i=this.cy(),n=this.nodes(),a=null,s=fae(e),o=new Array(s.k),l={},h=new Array(s.k);s.testMode?"number"!=typeof s.testCentroids&&(t="object"===lQ(s.testCentroids)?s.testCentroids:wae(n,s.k)):t=wae(n,s.k);for(var c=!0,u=0;c&&u<s.maxIterations;){for(var d=0;d<n.length;d++)l[(a=n[d]).id()]=vae(a,t,s.distance,s.attributes,"kMedoids");for(var c=!1,p=0;p<t.length;p++){var g=xae(p,n,l);if(0!==g.length){h[p]=Cae(t[p],g,s.attributes);for(var f=0;f<g.length;f++)(r=Cae(g[f],g,s.attributes))<h[p]&&(h[p]=r,t[p]=g[f],c=!0);o[p]=i.collection(g)}}u++}return o},"kMedoids"),Eae=mt(function(e,t,r,i,n){for(var a=0;a<t.length;a++)for(var s=0;s<e.length;s++)i[a][s]=Math.pow(r[a][s],n.m);for(var o=0;o<e.length;o++)for(var l=0;l<n.attributes.length;l++){for(var h=0,c=0,u=0;u<t.length;u++)h+=i[u][o]*n.attributes[l](t[u]),c+=i[u][o];e[o][l]=h/c}},"updateCentroids"),Sae=mt(function(e,t,r,i,n){for(var a=0;a<e.length;a++)t[a]=e[a].slice();for(var s,o,l=2/(n.m-1),h=0;h<r.length;h++)for(var c=0;c<i.length;c++){for(var u=0,d=0;d<r.length;d++)s=mae(n.distance,i[c],r[h],n.attributes,"cmeans"),o=mae(n.distance,i[c],r[d],n.attributes,"cmeans"),u+=Math.pow(s/o,l);e[c][h]=1/u}},"updateMembership"),_ae=mt(function(e,t,r,i){for(var n=new Array(r.k),a=0;a<n.length;a++)n[a]=[];for(var s=0;s<t.length;s++){for(var o=-1/0,l=-1,h=0;h<t[0].length;h++)t[s][h]>o&&(o=t[s][h],l=h);n[l].push(e[s])}for(var c=0;c<n.length;c++)n[c]=i.collection(n[c]);return n},"assign"),uue=mt(function(e){for(var t=this.cy(),r=this.nodes(),i=fae(e),n=new Array(r.length),a=0;a<r.length;a++)n[a]=new Array(i.k);for(var s=new Array(r.length),o=0;o<r.length;o++)s[o]=new Array(i.k);for(var l=0;l<r.length;l++){for(var h=0,c=0;c<i.k;c++)s[l][c]=Math.random(),h+=s[l][c];for(var u=0;u<i.k;u++)s[l][u]=s[l][u]/h}for(var d=new Array(i.k),p=0;p<i.k;p++)d[p]=new Array(i.attributes.length);for(var g=new Array(r.length),f=0;f<r.length;f++)g[f]=new Array(i.k);for(var m=!0,y=0;m&&y<i.maxIterations;)m=!1,Eae(d,r,s,g,i),Sae(s,n,d,r,i),Tae(s,n,i.sensitivityThreshold)||(m=!0),y++;return{clusters:_ae(r,s,i,t),degreeOfMembership:s}},"fuzzyCMeans"),Aae=lue({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!(Bce={kMeans:Bce,kMedoids:Oce,fuzzyCMeans:uue,fcm:uue}),dendrogramDepth:0,attributes:[]}),Lae={single:"min",complete:"max"},Rae=mt(function(e){var e=Aae(e),t=Lae[e.linkage];return null!=t&&(e.linkage=t),e},"setOptions"),Iae=mt(function(e,t,r,i,n){for(var a,s=0,o=1/0,l=n.attributes,h=mt(function(t,r){return NQ(n.distance,l.length,function(e){return l[e](t)},function(e){return l[e](r)},t,r)},"getDist"),c=0;c<e.length;c++){var u=e[c].key,d=r[u][i[u]];d<o&&(s=u,o=d)}if("threshold"===n.mode&&o>=n.threshold||"dendrogram"===n.mode&&1===e.length)return!1;var p=t[s],g=t[i[s]],f="dendrogram"===n.mode?{left:p,right:g,key:p.key}:{value:p.value.concat(g.value),key:p.key};e[p.index]=f,e.splice(g.index,1),t[p.key]=f;for(var m=0;m<e.length;m++){var y=e[m];p.key===y.key?a=1/0:"min"===n.linkage?(a=r[p.key][y.key],r[p.key][y.key]>r[g.key][y.key]&&(a=r[g.key][y.key])):"max"===n.linkage?(a=r[p.key][y.key],r[p.key][y.key]<r[g.key][y.key]&&(a=r[g.key][y.key])):a="mean"===n.linkage?(r[p.key][y.key]*p.size+r[g.key][y.key]*g.size)/(p.size+g.size):"dendrogram"===n.mode?h(y.value,p.value):h(y.value[0],p.value[0]),r[p.key][y.key]=r[y.key][p.key]=a}for(var v=0;v<e.length;v++){var x=e[v].key;if(i[x]===p.key||i[x]===g.key){for(var b=x,T=0;T<e.length;T++){var k=e[T].key;r[x][k]<r[x][b]&&(b=k)}i[x]=b}e[v].index=v}return!(p.key=g.key=p.index=g.index=null)},"mergeClosest"),Nae=mt(function(e,t,r){e&&(e.value?t.push(e.value):(e.left&&Nae(e.left,t),e.right&&Nae(e.right,t)))},"getAllChildren"),Dae=mt(function(e,t){var r,i,n;return e?e.left&&e.right?(r=Dae(e.left,t),i=Dae(e.right,t),n=t.add({group:"nodes",data:{id:r+","+i}}),t.add({group:"edges",data:{source:r,target:n.id()}}),t.add({group:"edges",data:{source:i,target:n.id()}}),n.id()):e.value?e.value.id():void 0:""},"buildDendrogram"),Mae=mt(function(e,t,r){var i,n,a;return e?(i=[],n=[],0===t?(e.left&&Nae(e.left,i),e.right&&Nae(e.right,n),a=i.concat(n),[r.collection(a)]):1===t?e.value?[r.collection(e.value)]:(e.left&&Nae(e.left,i),e.right&&Nae(e.right,n),[r.collection(i),r.collection(n)]):e.value?[r.collection(e.value)]:(e.left&&(i=Mae(e.left,t-1,r)),e.right&&(n=Mae(e.right,t-1,r)),i.concat(n))):[]},"buildClustersFromTree"),Oce=mt(function(e){for(var r=this.cy(),t=this.nodes(),i=Rae(e),n=i.attributes,a=mt(function(t,r){return NQ(i.distance,n.length,function(e){return n[e](t)},function(e){return n[e](r)},t,r)},"getDist"),s=[],o=[],l=[],h=[],c=0;c<t.length;c++){var u={value:"dendrogram"===i.mode?t[c]:[t[c]],key:c,index:c};h[c]=s[c]=u,o[c]=[],l[c]=0}for(var d=0;d<s.length;d++)for(var p=0;p<=d;p++){var g="dendrogram"===i.mode?d===p?1/0:a(s[d].value,s[p].value):d===p?1/0:a(s[d].value[0],s[p].value[0]);o[d][p]=g,(o[p][d]=g)<o[d][l[d]]&&(l[d]=p)}for(var f,m=Iae(s,h,o,l,i);m;)m=Iae(s,h,o,l,i);return"dendrogram"===i.mode?(f=Mae(s[0],i.dendrogramDepth,r),i.addDendrogram&&Dae(s[0],r)):(f=new Array(s.length),s.forEach(function(e,t){e.key=e.index=null,f[t]=r.collection(e.value)})),f},"hierarchicalClustering"),uue={hierarchicalClustering:Oce,hca:Oce},Oae=lue({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),Bae=mt(function(e){var t=e.damping,r=e.preference;return.5<=t&&t<1||oie("Damping must range on [0.5, 1). Got: ".concat(t)),(t=["median","mean","min","max"]).some(function(e){return e===r})||ce(r)||oie("Preference must be one of [".concat(t.map(function(e){return"'".concat(e,"'")}).join(", "),"] or a number. Got: ").concat(r)),Oae(e)},"setOptions"),Pae=mt(function(e,t,r,i){var n=mt(function(e,t){return i[t](e)},"attr");return-NQ(e,i.length,function(e){return n(t,e)},function(e){return n(r,e)},t,r)},"getSimilarity"),$ae=mt(function(e,t){return"median"===t?Gie(e):"mean"===t?Uie(e):"min"===t?qie(e):"max"===t?Wie(e):t},"getPreference"),Fae=mt(function(e,t,r){for(var i=[],n=0;n<e;n++)0<t[n*e+n]+r[n*e+n]&&i.push(n);return i},"findExemplars"),zae=mt(function(e,t,r){for(var i=[],n=0;n<e;n++){for(var a=-1,s=-1/0,o=0;o<r.length;o++){var l=r[o];t[n*e+l]>s&&(s=t[n*e+(a=l)])}0<a&&i.push(a)}for(var h=0;h<r.length;h++)i[r[h]]=r[h];return i},"assignClusters"),qae=mt(function(e,t,r){for(var i=zae(e,t,r),n=0;n<r.length;n++){for(var a=[],s=0;s<i.length;s++)i[s]===r[n]&&a.push(s);for(var o=-1,l=-1/0,h=0;h<a.length;h++){for(var c=0,u=0;u<a.length;u++)c+=t[a[u]*e+a[h]];l<c&&(o=h,l=c)}r[n]=a[o]}return zae(e,t,r)},"assign"),Oce=mt(function(B){for(var P=this.cy(),e=this.nodes(),t=Bae(B),$={},r=0;r<e.length;r++)$[e[r].id()]=r;for(var i,n=(i=e.length)*i,a=new Array(n),s=0;s<n;s++)a[s]=-1/0;for(var o=0;o<i;o++)for(var l=0;l<i;l++)o!==l&&(a[o*i+l]=Pae(t.distance,e[o],e[l],t.attributes));for(var F=$ae(a,t.preference),h=0;h<i;h++)a[h*i+h]=F;for(var c=new Array(n),u=0;u<n;u++)c[u]=0;for(var d=new Array(n),p=0;p<n;p++)d[p]=0;for(var g=new Array(i),f=new Array(i),m=new Array(i),y=0;y<i;y++)g[y]=0,f[y]=0,m[y]=0;for(var v,x=new Array(i*t.minIterations),z=0;z<x.length;z++)x[z]=0;for(v=0;v<t.maxIterations;v++){for(var b=0;b<i;b++){for(var T,k=-1/0,w=-1/0,C=-1,E=0;E<i;E++)g[E]=c[b*i+E],k<=(T=d[b*i+E]+a[b*i+E])?(w=k,k=T,C=E):w<T&&(w=T);for(var S=0;S<i;S++)c[b*i+S]=(1-t.damping)*(a[b*i+S]-k)+t.damping*g[S];c[b*i+C]=(1-t.damping)*(a[b*i+C]-w)+t.damping*g[C]}for(var _=0;_<i;_++){for(var A=0,L=0;L<i;L++)g[L]=d[L*i+_],f[L]=Math.max(0,c[L*i+_]),A+=f[L];A-=f[_],f[_]=c[_*i+_],A+=f[_];for(var R=0;R<i;R++)d[R*i+_]=(1-t.damping)*Math.min(0,A-f[R])+t.damping*g[R];d[_*i+_]=(1-t.damping)*(A-f[_])+t.damping*g[_]}for(var q=0,I=0;I<i;I++){var W=0<d[I*i+I]+c[I*i+I]?1:0;q+=x[v%t.minIterations*i+I]=W}if(0<q&&(v>=t.minIterations-1||v==t.maxIterations-1)){for(var U=0,N=0;N<i;N++){for(var G=m[N]=0;G<t.minIterations;G++)m[N]+=x[G*i+N];0!==m[N]&&m[N]!==t.minIterations||U++}if(U===i)break}}for(var D=Fae(i,c,d),j=qae(i,a,D),V={},Y=0;Y<D.length;Y++)V[D[Y]]=[];for(var M=0;M<e.length;M++){var H=j[$[e[M].id()]];null!=H&&V[H].push(e[M])}for(var X=new Array(D.length),O=0;O<D.length;O++)X[O]=P.collection(V[D[O]]);return X},"affinityPropagation"),Wae=lue({root:void 0,directed:!(Oce={affinityPropagation:Oce,ap:Oce})}),Ece={hierholzer:mt(function(e){Ate(e)||(e={root:(r=arguments)[0],directed:r[1]});var a,s,t,r=Wae(e),e=r.root,o=r.directed,l=!1,h=(e&&(t=(Ete(e)?this.filter(e):e)[0].id()),{}),c={},i=(o?this.forEach(function(e){var t,r,i,n=e.id();e.isNode()?(r=e.indegree(!0),i=(t=e.outdegree(!0))-r,1==(r-=t)?a?l=!0:a=n:1==i?s?l=!0:s=n:(1<i||1<r)&&(l=!0),h[n]=[],e.outgoers().forEach(function(e){e.isEdge()&&h[n].push(e.id())})):c[n]=[void 0,e.target().id()]}):this.forEach(function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(a?s?l=!0:s=t:a=t),h[t]=[],e.connectedEdges().forEach(function(e){return h[t].push(e.id())})):c[t]=[e.source().id(),e.target().id()]}),{found:!1,trail:void 0});if(!l){if(s&&a)if(o){if(t&&s!=t)return i;t=s}else{if(t&&s!=t&&a!=t)return i;t=t||s}else t=t||this[0].id();for(var n,u=mt(function(e){for(var t,r,i,n=e,a=[e];h[n].length;)t=h[n].shift(),r=c[t][0],n!=(i=c[t][1])?(h[i]=h[i].filter(function(e){return e!=t}),n=i):o||n==r||(h[r]=h[r].filter(function(e){return e!=t}),n=r),a.unshift(t),a.unshift(n);return a},"walk"),d=[],p=[],p=u(t);1!=p.length;)0==h[p[0]].length?(d.unshift(this.getElementById(p.shift())),d.unshift(this.getElementById(p.shift()))):p=u(p.shift()).concat(p);for(n in d.unshift(this.getElementById(p.shift())),h)if(h[n].length)return i;i.found=!0,i.trail=this.spawn(d,!0)}return i},"hierholzer")},oue={hopcroftTarjanBiconnected:oue=mt(function(){var s=this,o={},l=0,h=0,c=[],u=[],d={},p=mt(function(e,t){for(var r=u.length-1,i=[],n=s.spawn();u[r].x!=e||u[r].y!=t;)i.push(u.pop().edge),r--;i.push(u.pop().edge),i.forEach(function(e){var t=e.connectedNodes().intersection(s);n.merge(e),t.forEach(function(e){var t=e.id(),r=e.connectedEdges().intersection(s);n.merge(e),o[t].cutVertex?n.merge(r.filter(function(e){return e.isLoop()})):n.merge(r)})}),c.push(n)},"buildComponent"),g=mt(function(t,r,i){t===i&&(h+=1),o[r]={id:l,low:l++,cutVertex:!1};var n,a,e=s.getElementById(r).connectedEdges().intersection(s);0===e.size()?c.push(s.spawn(s.getElementById(r))):e.forEach(function(e){a=e.source().id(),n=e.target().id(),(n=a===r?n:a)!==i&&(a=e.id(),d[a]||(d[a]=!0,u.push({x:r,y:n,edge:e})),n in o?o[r].low=Math.min(o[r].low,o[n].id):(g(t,n,r),o[r].low=Math.min(o[r].low,o[n].low),o[r].id<=o[n].low&&(o[r].cutVertex=!0,p(r,n))))})},"biconnectedSearch"),e=(s.forEach(function(e){!e.isNode()||(e=e.id())in o||(h=0,g(e,e),o[e].cutVertex=1<h)}),Object.keys(o).filter(function(e){return o[e].cutVertex}).map(function(e){return s.getElementById(e)}));return{cut:s.spawn(e),components:c}},"hopcroftTarjanBiconnected"),htbc:oue,htb:oue,hopcroftTarjanBiconnectedComponents:oue},Kce=mt(function(){var n=this,a={},s=0,o=[],l=[],h=n.spawn(n),c=mt(function(t){if(l.push(t),a[t]={index:s,low:s++,explored:!1},n.getElementById(t).connectedEdges().intersection(n).forEach(function(e){(e=e.target().id())!==t&&(e in a||c(e),a[e].explored||(a[t].low=Math.min(a[t].low,a[e].low)))}),a[t].index===a[t].low){for(var e=n.spawn();;){var r=l.pop();if(e.merge(n.getElementById(r)),a[r].low=a[t].index,a[r].explored=!0,r===t)break}var i=e.edgesWith(e),i=e.merge(i);o.push(i),h=h.difference(i)}},"stronglyConnectedSearch");return n.forEach(function(e){!e.isNode()||(e=e.id())in a||c(e)}),{cut:h,components:o}},"tarjanStronglyConnected"),Uae={},[Fce,mue,zce,Pce,Uhe,_ce,Mce,Jce,sue,te,mce,$ce,Bce,uue,Oce,Ece,oue,{tarjanStronglyConnected:Kce,tsc:Kce,tscc:Kce,tarjanStronglyConnectedComponents:Kce}].forEach(function(e){Qte(Uae,e)}),(Gae=mt(function(e){if(!(this instanceof Gae))return new Gae(e);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof e&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))},"api")).prototype={fulfill:mt(function(e){return jae(this,1,"fulfillValue",e)},"fulfill"),reject:mt(function(e){return jae(this,2,"rejectReason",e)},"reject"),then:mt(function(e,t){var r=new Gae;return this.onFulfilled.push(Hae(e,r,"fulfill")),this.onRejected.push(Hae(t,r,"reject")),Vae(this),r.proxy},"then")},jae=mt(function(e,t,r,i){return 0===e.state&&(e.state=t,e[r]=i,Vae(e)),e},"deliver"),Vae=mt(function(e){1===e.state?Yae(e,"onFulfilled",e.fulfillValue):2===e.state&&Yae(e,"onRejected",e.rejectReason)},"execute"),Yae=mt(function(e,t,r){var i;0!==e[t].length&&(i=e[t],e[t]=[],e=mt(function(){for(var e=0;e<i.length;e++)i[e](r)},"func"),"function"==typeof setImmediate?setImmediate(e):setTimeout(e,0))},"execute_handlers"),Hae=mt(function(r,i,n){return function(e){if("function"!=typeof r)i[n].call(i,e);else{var t;try{t=r(e)}catch(e){return void i.reject(e)}Xae(i,t)}}},"resolver"),Xae=mt(function(t,r){if(t===r||t.proxy===r)t.reject(new TypeError("cannot resolve promise with itself"));else{var e;if("object"===lQ(r)&&null!==r||"function"==typeof r)try{e=r.then}catch(e){return void t.reject(e)}if("function"==typeof e){var i=!1;try{e.call(r,function(e){i||(i=!0,e===r?t.reject(new TypeError("circular thenable chain")):Xae(t,e))},function(e){i||(i=!0,t.reject(e))})}catch(e){i||t.reject(e)}}else t.fulfill(r)}},"resolve"),Gae.all=function(o){return new Gae(function(r,i){for(var n=new Array(o.length),a=0,s=mt(function(e,t){n[e]=t,++a===o.length&&r(n)},"fulfill"),e=0;e<o.length;e++)(t=>{var e=o[t];null!=e&&null!=e.then?e.then(function(e){s(t,e)},function(e){i(e)}):s(t,e)})(e)})},Gae.resolve=function(r){return new Gae(function(e,t){e(r)})},Gae.reject=function(r){return new Gae(function(e,t){t(r)})},Kae=typeof Promise<"u"?Promise:Gae,Zae=mt(function(e,t,r){var i=Ote(e),n=!i;(t=this._private=Qte({duration:1e3},t,r)).target=e,t.style=t.style||t.css,t.started=!1,t.playing=!1,t.hooked=!1,t.applying=!1,t.progress=0,t.completes=[],t.frames=[],t.complete&&Ste(t.complete)&&t.completes.push(t.complete),n&&(r=e.position(),t.startPosition=t.startPosition||{x:r.x,y:r.y},t.startStyle=t.startStyle||e.cy().style().getAnimationStartStyle(e,t.style)),i&&(n=e.pan(),t.startPan={x:n.x,y:n.y},t.startZoom=e.zoom()),this.length=1,this[0]=this},"Animation"),Fce=Zae.prototype,Qte(Fce,{instanceString:mt(function(){return"animation"},"instanceString"),hook:mt(function(){var e,t=this._private;return t.hooked||(e=t.target._private.animation,(t.queue?e.queue:e.current).push(this),Nte(t.target)&&t.target.cy().addToAnimationPool(t.target),t.hooked=!0),this},"hook"),play:mt(function(){var e=this._private;return 1===e.progress&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},"play"),playing:mt(function(){return this._private.playing},"playing"),apply:mt(function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},"apply"),applying:mt(function(){return this._private.applying},"applying"),pause:mt(function(){var e=this._private;return e.playing=!1,e.started=!1,this},"pause"),stop:mt(function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},"stop"),rewind:mt(function(){return this.progress(0)},"rewind"),fastforward:mt(function(){return this.progress(1)},"fastforward"),time:mt(function(e){var t=this._private;return void 0===e?t.progress*t.duration:this.progress(e/t.duration)},"time"),progress:mt(function(e){var t=this._private,r=t.playing;return void 0===e?t.progress:(r&&this.pause(),t.progress=e,t.started=!1,r&&this.play(),this)},"progress"),completed:mt(function(){return 1===this._private.progress},"completed"),reverse:mt(function(){var i=this._private,e=i.playing,t=(e&&this.pause(),i.progress=1-i.progress,i.started=!1,mt(function(e,t){var r=i[e];null!=r&&(i[e]=i[t],i[t]=r)},"swap"));if(t("zoom","startZoom"),t("pan","startPan"),t("position","startPosition"),i.style)for(var r=0;r<i.style.length;r++){var n=i.style[r],a=n.name,s=i.startStyle[a];i.startStyle[a]=n,i.style[r]=s}return e&&this.play(),this},"reverse"),promise:mt(function(e){var r,t=this._private;switch(e){case"frame":r=t.frames;break;default:case"complete":case"completed":r=t.completes}return new Kae(function(e,t){r.push(function(){e()})})},"promise")}),Fce.complete=Fce.completed,Fce.run=Fce.play,Fce.running=Fce.playing,mue={animated:mt(function(){return mt(function(){var e=void 0!==this.length?this:[this];return!!(this._private.cy||this).styleEnabled()&&((e=e[0])?0<e._private.animation.current.length:void 0)},"animatedImpl")},"animated"),clearQueue:mt(function(){return mt(function(){var e=void 0!==this.length?this:[this];if((this._private.cy||this).styleEnabled())for(var t=0;t<e.length;t++)e[t]._private.animation.queue=[];return this},"clearQueueImpl")},"clearQueue"),delay:mt(function(){return mt(function(e,t){return(this._private.cy||this).styleEnabled()?this.animate({delay:e,duration:e,complete:t}):this},"delayImpl")},"delay"),delayAnimation:mt(function(){return mt(function(e,t){return(this._private.cy||this).styleEnabled()?this.animation({delay:e,duration:e,complete:t}):this},"delayAnimationImpl")},"delayAnimation"),animation:mt(function(){return mt(function(e,t){var r=void 0!==this.length,i=r?this:[this],n=this._private.cy||this,a=!(r=!r);if(!n.styleEnabled())return this;var s=n.style();if(e=Qte({},e,t),!(t=0===Object.keys(e).length)){switch(void 0===e.duration&&(e.duration=400),e.duration){case"slow":e.duration=600;break;case"fast":e.duration=200}a&&(e.style=s.getPropsList(e.style||e.css),e.css=void 0),a&&null!=e.renderedPosition&&(t=e.renderedPosition,s=n.pan(),a=n.zoom(),e.position=Fie(t,a,s)),r&&null!=e.panBy&&(t=e.panBy,a=n.pan(),e.pan={x:a.x+t.x,y:a.y+t.y}),s=e.center||e.centre,r&&null!=s&&null!=(a=n.getCenterPan(s.eles,e.zoom))&&(e.pan=a),r&&null!=e.fit&&(t=e.fit,null!=(s=n.getFitViewport(t.eles||t.boundingBox,t.padding)))&&(e.pan=s.pan,e.zoom=s.zoom),r&&Ate(e.zoom)&&(null!=(a=n.getZoomedViewport(e.zoom))?(a.zoomed&&(e.zoom=a.zoom),a.panned&&(e.pan=a.pan)):e.zoom=null)}return new Zae(i[0],e)},"animationImpl")},"animation"),animate:mt(function(){return mt(function(e,t){var r=void 0!==this.length?this:[this];if((this._private.cy||this).styleEnabled()){t&&(e=Qte({},e,t));for(var i=0;i<r.length;i++){var n=r[i],a=n.animated()&&(void 0===e.queue||e.queue);n.animation(e,a?{queue:!0}:void 0).play()}}return this},"animateImpl")},"animate"),stop:mt(function(){return mt(function(e,t){var r=void 0!==this.length?this:[this],i=this._private.cy||this;if(i.styleEnabled()){for(var n=0;n<r.length;n++){for(var a=r[n]._private,s=a.animation.current,o=0;o<s.length;o++){var l=s[o]._private;t&&(l.duration=0)}e&&(a.animation.queue=[]),t||(a.animation.current=[])}i.notify("draw")}return this},"stopImpl")},"stop")},mt(DQ,"requireIsArray"),mt(MQ,"require_isKey"),mt(OQ,"requireIsFunction"),mt(BQ,"require_coreJsData"),mt(PQ,"require_isMasked"),mt($Q,"require_toSource"),mt(FQ,"require_baseIsNative"),mt(zQ,"require_getValue"),mt(qQ,"require_getNative"),mt(WQ,"require_nativeCreate"),mt(UQ,"require_hashClear"),mt(GQ,"require_hashDelete"),mt(jQ,"require_hashGet"),mt(VQ,"require_hashHas"),mt(YQ,"require_hashSet"),mt(HQ,"require_Hash"),mt(XQ,"require_listCacheClear"),mt(KQ,"requireEq"),mt(ZQ,"require_assocIndexOf"),mt(QQ,"require_listCacheDelete"),mt(JQ,"require_listCacheGet"),mt(eJ,"require_listCacheHas"),mt(tJ,"require_listCacheSet"),mt(rJ,"require_ListCache"),mt(iJ,"require_Map"),mt(nJ,"require_mapCacheClear"),mt(aJ,"require_isKeyable"),mt(sJ,"require_getMapData"),mt(oJ,"require_mapCacheDelete"),mt(lJ,"require_mapCacheGet"),mt(hJ,"require_mapCacheHas"),mt(cJ,"require_mapCacheSet"),mt(uJ,"require_MapCache"),mt(dJ,"requireMemoize"),mt(pJ,"require_memoizeCapped"),mt(gJ,"require_stringToPath"),mt(fJ,"require_arrayMap"),mt(mJ,"require_baseToString"),mt(yJ,"requireToString"),mt(vJ,"require_castPath"),mt(xJ,"require_toKey"),mt(bJ,"require_baseGet"),mt(TJ,"requireGet"),zce=TJ(),Roe=cQ(zce),mt(kJ,"require_defineProperty"),mt(wJ,"require_baseAssignValue"),mt(CJ,"require_assignValue"),mt(EJ,"require_isIndex"),mt(SJ,"require_baseSet"),mt(_J,"requireSet"),Pce=_J(),Uoe=cQ(Pce),mt(AJ,"require_copyArray"),mt(LJ,"requireToPath"),Uhe=LJ(),Hoe=cQ(Uhe),_ce={data:mt(function(b){var e={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:mt(function(e){},"beforeGet"),beforeSet:mt(function(e,t){},"beforeSet"),onSet:mt(function(e){},"onSet"),canSet:mt(function(e){return!0},"canSet")};return b=Qte({},e,b),mt(function(e,t){var r,i=b,n=this,a=void 0!==n.length,s=a?n:[n],o=a?n[0]:n;if(Ete(e)){var l,h=-1!==e.indexOf(".")&&Hoe(e);if(i.allowGetting&&void 0===t)return o&&(i.beforeGet(o),l=h&&void 0===o._private[i.field][e]?Roe(o._private[i.field],h):o._private[i.field][e]),l;if(i.allowSetting&&void 0!==t&&!i.immutableKeys[e]){a=JZ({},e,t),i.beforeSet(n,a);for(var c=0,u=s.length;c<u;c++){var d=s[c];i.canSet(d)&&(h&&void 0===o._private[i.field][e]?Uoe(d._private[i.field],h,t):d._private[i.field][e]=t)}i.updateStyle&&n.updateStyle(),i.onSet(n),i.settingTriggersEvent&&n[i.triggerFnName](i.settingEvent)}}else if(i.allowSetting&&Ate(e)){var p=e,g=Object.keys(p);i.beforeSet(n,p);for(var f=0;f<g.length;f++){var m,y=p[m=g[f]];if(!i.immutableKeys[m])for(var v=0;v<s.length;v++){var x=s[v];i.canSet(x)&&(x._private[i.field][m]=y)}}i.updateStyle&&n.updateStyle(),i.onSet(n),i.settingTriggersEvent&&n[i.triggerFnName](i.settingEvent)}else if(i.allowBinding&&Ste(e))n.on(i.bindingEvent,e);else if(i.allowGetting&&void 0===e)return o&&(i.beforeGet(o),r=o._private[i.field]),r;return n},"dataImpl")},"data"),removeData:mt(function(f){return f=Qte({},{field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}},f),mt(function(e){var t=f,r=void 0!==this.length?this:[this];if(Ete(e)){for(var i=e.split(/\s+/),n=i.length,a=0;a<n;a++){var s=i[a];if(!$te(s)&&!t.immutableKeys[s])for(var o=0,l=r.length;o<l;o++)r[o]._private[t.field][s]=void 0}t.triggerEvent&&this[t.triggerFnName](t.event)}else if(void 0===e){for(var h=0,c=r.length;h<c;h++)for(var u=r[h]._private[t.field],d=Object.keys(u),p=0;p<d.length;p++){var g=d[p];t.immutableKeys[g]||(u[g]=void 0)}t.triggerEvent&&this[t.triggerFnName](t.event)}return this},"removeDataImpl")},"removeData")},Mce={eventAliasesOn:mt(function(e){e.addListener=e.listen=e.bind=e.on,e.unlisten=e.unbind=e.off=e.removeListener,e.trigger=e.emit,e.pon=e.promiseOn=function(e,t){var n=this,a=Array.prototype.slice.call(arguments,0);return new Kae(function(t,e){var r=mt(function(e){n.off.apply(n,i),t(e)},"callback"),i=(r=a.concat([r])).concat([]);n.on.apply(n,r)})}},"eventAliasesOn")},Xoe={},[mue,_ce,Mce].forEach(function(e){Qte(Xoe,e)}),Jce={animate:Xoe.animate(),animation:Xoe.animation(),animated:Xoe.animated(),clearQueue:Xoe.clearQueue(),delay:Xoe.delay(),delayAnimation:Xoe.delayAnimation(),stop:Xoe.stop()},(sue={classes:mt(function(e){var t;if(void 0===e)return t=[],this[0]._private.classes.forEach(function(e){return t.push(e)}),t;_te(e)||(e=(e||"").match(/\S+/g)||[]);for(var r=[],i=new kie(e),n=0;n<this.length;n++){for(var a=this[n],s=a._private,o=s.classes,l=!1,h=0;h<e.length;h++){var c=e[h];if(!o.has(c)){l=!0;break}}(l=l||o.size!==e.length)&&(s.classes=i,r.push(a))}return 0<r.length&&this.spawn(r).updateStyle().emit("class"),this},"classes"),addClass:mt(function(e){return this.toggleClass(e,!0)},"addClass"),hasClass:mt(function(e){var t=this[0];return null!=t&&t._private.classes.has(e)},"hasClass"),toggleClass:mt(function(e,t){_te(e)||(e=e.match(/\S+/g)||[]);for(var r=void 0===t,i=[],n=0,a=this.length;n<a;n++)for(var s=this[n],o=s._private.classes,l=!1,h=0;h<e.length;h++){var c=e[h],u=o.has(c),d=!1;t||r&&!u?(o.add(c),d=!0):(!t||r&&u)&&(o.delete(c),d=!0),!l&&d&&(i.push(s),l=!0)}return 0<i.length&&this.spawn(i).updateStyle().emit("class"),this},"toggleClass"),removeClass:mt(function(e){return this.toggleClass(e,!1)},"removeClass"),flashClass:mt(function(e,t){var r=this;if(null==t)t=250;else if(0===t)return r;return r.addClass(e),setTimeout(function(){r.removeClass(e)},t),r},"flashClass")}).className=sue.classNames=sue.classes,(Koe={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:Xte,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"}).variable="(?:[\\w-.]|(?:\\\\"+Koe.metaChar+"))+",Koe.className="(?:[\\w-]|(?:\\\\"+Koe.metaChar+"))+",Koe.value=Koe.string+"|"+Koe.number,Koe.id=Koe.variable;for(var t,r=Koe.comparatorOp.split("|"),n=0;n<r.length;n++)t=r[n],Koe.comparatorOp+="|@"+t;for(r=Koe.comparatorOp.split("|"),n=0;n<r.length;n++)0<=(t=r[n]).indexOf("!")||"="===t||(Koe.comparatorOp+="|\\!"+t);function o(e){return-e.tension*e.x-e.friction*e.v}function l(e,t,r){return{dx:(r={x:e.x+r.dx*t,v:e.v+r.dv*t,tension:e.tension,friction:e.friction}).v,dv:o(r)}}function c(e,t){var r=l(e,.5*t,s={dx:e.v,dv:o(e)}),i=l(e,.5*t,r),n=l(e,t,i),a=1/6*(s.dx+2*(r.dx+i.dx)+n.dx),s=1/6*(s.dv+2*(r.dv+i.dv)+n.dv);return e.x=e.x+a*t,e.v=e.v+s*t,e}Zoe=mt(function(){return{checks:[]}},"newQuery"),Qoe={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},Joe=[{selector:":selected",matches:mt(function(e){return e.selected()},"matches")},{selector:":unselected",matches:mt(function(e){return!e.selected()},"matches")},{selector:":selectable",matches:mt(function(e){return e.selectable()},"matches")},{selector:":unselectable",matches:mt(function(e){return!e.selectable()},"matches")},{selector:":locked",matches:mt(function(e){return e.locked()},"matches")},{selector:":unlocked",matches:mt(function(e){return!e.locked()},"matches")},{selector:":visible",matches:mt(function(e){return e.visible()},"matches")},{selector:":hidden",matches:mt(function(e){return!e.visible()},"matches")},{selector:":transparent",matches:mt(function(e){return e.transparent()},"matches")},{selector:":grabbed",matches:mt(function(e){return e.grabbed()},"matches")},{selector:":free",matches:mt(function(e){return!e.grabbed()},"matches")},{selector:":removed",matches:mt(function(e){return e.removed()},"matches")},{selector:":inside",matches:mt(function(e){return!e.removed()},"matches")},{selector:":grabbable",matches:mt(function(e){return e.grabbable()},"matches")},{selector:":ungrabbable",matches:mt(function(e){return!e.grabbable()},"matches")},{selector:":animated",matches:mt(function(e){return e.animated()},"matches")},{selector:":unanimated",matches:mt(function(e){return!e.animated()},"matches")},{selector:":parent",matches:mt(function(e){return e.isParent()},"matches")},{selector:":childless",matches:mt(function(e){return e.isChildless()},"matches")},{selector:":child",matches:mt(function(e){return e.isChild()},"matches")},{selector:":orphan",matches:mt(function(e){return e.isOrphan()},"matches")},{selector:":nonorphan",matches:mt(function(e){return e.isChild()},"matches")},{selector:":compound",matches:mt(function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()},"matches")},{selector:":loop",matches:mt(function(e){return e.isLoop()},"matches")},{selector:":simple",matches:mt(function(e){return e.isSimple()},"matches")},{selector:":active",matches:mt(function(e){return e.active()},"matches")},{selector:":inactive",matches:mt(function(e){return!e.active()},"matches")},{selector:":backgrounding",matches:mt(function(e){return e.backgrounding()},"matches")},{selector:":nonbackgrounding",matches:mt(function(e){return!e.backgrounding()},"matches")}].sort(function(e,t){return Zte(e.selector,t.selector)}),ele=(()=>{for(var e,t={},r=0;r<Joe.length;r++)t[(e=Joe[r]).selector]=e.matches;return t})(),tle=mt(function(e,t){return ele[e](t)},"stateSelectorMatches"),te="("+Joe.map(function(e){return e.selector}).join("|")+")",rle=mt(function(e){return e.replace(new RegExp("\\\\("+Koe.metaChar+")","g"),function(e,t){return t})},"cleanMetaChars"),ile=mt(function(e,t,r){e[e.length-1]=r},"replaceLastQuery"),(nle=[{name:"group",query:!0,regex:"("+Koe.group+")",populate:mt(function(e,t,r){r=nQ(r,1)[0],t.checks.push({type:Qoe.GROUP,value:"*"===r?r:r+"s"})},"populate")},{name:"state",query:!0,regex:te,populate:mt(function(e,t,r){r=nQ(r,1)[0],t.checks.push({type:Qoe.STATE,value:r})},"populate")},{name:"id",query:!0,regex:"\\#("+Koe.id+")",populate:mt(function(e,t,r){r=nQ(r,1)[0],t.checks.push({type:Qoe.ID,value:rle(r)})},"populate")},{name:"className",query:!0,regex:"\\.("+Koe.className+")",populate:mt(function(e,t,r){r=nQ(r,1)[0],t.checks.push({type:Qoe.CLASS,value:rle(r)})},"populate")},{name:"dataExists",query:!0,regex:"\\[\\s*("+Koe.variable+")\\s*\\]",populate:mt(function(e,t,r){r=nQ(r,1)[0],t.checks.push({type:Qoe.DATA_EXIST,field:rle(r)})},"populate")},{name:"dataCompare",query:!0,regex:"\\[\\s*("+Koe.variable+")\\s*("+Koe.comparatorOp+")\\s*("+Koe.value+")\\s*\\]",populate:mt(function(e,t,r){var i=(r=nQ(r,3))[0],n=r[1],r=r[2],r=null!=new RegExp("^"+Koe.string+"$").exec(r)?r.substring(1,r.length-1):parseFloat(r);t.checks.push({type:Qoe.DATA_COMPARE,field:rle(i),operator:n,value:r})},"populate")},{name:"dataBool",query:!0,regex:"\\[\\s*("+Koe.boolOp+")\\s*("+Koe.variable+")\\s*\\]",populate:mt(function(e,t,r){var i=(r=nQ(r,2))[0];t.checks.push({type:Qoe.DATA_BOOL,field:rle(r[1]),operator:i})},"populate")},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+Koe.meta+")\\s*("+Koe.comparatorOp+")\\s*("+Koe.number+")\\s*\\]\\]",populate:mt(function(e,t,r){var i=(r=nQ(r,3))[0],n=r[1],r=r[2];t.checks.push({type:Qoe.META_COMPARE,field:rle(i),operator:n,value:parseFloat(r)})},"populate")},{name:"nextQuery",separator:!0,regex:Koe.separator,populate:mt(function(e,t){var r=e.currentSubject,i=e.edgeCount,n=e.compoundCount,a=e[e.length-1];return null!=r&&(a.subject=r,e.currentSubject=null),a.edgeCount=i,a.compoundCount=n,e.edgeCount=0,e.compoundCount=0,e[e.length++]=Zoe()},"populate")},{name:"directedEdge",separator:!0,regex:Koe.directedEdge,populate:mt(function(e,t){var r,i,n;return null==e.currentSubject?(i=Zoe(),r=t,n=Zoe(),i.checks.push({type:Qoe.DIRECTED_EDGE,source:r,target:n}),ile(e,t,i)):(r=Zoe(),i=t,n=Zoe(),r.checks.push({type:Qoe.NODE_SOURCE,source:i,target:n}),ile(e,t,r)),e.edgeCount++,n},"populate")},{name:"undirectedEdge",separator:!0,regex:Koe.undirectedEdge,populate:mt(function(e,t){var r,i,n;return null==e.currentSubject?(i=Zoe(),r=t,n=Zoe(),i.checks.push({type:Qoe.UNDIRECTED_EDGE,nodes:[r,n]}),ile(e,t,i),e.edgeCount++):(r=Zoe(),i=t,n=Zoe(),r.checks.push({type:Qoe.NODE_NEIGHBOR,node:i,neighbor:n}),ile(e,t,r)),n},"populate")},{name:"child",separator:!0,regex:Koe.child,populate:mt(function(e,t){var r,i,n,a,s,o;return null==e.currentSubject?(o=Zoe(),a=Zoe(),r=e[e.length-1],o.checks.push({type:Qoe.CHILD,parent:r,child:a}),ile(e,t,o),e.compoundCount++,a):e.currentSubject===t?(r=Zoe(),o=e[e.length-1],a=Zoe(),i=Zoe(),n=Zoe(),s=Zoe(),r.checks.push({type:Qoe.COMPOUND_SPLIT,left:o,right:a,subject:i}),i.checks=t.checks,t.checks=[{type:Qoe.TRUE}],s.checks.push({type:Qoe.TRUE}),a.checks.push({type:Qoe.PARENT,parent:s,child:n}),ile(e,o,r),e.currentSubject=i,e.compoundCount++,n):(a=Zoe(),s=Zoe(),o=[{type:Qoe.PARENT,parent:a,child:s}],a.checks=t.checks,t.checks=o,e.compoundCount++,s)},"populate")},{name:"descendant",separator:!0,regex:Koe.descendant,populate:mt(function(e,t){var r,i,n,a,s,o;return null==e.currentSubject?(o=Zoe(),a=Zoe(),r=e[e.length-1],o.checks.push({type:Qoe.DESCENDANT,ancestor:r,descendant:a}),ile(e,t,o),e.compoundCount++,a):e.currentSubject===t?(r=Zoe(),o=e[e.length-1],a=Zoe(),i=Zoe(),n=Zoe(),s=Zoe(),r.checks.push({type:Qoe.COMPOUND_SPLIT,left:o,right:a,subject:i}),i.checks=t.checks,t.checks=[{type:Qoe.TRUE}],s.checks.push({type:Qoe.TRUE}),a.checks.push({type:Qoe.ANCESTOR,ancestor:s,descendant:n}),ile(e,o,r),e.currentSubject=i,e.compoundCount++,n):(a=Zoe(),s=Zoe(),o=[{type:Qoe.ANCESTOR,ancestor:a,descendant:s}],a.checks=t.checks,t.checks=o,e.compoundCount++,s)},"populate")},{name:"subject",modifier:!0,regex:Koe.subject,populate:mt(function(e,t){if(null!=e.currentSubject&&e.currentSubject!==t)return hie("Redefinition of subject in selector `"+e.toString()+"`"),!1;e.currentSubject=t,(e=null==(t=e[e.length-1].checks[0])?null:t.type)===Qoe.DIRECTED_EDGE?t.type=Qoe.NODE_TARGET:e===Qoe.UNDIRECTED_EDGE&&(t.type=Qoe.NODE_NEIGHBOR,t.node=t.nodes[1],t.neighbor=t.nodes[0],t.nodes=null)},"populate")}]).forEach(function(e){return e.regexObj=new RegExp("^"+e.regex)}),ale=mt(function(e){for(var t=0;t<nle.length;t++){var r=(o=nle[t]).name,i=e.match(o.regexObj);if(null!=i){var n=i,a=o,s=r,o=i[0];e=e.substring(o.length);break}}return{expr:a,match:n,name:s,remaining:e}},"consumeExpr"),sle=mt(function(e){var t=e.match(/^\s+/);return t&&(t=t[0],e=e.substring(t.length)),e},"consumeWhitespace"),mce=mt(function(e){var t=this,r=t.inputText=e,i=t[0]=Zoe();for(t.length=1,r=sle(r);;){var n=ale(r);if(null==n.expr)return hie("The selector `"+e+"`is invalid"),!1;var a=n.match.slice(1);if(!1===(a=n.expr.populate(t,i,a)))return!1;if(null!=a&&(i=a),(r=n.remaining).match(/^\s*$/))break}var s=t[t.length-1];null!=t.currentSubject&&(s.subject=t.currentSubject),s.edgeCount=t.edgeCount,s.compoundCount=t.compoundCount;for(var o=0;o<t.length;o++){var l=t[o];if(0<l.compoundCount&&0<l.edgeCount)return hie("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(1<l.edgeCount)return hie("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===l.edgeCount&&hie("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"),$ce=mt(function(){if(null!=this.toStringCache)return this.toStringCache;for(var o=mt(function(e){return e??""},"clean"),l=mt(function(e){return Ete(e)?'"'+e+'"':o(e)},"cleanVal"),h=mt(function(e){return" "+e+" "},"space"),a=mt(function(e,t){var r=e.type,i=e.value;switch(r){case Qoe.GROUP:return(n=o(i)).substring(0,n.length-1);case Qoe.DATA_COMPARE:return"["+e.field+h(o(e.operator))+l(i)+"]";case Qoe.DATA_BOOL:var n=e.operator,a=e.field;return"["+o(n)+a+"]";case Qoe.DATA_EXIST:return"["+e.field+"]";case Qoe.META_COMPARE:return n=e.operator,"[["+e.field+h(o(n))+l(i)+"]]";case Qoe.STATE:return i;case Qoe.ID:return"#"+i;case Qoe.CLASS:return"."+i;case Qoe.PARENT:case Qoe.CHILD:return c(e.parent,t)+h(">")+c(e.child,t);case Qoe.ANCESTOR:case Qoe.DESCENDANT:return c(e.ancestor,t)+" "+c(e.descendant,t);case Qoe.COMPOUND_SPLIT:var a=c(e.left,t),n=c(e.subject,t),s=c(e.right,t);return a+(0<a.length?" ":"")+n+s;case Qoe.TRUE:return""}},"checkToString"),c=mt(function(i,n){return i.checks.reduce(function(e,t,r){return e+(n===i&&0===r?"$":"")+a(t,n)},"")},"queryToString"),e="",t=0;t<this.length;t++){var r=this[t];e+=c(r,r.subject),1<this.length&&t<this.length-1&&(e+=", ")}return this.toStringCache=e},"toString"),Bce={parse:mce,toString:$ce},ole=mt(function(e,t,r){var i,n,a,s=Ete(e),o=ce(e),l=Ete(r),h=!1,c=!1,u=!1;switch(0<=t.indexOf("!")&&(t=t.replace("!",""),c=!0),0<=t.indexOf("@")&&(t=t.replace("@",""),h=!0),(s||l||h)&&(n=s||o?""+e:"",a=""+r),h&&(e=n=n.toLowerCase(),r=a=a.toLowerCase()),t){case"*=":i=0<=n.indexOf(a);break;case"$=":i=0<=n.indexOf(a,n.length-a.length);break;case"^=":i=0===n.indexOf(a);break;case"=":i=e===r;break;case">":u=!0,i=r<e;break;case">=":u=!0,i=r<=e;break;case"<":u=!0,i=e<r;break;case"<=":u=!0,i=e<=r;break;default:i=!1}return!c||null==e&&u?i:!i},"valCmp"),lle=mt(function(e,t){switch(t){case"?":return!!e;case"!":return!e;case"^":return void 0===e}},"boolCmp"),hle=mt(function(e){return void 0!==e},"existCmp"),cle=mt(function(e,t){return e.data(t)},"data"),ule=mt(function(e,t){return e[t]()},"meta"),dle=[],ple=mt(function(e,t){return e.checks.every(function(e){return dle[e.type](e,t)})},"matches"),dle[Qoe.GROUP]=function(e,t){return"*"===(e=e.value)||e===t.group()},dle[Qoe.STATE]=function(e,t){return e=e.value,tle(e,t)},dle[Qoe.ID]=function(e,t){return e=e.value,t.id()===e},dle[Qoe.CLASS]=function(e,t){return e=e.value,t.hasClass(e)},dle[Qoe.META_COMPARE]=function(e,t){var r=e.field,i=e.operator,e=e.value;return ole(ule(t,r),i,e)},dle[Qoe.DATA_COMPARE]=function(e,t){var r=e.field,i=e.operator,e=e.value;return ole(cle(t,r),i,e)},dle[Qoe.DATA_BOOL]=function(e,t){var r=e.field,e=e.operator;return lle(cle(t,r),e)},dle[Qoe.DATA_EXIST]=function(e,t){return e=e.field,hle(cle(t,e))},dle[Qoe.UNDIRECTED_EDGE]=function(e,t){var r=e.nodes[0],e=e.nodes[1],i=t.source(),t=t.target();return ple(r,i)&&ple(e,t)||ple(e,i)&&ple(r,t)},dle[Qoe.NODE_NEIGHBOR]=function(t,e){return ple(t.node,e)&&e.neighborhood().some(function(e){return e.isNode()&&ple(t.neighbor,e)})},dle[Qoe.DIRECTED_EDGE]=function(e,t){return ple(e.source,t.source())&&ple(e.target,t.target())},dle[Qoe.NODE_SOURCE]=function(t,e){return ple(t.source,e)&&e.outgoers().some(function(e){return e.isNode()&&ple(t.target,e)})},dle[Qoe.NODE_TARGET]=function(t,e){return ple(t.target,e)&&e.incomers().some(function(e){return e.isNode()&&ple(t.source,e)})},dle[Qoe.CHILD]=function(e,t){return ple(e.child,t)&&ple(e.parent,t.parent())},dle[Qoe.PARENT]=function(t,e){return ple(t.parent,e)&&e.children().some(function(e){return ple(t.child,e)})},dle[Qoe.DESCENDANT]=function(t,e){return ple(t.descendant,e)&&e.ancestors().some(function(e){return ple(t.ancestor,e)})},dle[Qoe.ANCESTOR]=function(t,e){return ple(t.ancestor,e)&&e.descendants().some(function(e){return ple(t.descendant,e)})},dle[Qoe.COMPOUND_SPLIT]=function(e,t){return ple(e.subject,t)&&ple(e.left,t)&&ple(e.right,t)},dle[Qoe.TRUE]=function(){return!0},dle[Qoe.COLLECTION]=function(e,t){return e.value.has(t)},dle[Qoe.FILTER]=function(e,t){return(0,e.value)(t)},uue=mt(function(e){var t,i=this;return 1===i.length&&1===i[0].checks.length&&i[0].checks[0].type===Qoe.ID?e.getElementById(i[0].checks[0].value).collection():(t=mt(function(e){for(var t=0;t<i.length;t++){var r=i[t];if(ple(r,e))return!0}return!1},"selectorFunction"),null==i.text()&&(t=mt(function(){return!0},"selectorFunction")),e.filter(t))},"filter"),Oce=mt(function(e){for(var t=0;t<this.length;t++){var r=this[t];if(ple(r,e))return!0}return!1},"matches"),Ece={matches:Oce,filter:uue},gle=mt(function(e){this.inputText=e,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,null==e||Ete(e)&&e.match(/^\s*$/)||(Nte(e)?this.addQuery({checks:[{type:Qoe.COLLECTION,value:e.collection()}]}):Ste(e)?this.addQuery({checks:[{type:Qoe.FILTER,value:e}]}):Ete(e)?this.parse(e)||(this.invalid=!0):oie("A selector must be created from a string; found "))},"Selector"),fle=gle.prototype,[Bce,Ece].forEach(function(e){return Qte(fle,e)}),fle.text=function(){return this.inputText},fle.size=function(){return this.length},fle.eq=function(e){return this[e]},fle.sameText=function(e){return!this.invalid&&!e.invalid&&this.text()===e.text()},fle.addQuery=function(e){this[this.length++]=e},fle.selector=fle.toString,(oue={allAre:mt(function(e){var t=new gle(e);return this.every(function(e){return t.matches(e)})},"allAre"),is:mt(function(e){var t=new gle(e);return this.some(function(e){return t.matches(e)})},"is"),some:mt(function(e,t){for(var r=0;r<this.length;r++)if(t?e.apply(t,[this[r],r,this]):e(this[r],r,this))return!0;return!1},"some"),every:mt(function(e,t){for(var r=0;r<this.length;r++)if(!(t?e.apply(t,[this[r],r,this]):e(this[r],r,this)))return!1;return!0},"every"),same:mt(function(t){if(this===t)return!0;t=this.cy().collection(t);var e=this.length;return e===t.length&&(1===e?this[0]===t[0]:this.every(function(e){return t.hasElementWithId(e.id())}))},"same"),anySame:mt(function(t){return t=this.cy().collection(t),this.some(function(e){return t.hasElementWithId(e.id())})},"anySame"),allAreNeighbors:mt(function(e){e=this.cy().collection(e);var t=this.neighborhood();return e.every(function(e){return t.hasElementWithId(e.id())})},"allAreNeighbors"),contains:mt(function(e){e=this.cy().collection(e);var t=this;return e.every(function(e){return t.hasElementWithId(e.id())})},"contains")}).allAreNeighbours=oue.allAreNeighbors,oue.has=oue.contains,oue.equal=oue.equals=oue.same,Kce=mt(function(s,o){return mt(function(e,t,r,i){var n,a=e;return null==a?n="":Nte(a)&&1===a.length&&(n=a.id()),1===this.length&&n?(a=(a=(a=this[0]._private).traversalCache=a.traversalCache||{})[o]=a[o]||[])[n=Xre(n)]||(a[n]=s.call(this,e,t,r,i)):s.call(this,e,t,r,i)},"traversalCache")},"cache"),Fce={parent:mt(function(e){var t=[];if(1===this.length){var r=this[0]._private.parent;if(r)return r}for(var i=0;i<this.length;i++){var n=this[i]._private.parent;n&&t.push(n)}return this.spawn(t,!0).filter(e)},"parent"),parents:mt(function(e){for(var t=[],r=this.parent();r.nonempty();){for(var i=0;i<r.length;i++){var n=r[i];t.push(n)}r=r.parent()}return this.spawn(t,!0).filter(e)},"parents"),commonAncestors:mt(function(e){for(var t=0;t<this.length;t++)var r=this[t].parents(),i=(i=i||r).intersect(r);return i.filter(e)},"commonAncestors"),orphans:mt(function(e){return this.stdFilter(function(e){return e.isOrphan()}).filter(e)},"orphans"),nonorphans:mt(function(e){return this.stdFilter(function(e){return e.isChild()}).filter(e)},"nonorphans"),children:Kce(function(e){for(var t=[],r=0;r<this.length;r++)for(var i=this[r]._private.children,n=0;n<i.length;n++)t.push(i[n]);return this.spawn(t,!0).filter(e)},"children"),siblings:mt(function(e){return this.parent().children().not(this).filter(e)},"siblings"),isParent:mt(function(){var e=this[0];if(e)return e.isNode()&&0!==e._private.children.length},"isParent"),isChildless:mt(function(){var e=this[0];if(e)return e.isNode()&&0===e._private.children.length},"isChildless"),isChild:mt(function(){var e=this[0];if(e)return e.isNode()&&null!=e._private.parent},"isChild"),isOrphan:mt(function(){var e=this[0];if(e)return e.isNode()&&null==e._private.parent},"isOrphan"),descendants:mt(function(e){var i=[];function n(e){for(var t=0;t<e.length;t++){var r=e[t];i.push(r),r.children().nonempty()&&n(r.children())}}return mt(n,"add"),n(this.children()),this.spawn(i,!0).filter(e)},"descendants")},mt(RJ,"forEachCompound"),mt(IJ,"addChildren"),Fce.forEachDown=function(e){return RJ(this,e,!(1<arguments.length&&void 0!==arguments[1])||arguments[1],IJ)},mt(NJ,"addParent"),Fce.forEachUp=function(e){return RJ(this,e,!(1<arguments.length&&void 0!==arguments[1])||arguments[1],NJ)},mt(DJ,"addParentAndChildren"),Fce.forEachUpAndDown=function(e){return RJ(this,e,!(1<arguments.length&&void 0!==arguments[1])||arguments[1],DJ)},Fce.ancestors=Fce.parents,(Pce=zce={data:Xoe.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:Xoe.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Xoe.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Xoe.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Xoe.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Xoe.removeData({field:"rscratch",triggerEvent:!1}),id:mt(function(){var e=this[0];if(e)return e._private.data.id},"id")}).attr=Pce.data,Pce.removeAttr=Pce.removeData,Uhe=zce,mue={},mt(MJ,"defineDegreeFunction"),Qte(mue,{degree:MJ(function(e,t){return t.source().same(t.target())?2:1}),indegree:MJ(function(e,t){return t.target().same(e)?1:0}),outdegree:MJ(function(e,t){return t.source().same(e)?1:0})}),mt(OJ,"defineDegreeBoundsFunction"),Qte(mue,{minDegree:OJ("degree",function(e,t){return e<t}),maxDegree:OJ("degree",function(e,t){return t<e}),minIndegree:OJ("indegree",function(e,t){return e<t}),maxIndegree:OJ("indegree",function(e,t){return t<e}),minOutdegree:OJ("outdegree",function(e,t){return e<t}),maxOutdegree:OJ("outdegree",function(e,t){return t<e})}),Qte(mue,{totalDegree:mt(function(e){for(var t=0,r=this.nodes(),i=0;i<r.length;i++)t+=r[i].degree(e);return t},"totalDegree")}),mle=mt(function(e,t,r){for(var i=0;i<e.length;i++){var n,a=e[i];a.locked()||(n=a._private.position,n={x:null!=t.x?t.x-n.x:0,y:null!=t.y?t.y-n.y:0},!a.isParent()||0===n.x&&0===n.y||a.children().shift(n,r),a.dirtyBoundingBoxCache())}},"beforePositionSet"),_ce={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:mt(function(e){e.updateCompoundBounds()},"beforeGet"),beforeSet:mt(function(e,t){mle(e,t,!1)},"beforeSet"),onSet:mt(function(e){e.dirtyCompoundBoundsCache()},"onSet"),canSet:mt(function(e){return!e.locked()},"canSet")},(te=Mce={position:Xoe.data(_ce),silentPosition:Xoe.data(Qte({},_ce,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:mt(function(e,t){mle(e,t,!0)},"beforeSet"),onSet:mt(function(e){e.dirtyCompoundBoundsCache()},"onSet")})),positions:mt(function(e,t){if(Ate(e))t?this.silentPosition(e):this.position(e);else if(Ste(e)){var r=e;(e=this.cy()).startBatch();for(var i=0;i<this.length;i++){var n,a=this[i];(n=r(a,i))&&(t?a.silentPosition(n):a.position(n))}e.endBatch()}return this},"positions"),silentPositions:mt(function(e){return this.positions(e,!0)},"silentPositions"),shift:mt(function(e,t,r){var i;if(Ate(e)?(i={x:ce(e.x)?e.x:0,y:ce(e.y)?e.y:0},r=t):Ete(e)&&ce(t)&&((i={x:0,y:0})[e]=t),null!=i){var n=this.cy();n.startBatch();for(var a=0;a<this.length;a++){var s,o=this[a];n.hasCompoundNodes()&&o.isChild()&&o.ancestors().anySame(this)||(s={x:(s=o.position()).x+i.x,y:s.y+i.y},r?o.silentPosition(s):o.position(s))}n.endBatch()}return this},"shift"),silentShift:mt(function(e,t){return Ate(e)?this.shift(e,!0):Ete(e)&&ce(t)&&this.shift(e,t,!0),this},"silentShift"),renderedPosition:mt(function(e,t){var r=this[0],i=(s=this.cy()).zoom(),n=s.pan(),a=Ate(e)?e:void 0,s=void 0!==a||void 0!==t&&Ete(e);if(r&&r.isNode()){if(!s)return r=r.position(),a=$ie(r,i,n),void 0===e?a:a[e];for(var o=0;o<this.length;o++){var l=this[o];void 0!==t?l.position(e,(t-n[e])/i):void 0!==a&&l.position(Fie(a,i,n))}}else if(!s)return;return this},"renderedPosition"),relativePosition:mt(function(e,t){var r,i=this[0],n=this.cy(),a=Ate(e)?e:void 0,s=void 0!==a||void 0!==t&&Ete(e),o=n.hasCompoundNodes();if(i&&i.isNode()){if(!s)return n=i.position(),(r=(i=o?i.parent():null)&&0<i.length)&&(i=i[0]),r=r?i.position():{x:0,y:0},a={x:n.x-r.x,y:n.y-r.y},void 0===e?a:a[e];for(var l=0;l<this.length;l++){var h=this[l],c=o?h.parent():null,u=((u=c&&0<c.length)&&(c=c[0]),u?c.position():{x:0,y:0});void 0!==t?h.position(e,t+u[e]):void 0!==a&&h.position({x:a.x+u.x,y:a.y+u.y})}}else if(!s)return;return this},"relativePosition")}).modelPosition=te.point=te.position,te.modelPositions=te.points=te.positions,te.renderedPoint=te.renderedPosition,te.relativePoint=te.relativePosition,mce=Mce,Oce=$ce={renderedBoundingBox:function(e){var e=this.boundingBox(e),t=(r=this.cy()).zoom(),r=r.pan(),i=e.x1*t+r.x,n=e.x2*t+r.x,a=e.y1*t+r.y;return{x1:i,x2:n,y1:a,y2:e=e.y2*t+r.y,w:n-i,h:e-a}},dirtyCompoundBoundsCache:function(){var r=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e=this.cy();return e.styleEnabled()&&e.hasCompoundNodes()&&this.forEachUp(function(e){var t;e.isParent()&&((t=e._private).compoundBoundsClean=!1,t.bbCache=null,r||e.emitAndNotify("bounds"))}),this},updateCompoundBounds:function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=this.cy();if(t.styleEnabled()&&t.hasCompoundNodes()&&(e||!t.batching())){mt(a,"update");for(var r=0;r<this.length;r++){var i=this[r],n=i._private;n.compoundBoundsClean&&!e||(a(i),t.batching())||(n.compoundBoundsClean=!0)}}return this;function a(e){var t,r,i,n,a,s,o,l;function h(e,t,r){var i=0,n=0,a=t+r;return 0<e&&0<a&&(i=t/a*e,n=r/a*e),{biasDiff:i,biasComplementDiff:n}}function c(e,t,r,i){if("%"!==r.units)return"px"===r.units?r.pfValue:0;switch(i){case"width":return 0<e?r.pfValue*e:0;case"height":return 0<t?r.pfValue*t:0;case"average":return 0<e&&0<t?r.pfValue*(e+t)/2:0;case"min":return 0<e&&0<t?t<e?r.pfValue*t:r.pfValue*e:0;case"max":return 0<e&&0<t?t<e?r.pfValue*e:r.pfValue*t:0;default:return 0}}e.isParent()&&(t=e._private,i=e.children(),n="include"===e.pstyle("compound-sizing-wrt-labels").value,r={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},i=i.boundingBox({includeLabels:n,includeOverlays:!1,useCache:!1}),n=t.position,0!==i.w&&0!==i.h||((i={w:e.pstyle("width").pfValue,h:e.pstyle("height").pfValue}).x1=n.x-i.w/2,i.x2=n.x+i.w/2,i.y1=n.y-i.h/2,i.y2=n.y+i.h/2),mt(h,"computeBiasValues"),mt(c,"computePaddingValues"),s=r.width.left.value,"px"===r.width.left.units&&0<r.width.val&&(s=100*s/r.width.val),a=r.width.right.value,"px"===r.width.right.units&&0<r.width.val&&(a=100*a/r.width.val),l=r.height.top.value,"px"===r.height.top.units&&0<r.height.val&&(l=100*l/r.height.val),o=r.height.bottom.value,"px"===r.height.bottom.units&&0<r.height.val&&(o=100*o/r.height.val),a=(s=h(r.width.val-i.w,s,a)).biasDiff,s=s.biasComplementDiff,o=(l=h(r.height.val-i.h,l,o)).biasDiff,l=l.biasComplementDiff,t.autoPadding=c(i.w,i.h,e.pstyle("padding"),e.pstyle("padding-relative-to").value),t.autoWidth=Math.max(i.w,r.width.val),n.x=(-a+i.x1+i.x2+s)/2,t.autoHeight=Math.max(i.h,r.height.val),n.y=(-o+i.y1+i.y2+l)/2)}}},yle=mt(function(e){return e===1/0||e===-1/0?0:e},"noninf"),vle=mt(function(e,t,r,i,n){i-t!=0&&n-r!=0&&null!=t&&null!=r&&null!=i&&null!=n&&(e.x1=t<e.x1?t:e.x1,e.x2=e.x2<i?i:e.x2,e.y1=r<e.y1?r:e.y1,e.y2=e.y2<n?n:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},"updateBounds"),xle=mt(function(e,t){return null==t?e:vle(e,t.x1,t.y1,t.x2,t.y2)},"updateBoundsFromBox"),ble=mt(function(e,t,r){return xie(e,t,r)},"prefixedProperty"),Tle=mt(function(e,t,r){var i,n,a,s;t.cy().headless()||(i=(a=(s=t._private).rstyle).arrowWidth/2,"none"!==t.pstyle(r+"-arrow-shape").value&&(t="source"===r?(n=a.srcX,a.srcY):"target"===r?(n=a.tgtX,a.tgtY):(n=a.midX,a.midY),(s=(a=s.arrowBounds=s.arrowBounds||{})[r]=a[r]||{}).x1=n-i,s.y1=t-i,s.x2=n+i,s.y2=t+i,s.w=s.x2-s.x1,s.h=s.y2-s.y1,one(s,1),vle(e,s.x1,s.y1,s.x2,s.y2)))},"updateBoundsFromArrow"),kle=mt(function(e,t,r){if(!t.cy().headless()){var i=t._private,n=i.rstyle;if(t.pstyle((p=r?r+"-":"")+"label").strValue){var a=t.pstyle("text-halign"),s=t.pstyle("text-valign"),o=ble(n,"labelWidth",r),l=ble(n,"labelHeight",r),h=ble(n,"labelX",r),c=ble(n,"labelY",r),n=t.pstyle(p+"text-margin-x").pfValue,u=t.pstyle(p+"text-margin-y").pfValue,d=t.isEdge(),p=t.pstyle(p+"text-rotation"),g=t.pstyle("text-outline-width").pfValue,f=t.pstyle("text-border-width").pfValue/2,t=t.pstyle("text-background-padding").pfValue,m=l,y=o,v=y/2,x=m/2;if(d)C=h-v,E=h+v,S=c-x,_=c+x;else{switch(a.value){case"left":C=h-y,E=h;break;case"center":C=h-v,E=h+v;break;case"right":E=(C=h)+y}switch(s.value){case"top":S=c-m,_=c;break;case"center":S=c-x,_=c+x;break;case"bottom":_=(S=c)+m}}if(C+=l=n-Math.max(g,f)-t-2,E+=o=n+Math.max(g,f)+t+2,S+=n=u-Math.max(g,f)-t-2,_+=u=u+Math.max(g,f)+t+2,(t=(f=i.labelBounds)[g=r||"main"]=f[g]||{}).x1=C,t.y1=S,t.x2=E,t.y2=_,t.w=E-C,t.h=_-S,t.leftPad=l,t.rightPad=o,t.topPad=n,t.botPad=u,l=d&&"autorotate"===p.strValue,o=null!=p.pfValue&&0!==p.pfValue,l||o){var n=l?ble(i.rstyle,"labelAngle",r):p.pfValue,b=Math.cos(n),T=Math.sin(n),k=(C+E)/2,w=(S+_)/2;if(!d){switch(a.value){case"left":k=E;break;case"right":k=C}switch(s.value){case"top":w=_;break;case"bottom":w=S}}var u=(t=mt(function(e,t){return{x:(e-=k)*b-(t-=w)*T+k,y:e*T+t*b+w}},"rotate"))(C,S),o=t(C,_),l=t(E,S),r=t(E,_),C=Math.min(u.x,o.x,l.x,r.x),E=Math.max(u.x,o.x,l.x,r.x),S=Math.min(u.y,o.y,l.y,r.y),_=Math.max(u.y,o.y,l.y,r.y)}(n=f[p=g+"Rot"]=f[p]||{}).x1=C,n.y1=S,n.x2=E,n.y2=_,n.w=E-C,n.h=_-S,vle(e,C,S,E,_),vle(i.labelBounds.all,C,S,E,_)}return e}},"updateBoundsFromLabel"),wle=mt(function(e,t){var r,i;t.cy().headless()||(r=t.pstyle("outline-opacity").value,i=t.pstyle("outline-width").value+t.pstyle("outline-offset").value,Cle(e,t,r,i,"outside",i/2))},"updateBoundsFromOutline"),Cle=mt(function(e,t,r,i,n,a){var s,o,l;0===r||i<=0||"inside"===n||(r=t.cy(),o=t.pstyle("shape").value,r=r.renderer().nodeShapes[o],s=(o=t.position()).x,o=o.y,l=t.width(),t=t.height(),r.hasMiterBounds?("center"===n&&(i/=2),n=r.miterBounds(s,o,l,t,i),xle(e,n)):null!=a&&0<a&&lne(e,[a,a,a,a]))},"updateBoundsFromMiter"),Ele=mt(function(e,t){var r,i,n;t.cy().headless()||(r=t.pstyle("border-opacity").value,i=t.pstyle("border-width").pfValue,n=t.pstyle("border-position").value,Cle(e,t,r,i,n))},"updateBoundsFromMiterBorder"),Sle=mt(function(e,t){var r=(i=e._private.cy).styleEnabled(),i=i.headless(),n=rne(),a=e._private,s=e.isNode(),o=e.isEdge(),l=a.rstyle,h=s&&r?e.pstyle("bounds-expansion").pfValue:[0],c=mt(function(e){return"none"!==e.pstyle("display").value},"isDisplayed");if(c=!r||c(e)&&(!o||c(e.source())&&c(e.target()))){var u=0,d=(r&&t.includeOverlays&&0!==e.pstyle("overlay-opacity").value&&(u=e.pstyle("overlay-padding").value),0),u=(r&&t.includeUnderlays&&0!==e.pstyle("underlay-opacity").value&&(d=e.pstyle("underlay-padding").value),Math.max(u,d)),p=0;if(r&&(p=e.pstyle("width").pfValue/2),s&&t.includeNodes){var s=(d=e.position()).x,d=d.y,g=e.outerWidth()/2,f=e.outerHeight()/2;vle(n,y=s-g,x=d-f,v=s+g,b=d+f),r&&wle(n,e),r&&t.includeOutlines&&!i&&wle(n,e),r&&Ele(n,e)}else if(o&&t.includeEdges)if(r&&!i){var m,s=e.pstyle("curve-style").strValue,y=Math.min(l.srcX,l.midX,l.tgtX),v=Math.max(l.srcX,l.midX,l.tgtX),x=Math.min(l.srcY,l.midY,l.tgtY),b=Math.max(l.srcY,l.midY,l.tgtY);if(vle(n,y-=p,x-=p,v+=p,b+=p),"haystack"===s)(g=l.haystackPts)&&2===g.length&&(y=g[0].x,x=g[0].y,(v=g[1].x)<y&&(d=y,y=v,v=d),(b=g[1].y)<x&&(f=x,x=b,b=f),vle(n,y-p,x-p,v+p,b+p));else if("bezier"===s||"unbundled-bezier"===s||Hte(s,"segments")||Hte(s,"taxi")){switch(s){case"bezier":case"unbundled-bezier":m=l.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":m=l.linePts}if(null!=m)for(var T=0;T<m.length;T++){var k=m[T],y=k.x-p;vle(n,y,x=k.y-p,v=k.x+p,b=k.y+p)}}}else i=e.source().position(),d=e.target().position(),y=i.x,v=d.x,x=i.y,v<y&&(g=y,y=v,v=g),(b=d.y)<x&&(f=x,x=b,b=f),vle(n,y-=p,x-=p,v+=p,b+=p);r&&t.includeEdges&&o&&(Tle(n,e,"mid-source"),Tle(n,e,"mid-target"),Tle(n,e,"source"),Tle(n,e,"target")),r&&"yes"===e.pstyle("ghost").value&&(s=e.pstyle("ghost-offset-x").pfValue,i=e.pstyle("ghost-offset-y").pfValue,vle(n,n.x1+s,n.y1+i,n.x2+s,n.y2+i)),g=a.bodyBounds=a.bodyBounds||{},hne(g,n),lne(g,h),one(g,1),r&&(y=n.x1,v=n.x2,x=n.y1,b=n.y2,vle(n,y-u,x-u,v+u,b+u)),d=a.overlayBounds=a.overlayBounds||{},hne(d,n),lne(d,h),one(d,1),null!=(f=a.labelBounds=a.labelBounds||{}).all?nne(f.all):f.all=rne(),r&&t.includeLabels&&(t.includeMainLabels&&kle(n,e,null),o)&&(t.includeSourceLabels&&kle(n,e,"source"),t.includeTargetLabels)&&kle(n,e,"target")}return n.x1=yle(n.x1),n.y1=yle(n.y1),n.x2=yle(n.x2),n.y2=yle(n.y2),n.w=yle(n.x2-n.x1),n.h=yle(n.y2-n.y1),0<n.w&&0<n.h&&c&&(lne(n,h),one(n,1)),n},"boundingBoxImpl"),_le=mt(function(e){var t=0,r=mt(function(e){return(e?1:0)<<t++},"tf"),i=0;return(i+=r(e.incudeNodes))+r(e.includeEdges)+r(e.includeLabels)+r(e.includeMainLabels)+r(e.includeSourceLabels)+r(e.includeTargetLabels)+r(e.includeOverlays)+r(e.includeOutlines)},"getKey"),Ale=mt(function(e){var t,r,i=mt(function(e){return Math.round(e)},"r");return e.isEdge()?(r=e.source().position(),t=e.target().position(),Hre([i(r.x),i(r.y),i(t.x),i(t.y)])):(r=e.position(),Hre([i(r.x),i(r.y)]))},"getBoundingBoxPosKey"),Lle=mt(function(e,t){var r,i=e._private,n=e.isEdge(),a=(null==t?Ile:_le(t))===Ile;return null==i.bbCache?(r=Sle(e,Rle),i.bbCache=r,i.bbCachePosKey=Ale(e)):r=i.bbCache,a||(a=e.isNode(),r=rne(),(t.includeNodes&&a||t.includeEdges&&!a)&&(t.includeOverlays?xle(r,i.overlayBounds):xle(r,i.bodyBounds)),t.includeLabels&&(t.includeMainLabels&&(!n||t.includeSourceLabels&&t.includeTargetLabels)?xle(r,i.labelBounds.all):(t.includeMainLabels&&xle(r,i.labelBounds.mainRot),t.includeSourceLabels&&xle(r,i.labelBounds.sourceRot),t.includeTargetLabels&&xle(r,i.labelBounds.targetRot))),r.w=r.x2-r.x1,r.h=r.y2-r.y1),r},"cachedBoundingBoxImpl"),Ile=_le(Rle={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0}),Nle=lue(Rle),$ce.boundingBox=function(e){var t=void 0===e||void 0===e.useCache||!0===e.useCache,r=Ute(function(e){var t=e._private;return null==t.bbCache||t.styleDirty||t.bbCachePosKey!==Ale(e)},function(e){return e.id()});if(t&&1===this.length&&!r(this[0]))e=void 0===e?Rle:Nle(e),i=Lle(this[0],e);else{var i=rne(),n=Nle(e=e||Rle),e=this.cy().styleEnabled();this.edges().forEach(r),this.nodes().forEach(r),e&&this.recalculateRenderedStyle(t),this.updateCompoundBounds(!t);for(var a=0;a<this.length;a++){var s=this[a];r(s)&&s.dirtyBoundingBoxCache(),xle(i,Lle(s,n))}}return i.x1=yle(i.x1),i.y1=yle(i.y1),i.x2=yle(i.x2),i.y2=yle(i.y2),i.w=yle(i.x2-i.x1),i.h=yle(i.y2-i.y1),i},$ce.dirtyBoundingBoxCache=function(){for(var e=0;e<this.length;e++){var t=this[e]._private;t.bbCache=null,t.bbCachePosKey=null,t.bodyBounds=null,t.overlayBounds=null,t.labelBounds.all=null,t.labelBounds.source=null,t.labelBounds.target=null,t.labelBounds.main=null,t.labelBounds.sourceRot=null,t.labelBounds.targetRot=null,t.labelBounds.mainRot=null,t.arrowBounds.source=null,t.arrowBounds.target=null,t.arrowBounds["mid-source"]=null,t.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this},$ce.boundingBoxAt=function(r){var e,t=this.nodes(),i=this.cy(),n=i.hasCompoundNodes(),a=i.collection(),s=(n&&(a=t.filter(function(e){return e.isParent()}),t=t.not(a)),Ate(r)&&(e=r,r=mt(function(){return e},"fn")),mt(function(e,t){return e._private.bbAtOldPos=r(e,t)},"storeOldPos")),o=mt(function(e){return e._private.bbAtOldPos},"getOldPos"),s=(i.startBatch(),t.forEach(s).silentPositions(r),n&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0)),ine(this.boundingBox({useCache:!1})));return t.silentPositions(o),n&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0)),i.endBatch(),s},Oce.boundingbox=Oce.bb=Oce.boundingBox,Oce.renderedBoundingbox=Oce.renderedBoundingBox,uue=$ce,Dle=Bce={},(Ece=mt(function(i){i.uppercaseName=Yte(i.name),i.autoName="auto"+i.uppercaseName,i.labelName="label"+i.uppercaseName,i.outerName="outer"+i.uppercaseName,i.uppercaseOuterName=Yte(i.outerName),Dle[i.name]=mt(function(){var e=this[0],t=e._private,r=t.cy._private.styleEnabled;if(e)return r?e.isParent()?(e.updateCompoundBounds(),t[i.autoName]||0):"label"!==(r=e.pstyle(i.name)).strValue?r.pfValue:(e.recalculateRenderedStyle(),t.rstyle[i.labelName]||0):1},"dimImpl"),Dle["outer"+i.uppercaseName]=mt(function(){var e=this[0],t=e._private.cy._private.styleEnabled;if(e)return t?e[i.name]()+("center"===(t=e.pstyle("border-position").value)?e.pstyle("border-width").pfValue:"outside"===t?2*e.pstyle("border-width").pfValue:0)+2*e.padding():1},"outerDimImpl"),Dle["rendered"+i.uppercaseName]=mt(function(){var e=this[0];if(e)return e[i.name]()*this.cy().zoom()},"renderedDimImpl"),Dle["rendered"+i.uppercaseOuterName]=mt(function(){var e=this[0];if(e)return e[i.outerName]()*this.cy().zoom()},"renderedOuterDimImpl")},"defineDimFns"))({name:"width"}),Ece({name:"height"}),Bce.padding=function(){var e=this[0],t=e._private;return e.isParent()&&(e.updateCompoundBounds(),void 0!==t.autoPadding)?t.autoPadding:e.pstyle("padding").pfValue},Bce.paddedHeight=function(){var e=this[0];return e.height()+2*e.padding()},Bce.paddedWidth=function(){var e=this[0];return e.width()+2*e.padding()},Pce=Bce,Mle=mt(function(e,t){if(e.isEdge()&&e.takesUpSpace())return t(e)},"ifEdge"),Ole=mt(function(e,t){var r;if(e.isEdge()&&e.takesUpSpace())return r=e.cy(),$ie(t(e),r.zoom(),r.pan())},"ifEdgeRenderedPosition"),Ble=mt(function(e,t){var r,i,n;if(e.isEdge()&&e.takesUpSpace())return r=e.cy(),i=r.pan(),n=r.zoom(),t(e).map(function(e){return $ie(e,n,i)})},"ifEdgeRenderedPositions"),zce=mt(function(e){return e.renderer().getControlPoints(e)},"controlPoints"),_ce=mt(function(e){return e.renderer().getSegmentPoints(e)},"segmentPoints"),te=mt(function(e){return e.renderer().getSourceEndpoint(e)},"sourceEndpoint"),Mce=mt(function(e){return e.renderer().getTargetEndpoint(e)},"targetEndpoint"),Oce=mt(function(e){return e.renderer().getEdgeMidpoint(e)},"midpoint"),Ple={controlPoints:{get:zce,mult:!0},segmentPoints:{get:_ce,mult:!0},sourceEndpoint:{get:te},targetEndpoint:{get:Mce},midpoint:{get:Oce}},$le=mt(function(e){return"rendered"+e[0].toUpperCase()+e.substr(1)},"renderedName"),$ce=Object.keys(Ple).reduce(function(e,t){var r=Ple[t],i=$le(t);return e[t]=function(){return Mle(this,r.get)},r.mult?e[i]=function(){return Ble(this,r.get)}:e[i]=function(){return Ole(this,r.get)},e},{}),Ece=Qte({},mce,uue,Pce,$ce),Fle=mt(function(e,t){this.recycle(e,t)},"Event"),mt(BJ,"returnFalse"),mt(PJ,"returnTrue"),Fle.prototype={instanceString:mt(function(){return"event"},"instanceString"),recycle:mt(function(e,t){var r,i;this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=BJ,null!=e&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?PJ:BJ):null!=e&&e.type?t=e:this.type=e,null!=t&&(this.originalEvent=t.originalEvent,this.type=(null!=t.type?t:this).type,this.cy=t.cy,this.target=t.target,this.position=t.position,this.renderedPosition=t.renderedPosition,this.namespace=t.namespace,this.layout=t.layout),null!=this.cy&&null!=this.position&&null==this.renderedPosition&&(t=this.position,r=this.cy.zoom(),i=this.cy.pan(),this.renderedPosition={x:t.x*r+i.x,y:t.y*r+i.y}),this.timeStamp=e&&e.timeStamp||Date.now()},"recycle"),preventDefault:mt(function(){this.isDefaultPrevented=PJ;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},"preventDefault"),stopPropagation:mt(function(){this.isPropagationStopped=PJ;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},"stopPropagation"),stopImmediatePropagation:mt(function(){this.isImmediatePropagationStopped=PJ,this.stopPropagation()},"stopImmediatePropagation"),isDefaultPrevented:BJ,isPropagationStopped:BJ,isImmediatePropagationStopped:BJ},zle=/^([^.]+)(\.(?:[^.]+))?$/,qle={qualifierCompare:mt(function(e,t){return e===t},"qualifierCompare"),eventMatches:mt(function(){return!0},"eventMatches"),addEventFields:mt(function(){},"addEventFields"),callbackContext:mt(function(e){return e},"callbackContext"),beforeEmit:mt(function(){},"beforeEmit"),afterEmit:mt(function(){},"afterEmit"),bubble:mt(function(){return!1},"bubble"),parent:mt(function(){return null},"parent"),context:null},Wle=Object.keys(qle),Ule={},mt($J,"Emitter"),Bce=$J.prototype,Gle=mt(function(e,t,r,i,n,a,s){Ste(i)&&(n=i,i=null),s&&(a=null==a?s:Qte({},a,s));for(var o=_te(r)?r:r.split(/\s+/),l=0;l<o.length;l++){var h=o[l];if(!$te(h)){var c=h.match(zle);if(c&&!1===t(e,h,c[1],c[2]||null,i,n,a))break}}},"forEachEvent"),jle=mt(function(e,t){return e.addEventFields(e.context,t),new Fle(t.type,t)},"makeEventObj"),Vle=mt(function(e,t,r){if(Pte(r))t(e,r);else if(Ate(r))t(e,jle(e,r));else for(var i=_te(r)?r:r.split(/\s+/),n=0;n<i.length;n++){var a,s=i[n];$te(s)||(s=s.match(zle))&&(a=s[1],s=s[2]||null,t(e,jle(e,{type:a,namespace:s,target:e.context})))}},"forEachEventObj"),Bce.on=Bce.addListener=function(e,t,r,i,n){return Gle(this,function(e,t,r,i,n,a,s){Ste(a)&&e.listeners.push({event:t,callback:a,type:r,namespace:i,qualifier:n,conf:s})},e,t,r,i,n),this},Bce.one=function(e,t,r,i){return this.on(e,t,r,i,{one:!0})},Bce.removeListener=Bce.off=function(l,e,t,r){var i=this;0!==this.emitting&&(this.listeners=die(this.listeners));for(var h=this.listeners,n=mt(function(s){var o=h[s];Gle(i,function(e,t,r,i,n,a){if((o.type===r||"*"===l)&&(!i&&".*"!==o.namespace||o.namespace===i)&&(!n||e.qualifierCompare(o.qualifier,n))&&(!a||o.callback===a))return h.splice(s,1),!1},l,e,t,r)},"_loop"),a=h.length-1;0<=a;a--)n(a);return this},Bce.removeAllListeners=function(){return this.removeListener("*")},Bce.emit=Bce.trigger=function(e,s,t){var o=this.listeners,r=o.length;return this.emitting++,_te(s)||(s=[s]),Vle(this,function(i,n){null!=t&&(o=[{event:n.event,type:n.type,namespace:n.namespace,callback:t}],r=o.length);for(var e=mt(function(){var e,t,r=o[a];r.type!==n.type||r.namespace&&r.namespace!==n.namespace&&".*"!==r.namespace||!i.eventMatches(i.context,r,n)||(e=[n],null!=s&&vie(e,s),i.beforeEmit(i.context,r,n),r.conf&&r.conf.one&&(i.listeners=i.listeners.filter(function(e){return e!==r})),t=i.callbackContext(i.context,r,n),t=r.callback.apply(t,e),i.afterEmit(i.context,r,n),!1===t&&(n.stopPropagation(),n.preventDefault()))},"_loop2"),a=0;a<r;a++)e();i.bubble(i.context)&&!n.isPropagationStopped()&&i.parent(i.context).emit(n,s)},e),this.emitting--,this},Yle={qualifierCompare:mt(function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},"qualifierCompare"),eventMatches:mt(function(e,t,r){return null==(t=t.qualifier)||e!==r.target&&Dte(r.target)&&t.matches(r.target)},"eventMatches"),addEventFields:mt(function(e,t){t.cy=e.cy(),t.target=e},"addEventFields"),callbackContext:mt(function(e,t,r){return null!=t.qualifier?r.target:e},"callbackContext"),beforeEmit:mt(function(e,t){t.conf&&t.conf.once&&t.conf.onceCollection.removeListener(t.event,t.qualifier,t.callback)},"beforeEmit"),bubble:mt(function(){return!0},"bubble"),parent:mt(function(e){return e.isChild()?e.parent():e.cy()},"parent")},Hle=mt(function(e){return Ete(e)?new gle(e):e},"argSelector"),zce={createEmitter:mt(function(){for(var e=0;e<this.length;e++){var t=this[e],r=t._private;r.emitter||(r.emitter=new $J(Yle,t))}return this},"createEmitter"),emitter:mt(function(){return this._private.emitter},"emitter"),on:mt(function(e,t,r){for(var i=Hle(t),n=0;n<this.length;n++)this[n].emitter().on(e,i,r);return this},"on"),removeListener:mt(function(e,t,r){for(var i=Hle(t),n=0;n<this.length;n++)this[n].emitter().removeListener(e,i,r);return this},"removeListener"),removeAllListeners:mt(function(){for(var e=0;e<this.length;e++)this[e].emitter().removeAllListeners();return this},"removeAllListeners"),one:mt(function(e,t,r){for(var i=Hle(t),n=0;n<this.length;n++)this[n].emitter().one(e,i,r);return this},"one"),once:mt(function(e,t,r){for(var i=Hle(t),n=0;n<this.length;n++)this[n].emitter().on(e,i,r,{once:!0,onceCollection:this})},"once"),emit:mt(function(e,t){for(var r=0;r<this.length;r++)this[r].emitter().emit(e,t);return this},"emit"),emitAndNotify:mt(function(e,t){if(0!==this.length)return this.cy().notify(e,this),this.emit(e,t),this},"emitAndNotify")},Xoe.eventAliasesOn(zce),_ce={nodes:mt(function(e){return this.filter(function(e){return e.isNode()}).filter(e)},"nodes"),edges:mt(function(e){return this.filter(function(e){return e.isEdge()}).filter(e)},"edges"),byGroup:mt(function(){for(var e=this.spawn(),t=this.spawn(),r=0;r<this.length;r++){var i=this[r];(i.isNode()?e:t).push(i)}return{nodes:e,edges:t}},"byGroup"),filter:mt(function(e,t){if(void 0===e)return this;if(Ete(e)||Nte(e))return new gle(e).filter(this);if(Ste(e)){for(var r=this.spawn(),i=0;i<this.length;i++){var n=this[i];(t?e.apply(t,[n,i,this]):e(n,i,this))&&r.push(n)}return r}return this.spawn()},"filter"),not:mt(function(e){if(e){Ete(e)&&(e=this.filter(e));for(var t=this.spawn(),r=0;r<this.length;r++){var i=this[r];e.has(i)||t.push(i)}return t}return this},"not"),absoluteComplement:mt(function(){return this.cy().mutableElements().not(this)},"absoluteComplement"),intersect:mt(function(e){if(Ete(e))return this.filter(e);for(var t=this.spawn(),r=this.length<e.length,i=r?this:e,n=r?e:this,a=0;a<i.length;a++){var s=i[a];n.has(s)&&t.push(s)}return t},"intersect"),xor:mt(function(e){var t=this._private.cy,a=(Ete(e)&&(e=t.$(e)),this.spawn()),t=e;return(e=mt(function(e,t){for(var r=0;r<e.length;r++){var i=e[r],n=i._private.data.id;t.hasElementWithId(n)||a.push(i)}},"add"))(this,t),e(t,this),a},"xor"),diff:mt(function(e){var t=this._private.cy,t=(Ete(e)&&(e=t.$(e)),this.spawn()),r=this.spawn(),s=this.spawn(),i=mt(function(e,t,r){for(var i=0;i<e.length;i++){var n=e[i],a=n._private.data.id;t.hasElementWithId(a)?s.merge(n):r.push(n)}},"add");return i(this,e,t),i(e,this,r),{left:t,right:r,both:s}},"diff"),add:mt(function(e){var t,r=this._private.cy;if(!e)return this;Ete(e)&&(t=e,e=r.mutableElements().filter(t));for(var i=this.spawnSelf(),n=0;n<e.length;n++){var a=e[n];this.has(a)||i.push(a)}return i},"add"),merge:mt(function(e){var t,r=this._private,i=r.cy;if(e){Ete(e)&&(t=e,e=i.mutableElements().filter(t));for(var n=r.map,a=0;a<e.length;a++){var s,o=e[a],l=o._private.data.id;n.has(l)||(s=this.length++,this[s]=o,n.set(l,{ele:o,index:s}))}}return this},"merge"),unmergeAt:mt(function(e){var t,r,i=this[e].id(),n=this._private.map,i=(this[e]=void 0,n.delete(i),e===this.length-1);return 1<this.length&&!i&&(r=(t=this[i=this.length-1])._private.data.id,this[i]=void 0,this[e]=t,n.set(r,{ele:t,index:e})),this.length--,this},"unmergeAt"),unmergeOne:mt(function(e){e=e[0];var t=this._private,e=e._private.data.id;return(t=t.map.get(e))&&(e=t.index,this.unmergeAt(e)),this},"unmergeOne"),unmerge:mt(function(e){var t,r=this._private.cy;if(e){Ete(e)&&(t=e,e=r.mutableElements().filter(t));for(var i=0;i<e.length;i++)this.unmergeOne(e[i])}return this},"unmerge"),unmergeBy:mt(function(e){for(var t=this.length-1;0<=t;t--)e(this[t])&&this.unmergeAt(t);return this},"unmergeBy"),map:mt(function(e,t){for(var r=[],i=0;i<this.length;i++){var n=this[i],n=t?e.apply(t,[n,i,this]):e(n,i,this);r.push(n)}return r},"map"),reduce:mt(function(e,t){for(var r=t,i=0;i<this.length;i++)r=e(r,this[i],i,this);return r},"reduce"),max:mt(function(e,t){for(var r,i=-1/0,n=0;n<this.length;n++){var a=this[n],s=t?e.apply(t,[a,n,this]):e(a,n,this);i<s&&(i=s,r=a)}return{value:i,ele:r}},"max"),min:mt(function(e,t){for(var r,i=1/0,n=0;n<this.length;n++){var a=this[n],s=t?e.apply(t,[a,n,this]):e(a,n,this);s<i&&(i=s,r=a)}return{value:i,ele:r}},"min")},(te=_ce).u=te["|"]=te["+"]=te.union=te.or=te.add,te["\\"]=te["!"]=te["-"]=te.difference=te.relativeComplement=te.subtract=te.not,te.n=te["&"]=te["."]=te.and=te.intersection=te.intersect,te["^"]=te["(+)"]=te["(-)"]=te.symmetricDifference=te.symdiff=te.xor,te.fnFilter=te.filterFn=te.stdFilter=te.filter,te.complement=te.abscomp=te.absoluteComplement,Mce={isNode:mt(function(){return"nodes"===this.group()},"isNode"),isEdge:mt(function(){return"edges"===this.group()},"isEdge"),isLoop:mt(function(){return this.isEdge()&&this.source()[0]===this.target()[0]},"isLoop"),isSimple:mt(function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},"isSimple"),group:mt(function(){var e=this[0];if(e)return e._private.group},"group")},Xle=mt(function(e,t){var r=e.cy().hasCompoundNodes();function i(e){var t=e.pstyle("z-compound-depth");return"auto"===t.value?r?e.zDepth():0:"bottom"===t.value?-1:"top"===t.value?rie:0}mt(i,"getDepth");var n=i(e)-i(t);return 0!=n||(mt(a,"getEleDepth"),0!=(n=a(e)-a(t)))||0!=(n=e.pstyle("z-index").value-t.pstyle("z-index").value)?n:e.poolIndex()-t.poolIndex();function a(e){return"auto"===e.pstyle("z-index-compare").value&&e.isNode()?1:0}},"zIndexSort"),(Kle={forEach:mt(function(e,t){if(Ste(e))for(var r=this.length,i=0;i<r;i++){var n=this[i];if(!1===(t?e.apply(t,[n,i,this]):e(n,i,this)))break}return this},"forEach"),toArray:mt(function(){for(var e=[],t=0;t<this.length;t++)e.push(this[t]);return e},"toArray"),slice:mt(function(e,t){var r=[],i=this.length;(t=null==t?i:t)<0&&(t=i+t);for(var n=e=(e=null==e?0:e)<0?i+e:e;0<=n&&n<t&&n<i;n++)r.push(this[n]);return this.spawn(r)},"slice"),size:mt(function(){return this.length},"size"),eq:mt(function(e){return this[e]||this.spawn()},"eq"),first:mt(function(){return this[0]||this.spawn()},"first"),last:mt(function(){return this[this.length-1]||this.spawn()},"last"),empty:mt(function(){return 0===this.length},"empty"),nonempty:mt(function(){return!this.empty()},"nonempty"),sort:mt(function(e){return Ste(e)?(e=this.toArray().sort(e),this.spawn(e)):this},"sort"),sortByZIndex:mt(function(){return this.sort(Xle)},"sortByZIndex"),zDepth:mt(function(){var e,t,r=this[0];if(r)return"nodes"===(t=r._private).group?(e=t.data.parent?r.parents().size():0,r.isParent()?e:rie-1):(r=t.source,e=t.target,t=r.zDepth(),r=e.zDepth(),Math.max(t,r,0))},"zDepth")}).each=Kle.forEach,mt(function(){"undefined"!=("u"<typeof Symbol?"undefined":lQ(Symbol))&&"undefined"!=lQ(Symbol.iterator)&&(Kle[Symbol.iterator]=function(){var e=this,t={value:void 0,done:!1},r=0,i=this.length;return JZ({next:mt(function(){return r<i?t.value=e[r++]:(t.value=void 0,t.done=!0),t},"next")},Symbol.iterator,function(){return this})})},"defineSymbolIterator")(),Zle=lue({nodeDimensionsIncludeLabels:!1}),(Oce={layoutDimensions:mt(function(e){return e=Zle(e),0!==(e=this.takesUpSpace()?e.nodeDimensionsIncludeLabels?{w:(e=this.boundingBox()).w,h:e.h}:{w:this.outerWidth(),h:this.outerHeight()}:{w:0,h:0}).w&&0!==e.h||(e.w=e.h=1),e},"layoutDimensions"),layoutPositions:mt(function(e,i,t){var n=this.nodes().filter(function(e){return!e.isParent()}),r=this.cy(),a=i.eles,s=mt(function(e){return e.id()},"getMemoizeKey"),o=Ute(t,s),l=(e.emit({type:"layoutstart",layout:e}),e.animations=[],mt(function(e,t,r){var i=t.x1+t.w/2,t=t.y1+t.h/2;return{x:i+(r.x-i)*e,y:t+(r.y-t)*e}},"calculateSpacing")),h=i.spacingFactor&&1!==i.spacingFactor,c=mt(function(){if(!h)return null;for(var e=rne(),t=0;t<n.length;t++){var r=n[t],r=o(r,t);sne(e,r.x,r.y)}return e},"spacingBb")(),u=Ute(function(e,t){var r,t=o(e,t);return h&&(r=Math.abs(i.spacingFactor),t=l(r,c,t)),null!=i.transform?i.transform(e,t):t},s);if(i.animate){for(var d=0;d<n.length;d++){var p,g=n[d],f=u(g,d);null==i.animateFilter||i.animateFilter(g,d)?(p=g.animation({position:f,duration:i.animationDuration,easing:i.animationEasing}),e.animations.push(p)):g.position(f)}i.fit?(t=r.animation({fit:{boundingBox:a.boundingBoxAt(u),padding:i.padding},duration:i.animationDuration,easing:i.animationEasing}),e.animations.push(t)):void 0!==i.zoom&&void 0!==i.pan&&(s=r.animation({zoom:i.zoom,pan:i.pan,duration:i.animationDuration,easing:i.animationEasing}),e.animations.push(s)),e.animations.forEach(function(e){return e.play()}),e.one("layoutready",i.ready),e.emit({type:"layoutready",layout:e}),Kae.all(e.animations.map(function(e){return e.promise()})).then(function(){e.one("layoutstop",i.stop),e.emit({type:"layoutstop",layout:e})})}else n.positions(u),i.fit&&r.fit(i.eles,i.padding),null!=i.zoom&&r.zoom(i.zoom),i.pan&&r.pan(i.pan),e.one("layoutready",i.ready),e.emit({type:"layoutready",layout:e}),e.one("layoutstop",i.stop),e.emit({type:"layoutstop",layout:e});return this},"layoutPositions"),layout:mt(function(e){return this.cy().makeLayout(Qte({},e,{eles:this}))},"layout")}).createLayout=Oce.makeLayout=Oce.layout,mt(FJ,"styleCache"),mt(zJ,"cacheStyleFunction"),mt(qJ,"cachePrototypeStyleFunction"),mce={recalculateRenderedStyle:mt(function(e){var t=(r=this.cy()).renderer(),r=r.styleEnabled();return t&&r&&t.recalculateRenderedStyle(this,e),this},"recalculateRenderedStyle"),dirtyStyleCache:mt(function(){var e=this.cy(),t=mt(function(e){return e._private.styleCache=null},"dirty");return e.hasCompoundNodes()?((e=this.spawnSelf().merge(this.descendants()).merge(this.parents())).merge(e.connectedEdges()),e.forEach(t)):this.forEach(function(e){t(e),e.connectedEdges().forEach(t)}),this},"dirtyStyleCache"),updateStyle:mt(function(e){var t,r=this._private.cy;return r.styleEnabled()&&(r.batching()?r._private.batchStyleEles.merge(this):(t=this,e=!(!e&&void 0!==e),r=t=r.hasCompoundNodes()?this.spawnSelf().merge(this.descendants()).merge(this.parents()):t,e?r.emitAndNotify("style"):r.emit("style"),t.forEach(function(e){return e._private.styleDirty=!0}))),this},"updateStyle"),cleanStyle:mt(function(){var e=this.cy();if(e.styleEnabled())for(var t=0;t<this.length;t++){var r=this[t];r._private.styleDirty&&(r._private.styleDirty=!1,e.style().apply(r))}},"cleanStyle"),parsedStyle:mt(function(e){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],r=this[0],i=r.cy();if(i.styleEnabled()&&r)return r._private.styleDirty&&(r._private.styleDirty=!1,i.style().apply(r)),r._private.style[e]??(t?i.style().getDefaultProperty(e):null)},"parsedStyle"),numericStyle:mt(function(e){var t=this[0];if(t.cy().styleEnabled()&&t)return void 0!==(t=t.pstyle(e)).pfValue?t.pfValue:t.value},"numericStyle"),numericStyleUnits:mt(function(e){var t=this[0];if(t.cy().styleEnabled()&&t)return t.pstyle(e).units},"numericStyleUnits"),renderedStyle:mt(function(e){var t,r=this.cy();return r.styleEnabled()?(t=this[0])?r.style().getRenderedStyle(t,e):void 0:this},"renderedStyle"),style:mt(function(e,t){if((i=this.cy()).styleEnabled()){var r,i=i.style();if(Ate(e))i.applyBypass(this,e,!1),this.emitAndNotify("style");else if(Ete(e)){if(void 0===t)return(r=this[0])?i.getStylePropertyValue(r,e):void 0;i.applyBypass(this,e,t,!1),this.emitAndNotify("style")}else if(void 0===e)return(r=this[0])?i.getRawStyle(r):void 0}return this},"style"),removeStyle:mt(function(e){var t=this.cy();if(t.styleEnabled()){var r=t.style();if(void 0===e)for(var i=0;i<this.length;i++){var n=this[i];r.removeAllBypasses(n,!1)}else{e=e.split(/\s+/);for(var a=0;a<this.length;a++){var s=this[a];r.removeBypasses(s,e,!1)}}this.emitAndNotify("style")}return this},"removeStyle"),show:mt(function(){return this.css("display","element"),this},"show"),hide:mt(function(){return this.css("display","none"),this},"hide"),effectiveOpacity:mt(function(){if(!(e=this.cy()).styleEnabled())return 1;var e=e.hasCompoundNodes(),t=this[0];if(t){var r=t._private,i=t.pstyle("opacity").value;if(e){var n=r.data.parent?t.parents():null;if(n)for(var a=0;a<n.length;a++)i*=n[a].pstyle("opacity").value}return i}},"effectiveOpacity"),transparent:mt(function(){var e,t;return!!this.cy().styleEnabled()&&(t=(e=this[0]).cy().hasCompoundNodes(),e?t?0===e.effectiveOpacity():0===e.pstyle("opacity").value:void 0)},"transparent"),backgrounding:mt(function(){return!!this.cy().styleEnabled()&&!!this[0]._private.backgrounding},"backgrounding")},mt(WJ,"checkCompound"),mt(UJ,"defineDerivedStateFunction"),Qle=zJ("eleTakesUpSpace",function(e){return"element"===e.pstyle("display").value&&0!==e.width()&&(!e.isNode()||0!==e.height())}),mce.takesUpSpace=qJ("takesUpSpace",UJ({ok:Qle})),uue=zJ("eleInteractive",function(e){return"yes"===e.pstyle("events").value&&"visible"===e.pstyle("visibility").value&&Qle(e)}),Pce=zJ("parentInteractive",function(e){return"visible"===e.pstyle("visibility").value&&Qle(e)}),mce.interactive=qJ("interactive",UJ({ok:uue,parentOk:Pce,edgeOkViaNode:Qle})),mce.noninteractive=function(){var e=this[0];if(e)return!e.interactive()},$ce=zJ("eleVisible",function(e){return"visible"===e.pstyle("visibility").value&&0!==e.pstyle("opacity").pfValue&&Qle(e)}),Bce=Qle,mce.visible=qJ("visible",UJ({ok:$ce,edgeOkViaNode:Bce})),mce.hidden=function(){var e=this[0];if(e)return!e.visible()},mce.isBundledBezier=qJ("isBundledBezier",function(){return!!this.cy().styleEnabled()&&!this.removed()&&"bezier"===this.pstyle("curve-style").value&&this.takesUpSpace()}),mce.bypass=mce.css=mce.style,mce.renderedCss=mce.renderedStyle,mce.removeBypass=mce.removeCss=mce.removeStyle,mce.pstyle=mce.parsedStyle,Jle={},mt(GJ,"defineSwitchFunction"),mt(jJ,"defineSwitchSet"),jJ({field:"locked",overrideField:mt(function(e){return!!e.cy().autolock()||void 0},"overrideField"),on:"lock",off:"unlock"}),jJ({field:"grabbable",overrideField:mt(function(e){return!e.cy().autoungrabify()&&!e.pannable()&&void 0},"overrideField"),on:"grabify",off:"ungrabify"}),jJ({field:"selected",ableField:"selectable",overrideAble:mt(function(e){return!e.cy().autounselectify()&&void 0},"overrideAble"),on:"select",off:"unselect"}),jJ({field:"selectable",overrideField:mt(function(e){return!e.cy().autounselectify()&&void 0},"overrideField"),on:"selectify",off:"unselectify"}),Jle.deselect=Jle.unselect,Jle.grabbed=function(){var e=this[0];if(e)return e._private.grabbed},jJ({field:"active",on:"activate",off:"unactivate"}),jJ({field:"pannable",on:"panify",off:"unpanify"}),Jle.inactive=function(){var e=this[0];if(e)return!e._private.active},te={},uue=mt(function(h){return mt(function(e){for(var t=[],r=0;r<this.length;r++){var i=this[r];if(i.isNode()){for(var n=!1,a=i.connectedEdges(),s=0;s<a.length;s++){var o=(l=a[s]).source(),l=l.target();if(h.noIncomingEdges&&l===i&&o!==i||h.noOutgoingEdges&&o===i&&l!==i){n=!0;break}}n||t.push(i)}}return this.spawn(t,!0).filter(e)},"dagExtremityImpl")},"defineDagExtremity"),Pce=mt(function(h){return function(e){for(var t=[],r=0;r<this.length;r++){var i=this[r];if(i.isNode())for(var n=i.connectedEdges(),a=0;a<n.length;a++){var s=n[a],o=s.source(),l=s.target();h.outgoing&&o===i?(t.push(s),t.push(l)):h.incoming&&l===i&&(t.push(s),t.push(o))}}return this.spawn(t,!0).filter(e)}},"defineDagOneHop"),$ce=mt(function(h){return function(e){for(var t=this,r=[],i={};;){var n=h.outgoing?t.outgoers():t.incomers();if(0===n.length)break;for(var a=!1,s=0;s<n.length;s++){var o=n[s],l=o.id();i[l]||(i[l]=!0,r.push(o),a=!0)}if(!a)break;t=n}return this.spawn(r,!0).filter(e)}},"defineDagAllHops"),te.clearTraversalCache=function(){for(var e=0;e<this.length;e++)this[e]._private.traversalCache=null},Qte(te,{roots:uue({noIncomingEdges:!0}),leaves:uue({noOutgoingEdges:!0}),outgoers:Kce(Pce({outgoing:!0}),"outgoers"),successors:$ce({outgoing:!0}),incomers:Kce(Pce({incoming:!0}),"incomers"),predecessors:$ce({})}),Qte(te,{neighborhood:Kce(function(e){for(var t=[],r=this.nodes(),i=0;i<r.length;i++)for(var n=r[i],a=n.connectedEdges(),s=0;s<a.length;s++){var o=a[s],l=o.source(),h=o.target();0<(h=n===l?h:l).length&&t.push(h[0]),t.push(o[0])}return this.spawn(t,!0).filter(e)},"neighborhood"),closedNeighborhood:mt(function(e){return this.neighborhood().add(this).filter(e)},"closedNeighborhood"),openNeighborhood:mt(function(e){return this.neighborhood(e)},"openNeighborhood")}),te.neighbourhood=te.neighborhood,te.closedNeighbourhood=te.closedNeighborhood,te.openNeighbourhood=te.openNeighborhood,Qte(te,{source:Kce(mt(function(e){var t,r=this[0];return(t=r?r._private.source||r.cy().collection():t)&&e?t.filter(e):t},"sourceImpl"),"source"),target:Kce(mt(function(e){var t,r=this[0];return(t=r?r._private.target||r.cy().collection():t)&&e?t.filter(e):t},"targetImpl"),"target"),sources:VJ({attr:"source"}),targets:VJ({attr:"target"})}),mt(VJ,"defineSourceFunction"),Qte(te,{edgesWith:Kce(YJ(),"edgesWith"),edgesTo:Kce(YJ({thisIsSrc:!0}),"edgesTo")}),mt(YJ,"defineEdgesWithFunction"),Qte(te,{connectedEdges:Kce(function(e){for(var t=[],r=0;r<this.length;r++){var i=this[r];if(i.isNode())for(var n=i._private.edges,a=0;a<n.length;a++){var s=n[a];t.push(s)}}return this.spawn(t,!0).filter(e)},"connectedEdges"),connectedNodes:Kce(function(e){for(var t=[],r=0;r<this.length;r++){var i=this[r];i.isEdge()&&(t.push(i.source()[0]),t.push(i.target()[0]))}return this.spawn(t,!0).filter(e)},"connectedNodes"),parallelEdges:Kce(HJ(),"parallelEdges"),codirectedEdges:Kce(HJ({codirected:!0}),"codirectedEdges")}),mt(HJ,"defineParallelEdgesFunction"),Qte(te,{components:mt(function(e){var r=this,i=r.cy(),n=i.collection(),a=(null==e?r:e).nodes(),s=[],o=(null!=e&&a.empty()&&(a=e.sources()),mt(function(e,t){n.merge(e),a.unmerge(e),t.merge(e)},"visitInComponent"));if(a.empty())return r.spawn();for(var t=mt(function(){var t=i.collection(),e=(s.push(t),a[0]);o(e,t),r.bfs({directed:!1,roots:e,visit:mt(function(e){return o(e,t)},"visit")}),t.forEach(function(e){e.connectedEdges().forEach(function(e){r.has(e)&&t.has(e.source())&&t.has(e.target())&&t.merge(e)})})},"_loop");t(),0<a.length;);return s},"components"),component:mt(function(){var e=this[0];return e.cy().mutableElements().components(e)[0]},"component")}),te.componentsOf=te.components,ehe=mt(function(e,t){var r=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=3<arguments.length&&void 0!==arguments[3]&&arguments[3];if(void 0===e)oie("A collection must have a reference to the core");else{var n=new Tie,a=!1;if(t){if(0<t.length&&Ate(t[0])&&!Dte(t[0])){for(var a=!0,s=[],o=new kie,l=0,h=t.length;l<h;l++){var c=t[l],u=(null==c.data&&(c.data={}),c.data);if(null==u.id)u.id=pie();else if(e.hasElementWithId(u.id)||o.has(u.id))continue;c=new wie(e,c,!1),s.push(c),o.add(u.id)}t=s}}else t=[];for(var d=this.length=0,p=t.length;d<p;d++){var g,f=t[d][0];null!=f&&(g=f._private.data.id,r&&n.has(g)||(r&&n.set(g,{index:this.length,ele:f}),this[this.length]=f,this.length++))}this._private={eles:this,cy:e,get map(){return null==this.lazyMap&&this.rebuildMap(),this.lazyMap},set map(e){this.lazyMap=e},rebuildMap:mt(function(){for(var e=this.lazyMap=new Tie,t=this.eles,r=0;r<t.length;r++){var i=t[r];e.set(i.id(),{index:r,ele:i})}},"rebuildMap")},r&&(this._private.map=n),a&&!i&&this.restore()}},"Collection"),(the=wie.prototype=ehe.prototype=Object.create(Array.prototype)).instanceString=function(){return"collection"},the.spawn=function(e,t){return new ehe(this.cy(),e,t)},the.spawnSelf=function(){return this.spawn(this)},the.cy=function(){return this._private.cy},the.renderer=function(){return this._private.cy.renderer()},the.element=function(){return this[0]},the.collection=function(){return Mte(this)?this:new ehe(this._private.cy,[this])},the.unique=function(){return new ehe(this._private.cy,this,!0)},the.hasElementWithId=function(e){return this._private.map.has(e=""+e)},the.getElementById=function(e){var t=this._private.cy;return(e=this._private.map.get(e=""+e))?e.ele:new ehe(t)},the.$id=the.getElementById,the.poolIndex=function(){var e=this._private.cy._private.elements,t=this[0]._private.data.id;return e._private.map.get(t).index},the.indexOf=function(e){return e=e[0]._private.data.id,this._private.map.get(e).index},the.indexOfId=function(e){return this._private.map.get(e=""+e).index},the.json=function(n){var a,e,t,r,i,s,o,l,h=this.element(),c=this.cy();return null==h&&n?this:null!=h?(a=h._private,Ate(n)?(c.startBatch(),n.data&&(h.data(n.data),e=a.data,h.isEdge()?(s=!1,t={},r=n.data.source,i=n.data.target,null!=r&&r!=e.source&&(t.source=""+r,s=!0),null!=i&&i!=e.target&&(t.target=""+i,s=!0),s&&(h=h.move(t))):(r="parent"in n.data,i=n.data.parent,!r||null==i&&null==e.parent||i==e.parent||(h=h.move({parent:i=null!=(i=void 0===i?null:i)?""+i:i})))),n.position&&h.position(n.position),(s=mt(function(e,t,r){var i=n[e];null!=i&&i!==a[e]&&(i?h[t]():h[r]())},"checkSwitch"))("removed","remove","restore"),s("selected","select","unselect"),s("selectable","selectify","unselectify"),s("locked","lock","unlock"),s("grabbable","grabify","ungrabify"),s("pannable","panify","unpanify"),null!=n.classes&&h.classes(n.classes),c.endBatch(),this):void 0===n?((o={data:uie(a.data),position:uie(a.position),group:a.group,removed:a.removed,selected:a.selected,selectable:a.selectable,locked:a.locked,grabbable:a.grabbable,pannable:a.pannable,classes:null}).classes="",l=0,a.classes.forEach(function(e){return o.classes+=0==l++?e:" "+e}),o):void 0):void 0},the.jsons=function(){for(var e=[],t=0;t<this.length;t++){var r=this[t].json();e.push(r)}return e},the.clone=function(){for(var e=this.cy(),t=[],r=0;r<this.length;r++){var i=this[r].json(),i=new wie(e,i,!1);t.push(i)}return new ehe(e,t)},the.copy=the.clone,the.restore=function(){for(var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],r=this.cy(),i=r._private,n=[],a=[],s=0,o=this.length;s<o;s++){var l=this[s];t&&!l.removed()||(l.isNode()?n:a).push(l)}for(var h=n.concat(a),c=mt(function(){h.splice(u,1),u--},"removeFromElements"),u=0;u<h.length;u++){var d=h[u],p=d._private,g=p.data;if(d.clearTraversalCache(),t||p.removed)if(void 0===g.id)g.id=pie();else if(ce(g.id))g.id=""+g.id;else{if($te(g.id)||!Ete(g.id)){oie("Can not create element with invalid string ID `"+g.id+"`"),c();continue}if(r.hasElementWithId(g.id)){oie("Can not create second element with ID `"+g.id+"`"),c();continue}}var f=g.id;if(d.isNode()&&(null==(m=p.position).x&&(m.x=0),null==m.y)&&(m.y=0),d.isEdge()){for(var m=d,y=["source","target"],v=y.length,x=!1,b=0;b<v;b++){var T=y[b],k=g[T];null==(k=ce(k)?g[T]=""+g[T]:k)||""===k?(oie("Can not create edge `"+f+"` with unspecified "+T),x=!0):r.hasElementWithId(k)||(oie("Can not create edge `"+f+"` with nonexistant "+T+" `"+k+"`"),x=!0)}if(x){c();continue}var w=r.getElementById(g.source),C=r.getElementById(g.target);(w.same(C)?w:(w._private.edges.push(m),C))._private.edges.push(m),m._private.source=w,m._private.target=C}p.map=new Tie,p.map.set(f,{ele:d,index:0}),p.removed=!1,t&&r.addToPool(d)}for(var E=0;E<n.length;E++){var S=n[E],_=S._private.data,A=(ce(_.parent)&&(_.parent=""+_.parent),_.parent);if(null!=A||S._private.parent)if((A=S._private.parent?r.collection().merge(S._private.parent):r.getElementById(A)).empty())_.parent=void 0;else if(A[0].removed())hie("Node added with missing parent, reference to parent removed"),_.parent=void 0,S._private.parent=null;else{for(var L=!1,R=A;!R.empty();){if(S.same(R)){L=!0,_.parent=void 0;break}R=R.parent()}L||(A[0]._private.children.push(S),S._private.parent=A[0],i.hasCompoundNodes=!0)}}if(0<h.length){for(var I=h.length===this.length?this:new ehe(r,h),N=0;N<I.length;N++){var D=I[N];D.isNode()||(D.parallelEdges().clearTraversalCache(),D.source().clearTraversalCache(),D.target().clearTraversalCache())}(i.hasCompoundNodes?r.collection().merge(I).merge(I.connectedNodes()).merge(I.parent()):I).dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(e),e?I.emitAndNotify("add"):t&&I.emit("add")}return this},the.removed=function(){var e=this[0];return e&&e._private.removed},the.inside=function(){var e=this[0];return e&&!e._private.removed},the.remove=function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],r=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],i=[],n={},t=this._private.cy;function a(e){for(var t=e._private.edges,r=0;r<t.length;r++)o(t[r])}function s(e){for(var t=e._private.children,r=0;r<t.length;r++)o(t[r])}function o(e){var t=n[e.id()];r&&e.removed()||t||(n[e.id()]=!0,e.isNode()?(i.push(e),a(e),s(e)):i.unshift(e))}mt(a,"addConnectedEdges"),mt(s,"addChildren"),mt(o,"add");for(var l=0,h=this.length;l<h;l++)o(this[l]);function c(e,t){var r=e._private.edges;mie(r,t),e.clearTraversalCache()}function u(e){e.clearTraversalCache()}mt(c,"removeEdgeRef"),mt(u,"removeParallelRef");var d=[];function p(e,t){t=t[0];var r=(e=e[0])._private.children,i=e.id();mie(r,t),t._private.parent=null,d.ids[i]||(d.ids[i]=!0,d.push(e))}d.ids={},mt(p,"removeChildRef"),this.dirtyCompoundBoundsCache(),r&&t.removeFromPool(i);for(var g=0;g<i.length;g++){var f=i[g];if(f.isEdge()){var m=f.source()[0],y=f.target()[0];c(m,f),c(y,f);for(var v=f.parallelEdges(),x=0;x<v.length;x++){var b=v[x];u(b),b.isBundledBezier()&&b.dirtyBoundingBoxCache()}}else 0!==(m=f.parent()).length&&p(m,f);r&&(f._private.removed=!0)}var T=t._private.elements;t._private.hasCompoundNodes=!1;for(var k=0;k<T.length;k++)if(T[k].isParent()){t._private.hasCompoundNodes=!0;break}var w=new ehe(this.cy(),i);0<w.size()&&(e?w.emitAndNotify("remove"):r&&w.emit("remove"));for(var C=0;C<d.length;C++){var E=d[C];r&&E.removed()||E.updateStyle()}return w},the.move=function(e){var i,n,a,s,o,t=this._private.cy,l=this,r=mt(function(e){return null==e?e:""+e},"toString");return void 0!==e.source||void 0!==e.target?(i=r(e.source),n=r(e.target),a=null!=i&&t.hasElementWithId(i),s=null!=n&&t.hasElementWithId(n),(a||s)&&(t.batch(function(){l.remove(!1,!1),l.emitAndNotify("moveout");for(var e=0;e<l.length;e++){var t=l[e],r=t._private.data;t.isEdge()&&(a&&(r.source=i),s)&&(r.target=n)}l.restore(!1,!1)}),l.emitAndNotify("move"))):void 0===e.parent||null!==(r=r(e.parent))&&!t.hasElementWithId(r)||(o=null===r?void 0:r,t.batch(function(){var e=l.remove(!1,!1);e.emitAndNotify("moveout");for(var t=0;t<l.length;t++){var r=l[t],i=r._private.data;r.isNode()&&(i.parent=o)}e.restore(!1,!1)}),l.emitAndNotify("move")),this},[Uae,Jce,sue,oue,Fce,Uhe,mue,Ece,zce,_ce,Mce,Kle,Oce,mce,Jle,te].forEach(function(e){Qte(the,e)}),Bce={add:mt(function(e){if(Nte(e)){var t=e;if(t._private.cy===this)a=t.restore();else{for(var r=[],i=0;i<t.length;i++){var n=t[i];r.push(n.json())}a=new ehe(this,r)}}else if(_te(e))var a=new ehe(this,e);else if(Ate(e)&&(_te(e.nodes)||_te(e.edges))){for(var s=e,o=[],l=["nodes","edges"],h=0,c=l.length;h<c;h++){var u=l[h],d=s[u];if(_te(d))for(var p=0,g=d.length;p<g;p++){var f=Qte({group:u},d[p]);o.push(f)}}a=new ehe(this,o)}else a=new wie(this,e).collection();return a},"add"),remove:mt(function(e){var t;return Nte(e)||Ete(e)&&(t=e,e=this.$(t)),e.remove()},"remove")},mt(XJ,"generateCubicBezier"),mt(o,"springAccelerationForState"),mt(l,"springEvaluateStateWithDerivative"),mt(c,"springIntegrateState"),rhe=mt(function e(t,r,i){var n,a,s,o={x:-1,v:0,tension:null,friction:null},l=[0],h=0;for(t=parseFloat(t)||500,r=parseFloat(r)||20,i=i||null,o.tension=t,o.friction=r,a=(n=null!==i)?(h=e(t,r))/i*.016:.016;s=c(s||o,a),l.push(1+s.x),h+=16,1e-4<Math.abs(s.x)&&1e-4<Math.abs(s.v););return n?function(e){return l[e*(l.length-1)|0]}:h},"springRK4Factory"),uue=mt(function(e,t,r,i){var n=XJ(e,t,r,i);return function(e,t,r){return e+(t-e)*n(r)}},"cubicBezier"),ihe={linear:mt(function(e,t,r){return e+(t-e)*r},"linear"),ease:uue(.25,.1,.25,1),"ease-in":uue(.42,0,1,1),"ease-out":uue(0,0,.58,1),"ease-in-out":uue(.42,0,.58,1),"ease-in-sine":uue(.47,0,.745,.715),"ease-out-sine":uue(.39,.575,.565,1),"ease-in-out-sine":uue(.445,.05,.55,.95),"ease-in-quad":uue(.55,.085,.68,.53),"ease-out-quad":uue(.25,.46,.45,.94),"ease-in-out-quad":uue(.455,.03,.515,.955),"ease-in-cubic":uue(.55,.055,.675,.19),"ease-out-cubic":uue(.215,.61,.355,1),"ease-in-out-cubic":uue(.645,.045,.355,1),"ease-in-quart":uue(.895,.03,.685,.22),"ease-out-quart":uue(.165,.84,.44,1),"ease-in-out-quart":uue(.77,0,.175,1),"ease-in-quint":uue(.755,.05,.855,.06),"ease-out-quint":uue(.23,1,.32,1),"ease-in-out-quint":uue(.86,0,.07,1),"ease-in-expo":uue(.95,.05,.795,.035),"ease-out-expo":uue(.19,1,.22,1),"ease-in-out-expo":uue(1,0,0,1),"ease-in-circ":uue(.6,.04,.98,.335),"ease-out-circ":uue(.075,.82,.165,1),"ease-in-out-circ":uue(.785,.135,.15,.86),spring:mt(function(e,t,r){var i;return 0===r?ihe.linear:(i=rhe(e,t,r),function(e,t,r){return e+(t-e)*i(r)})},"spring"),"cubic-bezier":uue},mt(KJ,"getEasedValue"),mt(ZJ,"getValue"),mt(QJ,"ease"),mt(JJ,"step$1"),mt(eee,"valid"),mt(tee,"startAnimation"),mt(ree,"stepAll"),Pce={animate:Xoe.animate(),animation:Xoe.animation(),animated:Xoe.animated(),clearQueue:Xoe.clearQueue(),delay:Xoe.delay(),delayAnimation:Xoe.delayAnimation(),stop:Xoe.stop(),addToAnimationPool:mt(function(e){this.styleEnabled()&&this._private.aniEles.merge(e)},"addToAnimationPool"),stopAnimationLoop:mt(function(){this._private.animationsRunning=!1},"stopAnimationLoop"),startAnimationLoop:mt(function(){var e,r=this;function t(){r._private.animationsRunning&&zre(mt(function(e){ree(e,r),t()},"animationStep"))}r._private.animationsRunning=!0,r.styleEnabled()&&(mt(t,"headlessStep"),(e=r.renderer())&&e.beforeRender?e.beforeRender(mt(function(e,t){ree(t,r)},"rendererAnimationStep"),e.beforeRenderPriorities.animations):t())},"startAnimationLoop")},nhe={qualifierCompare:mt(function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},"qualifierCompare"),eventMatches:mt(function(e,t,r){return null==(t=t.qualifier)||e!==r.target&&Dte(r.target)&&t.matches(r.target)},"eventMatches"),addEventFields:mt(function(e,t){t.cy=e,t.target=e},"addEventFields"),callbackContext:mt(function(e,t,r){return null!=t.qualifier?r.target:e},"callbackContext")},ahe=mt(function(e){return Ete(e)?new gle(e):e},"argSelector"),$ce={createEmitter:mt(function(){var e=this._private;return e.emitter||(e.emitter=new $J(nhe,this)),this},"createEmitter"),emitter:mt(function(){return this._private.emitter},"emitter"),on:mt(function(e,t,r){return this.emitter().on(e,ahe(t),r),this},"on"),removeListener:mt(function(e,t,r){return this.emitter().removeListener(e,ahe(t),r),this},"removeListener"),removeAllListeners:mt(function(){return this.emitter().removeAllListeners(),this},"removeAllListeners"),one:mt(function(e,t,r){return this.emitter().one(e,ahe(t),r),this},"one"),once:mt(function(e,t,r){return this.emitter().one(e,ahe(t),r),this},"once"),emit:mt(function(e,t){return this.emitter().emit(e,t),this},"emit"),emitAndNotify:mt(function(e,t){return this.emit(e),this.notify(e,t),this},"emitAndNotify")},Xoe.eventAliasesOn($ce),(Kce={png:mt(function(e){return this._private.renderer.png(e=e||{})},"png"),jpg:mt(function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)},"jpg")}).jpeg=Kce.jpg,(Jce={layout:mt(function(e){if(null==e)oie("Layout options must be specified to make a layout");else if(null==e.name)oie("A `name` must be specified to make a layout");else{var t,r=e.name,i=this.extension("layout",r);if(null!=i)return t=Ete(e.eles)?this.$(e.eles):null!=e.eles?e.eles:this.$(),new i(Qte({},e,{cy:this,eles:t}));oie("No such layout `"+r+"` found. Did you forget to import it and `cytoscape.use()` it?")}},"layout")}).createLayout=Jce.makeLayout=Jce.layout,sue={notify:mt(function(e,t){var r,i=this._private;this.batching()?(i.batchNotifications=i.batchNotifications||{},r=i.batchNotifications[e]=i.batchNotifications[e]||this.collection(),null!=t&&r.merge(t)):i.notificationsEnabled&&(r=this.renderer(),!this.destroyed())&&r&&r.notify(e,t)},"notify"),notifications:mt(function(e){var t=this._private;return void 0===e?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},"notifications"),noNotifications:mt(function(e){this.notifications(!1),e(),this.notifications(!0)},"noNotifications"),batching:mt(function(){return 0<this._private.batchCount},"batching"),startBatch:mt(function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},"startBatch"),endBatch:mt(function(){var r,i=this._private;return 0!==i.batchCount&&(i.batchCount--,0===i.batchCount)&&(i.batchStyleEles.updateStyle(),r=this.renderer(),Object.keys(i.batchNotifications).forEach(function(e){var t=i.batchNotifications[e];t.empty()?r.notify(e):r.notify(e,t)})),this},"endBatch"),batch:mt(function(e){return this.startBatch(),e(),this.endBatch(),this},"batch"),batchData:mt(function(n){var a=this;return this.batch(function(){for(var e=Object.keys(n),t=0;t<e.length;t++){var r=e[t],i=n[r];a.getElementById(r).data(i)}})},"batchData")},she=lue({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1,webgl:!1,webglDebug:!1,webglDebugShowAtlases:!1,webglTexSize:2048,webglTexRows:36,webglTexRowsNodes:18,webglBatchSize:2048,webglTexPerBatch:14,webglBgColor:[255,255,255]}),(oue={renderTo:mt(function(e,t,r,i){return this._private.renderer.renderTo(e,t,r,i),this},"renderTo"),renderer:mt(function(){return this._private.renderer},"renderer"),forceRender:mt(function(){return this.notify("draw"),this},"forceRender"),resize:mt(function(){return this.invalidateSize(),this.emitAndNotify("resize"),this},"resize"),initRenderer:mt(function(e){var t=this.extension("renderer",e.name);null==t?oie("Can not initialise: No such renderer `".concat(e.name,"` found. Did you forget to import it and `cytoscape.use()` it?")):(void 0!==e.wheelSensitivity&&hie("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine."),((e=she(e)).cy=this)._private.renderer=new t(e),this.notify("init"))},"initRenderer"),destroyRenderer:mt(function(){this.notify("destroy");var e=this.container();if(e)for(e._cyreg=null;0<e.childNodes.length;)e.removeChild(e.childNodes[0]);this._private.renderer=null,this.mutableElements().forEach(function(e){(e=e._private).rscratch={},e.rstyle={},e.animation.current=[],e.animation.queue=[]})},"destroyRenderer"),onRender:mt(function(e){return this.on("render",e)},"onRender"),offRender:mt(function(e){return this.off("render",e)},"offRender")}).invalidateDimensions=oue.resize,(Fce={collection:mt(function(e,t){return Ete(e)?this.$(e):Nte(e)?e.collection():_te(e)?new ehe(this,e,(t=t||{}).unique,t.removed):new ehe(this)},"collection"),nodes:mt(function(e){var t=this.$(function(e){return e.isNode()});return e?t.filter(e):t},"nodes"),edges:mt(function(e){var t=this.$(function(e){return e.isEdge()});return e?t.filter(e):t},"edges"),$:mt(function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},"$"),mutableElements:mt(function(){return this._private.elements},"mutableElements")}).elements=Fce.filter=Fce.$,Uhe={apply:function(e){for(var t=this._private.cy.collection(),r=0;r<e.length;r++){var i,n=e[r],a=this.getContextMeta(n);a.empty||(i=this.getContextStyle(a),a=this.applyContextStyle(a,i,n),n._private.appliedInitStyle?this.updateTransitions(n,a.diffProps):n._private.appliedInitStyle=!0,this.updateStyleHints(n)&&t.push(n))}return t},getPropertiesDiff:function(e,t){var r=this._private.propDiffs=this._private.propDiffs||{},i=e+"-"+t,n=r[i];if(n)return n;for(var a=[],s={},o=0;o<this.length;o++){var l=this[o],h="t"===e[o],c="t"===t[o],u=0<l.mappedProperties.length;if((h=h!=c)||c&&u){var d=void 0;h&&u||h?d=l.properties:u&&(d=l.mappedProperties);for(var p=0;p<d.length;p++){for(var g=d[p],f=g.name,m=!1,y=o+1;y<this.length;y++){var v=this[y];if("t"===t[y]&&(m=null!=v.properties[g.name]))break}s[f]||m||(s[f]=!0,a.push(f))}}}return r[i]=a},getContextMeta:function(e){for(var t="",r=e._private.styleCxtKey||"",i=0;i<this.length;i++){var n=this[i];t+=n.selector&&n.selector.matches(e)?"t":"f"}return r=this.getPropertiesDiff(r,t),{key:e._private.styleCxtKey=t,diffPropNames:r,empty:0===r.length}},getContextStyle:function(e){var t=e.key;if((e=this._private.contextStyles=this._private.contextStyles||{})[t])return e[t];for(var r={_private:{key:t}},i=0;i<this.length;i++){var n=this[i];if("t"===t[i])for(var a=0;a<n.properties.length;a++){var s=n.properties[a];r[s.name]=s}}return e[t]=r},applyContextStyle:function(e,t,r){for(var i=e.diffPropNames,n={},a=this.types,s=0;s<i.length;s++){var o=i[s],l=t[o],h=r.pstyle(o);if(!l){if(!h)continue;l=h.bypass?{name:o,deleteBypassed:!0}:{name:o,delete:!0}}if(h!==l){if(l.mapped===a.fn&&null!=h&&null!=h.mapping&&h.mapping.value===l.value){var c=h.mapping;if((c.fnValue=l.value(r))===c.prevFnValue)continue}c=n[o]={prev:h},this.applyParsedProperty(r,l),c.next=r.pstyle(o),c.next&&c.next.bypass&&(c.next=c.next.bypassed)}}return{diffProps:n}},updateStyleHints:function(e){var r=e._private,i=this,t=(i.propertyGroupNames,i.propertyGroupKeys),n=mt(function(e,t,r){return i.getPropertiesHash(e,t,r)},"propHash"),a=r.styleKey;if(e.removed())return!1;for(var s="nodes"===r.group,o=e._private.style,l=Object.keys(o),h=0;h<t.length;h++){var c=t[h];r.styleKeys[c]=[9261,5381]}for(var u=mt(function(e,t){return r.styleKeys[t][0]=Ure(e,r.styleKeys[t][0])},"updateGrKey1"),d=mt(function(e,t){return r.styleKeys[t][1]=Gre(e,r.styleKeys[t][1])},"updateGrKey2"),p=mt(function(e,t){u(e,t),d(e,t)},"updateGrKey"),g=mt(function(e,t){for(var r=0;r<e.length;r++){var i=e.charCodeAt(r);u(i,t),d(i,t)}},"updateGrKeyWStr"),f=mt(function(e){return-128<e&&e<128&&Math.floor(e)!==e?2e9-(1024*e|0):e},"cleanNum"),m=0;m<l.length;m++){var y,v,x,b,T,k=l[m],w=o[k];null!=w&&(y=(k=this.properties[k]).type,v=k.groupKey,x=void 0,null!=k.hashOverride?x=k.hashOverride(e,w):null!=w.pfValue&&(x=w.pfValue),k=null==k.enums?w.value:null,b=null!=x,T=w.units,!y.number||!b&&null==k||y.multiple?g(w.strValue,v):(p(f(b?x:k),v),b||null==T||g(T,v)))}for(var C=[9261,5381],E=0;E<t.length;E++){var S=t[E],S=r.styleKeys[S];C[0]=Ure(S[0],C[0]),C[1]=Gre(S[1],C[1])}r.styleKey=jre(C[0],C[1]);var _=r.styleKeys,A=(r.labelDimsKey=Vre(_.labelDimensions),n(e,["label"],_.labelDimensions));return r.labelKey=Vre(A),r.labelStyleKey=Vre(Yre(_.commonLabel,A)),s||(A=n(e,["source-label"],_.labelDimensions),r.sourceLabelKey=Vre(A),r.sourceLabelStyleKey=Vre(Yre(_.commonLabel,A)),A=n(e,["target-label"],_.labelDimensions),r.targetLabelKey=Vre(A),r.targetLabelStyleKey=Vre(Yre(_.commonLabel,A))),s&&(s=[(n=r.styleKeys).nodeBody,n.nodeBorder,n.nodeOutline,n.backgroundImage,n.compound,_=n.pie,A=n.stripe].filter(function(e){return null!=e}).reduce(Yre,[9261,5381]),r.nodeKey=Vre(s),r.hasPie=null!=_&&9261!==_[0]&&5381!==_[1],r.hasStripe=null!=A&&9261!==A[0]&&5381!==A[1]),a!==r.styleKey},clearStyleHints:function(e){(e=e._private).styleCxtKey="",e.styleKeys={},e.styleKey=null,e.labelKey=null,e.labelStyleKey=null,e.sourceLabelKey=null,e.sourceLabelStyleKey=null,e.targetLabelKey=null,e.targetLabelStyleKey=null,e.nodeKey=null,e.hasPie=null,e.hasStripe=null},applyParsedProperty:function(r,e){var i=this,n=e,t=r._private.style,a=i.types,s=i.properties[n.name].type,o=n.bypass,l=t[n.name],h=l&&l.bypass,c=r._private,u="mapping",d=mt(function(e){return null==e?null:null!=e.pfValue?e.pfValue:e.value},"getVal"),p=mt(function(){var e=d(l),t=d(n);i.checkTriggers(r,n.name,e,t)},"checkTriggers");if((n="curve-style"===e.name&&r.isEdge()&&("bezier"!==e.value&&r.isLoop()||"haystack"===e.value&&(r.source().isParent()||r.target().isParent()))?e=this.parse(e.name,"bezier",o):n).delete)t[n.name]=void 0;else{if(n.deleteBypassed)return l?!!l.bypass&&(l.bypassed=void 0,p(),!0):(p(),!0);if(n.deleteBypass)return l?!!l.bypass&&(t[n.name]=l.bypassed,p(),!0):(p(),!0);var g=mt(function(){hie("Do not assign mappings to elements without corresponding data (i.e. ele `"+r.id()+"` has no mapping for property `"+n.name+"` with data field `"+n.field+"`); try a `["+n.field+"]` selector to limit scope to elements with `"+n.field+"` defined")},"printMappingErr");switch(n.mapped){case a.mapData:for(var f=n.field.split("."),m=c.data,y=0;y<f.length&&m;y++)m=m[f[y]];if(null==m)return g(),!1;if(!ce(m))return hie("Do not use continuous mappers without specifying numeric data (i.e. `"+n.field+": "+m+"` for `"+r.id()+"` is non-numeric)"),!1;var v=n.fieldMax-n.fieldMin;if((v=0==v?0:(m-n.fieldMin)/v)<0?v=0:1<v&&(v=1),s.color)var x=n.valueMin[0],b=n.valueMax[0],T=n.valueMin[1],k=n.valueMax[1],w=n.valueMin[2],C=n.valueMax[2],E=null==n.valueMin[3]?1:n.valueMin[3],S=null==n.valueMax[3]?1:n.valueMax[3],b=[Math.round(x+(b-x)*v),Math.round(T+(k-T)*v),Math.round(w+(C-w)*v),Math.round(E+(S-E)*v)],x={bypass:n.bypass,name:n.name,value:b,strValue:"rgb("+b[0]+", "+b[1]+", "+b[2]+")"};else{if(!s.number)return!1;k=n.valueMin+(n.valueMax-n.valueMin)*v,x=this.parse(n.name,k,n.bypass,u)}if(!x)return g(),!1;x.mapping=n,n=x;break;case a.data:for(var _=n.field.split("."),A=c.data,L=0;L<_.length&&A;L++)A=A[_[L]];if(!(x=null!=A?this.parse(n.name,A,n.bypass,u):x))return g(),!1;x.mapping=n,n=x;break;case a.fn:if(T=n.value,C=null!=n.fnValue?n.fnValue:T(r),null==(n.prevFnValue=C))return hie("Custom function mappers may not return null (i.e. `"+n.name+"` for ele `"+r.id()+"` is null)"),!1;if(!(x=this.parse(n.name,C,n.bypass,u)))return hie("Custom function mappers may not return invalid values for the property type (i.e. `"+n.name+"` for ele `"+r.id()+"` is invalid)"),!1;x.mapping=uie(n),n=x;break;case void 0:break;default:return!1}o?(n.bypassed=h?l.bypassed:l,t[n.name]=n):h?l.bypassed=n:t[n.name]=n}return p(),!0},cleanElements:function(e,t){for(var r=0;r<e.length;r++){var i=e[r];if(this.clearStyleHints(i),i.dirtyCompoundBoundsCache(),i.dirtyBoundingBoxCache(),t)for(var n=i._private.style,a=Object.keys(n),s=0;s<a.length;s++){var o=a[s],l=n[o];null!=l&&(l.bypass?l.bypassed=null:n[o]=null)}else i._private.style={}}},update:function(){this._private.cy.mutableElements().updateStyle()},updateTransitions:function(t,e){var r=this,i=t._private,n=t.pstyle("transition-property").value,a=t.pstyle("transition-duration").pfValue,s=t.pstyle("transition-delay").pfValue;if(0<n.length&&0<a){for(var o={},l=!1,h=0;h<n.length;h++){var c,u,d=n[h],p=t.pstyle(d),g=e[d];g&&(c=g.prev,g=null!=g.next?g.next:p,p=!1,u=void 0,c)&&(ce(c.pfValue)&&ce(g.pfValue)?(p=g.pfValue-c.pfValue,u=c.pfValue+1e-6*p):ce(c.value)&&ce(g.value)?(p=g.value-c.value,u=c.value+1e-6*p):_te(c.value)&&_te(g.value)&&(p=c.value[0]!==g.value[0]||c.value[1]!==g.value[1]||c.value[2]!==g.value[2],u=c.strValue),p)&&(o[d]=g.strValue,this.applyBypass(t,d,u),l=!0)}l&&(i.transitioning=!0,new Kae(function(e){0<s?t.delayAnimation(s).play().promise().then(e):e()}).then(function(){return t.animation({style:o,duration:a,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(t,n),t.emitAndNotify("style"),i.transitioning=!1}))}else i.transitioning&&(this.removeBypasses(t,n),t.emitAndNotify("style"),i.transitioning=!1)},checkTrigger:function(e,t,r,i,n,a){n=n(t=this.properties[t]),e.removed()||null!=n&&n(r,i,e)&&a(t)},checkZOrderTrigger:function(e,t,r,i){var n=this;this.checkTrigger(e,t,r,i,function(e){return e.triggersZOrder},function(){n._private.cy.notify("zorder",e)})},checkBoundsTrigger:function(t,e,r,i){this.checkTrigger(t,e,r,i,function(e){return e.triggersBounds},function(e){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache()})},checkConnectedEdgesBoundsTrigger:function(t,e,r,i){this.checkTrigger(t,e,r,i,function(e){return e.triggersBoundsOfConnectedEdges},function(e){t.connectedEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},checkParallelEdgesBoundsTrigger:function(t,e,r,i){this.checkTrigger(t,e,r,i,function(e){return e.triggersBoundsOfParallelEdges},function(e){t.parallelEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},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)}},mue={applyBypass:function(e,t,r,i){var n=[];if("*"===t||"**"===t){if(void 0!==r)for(var a=0;a<this.properties.length;a++){var s=this.properties[a].name;(s=this.parse(s,r,!0))&&n.push(s)}}else if(Ete(t)){var o=this.parse(t,r,!0);o&&n.push(o)}else{if(!Ate(t))return!1;var l=t;i=r;for(var h=Object.keys(l),c=0;c<h.length;c++){var u=h[c],d=l[u];void 0!==(d=void 0===d?l[jte(u)]:d)&&(u=this.parse(u,d,!0))&&n.push(u)}}if(0===n.length)return!1;for(var p=!1,g=0;g<e.length;g++){for(var f=e[g],m={},y=void 0,v=0;v<n.length;v++){var x,b=n[v];i&&(x=f.pstyle(b.name),y=m[b.name]={prev:x}),p=this.applyParsedProperty(f,uie(b))||p,i&&(y.next=f.pstyle(b.name))}p&&this.updateStyleHints(f),i&&this.updateTransitions(f,m,!0)}return p},overrideBypass:function(e,t,r){t=Gte(t);for(var i=0;i<e.length;i++){var n=e[i],a=n._private.style[t],s=(o=this.properties[t].type).color,o=o.mutiple,l=a?null!=a.pfValue?a.pfValue:a.value:null;a&&a.bypass?(a.value=r,null!=a.pfValue&&(a.pfValue=r),a.strValue=s?"rgb("+r.join(",")+")":o?r.join(" "):""+r,this.updateStyleHints(n)):this.applyBypass(n,t,r),this.checkTriggers(n,t,l,r)}},removeAllBypasses:function(e,t){return this.removeBypasses(e,this.propertyNames,t)},removeBypasses:function(e,t,r){for(var i=0;i<e.length;i++){for(var n=e[i],a={},s=0;s<t.length;s++){var o=t[s],l=this.properties[o],h=n.pstyle(l.name);h&&h.bypass&&(o=this.parse(o,"",!0),h=a[l.name]={prev:h},this.applyParsedProperty(n,o),h.next=n.pstyle(l.name))}this.updateStyleHints(n),r&&this.updateTransitions(n,a,!0)}}},Ece={getEmSizeInPixels:function(){var e=this.containerCss("font-size");return null!=e?parseFloat(e):1},containerCss:function(e){var t=this._private.cy,r=t.container();if((t=t.window())&&r&&t.getComputedStyle)return t.getComputedStyle(r).getPropertyValue(e)}},(zce={getRenderedStyle:function(e,t){return t?this.getStylePropertyValue(e,t,!0):this.getRawStyle(e,!0)},getRawStyle:function(e,t){if(e=e[0]){for(var r={},i=0;i<this.properties.length;i++){var n=this.properties[i],a=this.getStylePropertyValue(e,n.name,t);null!=a&&(r[n.name]=a,r[jte(n.name)]=a)}return r}},getIndexedStyle:function(e,t,r,i){return e.pstyle(t)[r][i]??e.cy().style().getDefaultProperty(t)[r][0]},getStylePropertyValue:function(e,t,r){if(e=e[0]){var i=(t=(t=this.properties[t]).alias?t.pointsTo:t).type;if(t=e.pstyle(t.name)){var n,a,s,o=t.value,l=t.units,t=t.strValue;if(r&&i.number&&null!=o&&ce(o))return n=e.cy().zoom(),a=mt(function(e){return e*n},"getRenderedValue"),s=mt(function(e,t){return a(e)+t},"getValueStringWithUnits"),((r=_te(o))?l.every(function(e){return null!=e}):null!=l)?r?o.map(function(e,t){return s(e,l[t])}).join(" "):s(o,l):r?o.map(function(e){return Ete(e)?e:""+a(e)}).join(" "):""+a(o);if(null!=t)return t}return null}},getAnimationStartStyle:function(e,t){for(var r={},i=0;i<t.length;i++){var n=t[i].name,a=e.pstyle(n);(a=void 0!==a?Ate(a)?this.parse(n,a.strValue):this.parse(n,a):a)&&(r[n]=a)}return r},getPropsList:function(e){var t=[],r=e,i=this.properties;if(r)for(var n=Object.keys(r),a=0;a<n.length;a++){var s=r[o=n[a]],o=i[o]||i[Gte(o)];(o=this.parse(o.name,s))&&t.push(o)}return t},getNonDefaultPropertiesHash:function(e,t,r){for(var i,n,a,s,o=r.slice(),l=0;l<t.length;l++)if(null!=(i=e.pstyle(t[l],!1)))if(null!=i.pfValue)o[0]=Ure(a,o[0]),o[1]=Gre(a,o[1]);else for(n=i.strValue,s=0;s<n.length;s++)a=n.charCodeAt(s),o[0]=Ure(a,o[0]),o[1]=Gre(a,o[1]);return o}}).getPropertiesHash=zce.getNonDefaultPropertiesHash,_ce={appendFromJson:function(e){for(var t=0;t<e.length;t++){var r=e[t],i=r.selector,n=r.style||r.css,a=Object.keys(n);this.selector(i);for(var s=0;s<a.length;s++){var o=a[s],l=n[o];this.css(o,l)}}return this},fromJson:function(e){return this.resetToDefault(),this.appendFromJson(e),this},json:function(){for(var e=[],t=this.defaultLength;t<this.length;t++){for(var r=this[t],i=r.selector,n=r.properties,a={},s=0;s<n.length;s++){var o=n[s];a[o.name]=o.strValue}e.push({selector:i?i.toString():"core",style:a})}return e}},Mce={appendFromString:function(e){var t=""+e;function r(){t=t.length>a.length?t.substr(a.length):""}function i(){h=h.length>u.length?h.substr(u.length):""}for(t=t.replace(/[/][*](\s|.)+?[*][/]/g,""),mt(r,"removeSelAndBlockFromRemaining"),mt(i,"removePropAndValFromRem");!t.match(/^\s*$/);){var n=t.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!n){hie("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+t);break}var a=n[0],s=n[1];if("core"!==s&&new gle(s).invalid)hie("Skipping parsing of block: Invalid selector found in string stylesheet: "+s);else{for(var o=n[2],l=!1,h=o,c=[];!h.match(/^\s*$/);){if(!(p=h.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/))){hie("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+o),l=!0;break}var u=p[0],d=p[1],p=p[2];this.properties[d]?this.parse(d,p)?c.push({name:d,val:p}):hie("Skipping property: Invalid property definition in: "+u):hie("Skipping property: Invalid property name in: "+u),i()}if(l){r();break}this.selector(s);for(var g=0;g<c.length;g++){var f=c[g];this.css(f.name,f.val)}}r()}return this},fromString:function(e){return this.resetToDefault(),this.appendFromString(e),this}},ohe={};var a=Xte,s=mt(function(e){return"^"+e+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},"data"),h=mt(function(e){var t=a+"|\\w+|rgb[a]?\\((?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)(?:\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)|hsl[a]?\\((?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?)))\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])(?:\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)|\\#[0-9a-fA-F]{3}|\\#[0-9a-fA-F]{6}";return"^"+e+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+a+")\\s*\\,\\s*("+a+")\\s*,\\s*("+t+")\\s*\\,\\s*("+t+")\\)$"},"mapData"),u=[`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`,"^(none)$","^(.+)$"],s=(ohe.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},percentages:{number:!0,min:0,max:100,units:"%",implicitUnits:"%",multiple:!0},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},nonNegativeNumber:{number:!0,min:0,unitless:!0},position:{enums:["parent","origin"]},nodeSize:{number:!0,min:0,enums:["label"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizeMaybePercent:{number:!0,allowPercent:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},axisDirection:{enums:["horizontal","leftward","rightward","vertical","upward","downward","auto"]},axisDirectionExplicit:{enums:["leftward","rightward","upward","downward"]},axisDirectionPrimary:{enums:["horizontal","vertical"]},paddingRelativeTo:{enums:["width","height","average","min","max"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:["auto"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:["inner","include-padding"],multiple:!0},bgRepeat:{enums:["repeat","repeat-x","repeat-y","no-repeat"],multiple:!0},bgFit:{enums:["none","contain","cover"],multiple:!0},bgCrossOrigin:{enums:["anonymous","use-credentials","null"],multiple:!0},bgClip:{enums:["none","node"],multiple:!0},bgContainment:{enums:["inside","over"],multiple:!0},boxSelection:{enums:["contain","overlap","none"]},color:{color:!0},colors:{color:!0,multiple:!0},fill:{enums:["solid","linear-gradient","radial-gradient"]},bool:{enums:["yes","no"]},bools:{enums:["yes","no"],multiple:!0},lineStyle:{enums:["solid","dotted","dashed"]},lineCap:{enums:["butt","round","square"]},linePosition:{enums:["center","inside","outside"]},lineJoin:{enums:["round","bevel","miter"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments","straight","straight-triangle","taxi","round-segments","round-taxi"]},radiusType:{enums:["arc-radius","influence-radius"],multiple:!0},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontStyle:{enums:["italic","normal","oblique"]},fontWeight:{enums:["normal","bold","bolder","lighter","100","200","300","400","500","600","800","900",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:["none","underline","overline","line-through"]},textTransform:{enums:["none","uppercase","lowercase"]},textWrap:{enums:["none","wrap","ellipsis"]},textOverflowWrap:{enums:["whitespace","anywhere"]},textBackgroundShape:{enums:["rectangle","roundrectangle","round-rectangle","circle"]},nodeShape:{enums:["rectangle","roundrectangle","round-rectangle","cutrectangle","cut-rectangle","bottomroundrectangle","bottom-round-rectangle","barrel","ellipse","triangle","round-triangle","square","pentagon","round-pentagon","hexagon","round-hexagon","concavehexagon","concave-hexagon","heptagon","round-heptagon","octagon","round-octagon","tag","round-tag","star","diamond","round-diamond","vee","rhomboid","right-rhomboid","polygon"]},overlayShape:{enums:["roundrectangle","round-rectangle","ellipse"]},cornerRadius:{number:!0,min:0,units:"px|em",implicitUnits:"px",enums:["auto"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","circle-triangle","triangle-cross","triangle-backcurve","vee","square","circle","diamond","chevron","none"]},arrowFill:{enums:["filled","hollow"]},arrowWidth:{number:!0,units:"%|px|em",implicitUnits:"px",enums:["match-line"]},display:{enums:["element","none"]},visibility:{enums:["hidden","visible"]},zCompoundDepth:{enums:["bottom","orphan","auto","top"]},zIndexCompare:{enums:["auto","manual"]},valign:{enums:["top","center","bottom"]},halign:{enums:["left","center","right"]},justification:{enums:["left","center","right","auto"]},text:{string:!0},data:{mapping:!0,regex:s("data")},layoutData:{mapping:!0,regex:s("layoutData")},scratch:{mapping:!0,regex:s("scratch")},mapData:{mapping:!0,regex:h("mapData")},mapLayoutData:{mapping:!0,regex:h("mapLayoutData")},mapScratch:{mapping:!0,regex:h("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:u,singleRegexMatchValue:!0},urls:{regexes:u,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:"deg|rad",implicitUnits:"rad"},textRotation:{number:!0,units:"deg|rad",implicitUnits:"rad",enums:["none","autorotate"]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:["intersection","node-position","endpoints"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-node-or-label","outside-to-line","outside-to-line-or-label"],singleEnum:!0,validate:mt(function(e,t){switch(e.length){case 2:return"deg"!==t[0]&&"rad"!==t[0]&&"deg"!==t[1]&&"rad"!==t[1];case 1:return Ete(e[0])||"deg"===t[0]||"rad"===t[0];default:return!1}},"validate")},easing:{regexes:["^(spring)\\s*\\(\\s*("+a+")\\s*,\\s*("+a+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+a+")\\s*,\\s*("+a+")\\s*,\\s*("+a+")\\s*,\\s*("+a+")\\s*\\)$"],enums:["linear","ease","ease-in","ease-out","ease-in-out","ease-in-sine","ease-out-sine","ease-in-out-sine","ease-in-quad","ease-out-quad","ease-in-out-quad","ease-in-cubic","ease-out-cubic","ease-in-out-cubic","ease-in-quart","ease-out-quart","ease-in-out-quart","ease-in-quint","ease-out-quint","ease-in-out-quint","ease-in-expo","ease-out-expo","ease-in-out-expo","ease-in-circ","ease-out-circ","ease-in-out-circ"]},gradientDirection:{enums:["to-bottom","to-top","to-left","to-right","to-bottom-right","to-bottom-left","to-top-right","to-top-left","to-right-bottom","to-left-bottom","to-right-top","to-left-top"]},boundsExpansion:{number:!0,multiple:!0,min:0,validate:mt(function(e){return 1===(e=e.length)||2===e||4===e},"validate")}},{zeroNonZero:mt(function(e,t){return(null==e||null==t)&&e!==t||0==e&&0!=t||0!=e&&0==t},"zeroNonZero"),any:mt(function(e,t){return e!=t},"any"),emptyNonEmpty:mt(function(e,t){return e=$te(e),t=$te(t),e&&!t||!e&&t},"emptyNonEmpty")}),d=ohe.types,h=[{name:"label",type:d.text,triggersBounds:s.any,triggersZOrder:s.emptyNonEmpty},{name:"text-rotation",type:d.textRotation,triggersBounds:s.any},{name:"text-margin-x",type:d.bidirectionalSize,triggersBounds:s.any},{name:"text-margin-y",type:d.bidirectionalSize,triggersBounds:s.any}],u=[{name:"source-label",type:d.text,triggersBounds:s.any},{name:"source-text-rotation",type:d.textRotation,triggersBounds:s.any},{name:"source-text-margin-x",type:d.bidirectionalSize,triggersBounds:s.any},{name:"source-text-margin-y",type:d.bidirectionalSize,triggersBounds:s.any},{name:"source-text-offset",type:d.size,triggersBounds:s.any}],p=[{name:"target-label",type:d.text,triggersBounds:s.any},{name:"target-text-rotation",type:d.textRotation,triggersBounds:s.any},{name:"target-text-margin-x",type:d.bidirectionalSize,triggersBounds:s.any},{name:"target-text-margin-y",type:d.bidirectionalSize,triggersBounds:s.any},{name:"target-text-offset",type:d.size,triggersBounds:s.any}],g=[{name:"font-family",type:d.fontFamily,triggersBounds:s.any},{name:"font-style",type:d.fontStyle,triggersBounds:s.any},{name:"font-weight",type:d.fontWeight,triggersBounds:s.any},{name:"font-size",type:d.size,triggersBounds:s.any},{name:"text-transform",type:d.textTransform,triggersBounds:s.any},{name:"text-wrap",type:d.textWrap,triggersBounds:s.any},{name:"text-overflow-wrap",type:d.textOverflowWrap,triggersBounds:s.any},{name:"text-max-width",type:d.size,triggersBounds:s.any},{name:"text-outline-width",type:d.size,triggersBounds:s.any},{name:"line-height",type:d.positiveNumber,triggersBounds:s.any}],f=[{name:"text-valign",type:d.valign,triggersBounds:s.any},{name:"text-halign",type:d.halign,triggersBounds:s.any},{name:"color",type:d.color},{name:"text-outline-color",type:d.color},{name:"text-outline-opacity",type:d.zeroOneNumber},{name:"text-background-color",type:d.color},{name:"text-background-opacity",type:d.zeroOneNumber},{name:"text-background-padding",type:d.size,triggersBounds:s.any},{name:"text-border-opacity",type:d.zeroOneNumber},{name:"text-border-color",type:d.color},{name:"text-border-width",type:d.size,triggersBounds:s.any},{name:"text-border-style",type:d.borderStyle,triggersBounds:s.any},{name:"text-background-shape",type:d.textBackgroundShape,triggersBounds:s.any},{name:"text-justification",type:d.justification},{name:"box-select-labels",type:d.bool,triggersBounds:s.any}],m=[{name:"events",type:d.bool,triggersZOrder:s.any},{name:"text-events",type:d.bool,triggersZOrder:s.any},{name:"box-selection",type:d.boxSelection,triggersZOrder:s.any}],y=[{name:"display",type:d.display,triggersZOrder:s.any,triggersBounds:s.any,triggersBoundsOfConnectedEdges:s.any,triggersBoundsOfParallelEdges:mt(function(e,t,r){return e!==t&&"bezier"===r.pstyle("curve-style").value},"triggersBoundsOfParallelEdges")},{name:"visibility",type:d.visibility,triggersZOrder:s.any},{name:"opacity",type:d.zeroOneNumber,triggersZOrder:s.zeroNonZero},{name:"text-opacity",type:d.zeroOneNumber},{name:"min-zoomed-font-size",type:d.size},{name:"z-compound-depth",type:d.zCompoundDepth,triggersZOrder:s.any},{name:"z-index-compare",type:d.zIndexCompare,triggersZOrder:s.any},{name:"z-index",type:d.number,triggersZOrder:s.any}],B=[{name:"overlay-padding",type:d.size,triggersBounds:s.any},{name:"overlay-color",type:d.color},{name:"overlay-opacity",type:d.zeroOneNumber,triggersBounds:s.zeroNonZero},{name:"overlay-shape",type:d.overlayShape,triggersBounds:s.any},{name:"overlay-corner-radius",type:d.cornerRadius}],P=[{name:"underlay-padding",type:d.size,triggersBounds:s.any},{name:"underlay-color",type:d.color},{name:"underlay-opacity",type:d.zeroOneNumber,triggersBounds:s.zeroNonZero},{name:"underlay-shape",type:d.overlayShape,triggersBounds:s.any},{name:"underlay-corner-radius",type:d.cornerRadius}],$=[{name:"transition-property",type:d.propList},{name:"transition-duration",type:d.time},{name:"transition-delay",type:d.time},{name:"transition-timing-function",type:d.easing}],v=mt(function(e,t){return"label"===t.value?-e.poolIndex():t.pfValue},"nodeSizeHashOverride"),v=[{name:"height",type:d.nodeSize,triggersBounds:s.any,hashOverride:v},{name:"width",type:d.nodeSize,triggersBounds:s.any,hashOverride:v},{name:"shape",type:d.nodeShape,triggersBounds:s.any},{name:"shape-polygon-points",type:d.polygonPointList,triggersBounds:s.any},{name:"corner-radius",type:d.cornerRadius},{name:"background-color",type:d.color},{name:"background-fill",type:d.fill},{name:"background-opacity",type:d.zeroOneNumber},{name:"background-blacken",type:d.nOneOneNumber},{name:"background-gradient-stop-colors",type:d.colors},{name:"background-gradient-stop-positions",type:d.percentages},{name:"background-gradient-direction",type:d.gradientDirection},{name:"padding",type:d.sizeMaybePercent,triggersBounds:s.any},{name:"padding-relative-to",type:d.paddingRelativeTo,triggersBounds:s.any},{name:"bounds-expansion",type:d.boundsExpansion,triggersBounds:s.any}],F=[{name:"border-color",type:d.color},{name:"border-opacity",type:d.zeroOneNumber},{name:"border-width",type:d.size,triggersBounds:s.any},{name:"border-style",type:d.borderStyle},{name:"border-cap",type:d.lineCap},{name:"border-join",type:d.lineJoin},{name:"border-dash-pattern",type:d.numbers},{name:"border-dash-offset",type:d.number},{name:"border-position",type:d.linePosition}],z=[{name:"outline-color",type:d.color},{name:"outline-opacity",type:d.zeroOneNumber},{name:"outline-width",type:d.size,triggersBounds:s.any},{name:"outline-style",type:d.borderStyle},{name:"outline-offset",type:d.size,triggersBounds:s.any}],q=[{name:"background-image",type:d.urls},{name:"background-image-crossorigin",type:d.bgCrossOrigin},{name:"background-image-opacity",type:d.zeroOneNumbers},{name:"background-image-containment",type:d.bgContainment},{name:"background-image-smoothing",type:d.bools},{name:"background-position-x",type:d.bgPos},{name:"background-position-y",type:d.bgPos},{name:"background-width-relative-to",type:d.bgRelativeTo},{name:"background-height-relative-to",type:d.bgRelativeTo},{name:"background-repeat",type:d.bgRepeat},{name:"background-fit",type:d.bgFit},{name:"background-clip",type:d.bgClip},{name:"background-width",type:d.bgWH},{name:"background-height",type:d.bgWH},{name:"background-offset-x",type:d.bgPos},{name:"background-offset-y",type:d.bgPos}],W=[{name:"position",type:d.position,triggersBounds:s.any},{name:"compound-sizing-wrt-labels",type:d.compoundIncludeLabels,triggersBounds:s.any},{name:"min-width",type:d.size,triggersBounds:s.any},{name:"min-width-bias-left",type:d.sizeMaybePercent,triggersBounds:s.any},{name:"min-width-bias-right",type:d.sizeMaybePercent,triggersBounds:s.any},{name:"min-height",type:d.size,triggersBounds:s.any},{name:"min-height-bias-top",type:d.sizeMaybePercent,triggersBounds:s.any},{name:"min-height-bias-bottom",type:d.sizeMaybePercent,triggersBounds:s.any}],U=[{name:"line-style",type:d.lineStyle},{name:"line-color",type:d.color},{name:"line-fill",type:d.fill},{name:"line-cap",type:d.lineCap},{name:"line-opacity",type:d.zeroOneNumber},{name:"line-dash-pattern",type:d.numbers},{name:"line-dash-offset",type:d.number},{name:"line-outline-width",type:d.size},{name:"line-outline-color",type:d.color},{name:"line-gradient-stop-colors",type:d.colors},{name:"line-gradient-stop-positions",type:d.percentages},{name:"curve-style",type:d.curveStyle,triggersBounds:s.any,triggersBoundsOfParallelEdges:mt(function(e,t){return e!==t&&("bezier"===e||"bezier"===t)},"triggersBoundsOfParallelEdges")},{name:"haystack-radius",type:d.zeroOneNumber,triggersBounds:s.any},{name:"source-endpoint",type:d.edgeEndpoint,triggersBounds:s.any},{name:"target-endpoint",type:d.edgeEndpoint,triggersBounds:s.any},{name:"control-point-step-size",type:d.size,triggersBounds:s.any},{name:"control-point-distances",type:d.bidirectionalSizes,triggersBounds:s.any},{name:"control-point-weights",type:d.numbers,triggersBounds:s.any},{name:"segment-distances",type:d.bidirectionalSizes,triggersBounds:s.any},{name:"segment-weights",type:d.numbers,triggersBounds:s.any},{name:"segment-radii",type:d.numbers,triggersBounds:s.any},{name:"radius-type",type:d.radiusType,triggersBounds:s.any},{name:"taxi-turn",type:d.bidirectionalSizeMaybePercent,triggersBounds:s.any},{name:"taxi-turn-min-distance",type:d.size,triggersBounds:s.any},{name:"taxi-direction",type:d.axisDirection,triggersBounds:s.any},{name:"taxi-radius",type:d.number,triggersBounds:s.any},{name:"edge-distances",type:d.edgeDistances,triggersBounds:s.any},{name:"arrow-scale",type:d.positiveNumber,triggersBounds:s.any},{name:"loop-direction",type:d.angle,triggersBounds:s.any},{name:"loop-sweep",type:d.angle,triggersBounds:s.any},{name:"source-distance-from-node",type:d.size,triggersBounds:s.any},{name:"target-distance-from-node",type:d.size,triggersBounds:s.any}],G=[{name:"ghost",type:d.bool,triggersBounds:s.any},{name:"ghost-offset-x",type:d.bidirectionalSize,triggersBounds:s.any},{name:"ghost-offset-y",type:d.bidirectionalSize,triggersBounds:s.any},{name:"ghost-opacity",type:d.zeroOneNumber}],j=[{name:"selection-box-color",type:d.color},{name:"selection-box-opacity",type:d.zeroOneNumber},{name:"selection-box-border-color",type:d.color},{name:"selection-box-border-width",type:d.size},{name:"active-bg-color",type:d.color},{name:"active-bg-opacity",type:d.zeroOneNumber},{name:"active-bg-size",type:d.size},{name:"outside-texture-bg-color",type:d.color},{name:"outside-texture-bg-opacity",type:d.zeroOneNumber}],x=[];ohe.pieBackgroundN=16,x.push({name:"pie-size",type:d.sizeMaybePercent}),x.push({name:"pie-hole",type:d.sizeMaybePercent}),x.push({name:"pie-start-angle",type:d.angle});for(var b=1;b<=ohe.pieBackgroundN;b++)x.push({name:"pie-"+b+"-background-color",type:d.color}),x.push({name:"pie-"+b+"-background-size",type:d.percent}),x.push({name:"pie-"+b+"-background-opacity",type:d.zeroOneNumber});var T=[];ohe.stripeBackgroundN=16,T.push({name:"stripe-size",type:d.sizeMaybePercent}),T.push({name:"stripe-direction",type:d.axisDirectionPrimary});for(var k=1;k<=ohe.stripeBackgroundN;k++)T.push({name:"stripe-"+k+"-background-color",type:d.color}),T.push({name:"stripe-"+k+"-background-size",type:d.percent}),T.push({name:"stripe-"+k+"-background-opacity",type:d.zeroOneNumber});var w=[],V=ohe.arrowPrefixes=["source","mid-source","target","mid-target"],C=([{name:"arrow-shape",type:d.arrowShape,triggersBounds:s.any},{name:"arrow-color",type:d.color},{name:"arrow-fill",type:d.arrowFill},{name:"arrow-width",type:d.arrowWidth}].forEach(function(t){V.forEach(function(e){e=e+"-"+t.name,w.push({name:e,type:t.type,triggersBounds:t.triggersBounds})})},{}),ohe.properties=[].concat(m,$,y,B,P,G,f,g,h,u,p,v,F,z,q,x,T,W,U,w,j)),E=ohe.propertyGroups={behavior:m,transition:$,visibility:y,overlay:B,underlay:P,ghost:G,commonLabel:f,labelDimensions:g,mainLabel:h,sourceLabel:u,targetLabel:p,nodeBody:v,nodeBorder:F,nodeOutline:z,backgroundImage:q,pie:x,stripe:T,compound:W,edgeLine:U,edgeArrow:w,core:j},Y=ohe.propertyGroupNames={},H=((ohe.propertyGroupKeys=Object.keys(E)).forEach(function(t){Y[t]=E[t].map(function(e){return e.name}),E[t].forEach(function(e){return e.groupKey=t})}),ohe.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{name:"segment-distance",pointsTo:"segment-distances"},{name:"segment-weight",pointsTo:"segment-weights"},{name:"segment-radius",pointsTo:"segment-radii"},{name:"edge-text-rotation",pointsTo:"text-rotation"},{name:"padding-left",pointsTo:"padding"},{name:"padding-right",pointsTo:"padding"},{name:"padding-top",pointsTo:"padding"},{name:"padding-bottom",pointsTo:"padding"}]);ohe.propertyNames=C.map(function(e){return e.name});for(var S=0;S<C.length;S++){var X=C[S];C[X.name]=X}for(var _=0;_<H.length;_++){var A=H[_],L=C[A.pointsTo];C.push(L={name:A.name,alias:!0,pointsTo:L}),C[A.name]=L}function R(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:nie;XZ(this,R),this.idsByKey=new Tie,this.keyForId=new Tie,this.cachesByLvl=new Tie,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=t}function I(e,t,r,i){XZ(this,I),this.r=e,this.texSize=t,this.texRows=r,this.createTextureCanvas=i,this.atlases=[],this.styleKeyToAtlas=new Map,this.markedKeys=new Set}function N(e,t,r,i){XZ(this,N),this.debugID=Math.floor(1e4*Math.random()),this.r=e,this.texSize=t,this.texRows=r,this.texHeight=Math.floor(t/r),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=i(e,t,t),this.scratch=i(e,t,this.texHeight,"scratch")}function D(e,t,r){XZ(this,D),this.r=e,this.gl=t,this.maxInstances=r.webglBatchSize,this.atlasSize=r.webglTexSize,this.bgColor=r.bgColor,this.debug=r.webglDebug,this.batchDebugInfo=[],r.enableWrapping=!0,r.createTextureCanvas=Eee,this.atlasManager=new jce(e,r),this.batchManager=new Vce(r),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(Yce.SCREEN),this.pickingProgram=this._createShaderProgram(Yce.PICKING),this.vao=this._createVAO()}function M(e){XZ(this,M),this.globalOptions=e,this.atlasSize=e.webglTexSize,this.maxAtlasesPerBatch=e.webglTexPerBatch,this.batchAtlases=[]}function O(e,t){XZ(this,O),this.r=e,this.globalOptions=t,this.atlasSize=t.webglTexSize,this.maxAtlasesPerBatch=t.webglTexPerBatch,this.renderTypes=new Map,this.collections=new Map,this.typeAndIdToKey=new Map}for(ohe.getDefaultProperty=function(e){return this.getDefaultProperties()[e]},ohe.getDefaultProperties=function(){var e=this._private;if(null==e.defaultProperties){for(var t=Qte({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125,events:"yes","text-events":"no","text-valign":"top","text-halign":"center","text-justification":"auto","line-height":1,color:"#000","box-selection":"contain","text-outline-color":"#000","text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":"none","text-transform":"none","text-wrap":"none","text-overflow-wrap":"whitespace","text-max-width":9999,"text-background-color":"#000","text-background-opacity":0,"text-background-shape":"rectangle","text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":"solid","text-border-color":"#000","font-family":"Helvetica Neue, Helvetica, sans-serif","font-style":"normal","font-weight":"normal","font-size":16,"min-zoomed-font-size":0,"text-rotation":"none","source-text-rotation":"none","target-text-rotation":"none",visibility:"visible",display:"element",opacity:1,"z-compound-depth":"auto","z-index-compare":"auto","z-index":0,label:"","text-margin-x":0,"text-margin-y":0,"source-label":"","source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":"","target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":"#000","overlay-padding":10,"overlay-shape":"round-rectangle","overlay-corner-radius":"auto","underlay-opacity":0,"underlay-color":"#000","underlay-padding":10,"underlay-shape":"round-rectangle","underlay-corner-radius":"auto","transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","box-select-labels":"no","background-blacken":0,"background-color":"#999","background-fill":"solid","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-image-containment":"inside","background-image-smoothing":"yes","background-position-x":"50%","background-position-y":"50%","background-offset-x":0,"background-offset-y":0,"background-width-relative-to":"include-padding","background-height-relative-to":"include-padding","background-repeat":"no-repeat","background-fit":"none","background-clip":"node","background-width":"auto","background-height":"auto","border-color":"#000","border-opacity":1,"border-width":0,"border-style":"solid","border-dash-pattern":[4,2],"border-dash-offset":0,"border-cap":"butt","border-join":"miter","border-position":"center","outline-color":"#999","outline-opacity":1,"outline-width":0,"outline-offset":0,"outline-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1, 1, -1, 1, 1, -1, 1","corner-radius":"auto","bounds-expansion":0,"background-gradient-direction":"to-bottom","background-gradient-stop-colors":"#999","background-gradient-stop-positions":"0%",ghost:"no","ghost-offset-y":0,"ghost-offset-x":0,"ghost-opacity":0,padding:0,"padding-relative-to":"width",position:"origin","compound-sizing-wrt-labels":"include","min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":"100%","pie-hole":0,"pie-start-angle":"0deg"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce(function(e,t){for(var r=1;r<=ohe.pieBackgroundN;r++){var i=t.name.replace("{{i}}",r),n=t.value;e[i]=n}return e},{}),{"stripe-size":"100%","stripe-direction":"horizontal"},[{name:"stripe-{{i}}-background-color",value:"black"},{name:"stripe-{{i}}-background-size",value:"0%"},{name:"stripe-{{i}}-background-opacity",value:1}].reduce(function(e,t){for(var r=1;r<=ohe.stripeBackgroundN;r++){var i=t.name.replace("{{i}}",r),n=t.value;e[i]=n}return e},{}),{"line-style":"solid","line-color":"#999","line-fill":"solid","line-cap":"butt","line-opacity":1,"line-outline-width":0,"line-outline-color":"#000","line-gradient-stop-colors":"#999","line-gradient-stop-positions":"0%","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"segment-radii":15,"radius-type":"arc-radius","taxi-turn":"50%","taxi-radius":15,"taxi-turn-min-distance":10,"taxi-direction":"auto","edge-distances":"intersection","curve-style":"haystack","haystack-radius":0,"arrow-scale":1,"loop-direction":"-45deg","loop-sweep":"-90deg","source-distance-from-node":0,"target-distance-from-node":0,"source-endpoint":"outside-to-node","target-endpoint":"outside-to-node","line-dash-pattern":[6,3],"line-dash-offset":0},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"},{name:"arrow-width",value:1}].reduce(function(t,r){return ohe.arrowPrefixes.forEach(function(e){e=e+"-"+r.name,t[e]=r.value}),t},{})),r={},i=0;i<this.properties.length;i++){var n,a=this.properties[i];a.pointsTo||(n=t[a=a.name],n=this.parse(a,n),r[a]=n)}e.defaultProperties=r}return e.defaultProperties},ohe.addDefaultStylesheet=function(){this.selector(":parent").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3}).selector(":loop").css({"curve-style":"bezier"}).selector("edge:compound").css({"curve-style":"bezier","source-endpoint":"outside-to-line","target-endpoint":"outside-to-line"}).selector(":selected").css({"background-color":"#0169D9","line-color":"#0169D9","source-arrow-color":"#0169D9","target-arrow-color":"#0169D9","mid-source-arrow-color":"#0169D9","mid-target-arrow-color":"#0169D9"}).selector(":parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}),this.defaultLength=this.length},Oce={parse:function(e,t,r,i){var n,a,s;return Ste(t)?this.parseImplWarn(e,t,r,i):(n=Kre(e,""+t,r?"t":"f","mapping"===i||!0===i||!1===i||null==i?"dontcare":i),s=(s=(a=this.propCache=this.propCache||[])[n])||(a[n]=this.parseImplWarn(e,t,r,i)),(r||"mapping"===i)&&(s=uie(s))&&(s.value=uie(s.value)),s)},parseImplWarn:function(e,t,r,i){return(r=this.parseImpl(e,t,r,i))||null==t||hie("The style property `".concat(e,": ").concat(t,"` is invalid")),!r||"width"!==r.name&&"height"!==r.name||"label"!==t||hie("The style value of `label` is deprecated for `"+r.name+"`"),r},parseImpl:function(t,r,i,e){t=Gte(t);var n=this.properties[t],a=r,s=this.types;if(!n||void 0===r)return null;n.alias&&(n=n.pointsTo,t=n.name);var o=Ete(r),l=(o&&(r=r.trim()),n.type);if(!l)return null;if(i&&(""===r||null===r))return{name:t,value:r,bypass:!0,deleteBypass:!0};if(Ste(r))return{name:t,value:r,strValue:"fn",mapped:s.fn,bypass:i};if(!(!o||e||r.length<7||"a"!==r[1])){if(7<=r.length&&"d"===r[0]&&(n=new RegExp(s.data.regex).exec(r)))return!i&&(b=s.data,{name:t,value:n,strValue:""+r,mapped:b,field:n[1],bypass:i});if(10<=r.length&&"m"===r[0]&&(b=new RegExp(s.mapData.regex).exec(r))){if(i||l.multiple)return!1;if(n=s.mapData,!l.color&&!l.number)return!1;if(!(s=this.parse(t,b[4]))||s.mapped)return!1;if(!(T=this.parse(t,b[5]))||T.mapped)return!1;if(s.pfValue===T.pfValue||s.strValue===T.strValue)return hie("`"+t+": "+r+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+s.strValue+"`"),this.parse(t,s.strValue);if(l.color){var h=s.value,c=T.value;if(!(h[0]!==c[0]||h[1]!==c[1]||h[2]!==c[2]||h[3]!==c[3]&&(null!=h[3]&&1!==h[3]||null!=c[3]&&1!==c[3])))return!1}return{name:t,value:b,strValue:""+r,mapped:n,field:b[1],fieldMin:parseFloat(b[2]),fieldMax:parseFloat(b[3]),valueMin:s.value,valueMax:T.value,bypass:i}}}if(l.multiple&&"multiple"!==e){var u=o?r.split(/\s+/):_te(r)?r:[r];if(l.evenMultiple&&u.length%2!=0)return null;for(var d=[],p=[],g=[],f="",m=!1,y=0;y<u.length;y++){var v=this.parse(t,u[y],i,"multiple"),m=m||Ete(v.value);d.push(v.value),g.push(null!=v.pfValue?v.pfValue:v.value),p.push(v.units),f+=(0<y?" ":"")+v.strValue}return l.validate&&!l.validate(d,p)?null:l.singleEnum&&m?1===d.length&&Ete(d[0])?{name:t,value:d[0],strValue:d[0],bypass:i}:null:{name:t,value:d,pfValue:g,strValue:f,bypass:i,units:p}}var x,b,h=mt(function(){for(var e=0;e<l.enums.length;e++)if(l.enums[e]===r)return{name:t,value:r,strValue:""+r,bypass:i};return null},"checkEnums");if(l.number)return c="px",l.units&&(x=l.units),l.implicitUnits&&(c=l.implicitUnits),l.unitless||(o?(n="px|em"+(l.allowPercent?"|\\%":""),x&&(n=x),(b=r.match("^("+Xte+")("+n+")?$"))&&(r=b[1],x=b[2]||c)):x&&!l.implicitUnits||(x=c)),r=parseFloat(r),isNaN(r)&&void 0===l.enums?null:isNaN(r)&&void 0!==l.enums?(r=a,h()):l.integer&&!Rte(r)||void 0!==l.min&&(r<l.min||l.strictMin&&r===l.min)||void 0!==l.max&&(r>l.max||l.strictMax&&r===l.max)?null:(s={name:t,value:r,strValue:""+r+(x||""),units:x,bypass:i},l.unitless||"px"!==x&&"em"!==x?s.pfValue=r:s.pfValue="px"!==x&&x?this.getEmSizeInPixels()*r:r,"ms"!==x&&"s"!==x||(s.pfValue="ms"===x?r:1e3*r),"deg"!==x&&"rad"!==x||(s.pfValue="rad"===x?r:jie(r)),"%"===x&&(s.pfValue=r/100),s);if(l.propList){var T,k=[];if("none"!=(T=""+r)){for(var w=T.split(/\s*,\s*|\s+/),C=0;C<w.length;C++){var E=w[C].trim();this.properties[E]?k.push(E):hie("`"+E+"` is not a valid property name")}if(0===k.length)return null}return{name:t,value:k,strValue:0===k.length?"none":k.join(" "),bypass:i}}if(l.color)return(e=ire(r))?{name:t,value:e,pfValue:e,strValue:"rgb("+e[0]+","+e[1]+","+e[2]+")",bypass:i}:null;if(l.regex||l.regexes){if(l.enums&&(o=h()))return o;for(var S=l.regexes||[l.regex],_=0;_<S.length;_++){var A=new RegExp(S[_]).exec(r);if(A)return{name:t,value:l.singleRegexMatchValue?A[1]:A,strValue:""+r,bypass:i}}return null}return l.string?{name:t,value:""+r,strValue:""+r,bypass:i}:l.enums?h():null}},lhe=mt(function(e){if(!(this instanceof lhe))return new lhe(e);Ote(e)?(this._private={cy:e,coreStyle:{}},this.length=0,this.resetToDefault()):oie("A style must have a core reference")},"Style"),(hhe=lhe.prototype).instanceString=function(){return"style"},hhe.clear=function(){for(var e=this._private,t=e.cy.elements(),r=0;r<this.length;r++)this[r]=void 0;return this.length=0,e.contextStyles={},e.propDiffs={},this.cleanElements(t,!0),t.forEach(function(e){(e=e[0]._private).styleDirty=!0,e.appliedInitStyle=!1}),this},hhe.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},hhe.core=function(e){return this._private.coreStyle[e]||this.getDefaultProperty(e)},hhe.selector=function(e){var e="core"===e?null:new gle(e),t=this.length++;return this[t]={selector:e,properties:[],mappedProperties:[],index:t},this},hhe.css=function(){var e=arguments;if(1===e.length)for(var t=e[0],r=0;r<this.properties.length;r++){var i=this.properties[r],n=t[i.name];void 0!==(n=void 0===n?t[jte(i.name)]:n)&&this.cssRule(i.name,n)}else 2===e.length&&this.cssRule(e[0],e[1]);return this},hhe.style=hhe.css,hhe.cssRule=function(e,t){return(e=this.parse(e,t))&&(this[t=this.length-1].properties.push(e),(this[t].properties[e.name]=e).name.match(/pie-(\d+)-background-size/)&&e.value&&(this._private.hasPie=!0),e.name.match(/stripe-(\d+)-background-size/)&&e.value&&(this._private.hasStripe=!0),e.mapped&&this[t].mappedProperties.push(e),!this[t].selector)&&(this._private.coreStyle[e.name]=e),this},hhe.append=function(e){return Bte(e)?e.appendToStyle(this):_te(e)?this.appendFromJson(e):Ete(e)&&this.appendFromString(e),this},lhe.fromJson=function(e,t){return(e=new lhe(e)).fromJson(t),e},lhe.fromString=function(e,t){return new lhe(e).fromString(t)},[Uhe,mue,Ece,zce,_ce,Mce,ohe,Oce].forEach(function(e){Qte(hhe,e)}),lhe.types=hhe.types,lhe.properties=hhe.properties,lhe.propertyGroups=hhe.propertyGroups,lhe.propertyGroupNames=hhe.propertyGroupNames,lhe.propertyGroupKeys=hhe.propertyGroupKeys,mce={style:mt(function(e){return e&&this.setStyle(e).update(),this._private.style},"style"),setStyle:mt(function(e){var t=this._private;return Bte(e)?t.style=e.generateStyle(this):_te(e)?t.style=lhe.fromJson(this,e):Ete(e)?t.style=lhe.fromString(this,e):t.style=lhe(this),t.style},"setStyle"),updateStyle:mt(function(){this.mutableElements().updateStyle()},"updateStyle")},(te={autolock:mt(function(e){return void 0===e?this._private.autolock:(this._private.autolock=!!e,this)},"autolock"),autoungrabify:mt(function(e){return void 0===e?this._private.autoungrabify:(this._private.autoungrabify=!!e,this)},"autoungrabify"),autounselectify:mt(function(e){return void 0===e?this._private.autounselectify:(this._private.autounselectify=!!e,this)},"autounselectify"),selectionType:mt(function(e){var t=this._private;return null==t.selectionType&&(t.selectionType="single"),void 0===e?t.selectionType:("additive"!==e&&"single"!==e||(t.selectionType=e),this)},"selectionType"),panningEnabled:mt(function(e){return void 0===e?this._private.panningEnabled:(this._private.panningEnabled=!!e,this)},"panningEnabled"),userPanningEnabled:mt(function(e){return void 0===e?this._private.userPanningEnabled:(this._private.userPanningEnabled=!!e,this)},"userPanningEnabled"),zoomingEnabled:mt(function(e){return void 0===e?this._private.zoomingEnabled:(this._private.zoomingEnabled=!!e,this)},"zoomingEnabled"),userZoomingEnabled:mt(function(e){return void 0===e?this._private.userZoomingEnabled:(this._private.userZoomingEnabled=!!e,this)},"userZoomingEnabled"),boxSelectionEnabled:mt(function(e){return void 0===e?this._private.boxSelectionEnabled:(this._private.boxSelectionEnabled=!!e,this)},"boxSelectionEnabled"),pan:mt(function(){var e,t,r,i=arguments,n=this._private.pan;switch(i.length){case 0:return n;case 1:if(Ete(i[0]))return n[e=i[0]];if(Ate(i[0])){if(!this._private.panningEnabled)return this;t=(r=i[0]).x,r=r.y,ce(t)&&(n.x=t),ce(r)&&(n.y=r),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;t=i[1],"x"!==(e=i[0])&&"y"!==e||!ce(t)||(n[e]=t),this.emit("pan viewport")}return this.notify("viewport"),this},"pan"),panBy:mt(function(e,t){var r,i,n=arguments,a=this._private.pan;if(this._private.panningEnabled){switch(n.length){case 1:Ate(e)&&(r=(i=n[0]).x,i=i.y,ce(r)&&(a.x+=r),ce(i)&&(a.y+=i),this.emit("pan viewport"));break;case 2:r=t,"x"!==(i=e)&&"y"!==i||!ce(r)||(a[i]+=r),this.emit("pan viewport")}this.notify("viewport")}return this},"panBy"),gc:mt(function(){this.notify("gc")},"gc"),fit:mt(function(e,t){return(e=this.getFitViewport(e,t))&&((t=this._private).zoom=e.zoom,t.pan=e.pan,this.emit("pan zoom viewport"),this.notify("viewport")),this},"fit"),getFitViewport:mt(function(e,t){if(ce(e)&&void 0===t&&(t=e,e=void 0),this._private.panningEnabled&&this._private.zoomingEnabled&&(Ete(e)?(i=e,e=this.$(i)):zte(e)?((r={x1:(i=e).x1,y1:i.y1,x2:i.x2,y2:i.y2}).w=r.x2-r.x1,r.h=r.y2-r.y1):Nte(e)||(e=this.mutableElements()),!Nte(e)||!e.empty())){var r=r||e.boundingBox(),i=this.width(),e=this.height();if(t=ce(t)?t:0,!isNaN(i)&&!isNaN(e)&&0<i&&0<e&&!isNaN(r.w)&&!isNaN(r.h)&&0<r.w&&0<r.h)return{zoom:t=(t=(t=Math.min((i-2*t)/r.w,(e-2*t)/r.h))>this._private.maxZoom?this._private.maxZoom:t)<this._private.minZoom?this._private.minZoom:t,pan:{x:(i-t*(r.x1+r.x2))/2,y:(e-t*(r.y1+r.y2))/2}}}},"getFitViewport"),zoomRange:mt(function(e,t){var r,i=this._private;return null==t&&(e=(r=e).min,t=r.max),ce(e)&&ce(t)&&e<=t?(i.minZoom=e,i.maxZoom=t):ce(e)&&void 0===t&&e<=i.maxZoom?i.minZoom=e:ce(t)&&void 0===e&&t>=i.minZoom&&(i.maxZoom=t),this},"zoomRange"),minZoom:mt(function(e){return void 0===e?this._private.minZoom:this.zoomRange({min:e})},"minZoom"),maxZoom:mt(function(e){return void 0===e?this._private.maxZoom:this.zoomRange({max:e})},"maxZoom"),getZoomedViewport:mt(function(e){var t,r,i=this._private,n=i.pan,a=i.zoom,s=!i.zoomingEnabled;return ce(e)?r=e:Ate(e)&&(r=e.level,null!=e.position?t=$ie(e.position,a,n):null!=e.renderedPosition&&(t=e.renderedPosition),null!=t)&&!i.panningEnabled&&(s=!0),r=(r=r>i.maxZoom?i.maxZoom:r)<i.minZoom?i.minZoom:r,!s&&ce(r)&&r!==a&&(null==t||ce(t.x)&&ce(t.y))?null!=t?{zoomed:!0,panned:!0,zoom:e=r,pan:{x:-e/a*(t.x-n.x)+t.x,y:-e/a*(t.y-n.y)+t.y}}:{zoomed:!0,panned:!1,zoom:r,pan:n}:null},"getZoomedViewport"),zoom:mt(function(e){var t;return void 0===e?this._private.zoom:(e=this.getZoomedViewport(e),t=this._private,null!=e&&e.zoomed&&(t.zoom=e.zoom,e.panned&&(t.pan.x=e.pan.x,t.pan.y=e.pan.y),this.emit("zoom"+(e.panned?" pan":"")+" viewport"),this.notify("viewport")),this)},"zoom"),viewport:mt(function(e){var t=this._private,r=!0,i=!0,n=[],a=!1,s=!1;return e&&(ce(e.zoom)||(r=!1),Ate(e.pan)||(i=!1),r||i)&&(r&&((r=e.zoom)<t.minZoom||r>t.maxZoom||!t.zoomingEnabled?a=!0:(t.zoom=r,n.push("zoom"))),!i||a&&e.cancelOnFailedZoom||!t.panningEnabled||(r=e.pan,ce(r.x)&&(t.pan.x=r.x,s=!1),ce(r.y)&&(t.pan.y=r.y,s=!1),s)||n.push("pan"),0<n.length)&&(n.push("viewport"),this.emit(n.join(" ")),this.notify("viewport")),this},"viewport"),center:mt(function(e){return(e=this.getCenterPan(e))&&(this._private.pan=e,this.emit("pan viewport"),this.notify("viewport")),this},"center"),getCenterPan:mt(function(e,t){var r,i;if(this._private.panningEnabled&&(Ete(e)?(r=e,e=this.mutableElements().filter(r)):Nte(e)||(e=this.mutableElements()),0!==e.length))return r=e.boundingBox(),e=this.width(),i=this.height(),{x:(e-(t=void 0===t?this._private.zoom:t)*(r.x1+r.x2))/2,y:(i-t*(r.y1+r.y2))/2}},"getCenterPan"),reset:mt(function(){return this._private.panningEnabled&&this._private.zoomingEnabled&&this.viewport({pan:{x:0,y:0},zoom:1}),this},"reset"),invalidateSize:mt(function(){this._private.sizeCache=null},"invalidateSize"),size:mt(function(){var t,e=this._private,r=e.container;return e.sizeCache=e.sizeCache||(r?(t=this.window().getComputedStyle(r),e=mt(function(e){return parseFloat(t.getPropertyValue(e))},"val"),{width:r.clientWidth-e("padding-left")-e("padding-right"),height:r.clientHeight-e("padding-top")-e("padding-bottom")}):{width:1,height:1})},"size"),width:mt(function(){return this.size().width},"width"),height:mt(function(){return this.size().height},"height"),extent:mt(function(){var e=this._private.pan,t=this._private.zoom,r=this.renderedExtent();return(r={x1:(r.x1-e.x)/t,x2:(r.x2-e.x)/t,y1:(r.y1-e.y)/t,y2:(r.y2-e.y)/t}).w=r.x2-r.x1,r.h=r.y2-r.y1,r},"extent"),renderedExtent:mt(function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},"renderedExtent"),multiClickDebounceTime:mt(function(e){return e?(this._private.multiClickDebounceTime=e,this):this._private.multiClickDebounceTime},"multiClickDebounceTime")}).centre=te.center,te.autolockNodes=te.autolock,te.autoungrabifyNodes=te.autoungrabify,(uue={data:Xoe.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Xoe.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Xoe.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Xoe.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})}).attr=uue.data,uue.removeAttr=uue.removeData,che=mt(function(e){var n=this,r=(o=(o=(e=Qte({},e)).container)&&!Ite(o)&&Ite(o[0])?o[0]:o)?o._cyreg:null,i=((r=r||{})&&r.cy&&(r.cy.destroy(),r={}),r.readies=r.readies||[]),t=(o&&(o._cyreg=r),r.cy=n,void 0!==vte&&void 0!==o&&!e.headless),a=e,e=(a.layout=Qte({name:t?"grid":"null"},a.layout),a.renderer=Qte({name:t?"canvas":"null"},a.renderer),mt(function(e,t,r){return void 0!==t?t:void 0!==r?r:e},"defVal")),s=this._private={container:o,ready:!1,options:a,elements:new ehe(this),listeners:[],aniEles:new ehe(this),data:a.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:e(!0,a.zoomingEnabled),userZoomingEnabled:e(!0,a.userZoomingEnabled),panningEnabled:e(!0,a.panningEnabled),userPanningEnabled:e(!0,a.userPanningEnabled),boxSelectionEnabled:e(!0,a.boxSelectionEnabled),autolock:e(!1,a.autolock,a.autolockNodes),autoungrabify:e(!1,a.autoungrabify,a.autoungrabifyNodes),autounselectify:e(!1,a.autounselectify),styleEnabled:void 0===a.styleEnabled?t:a.styleEnabled,zoom:ce(a.zoom)?a.zoom:1,pan:{x:Ate(a.pan)&&ce(a.pan.x)?a.pan.x:0,y:Ate(a.pan)&&ce(a.pan.y)?a.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:e(250,a.multiClickDebounceTime)},o=(this.createEmitter(),this.selectionType(a.selectionType),this.zoomRange({min:a.minZoom,max:a.maxZoom}),mt(function(e,t){if(e.some(qte))return Kae.all(e).then(t);t(e)},"loadExtData")),t=(s.styleEnabled&&n.setStyle([]),Qte({},a,a.renderer)),l=(n.initRenderer(t),mt(function(e,t,r){n.notifications(!1);var i=n.mutableElements();0<i.length&&i.remove(),null!=e&&(Ate(e)||_te(e))&&n.add(e),n.one("layoutready",function(e){n.notifications(!0),n.emit(e),n.one("load",t),n.emitAndNotify("load")}).one("layoutstop",function(){n.one("done",r),n.emit("done")}),(i=Qte({},n._private.options.layout)).eles=n.elements(),n.layout(i).run()},"setElesAndLayout"));o([a.style,a.elements],function(e){var t=e[0],e=e[1];s.styleEnabled&&n.style().append(t),l(e,function(){n.startAnimationLoop(),s.ready=!0,Ste(a.ready)&&n.on("ready",a.ready);for(var e=0;e<i.length;e++){var t=i[e];n.on("ready",t)}r&&(r.readies=[]),n.emit("ready")},a.done)})},"Core"),uhe=che.prototype,Qte(uhe,{instanceString:mt(function(){return"core"},"instanceString"),isReady:mt(function(){return this._private.ready},"isReady"),destroyed:mt(function(){return this._private.destroyed},"destroyed"),ready:mt(function(e){return this.isReady()?this.emitter().emit("ready",[],e):this.on("ready",e),this},"ready"),destroy:mt(function(){if(!this.destroyed())return this.stopAnimationLoop(),this.destroyRenderer(),this.emit("destroy"),this._private.destroyed=!0,this},"destroy"),hasElementWithId:mt(function(e){return this._private.elements.hasElementWithId(e)},"hasElementWithId"),getElementById:mt(function(e){return this._private.elements.getElementById(e)},"getElementById"),hasCompoundNodes:mt(function(){return this._private.hasCompoundNodes},"hasCompoundNodes"),headless:mt(function(){return this._private.renderer.isHeadless()},"headless"),styleEnabled:mt(function(){return this._private.styleEnabled},"styleEnabled"),addToPool:mt(function(e){return this._private.elements.merge(e),this},"addToPool"),removeFromPool:mt(function(e){return this._private.elements.unmerge(e),this},"removeFromPool"),container:mt(function(){return this._private.container||null},"container"),window:mt(function(){var e;return null!=this._private.container&&void 0!==(e=this._private.container.ownerDocument)&&null!=e&&e.defaultView||vte},"window"),mount:mt(function(e){var t,r;if(null!=e)return r=(t=this._private).options,!Ite(e)&&Ite(e[0])&&(e=e[0]),this.stopAnimationLoop(),this.destroyRenderer(),t.container=e,t.styleEnabled=!0,this.invalidateSize(),this.initRenderer(Qte({},r,r.renderer,{name:"null"===r.renderer.name?"canvas":r.renderer.name})),this.startAnimationLoop(),this.style(r.style),this.emit("mount"),this},"mount"),unmount:mt(function(){return this.stopAnimationLoop(),this.destroyRenderer(),this.initRenderer({name:"null"}),this.emit("unmount"),this},"unmount"),options:mt(function(){return uie(this._private.options)},"options"),json:mt(function(e){var r,c=this,t=c._private,i=c.mutableElements(),n=mt(function(e){return c.getElementById(e.id())},"getFreshRef");if(Ate(e)){if(c.startBatch(),e.elements){var u={},a=mt(function(e,t){for(var r=[],i=[],n=0;n<e.length;n++){var a,s,o=e[n];o.data.id?(a=""+o.data.id,s=c.getElementById(a),u[a]=!0,0!==s.length?i.push({ele:s,json:o}):(t&&(o.group=t),r.push(o))):hie("cy.json() cannot handle elements without an ID attribute")}c.add(r);for(var l=0;l<i.length;l++){var h=i[l];h.ele.json(h.json)}},"updateEles");if(_te(e.elements))a(e.elements);else for(var s=["nodes","edges"],o=0;o<s.length;o++){var l=s[o],h=e.elements[l];_te(h)&&a(h,l)}var d=c.collection();i.filter(function(e){return!u[e.id()]}).forEach(function(e){e.isParent()?d.merge(e):e.remove()}),d.forEach(function(e){return e.children().move({parent:null})}),d.forEach(function(e){return n(e).remove()})}e.style&&c.style(e.style),null!=e.zoom&&e.zoom!==t.zoom&&c.zoom(e.zoom),!e.pan||e.pan.x===t.pan.x&&e.pan.y===t.pan.y||c.pan(e.pan),e.data&&c.data(e.data);for(var p=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify","multiClickDebounceTime"],g=0;g<p.length;g++){var f=p[g];null!=e[f]&&c[f](e[f])}return c.endBatch(),this}return r={},e?r.elements=this.elements().map(function(e){return e.json()}):(r.elements={},i.forEach(function(e){var t=e.group();r.elements[t]||(r.elements[t]=[]),r.elements[t].push(e.json())})),this._private.styleEnabled&&(r.style=c.style().json()),r.data=uie(c.data()),i=t.options,r.zoomingEnabled=t.zoomingEnabled,r.userZoomingEnabled=t.userZoomingEnabled,r.zoom=t.zoom,r.minZoom=t.minZoom,r.maxZoom=t.maxZoom,r.panningEnabled=t.panningEnabled,r.userPanningEnabled=t.userPanningEnabled,r.pan=uie(t.pan),r.boxSelectionEnabled=t.boxSelectionEnabled,r.renderer=uie(i.renderer),r.hideEdgesOnViewport=i.hideEdgesOnViewport,r.textureOnViewport=i.textureOnViewport,r.wheelSensitivity=i.wheelSensitivity,r.motionBlur=i.motionBlur,r.multiClickDebounceTime=i.multiClickDebounceTime,r},"json")}),uhe.$id=uhe.getElementById,[Bce,Pce,$ce,Kce,Jce,sue,oue,Fce,mce,te,uue].forEach(function(e){Qte(uhe,e)}),dhe={fit:!0,directed:!1,direction:"downward",padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,depthSort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:mt(function(e,t){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:mt(function(e,t){return t},"transform")},phe={maximal:!1,acyclic:!1},ghe=mt(function(e){return e.scratch("breadthfirst")},"getInfo"),fhe=mt(function(e,t){return e.scratch("breadthfirst",t)},"setInfo"),mt(iee,"BreadthFirstLayout"),mhe={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!(iee.prototype.run=function(){var l=this.options,e=l.cy,h=l.eles,c=h.nodes().filter(function(e){return e.isChildless()}),t=h,r=l.directed,B=l.acyclic||l.maximal||0<l.maximalAdjustments,n=!!l.boundingBox,a=rne(n?l.boundingBox:structuredClone(e.extent()));if(Nte(l.roots))d=l.roots;else if(_te(l.roots)){for(var i=[],s=0;s<l.roots.length;s++){var o=l.roots[s],o=e.getElementById(o);i.push(o)}d=e.collection(i)}else if(Ete(l.roots))d=e.$(l.roots);else if(r)d=c.roots();else for(var u=h.components(),d=e.collection(),P=mt(function(){var t=(e=u[p]).maxDegree(!1),e=e.filter(function(e){return e.degree(!1)===t});d=d.add(e)},"_loop"),p=0;p<u.length;p++)P();var g=[],f={},m=mt(function(e,t){null==g[t]&&(g[t]=[]);var r=g[t].length;g[t].push(e),fhe(e,{index:r,depth:t})},"addToDepth"),$=mt(function(e,t){var r=ghe(e),i=r.depth;g[i][r.index]=null,e.isChildless()&&m(e,t)},"changeDepth");t.bfs({roots:d,directed:l.directed,visit:mt(function(e,t,r,i,n){var a=(e=e[0]).id();e.isChildless()&&m(e,n),f[a]=!0},"visit")});for(var y=[],v=0;v<c.length;v++){var x=c[v];f[x.id()]||y.push(x)}var b=mt(function(e){for(var t=g[e],r=0;r<t.length;r++){var i=t[r];null==i?(t.splice(r,1),r--):fhe(i,{depth:e,index:r})}},"assignDepthsAt"),F=mt(function(e,t){for(var r=ghe(e),i=e.incomers().filter(function(e){return e.isNode()&&h.has(e)}),n=-1,a=e.id(),s=0;s<i.length;s++)var o=i[s],o=ghe(o),n=Math.max(n,o.depth);return r.depth<=n&&(!l.acyclic&&t[a]?null:($(e,r=n+1),t[a]=r,!0))},"adjustMaximally");if(r&&B){var T=[],z={},q=mt(function(e){return T.push(e)},"enqueue"),W=mt(function(){return T.shift()},"dequeue");for(c.forEach(function(e){return T.push(e)});0<T.length;){var k=W(),w=F(k,z);if(w)k.outgoers().filter(function(e){return e.isNode()&&h.has(e)}).forEach(q);else if(null===w){hie("Detected double maximal shift for node `"+k.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var C=0;if(l.avoidOverlap)for(var E=0;E<c.length;E++)var S=c[E].layoutDimensions(l),U=S.w,C=Math.max(C,U,S.h);var _={},A=mt(function(e){if(_[e.id()])return _[e.id()];for(var t=ghe(e).depth,r=e.neighborhood(),i=0,n=0,a=0;a<r.length;a++){var s,o,l=r[a];l.isEdge()||l.isParent()||!c.has(l)||null!=(l=ghe(l))&&(s=l.index,l=l.depth,null!=s)&&null!=l&&(o=g[l].length,l<t)&&(i+=s/o,n++)}return i/=n=Math.max(1,n),0===n&&(i=0),_[e.id()]=i},"getWeightedPercent"),G=mt(function(e,t){var r=A(e)-A(t);return 0==r?Kte(e.id(),t.id()):r},"sortFn");void 0!==l.depthSort&&(G=l.depthSort);for(var L=g.length,R=0;R<L;R++)g[R].sort(G),b(R);for(var I=[],N=0;N<y.length;N++)I.push(y[N]);t=mt(function(){for(var e=0;e<L;e++)b(e)},"assignDepths"),I.length&&(g.unshift(I),L=g.length,t());for(var j=0,D=0;D<L;D++)j=Math.max(g[D].length,j);var V=a.x1+a.w/2,Y=a.y1+a.h/2,M=c.reduce(function(e,t){return t=t.boundingBox({includeLabels:l.nodeDimensionsIncludeLabels}),{w:-1===e.w?t.w:(e.w+t.w)/2,h:-1===e.h?t.h:(e.h+t.h)/2}},{w:-1,h:-1}),H=Math.max(1===L?0:n?(a.h-2*l.padding-M.h)/(L-1):(a.h-2*l.padding-M.h)/(L+1),C),X=g.reduce(function(e,t){return Math.max(e,t.length)},0),K=mt(function(e){var t,r,i=(e=ghe(e)).depth,e=e.index;return l.circle?(t=Math.min(a.w/2/L,a.h/2/L),t=(t=Math.max(t,C))*i+t-(0<L&&g[0].length<=3?t/2:0),r=2*Math.PI/g[i].length*e,0===i&&1===g[0].length&&(t=1),{x:V+t*Math.cos(r),y:Y+t*Math.sin(r)}):(t=g[i].length,r=Math.max(1===t?0:n?(a.w-2*l.padding-M.w)/((l.grid?X:t)-1):(a.w-2*l.padding-M.w)/((l.grid?X:t)+1),C),{x:V+(e+1-(t+1)/2)*r,y:Y+(i+1-(L+1)/2)*H})},"getPositionTopBottom"),O={downward:0,leftward:90,upward:180,rightward:-90},r=(-1===Object.keys(O).indexOf(l.direction)&&oie("Invalid direction '".concat(l.direction,"' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(O).join(", "))),mt(function(e){return SQ(K(e),a,O[l.direction])},"getPosition"));return h.nodes().layoutPositions(this,l,r),this}),spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:mt(function(e,t){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:mt(function(e,t){return t},"transform")},mt(nee,"CircleLayout"),yhe={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!(nee.prototype.run=function(){var i=e=this.options,e=e.cy,t=i.eles,n=void 0!==i.counterclockwise?!i.counterclockwise:i.clockwise,r=t.nodes().not(":parent");i.sort&&(r=r.sort(i.sort));for(var a,s=(e=rne(i.boundingBox||{x1:0,y1:0,w:e.width(),h:e.height()})).x1+e.w/2,o=e.y1+e.h/2,l=(void 0===i.sweep?2*Math.PI-2*Math.PI/r.length:i.sweep)/Math.max(1,r.length-1),h=0,c=0;c<r.length;c++)var u=r[c].layoutDimensions(i),d=u.w,h=Math.max(h,d,u.h);a=ce(i.radius)?i.radius:r.length<=1?0:Math.min(e.h,e.w)/2-h,1<r.length&&i.avoidOverlap&&(h*=1.75,e=Math.cos(l)-Math.cos(0),p=Math.sin(l)-Math.sin(0),e=Math.sqrt(h*h/(e*e+p*p)),a=Math.max(e,a));var p=mt(function(e,t){var t=i.startAngle+t*l*(n?1:-1),r=a*Math.cos(t),t=a*Math.sin(t);return{x:s+r,y:o+t}},"getPos");return t.nodes().layoutPositions(this,i,p),this}),minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:mt(function(e){return e.degree()},"concentric"),levelWidth:mt(function(e){return e.maxDegree()/4},"levelWidth"),animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:mt(function(e,t){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:mt(function(e,t){return t},"transform")},mt(aee,"ConcentricLayout"),aee.prototype.run=function(){for(var e=r=this.options,t=void 0!==e.counterclockwise?!e.counterclockwise:e.clockwise,r=r.cy,i=e.eles,n=i.nodes().not(":parent"),a=(r=rne(e.boundingBox||{x1:0,y1:0,w:r.width(),h:r.height()})).x1+r.w/2,s=r.y1+r.h/2,o=[],l=0,h=0;h<n.length;h++){var c=n[h],u=e.concentric(c);o.push({value:u,node:c}),c._private.scratch.concentric=u}n.updateStyle();for(var d=0;d<n.length;d++)var p=n[d].layoutDimensions(e),l=Math.max(l,p.w,p.h);o.sort(function(e,t){return t.value-e.value});for(var B=e.levelWidth(n),g=[[]],f=g[0],m=0;m<o.length;m++){var y=o[m];0<f.length&&B<=Math.abs(f[0].value-y.value)&&g.push(f=[]),f.push(y)}var v,x=l+e.minNodeSpacing;e.avoidOverlap||(v=0<g.length&&1<g[0].length,r=Math.min(r.w,r.h)/2-x,x=Math.min(x,r/(g.length+v?1:0)));for(var b=0,T=0;T<g.length;T++){var k,w=g[T],C=void 0===e.sweep?2*Math.PI-2*Math.PI/w.length:e.sweep,C=w.dTheta=C/Math.max(1,w.length-1);1<w.length&&e.avoidOverlap&&(k=Math.cos(C)-Math.cos(0),C=Math.sin(C)-Math.sin(0),k=Math.sqrt(x*x/(k*k+C*C)),b=Math.max(k,b)),w.r=b,b+=x}if(e.equidistant){for(var E=0,S=0,_=0;_<g.length;_++)var P=g[_].r-S,E=Math.max(E,P);for(var S=0,A=0;A<g.length;A++){var L=g[A];0===A&&(S=L.r),L.r=S,S+=E}}for(var R={},I=0;I<g.length;I++)for(var N=g[I],$=N.dTheta,D=N.r,M=0;M<N.length;M++){var F=N[M],O=e.startAngle+(t?1:-1)*$*M,O={x:a+D*Math.cos(O),y:s+D*Math.sin(O)};R[F.node.id()]=O}return i.nodes().layoutPositions(this,e,function(e){return e=e.id(),R[e]}),this},xhe={ready:mt(function(){},"ready"),stop:mt(function(){},"stop"),animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:mt(function(e,t){return!0},"animateFilter"),animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:mt(function(e){return 2048},"nodeRepulsion"),nodeOverlap:4,idealEdgeLength:mt(function(e){return 32},"idealEdgeLength"),edgeElasticity:mt(function(e){return 32},"edgeElasticity"),nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1},mt(see,"CoseLayout"),see.prototype.run=function(){var r=this.options,e=r.cy,i=this,n=(!(i.stopped=!1)!==r.animate&&!1!==r.animate||i.emit({type:"layoutstart",layout:i}),vhe=!0===r.debug,bhe(e,i,r)),t=(vhe&&(void 0)(n),r.randomize&&whe(n),qre()),a=mt(function(){Ehe(n,e,r),!0===r.fit&&e.fit(r.padding)},"refresh"),s=mt(function(e){return!(i.stopped||e>=r.numIter||(She(n,r),n.temperature=n.temperature*r.coolingFactor,n.temperature<r.minTemp))},"mainLoop"),o=mt(function(){var e,t;!0===r.animate||!1===r.animate?(a(),i.one("layoutstop",r.stop),i.emit({type:"layoutstop",layout:i})):(e=r.eles.nodes(),t=Che(n,r,e),e.layoutPositions(i,r,t))},"done"),l=0,h=!0;if(!0===r.animate){var c=mt(function(){for(var e=0;h&&e<r.refresh;)h=s(l),l++,e++;h?(qre()-t>=r.animationThreshold&&a(),zre(c)):($he(n,r),o())},"frame");c()}else{for(;h;)h=s(l),l++;$he(n,r),o()}return this},see.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},see.prototype.destroy=function(){return this.thread&&this.thread.stop(),this},bhe=mt(function(e,t,r){for(var i=r.eles.edges(),n=r.eles.nodes(),a=rne(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},o=r.eles.components(),l={},h=0;h<o.length;h++)for(var c=o[h],u=0;u<c.length;u++)l[c[u].id()]=h;for(h=0;h<s.nodeSize;h++){var d=(y=n[h]).layoutDimensions(r);(I={}).isLocked=y.locked(),I.id=y.data("id"),I.parentId=y.data("parent"),I.cmptId=l[y.id()],I.children=[],I.positionX=y.position("x"),I.positionY=y.position("y"),I.offsetX=0,I.offsetY=0,I.height=d.w,I.width=d.h,I.maxX=I.positionX+I.width/2,I.minX=I.positionX-I.width/2,I.maxY=I.positionY+I.height/2,I.minY=I.positionY-I.height/2,I.padLeft=parseFloat(y.style("padding")),I.padRight=parseFloat(y.style("padding")),I.padTop=parseFloat(y.style("padding")),I.padBottom=parseFloat(y.style("padding")),I.nodeRepulsion=Ste(r.nodeRepulsion)?r.nodeRepulsion(y):r.nodeRepulsion,s.layoutNodes.push(I),s.idToIndex[I.id]=h}for(var p=[],g=0,f=-1,m=[],h=0;h<s.nodeSize;h++){var y,v=(y=s.layoutNodes[h]).parentId;(null!=v?s.layoutNodes[s.idToIndex[v]].children:(p[++f]=y.id,m)).push(y.id)}for(s.graphSet.push(m);g<=f;){var x=p[g++],x=s.idToIndex[x],b=s.layoutNodes[x].children;if(0<b.length)for(s.graphSet.push(b),h=0;h<b.length;h++)p[++f]=b[h]}for(h=0;h<s.graphSet.length;h++)for(var T=s.graphSet[h],u=0;u<T.length;u++){var k=s.idToIndex[T[u]];s.indexToGraph[k]=h}for(h=0;h<s.edgeSize;h++){var w=i[h],C={},E=(C.id=w.data("id"),C.sourceId=w.data("source"),C.targetId=w.data("target"),Ste(r.idealEdgeLength)?r.idealEdgeLength(w):r.idealEdgeLength),w=Ste(r.edgeElasticity)?r.edgeElasticity(w):r.edgeElasticity,S=s.idToIndex[C.sourceId],_=s.idToIndex[C.targetId];if(s.indexToGraph[S]!=s.indexToGraph[_]){for(var A=The(C.sourceId,C.targetId,s),L=s.graphSet[A],R=0,I=s.layoutNodes[S];-1===L.indexOf(I.id);)I=s.layoutNodes[s.idToIndex[I.parentId]],R++;for(I=s.layoutNodes[_];-1===L.indexOf(I.id);)I=s.layoutNodes[s.idToIndex[I.parentId]],R++;E*=R*r.nestingFactor}C.idealLength=E,C.elasticity=w,s.layoutEdges.push(C)}return s},"createLayoutInfo"),The=mt(function(e,t,r){return(e=khe(e,t,0,r)).count<2?0:e.graph},"findLCA"),khe=mt(function(e,t,r,i){var n=i.graphSet[r];if(-1<n.indexOf(e)&&-1<n.indexOf(t))return{count:2,graph:r};for(var a=0,s=0;s<n.length;s++){var o=n[s],o=i.idToIndex[o];if(0!==(o=i.layoutNodes[o].children).length&&(o=i.indexToGraph[i.idToIndex[o[0]]],0!==(o=khe(e,t,o,i)).count)){if(1!==o.count)return o;if(2==++a)break}}return{count:a,graph:r}},"findLCA_aux"),whe=mt(function(e,t){for(var r=e.clientWidth,i=e.clientHeight,n=0;n<e.nodeSize;n++){var a=e.layoutNodes[n];0!==a.children.length||a.isLocked||(a.positionX=Math.random()*r,a.positionY=Math.random()*i)}},"randomizePositions"),Che=mt(function(n,a,e){var s=n.boundingBox,o={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return a.boundingBox&&(e.forEach(function(e){e=n.layoutNodes[n.idToIndex[e.data("id")]],o.x1=Math.min(o.x1,e.positionX),o.x2=Math.max(o.x2,e.positionX),o.y1=Math.min(o.y1,e.positionY),o.y2=Math.max(o.y2,e.positionY)}),o.w=o.x2-o.x1,o.h=o.y2-o.y1),function(e,t){var r,i,e=n.layoutNodes[n.idToIndex[e.data("id")]];return a.boundingBox?(r=0===o.w?.5:(e.positionX-o.x1)/o.w,i=0===o.h?.5:(e.positionY-o.y1)/o.h,{x:s.x1+r*s.w,y:s.y1+i*s.h}):{x:e.positionX,y:e.positionY}}},"getScaleInBoundsFn"),Ehe=mt(function(e,t,r){var i=r.layout,n=r.eles.nodes(),a=Che(e,r,n);n.positions(a),!0!==e.ready&&(e.ready=!0,i.one("layoutready",r.ready),i.emit({type:"layoutready",layout:this}))},"refreshPositions"),She=mt(function(e,t,r){_he(e,t),Nhe(e),Dhe(e,t),Mhe(e),Ohe(e)},"step"),_he=mt(function(e,t){for(var r=0;r<e.graphSet.length;r++)for(var i=e.graphSet[r],n=i.length,a=0;a<n;a++)for(var s=e.layoutNodes[e.idToIndex[i[a]]],o=a+1;o<n;o++){var l=e.layoutNodes[e.idToIndex[i[o]]];Lhe(s,l,e,t)}},"calculateNodeForces"),Ahe=mt(function(e){return 2*e*Math.random()-1},"randomDistance"),Lhe=mt(function(e,t,r,i){var n,a,s,o;e.cmptId!==t.cmptId&&!r.isCompound||(r=t.positionX-e.positionX,n=t.positionY-e.positionY,0===r&&0===n&&(r=Ahe(1),n=Ahe(1)),o=0<(o=Rhe(e,t,r,n))?(s=i.nodeOverlap*o)*r/(a=Math.sqrt(r*r+n*n)):(i=Ihe(e,r,n),o=(r=(o=Ihe(t,-1*r,-1*n)).x-i.x)*r+(n=o.y-i.y)*n,a=Math.sqrt(o),(s=(e.nodeRepulsion+t.nodeRepulsion)/o)*r/a),i=s*n/a,e.isLocked||(e.offsetX-=o,e.offsetY-=i),t.isLocked)||(t.offsetX+=o,t.offsetY+=i)},"nodeRepulsion"),Rhe=mt(function(e,t,r,i){return r=0<r?e.maxX-t.minX:t.maxX-e.minX,i=0<i?e.maxY-t.minY:t.maxY-e.minY,0<=r&&0<=i?Math.sqrt(r*r+i*i):0},"nodesOverlap"),Ihe=mt(function(e,t,r){var i=e.positionX,n=e.positionY,a=e.height||1,s=r/t,o=a/(e=e.width||1),l={};return 0===t&&0<r||0===t&&r<0?(l.x=i,l.y=n+a/2):0<t&&-1*o<=s&&s<=o?(l.x=i+e/2,l.y=n+e*r/2/t):t<0&&-1*o<=s&&s<=o?(l.x=i-e/2,l.y=n-e*r/2/t):0<r&&(s<=-1*o||o<=s)?(l.x=i+a*t/2/r,l.y=n+a/2):r<0&&(s<=-1*o||o<=s)&&(l.x=i-a*t/2/r,l.y=n-a/2),l},"findClippingPoint"),Nhe=mt(function(e,t){for(var r=0;r<e.edgeSize;r++){var i,n,a=e.layoutEdges[r],s=e.idToIndex[a.sourceId],s=e.layoutNodes[s],o=e.idToIndex[a.targetId],l=(o=e.layoutNodes[o]).positionX-s.positionX,h=o.positionY-s.positionY;0==l&&0==h||(i=Ihe(s,l,h),h=(l=Ihe(o,-1*l,-1*h)).x-i.x,l=l.y-i.y,i=Math.sqrt(h*h+l*l),a=Math.pow(a.idealLength-i,2)/a.elasticity,h=0!==i?(n=a*h/i,a*l/i):n=0,s.isLocked||(s.offsetX+=n,s.offsetY+=h),o.isLocked)||(o.offsetX-=n,o.offsetY-=h)}},"calculateEdgeForces"),Dhe=mt(function(e,t){if(0!==t.gravity)for(var r=0;r<e.graphSet.length;r++)for(var i,n,a=e.graphSet[r],s=a.length,o=0===r?(n=e.clientHeight/2,e.clientWidth/2):(i=e.layoutNodes[e.idToIndex[a[0]]],n=(i=e.layoutNodes[e.idToIndex[i.parentId]]).positionX,i.positionY),l=0;l<s;l++){var h,c,u,d=e.layoutNodes[e.idToIndex[a[l]]];d.isLocked||(c=n-d.positionX,u=o-d.positionY,1<(h=Math.sqrt(c*c+u*u))&&(c=t.gravity*c/h,u=t.gravity*u/h,d.offsetX+=c,d.offsetY+=u))}},"calculateGravityForces"),Mhe=mt(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++],a=e.idToIndex[a],s=(a=e.layoutNodes[a]).children;if(0<s.length&&!a.isLocked){for(var o=a.offsetX,l=a.offsetY,h=0;h<s.length;h++){var c=e.layoutNodes[e.idToIndex[s[h]]];c.offsetX+=o,c.offsetY+=l,r[++n]=s[h]}a.offsetX=0,a.offsetY=0}}},"propagateForces"),Ohe=mt(function(e,t){for(var r=0;r<e.nodeSize;r++)0<(n=e.layoutNodes[r]).children.length&&(n.maxX=void 0,n.minX=void 0,n.maxY=void 0,n.minY=void 0);for(var i,r=0;r<e.nodeSize;r++)0<(n=e.layoutNodes[r]).children.length||n.isLocked||(i=Bhe(n.offsetX,n.offsetY,e.temperature),n.positionX+=i.x,n.positionY+=i.y,n.offsetX=0,n.offsetY=0,n.minX=n.positionX-n.width,n.maxX=n.positionX+n.width,n.minY=n.positionY-n.height,n.maxY=n.positionY+n.height,Phe(n,e));for(var n,r=0;r<e.nodeSize;r++)0<(n=e.layoutNodes[r]).children.length&&!n.isLocked&&(n.positionX=(n.maxX+n.minX)/2,n.positionY=(n.maxY+n.minY)/2,n.width=n.maxX-n.minX,n.height=n.maxY-n.minY)},"updatePositions"),Bhe=mt(function(e,t,r){var i=Math.sqrt(e*e+t*t);return r<i?{x:r*e/i,y:r*t/i}:{x:e,y:t}},"limitForce"),Phe=mt(function(e,t){if(null!=(r=e.parentId)){var r,i=!1;if((null==(r=t.layoutNodes[t.idToIndex[r]]).maxX||e.maxX+r.padRight>r.maxX)&&(r.maxX=e.maxX+r.padRight,i=!0),(null==r.minX||e.minX-r.padLeft<r.minX)&&(r.minX=e.minX-r.padLeft,i=!0),(null==r.maxY||e.maxY+r.padBottom>r.maxY)&&(r.maxY=e.maxY+r.padBottom,i=!0),(null==r.minY||e.minY-r.padTop<r.minY)&&(r.minY=e.minY-r.padTop,i=!0),i)return Phe(r,t)}},"updateAncestryBoundaries"),$he=mt(function(e,t){for(var r=e.layoutNodes,i=[],n=0;n<r.length;n++){var a=r[n],s=a.cmptId;(i[s]=i[s]||[]).push(a)}for(var o=0,n=0;n<i.length;n++)if(c=i[n]){c.x1=1/0,c.x2=-1/0,c.y1=1/0,c.y2=-1/0;for(var l=0;l<c.length;l++){var h=c[l];c.x1=Math.min(c.x1,h.positionX-h.width/2),c.x2=Math.max(c.x2,h.positionX+h.width/2),c.y1=Math.min(c.y1,h.positionY-h.height/2),c.y2=Math.max(c.y2,h.positionY+h.height/2)}c.w=c.x2-c.x1,c.h=c.y2-c.y1,o+=c.w*c.h}i.sort(function(e,t){return t.w*t.h-e.w*e.h});for(var c,u=0,d=0,p=0,g=0,f=Math.sqrt(o)*e.clientWidth/e.clientHeight,n=0;n<i.length;n++)if(c=i[n]){for(l=0;l<c.length;l++)(h=c[l]).isLocked||(h.positionX+=u-c.x1,h.positionY+=d-c.y1);u+=c.w+t.componentSpacing,p+=c.w+t.componentSpacing,g=Math.max(g,c.h),f<p&&(d+=g+t.componentSpacing,g=p=u=0)}},"separateComponents"),Fhe={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:mt(function(e){},"position"),sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:mt(function(e,t){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:mt(function(e,t){return t},"transform")},mt(oee,"GridLayout"),oee.prototype.run=function(){var e=t=this.options,t=t.cy,r=(h=e.eles).nodes().not(":parent"),n=(e.sort&&(r=r.sort(e.sort)),rne(e.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()}));if(0===n.h||0===n.w)h.nodes().layoutPositions(this,e,function(e){return{x:n.x1,y:n.y1}});else{var i=r.size(),t=Math.sqrt(i*n.h/n.w),a=Math.round(t),s=Math.round(n.w/n.h*t),o=mt(function(e){if(null==e)return Math.min(a,s);Math.min(a,s)==a?a=e:s=e},"small"),l=mt(function(e){if(null==e)return Math.max(a,s);Math.max(a,s)==a?a=e:s=e},"large"),h=e.rows,t=null!=e.cols?e.cols:e.columns;if(null!=h&&null!=t)a=h,s=t;else if(null!=h&&null==t)a=h,s=Math.ceil(i/a);else if(null==h&&null!=t)s=t,a=Math.ceil(i/s);else if(i<s*a)i<=((h=o())-1)*(t=l())?o(h-1):i<=(t-1)*h&&l(t-1);else for(;s*a<i;){var c=o(),u=l();i<=(u+1)*c?l(u+1):o(c+1)}var d=n.w/s,p=n.h/a;if(e.condense&&(p=d=0),e.avoidOverlap)for(var g=0;g<r.length;g++){null!=(f=(m=r[g])._private.position).x&&null!=f.y||(f.x=0,f.y=0);var f=m.layoutDimensions(e),m=e.avoidOverlapPadding,y=f.w+m,f=f.h+m,d=Math.max(d,y),p=Math.max(p,f)}for(var v={},x=mt(function(e,t){return!!v["c-"+e+"-"+t]},"used"),b=mt(function(e,t){v["c-"+e+"-"+t]=!0},"use"),T=0,k=0,w=mt(function(){s<=++k&&(k=0,T++)},"moveToNextCell"),C={},E=0;E<r.length;E++){var S=r[E],_=e.position(S);if(_&&(void 0!==_.row||void 0!==_.col)){var A={row:_.row,col:_.col};if(void 0===A.col)for(A.col=0;x(A.row,A.col);)A.col++;else if(void 0===A.row)for(A.row=0;x(A.row,A.col);)A.row++;C[S.id()]=A,b(A.row,A.col)}}h=mt(function(e,t){var r,i;if(e.locked()||e.isParent())return!1;if(e=C[e.id()])r=e.col*d+d/2+n.x1,i=e.row*p+p/2+n.y1;else{for(;x(T,k);)w();r=k*d+d/2+n.x1,i=T*p+p/2+n.y1,b(T,k),w()}return{x:r,y:i}},"getPos"),r.layoutPositions(this,e,h)}return this},zhe={ready:mt(function(){},"ready"),stop:mt(function(){},"stop")},mt(lee,"NullLayout"),lee.prototype.run=function(){var e=this.options,t=e.eles;return this.emit("layoutstart"),t.nodes().positions(function(){return{x:0,y:0}}),this.one("layoutready",e.ready),this.emit("layoutready"),this.one("layoutstop",e.stop),this.emit("layoutstop"),this},qhe={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,spacingFactor:void 0,animate:!(lee.prototype.stop=function(){return this}),animationDuration:500,animationEasing:void 0,animateFilter:mt(function(e,t){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:mt(function(e,t){return t},"transform")},mt(hee,"PresetLayout"),Whe={fit:!0,padding:30,boundingBox:void 0,animate:!(hee.prototype.run=function(){var t=this.options,e=t.eles.nodes(),r=Ste(t.positions);function i(e){return null==t.positions?Pie(e.position()):r?t.positions(e):t.positions[e._private.data.id]??null}return mt(i,"getPosition"),e.layoutPositions(this,t,function(e,t){var r=i(e);return!e.locked()&&null!=r&&r}),this}),animationDuration:500,animationEasing:void 0,animateFilter:mt(function(e,t){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:mt(function(e,t){return t},"transform")},mt(cee,"RandomLayout"),cee.prototype.run=function(){var e=this.options,t=e.cy,r=e.eles,i=rne(e.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()}),t=mt(function(e,t){return{x:i.x1+Math.round(Math.random()*i.w),y:i.y1+Math.round(Math.random()*i.h)}},"getPos");return r.nodes().layoutPositions(this,e,t),this},Uhe=[{name:"breadthfirst",impl:iee},{name:"circle",impl:nee},{name:"concentric",impl:aee},{name:"cose",impl:see},{name:"grid",impl:oee},{name:"null",impl:lee},{name:"preset",impl:hee},{name:"random",impl:cee}],mt(uee,"NullRenderer"),mue=mt(function(){},"noop"),Ece=mt(function(){throw new Error("A headless instance can not render images")},"throwImgErr"),uee.prototype={recalculateRenderedStyle:mue,notify:mt(function(){this.notifications++},"notify"),init:mue,isHeadless:mt(function(){return!0},"isHeadless"),png:Ece,jpg:Ece},zce={arrowShapeWidth:.3,registerArrowShapes:function(){var r=this.arrowShapes={},o=this,i=mt(function(e,t,r,i,n,a,s){return n.x-r/2-s<=e&&e<=n.x+r/2+s&&n.y-r/2-s<=t&&t<=n.y+r/2+s},"bbCollide"),l=mt(function(e,t,r,i,n){var a=e*Math.cos(i)-t*Math.sin(i),e=e*Math.sin(i)+t*Math.cos(i);return{x:a*r+n.x,y:e*r+n.y}},"transform"),h=mt(function(e,t,r,i){for(var n=[],a=0;a<e.length;a+=2)n.push(l(e[a],e[a+1],t,r,i));return n},"transformPoints"),c=mt(function(e){for(var t=[],r=0;r<e.length;r++){var i=e[r];t.push(i.x,i.y)}return t},"pointsToArr"),n=mt(function(e){return e.pstyle("width").pfValue*e.pstyle("arrow-scale").pfValue*2},"standardGap"),e=mt(function(e,t){Ete(t)&&(t=r[t]),r[e]=Qte({name:e,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:mt(function(e,t,r,i,n,a){return r=c(h(this.points,r+2*a,i,n)),kne(e,t,r)},"collide"),roughCollide:i,draw:mt(function(e,t,r,i){t=h(this.points,t,r,i),o.arrowShapeImpl("polygon")(e,t)},"draw"),spacing:mt(function(e){return 0},"spacing"),gap:n},t)},"defineArrowShape");e("none",{collide:nie,roughCollide:nie,draw:sie,spacing:aie,gap:aie}),e("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),e("arrow","triangle"),e("triangle-backcurve",{points:r.triangle.points,controlPoint:[0,-.15],roughCollide:i,draw:mt(function(e,t,r,i,n){var a=h(this.points,t,r,i),s=this.controlPoint,s=l(s[0],s[1],t,r,i);o.arrowShapeImpl(this.name)(e,a,s)},"draw"),gap:mt(function(e){return.8*n(e)},"gap")}),e("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:mt(function(e,t,r,i,n,a,s){var o=c(h(this.points,r+2*s,i,n)),r=c(h(this.pointsTee,r+2*s,i,n));return kne(e,t,o)||kne(e,t,r)},"collide"),draw:mt(function(e,t,r,i,n){var a=h(this.points,t,r,i),t=h(this.pointsTee,t,r,i);o.arrowShapeImpl(this.name)(e,a,t)},"draw")}),e("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:mt(function(e,t,r,i,n,a,s){var o=n,o=Math.pow(o.x-e,2)+Math.pow(o.y-t,2)<=Math.pow((r+2*s)*this.radius,2),r=c(h(this.points,r+2*s,i,n));return kne(e,t,r)||o},"collide"),draw:mt(function(e,t,r,i,n){r=h(this.pointsTr,t,r,i),o.arrowShapeImpl(this.name)(e,r,i.x,i.y,this.radius*t)},"draw"),spacing:mt(function(e){return o.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.radius},"spacing")}),e("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:mt(function(e,t){var r=this.baseCrossLinePts.slice(),t=t/e;return r[3]=r[3]-t,r[5]=r[5]-t,r},"crossLinePts"),collide:mt(function(e,t,r,i,n,a,s){var o=c(h(this.points,r+2*s,i,n)),a=c(h(this.crossLinePts(r,a),r+2*s,i,n));return kne(e,t,o)||kne(e,t,a)},"collide"),draw:mt(function(e,t,r,i,n){var a=h(this.points,t,r,i),n=h(this.crossLinePts(t,n),t,r,i);o.arrowShapeImpl(this.name)(e,a,n)},"draw")}),e("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:mt(function(e){return.525*n(e)},"gap")}),e("circle",{radius:.15,collide:mt(function(e,t,r,i,n,a,s){return Math.pow(n.x-e,2)+Math.pow(n.y-t,2)<=Math.pow((r+2*s)*this.radius,2)},"collide"),draw:mt(function(e,t,r,i,n){o.arrowShapeImpl(this.name)(e,i.x,i.y,this.radius*t)},"draw"),spacing:mt(function(e){return o.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.radius},"spacing")}),e("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:mt(function(e){return 1},"spacing"),gap:mt(function(e){return 1},"gap")}),e("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),e("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:mt(function(e){return e.pstyle("width").pfValue*e.pstyle("arrow-scale").value},"gap")}),e("chevron",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:mt(function(e){return.95*e.pstyle("width").pfValue*e.pstyle("arrow-scale").value},"gap")})}},_ce={projectIntoViewport:function(e,t){var r=this.cy,i=(a=this.findContainerClientCoords())[0],n=a[1],a=a[4],s=r.pan(),r=r.zoom();return[((e-i)/a-s.x)/r,((t-n)/a-s.y)/r]},findContainerClientCoords:function(){var t,e,r,i,n,a,s,o,l,h,c;return this.containerBB||(c=(o=this.container).getBoundingClientRect(),t=this.cy.window().getComputedStyle(o),e=(s=mt(function(e){return parseFloat(t.getPropertyValue(e))},"styleValue"))("padding-left"),r=s("padding-right"),i=s("padding-top"),n=s("padding-bottom"),h=s("border-left-width"),l=s("border-right-width"),a=s("border-top-width"),s("border-bottom-width"),s=o.clientWidth,o=o.clientHeight,l=c.width/(s+(h+l)),h=c.left+e+h,c=c.top+i+a,this.containerBB=[h,c,s-(e+r),o-(i+n),l])},invalidateContainerClientCoordsCache:function(){this.containerBB=null},findNearestElement:function(e,t,r,i){return this.findNearestElements(e,t,r,i)[0]},findNearestElements:function(y,v,e,t){var i,n,x=this,b=this,r=b.getCachedZSortedEles(),T=[],a=b.cy.zoom(),k=b.cy.hasCompoundNodes(),w=(t?24:8)/a,l=(t?8:2)/a,g=(t?8:2)/a,s=1/0;function C(e,t){if(e.isNode()){if(n)return;n=e,T.push(e)}if(e.isEdge()&&(null==t||t<s))if(i){if(i.pstyle("z-compound-depth").value===e.pstyle("z-compound-depth").value&&i.pstyle("z-compound-depth").value===e.pstyle("z-compound-depth").value)for(var r=0;r<T.length;r++)if(T[r].isEdge()){T[r]=e,i=e,s=t??s;break}}else T.push(e),i=e,s=t??s}function E(e){var t=e.outerWidth()+2*l,r=e.outerHeight()+2*l,i=t/2,n=r/2,a=e.position(),s="auto"===e.pstyle("corner-radius").value?"auto":e.pstyle("corner-radius").pfValue,o=e._private.rscratch;if(a.x-i<=y&&y<=a.x+i&&a.y-n<=v&&v<=a.y+n&&b.nodeShapes[x.getNodeShape(e)].checkPoint(y,v,0,t,r,a.x,a.y,s,o))return C(e,0),!0}function o(e){var t,r=e._private,i=r.rscratch,n=e.pstyle("width").pfValue,a=e.pstyle("arrow-scale").value,s=(l=n/2+w)*l,o=2*l,l=r.source,h=r.target;if("segments"===i.edgeType||"straight"===i.edgeType||"haystack"===i.edgeType){for(var c=i.allpts,u=0;u+3<c.length;u+=2)if(mne(y,v,c[u],c[u+1],c[u+2],c[u+3],o)&&s>(t=Tne(y,v,c[u],c[u+1],c[u+2],c[u+3])))return C(e,t),!0}else if("bezier"===i.edgeType||"multibezier"===i.edgeType||"self"===i.edgeType||"compound"===i.edgeType)for(c=i.allpts,u=0;u+5<i.allpts.length;u+=4)if(yne(y,v,c[u],c[u+1],c[u+2],c[u+3],c[u+4],c[u+5],o)&&s>(t=bne(y,v,c[u],c[u+1],c[u+2],c[u+3],c[u+4],c[u+5])))return C(e,t),!0;for(var l=l||r.source,h=h||r.target,d=x.getArrowWidth(n,a),p=[{name:"source",x:i.arrowStartX,y:i.arrowStartY,angle:i.srcArrowAngle},{name:"target",x:i.arrowEndX,y:i.arrowEndY,angle:i.tgtArrowAngle},{name:"mid-source",x:i.midX,y:i.midY,angle:i.midsrcArrowAngle},{name:"mid-target",x:i.midX,y:i.midY,angle:i.midtgtArrowAngle}],u=0;u<p.length;u++){var g=p[u],f=b.arrowShapes[e.pstyle(g.name+"-arrow-shape").value],m=e.pstyle("width").pfValue;if(f.roughCollide(y,v,d,g.angle,{x:g.x,y:g.y},m,w)&&f.collide(y,v,d,g.angle,{x:g.x,y:g.y},m,w))return C(e),!0}k&&0<T.length&&(E(l),E(h))}function f(e,t,r){return xie(e,t,r)}function h(e,t){var r=e._private,i=g,n=t?t+"-":"",a=(e.boundingBox(),r.labelBounds[t||"main"]),s=e.pstyle(n+"label").value;if("yes"===e.pstyle("text-events").strValue&&s){var o=f(r.rscratch,"labelX",t),l=f(r.rscratch,"labelY",t),s=f(r.rscratch,"labelAngle",t),r=e.pstyle(n+"text-margin-x").pfValue,t=e.pstyle(n+"text-margin-y").pfValue,n=a.x1-i-r,h=a.x2+i-r,c=a.y1-i-t,i=a.y2+i-t;if(s){var u=Math.cos(s),d=Math.sin(s),p=(s=mt(function(e,t){return{x:(e-=o)*u-(t-=l)*d+o,y:e*d+t*u+l}},"rotate"))(n,c),n=s(n,i),c=s(h,c),s=s(h,i),h=[p.x+r,p.y+t,c.x+r,c.y+t,s.x+r,s.y+t,n.x+r,n.y+t];if(kne(y,v,h))return C(e),!0}else if(une(a,y,v))return C(e),!0}}e&&(r=r.interactive),mt(C,"addEle"),mt(E,"checkNode"),mt(o,"checkEdge"),mt(f,"preprop"),mt(h,"checkLabel");for(var c=r.length-1;0<=c;c--){var u=r[c];u.isNode()?E(u)||h(u):o(u)||h(u)||h(u,"source")||h(u,"target")}return T},getAllInBox:function(e,t,r,i){var n=this.getCachedZSortedEles().interactive,u=2/this.cy.zoom(),a=[],s=Math.min(e,r),o=Math.max(e,r),l=Math.min(t,i),h=Math.max(t,i),c=rne({x1:e=s,y1:t=l,x2:r=o,y2:i=h}),d=[{x:c.x1,y:c.y1},{x:c.x2,y:c.y1},{x:c.x2,y:c.y2},{x:c.x1,y:c.y2}],p=[[d[0],d[1]],[d[1],d[2]],[d[2],d[3]],[d[3],d[0]]];function g(e,t,r){return xie(e,t,r)}function f(e,t){var r,i,n,a,s,o,l=e._private,h=u,c=(e.boundingBox(),l.labelBounds.main);return c?(r=g(l.rscratch,"labelX",t),i=g(l.rscratch,"labelY",t),l=g(l.rscratch,"labelAngle",t),t=e.pstyle("text-margin-x").pfValue,e=e.pstyle("text-margin-y").pfValue,n=c.x1-h-t,t=c.x2+h-t,a=c.y1-h-e,c=c.y2+h-e,l?(s=Math.cos(l),o=Math.sin(l),[(h=mt(function(e,t){return{x:(e-=r)*s-(t-=i)*o+r,y:e*o+t*s+i}},"rotate"))(n,a),h(t,a),h(t,c),h(n,c)]):[{x:n,y:a},{x:t,y:a},{x:t,y:c},{x:n,y:c}]):null}function m(e,t,r,i){function n(e,t,r){return(r.y-e.y)*(t.x-e.x)>(t.y-e.y)*(r.x-e.x)}return mt(n,"ccw"),n(e,r,i)!==n(t,r,i)&&n(e,t,r)!==n(e,t,i)}mt(g,"preprop"),mt(f,"getRotatedLabelBox"),mt(m,"doLinesIntersect");for(var y=0;y<n.length;y++){var v=n[y];if(v.isNode()){var x=v,b="yes"===x.pstyle("text-events").strValue,T=x.pstyle("box-selection").strValue,k="yes"===x.pstyle("box-select-labels").strValue;"none"!==T&&(E=x.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:("overlap"===T||k)&&b}),"contain"===T?(C=!1,k&&b&&(k=f(x))&&IQ(k,d)&&(a.push(x),C=!0),!C&&pne(c,E)&&a.push(x)):"overlap"===T&&cne(c,E)&&(IQ([{x:(b=x.boundingBox({includeNodes:!0,includeEdges:!0,includeLabels:!1,includeMainLabels:!1,includeSourceLabels:!1,includeTargetLabels:!1})).x1,y:b.y1},{x:b.x2,y:b.y1},{x:b.x2,y:b.y2},{x:b.x1,y:b.y2}],d)||(k=f(x))&&IQ(k,d))&&a.push(x))}else{var w=v,C=w._private,T=C.rscratch,E=w.pstyle("box-selection").strValue;if("none"!==E)if("contain"===E){if((null==T.startX||null==T.startY||une(c,T.startX,T.startY))&&(null==T.endX||null==T.endY||une(c,T.endX,T.endY)))if("bezier"===T.edgeType||"multibezier"===T.edgeType||"self"===T.edgeType||"compound"===T.edgeType||"segments"===T.edgeType||"haystack"===T.edgeType){for(var S=C.rstyle.bezierPts||C.rstyle.linePts||C.rstyle.haystackPts,_=!0,A=0;A<S.length;A++)if(!dne(c,S[A])){_=!1;break}_&&a.push(w)}else"straight"===T.edgeType&&a.push(w)}else if("overlap"===E){var L=!1;if(null!=T.startX&&null!=T.startY&&null!=T.endX&&null!=T.endY&&(une(c,T.startX,T.startY)||une(c,T.endX,T.endY)))a.push(w),L=!0;else if(!L&&"haystack"===T.edgeType)for(var R=C.rstyle.haystackPts,I=0;I<R.length;I++)if(dne(c,R[I])){a.push(w),L=!0;break}if(!L){var N=C.rstyle.bezierPts||C.rstyle.linePts||C.rstyle.haystackPts;if((N=(!N||N.length<2)&&"straight"===T.edgeType&&null!=T.startX&&null!=T.startY&&null!=T.endX&&null!=T.endY?[{x:T.startX,y:T.startY},{x:T.endX,y:T.endY}]:N)&&!(N.length<2))for(var D=0;D<N.length-1;D++){for(var B=N[D],P=N[D+1],M=0;M<p.length;M++){var O=nQ(p[M],2);if(m(B,P,O[0],O[1])){a.push(w),L=!0;break}}if(L)break}}}}}return a}},(Mce={calculateArrowAngles:function(e){var t,r,i,n,a,s,o,l,h,c,u,d,p,g,f="haystack"===(e=e._private.rscratch).edgeType,m="bezier"===e.edgeType,y="multibezier"===e.edgeType,v="segments"===e.edgeType,x="compound"===e.edgeType,b="self"===e.edgeType,T=f?(d=e.haystackPts[0],g=e.haystackPts[1],t=e.haystackPts[2],e.haystackPts[3]):(d=e.arrowStartX,g=e.arrowStartY,t=e.arrowEndX,e.arrowEndY),k=(k=e.midX,w=e.midY,i=v?(r=d-e.segpts[0],g-e.segpts[1]):y||x||b||m?(p=e.allpts,r=d-Qie(p[0],p[2],p[4],.1),g-Qie(p[1],p[3],p[5],.1)):(r=d-k,g-w),e.srcArrowAngle=Vie(r,i),e.midX),w=e.midY;f&&(k=(d+t)/2,w=(g+T)/2),r=t-d,i=T-g,v?i=(p=e.allpts).length/2%2==0?(n=(u=p.length/2)-2,r=p[u]-p[n],p[u+1]-p[n+1]):e.isRound?(r=e.midVector[1],-e.midVector[0]):(n=(u=p.length/2-1)-2,r=p[u]-p[n],p[u+1]-p[n+1]):(y||x||b)&&(p=e.allpts,f=e.ctrlpts.length/2%2==0?(c=2+(l=2+(h=p.length/2-1)),a=Qie(p[h],p[l],p[c],0),s=Qie(p[h+1],p[l+1],p[c+1],0),o=Qie(p[h],p[l],p[c],1e-4),Qie(p[h+1],p[l+1],p[c+1],1e-4)):(c=2+(l=p.length/2-1),a=Qie(p[h=l-2],p[l],p[c],.4999),s=Qie(p[h+1],p[l+1],p[c+1],.4999),o=Qie(p[h],p[l],p[c],.5),Qie(p[h+1],p[l+1],p[c+1],.5)),r=o-a,i=f-s),e.midtgtArrowAngle=Vie(r,i),e.midDispX=r,e.midDispY=i,r*=-1,i*=-1,v&&(p=e.allpts).length/2%2!=0&&!e.isRound&&(r=-(p[d=2+(u=p.length/2-1)]-p[u]),i=-(p[d+1]-p[u+1])),e.midsrcArrowAngle=Vie(r,i),i=v?(r=t-e.segpts[e.segpts.length-2],T-e.segpts[e.segpts.length-1]):y||x||b||m?(g=(p=e.allpts).length,r=t-Qie(p[g-6],p[g-4],p[g-2],.9),T-Qie(p[g-5],p[g-3],p[g-1],.9)):(r=t-k,T-w),e.tgtArrowAngle=Vie(r,i)}}).getArrowWidth=Mce.getArrowHeight=function(e,t){var r,i=this.arrowWidthCache=this.arrowWidthCache||{};return i[e+", "+t]||(r=Math.max(Math.pow(13.37*e,.9),29)*t,i[e+", "+t]=r)},Vhe={},Yhe={},sce=mt(function(e,t,r){r.x=t.x-e.x,r.y=t.y-e.y,r.len=Math.sqrt(r.x*r.x+r.y*r.y),r.nx=r.x/r.len,r.ny=r.y/r.len,r.ang=Math.atan2(r.ny,r.nx)},"asVec"),oce=mt(function(e,t){t.x=-1*e.x,t.y=-1*e.y,t.nx=-1*e.nx,t.ny=-1*e.ny,t.ang=0<e.ang?-(Math.PI-e.ang):Math.PI+e.ang},"invertVec"),lce=mt(function(e,t,r,i,n){e!==ace?sce(t,e,Vhe):oce(Yhe,Vhe),sce(t,r,Yhe),ece=Vhe.nx*Yhe.ny-Vhe.ny*Yhe.nx,Khe=Vhe.nx*Yhe.nx-Vhe.ny*-Yhe.ny,ece=Math.asin(Math.max(-1,Math.min(1,ece))),Math.abs(ece)<1e-6?(Ghe=t.x,jhe=t.y,Zhe=Jhe=0):(Xhe=!(Hhe=1),Khe<0?ece<0?ece=Math.PI+ece:(ece=Math.PI-ece,Hhe=-1,Xhe=!0):0<ece&&(Hhe=-1,Xhe=!0),Jhe=void 0!==t.radius?t.radius:i,Khe=ece/2,ece=Math.min(Vhe.len/2,Yhe.len/2),Zhe=n?(Qhe=Math.abs(Math.cos(Khe)*Jhe/Math.sin(Khe)),ece<Qhe?(Qhe=ece,Math.abs(Qhe*Math.sin(Khe)/Math.cos(Khe))):Jhe):(Qhe=Math.min(ece,Jhe),Math.abs(Qhe*Math.sin(Khe)/Math.cos(Khe))),ice=t.x+Yhe.nx*Qhe,nce=t.y+Yhe.ny*Qhe,Ghe=ice-Yhe.ny*Zhe*Hhe,jhe=nce+Yhe.nx*Zhe*Hhe,tce=t.x+Vhe.nx*Qhe,rce=t.y+Vhe.ny*Qhe,ace=t)},"calcCornerArc"),mt(dee,"drawPreparedRoundCorner"),mt(pee,"getRoundCorner"),hce=Math.sqrt(.02),Oce={findMidptPtsEtc:function(e,t){var r,i,n,a,s,o,l=t.posPts,h=t.intersectionPts,c=t.vectorNormInverse,u=e.pstyle("source-endpoint"),d=e.pstyle("target-endpoint"),p=null!=u.units&&null!=d.units,g=mt(function(e,t,r,i){return i-=t,t=r-e,{x:-i/(r=Math.sqrt(t*t+i*i)),y:t/r}},"recalcVectorNormInverse");switch(e.pstyle("edge-distances").value){case"node-position":o=l;break;case"intersection":o=h;break;case"endpoints":o=p?(s={x1:r=(i=nQ(this.manualEndptToPx(e.source()[0],u),2))[0],y1:i=i[1],x2:n=(a=nQ(this.manualEndptToPx(e.target()[0],d),2))[0],y2:a=a[1]},c=g(r,i,n,a),s):(hie("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).")),h)}return{midptPts:o,vectorNormInverse:c}},findHaystackPoints:function(e){for(var t=0;t<e.length;t++){var r=e[t],i=(a=r._private).rscratch,n=(i.haystack||(n=2*Math.random()*Math.PI,i.source={x:Math.cos(n),y:Math.sin(n)},n=2*Math.random()*Math.PI,i.target={x:Math.cos(n),y:Math.sin(n)}),a.source),a=a.target,s=n.position(),o=a.position(),l=n.width(),h=a.width(),c=n.height(),a=a.height(),u=r.pstyle("haystack-radius").value/2;i.haystackPts=i.allpts=[i.source.x*l*u+s.x,i.source.y*c*u+s.y,i.target.x*h*u+o.x,i.target.y*a*u+o.y],i.midX=(i.allpts[0]+i.allpts[2])/2,i.midY=(i.allpts[1]+i.allpts[3])/2,i.edgeType="haystack",i.haystack=!0,this.storeEdgeProjections(r),this.calculateArrowAngles(r),this.recalculateEdgeLabelProjections(r),this.calculateLabelAngles(r)}},findSegmentsPoints:function(e,t){var r=e._private.rscratch,i=e.pstyle("segment-weights"),n=e.pstyle("segment-distances"),a=e.pstyle("segment-radii"),s=e.pstyle("radius-type"),o=Math.min(i.pfValue.length,n.pfValue.length),l=a.pfValue[a.pfValue.length-1],h=s.pfValue[s.pfValue.length-1];r.edgeType="segments",r.segpts=[],r.radii=[],r.isArcRadius=[];for(var c=0;c<o;c++){var u=i.pfValue[c],d=n.pfValue[c],p=1-u,g=this.findMidptPtsEtc(e,t),f=g.midptPts,m=f.x1*p+f.x2*u;r.segpts.push(m+(g=g.vectorNormInverse).x*d,f.y1*p+f.y2*u+g.y*d),r.radii.push(void 0!==a.pfValue[c]?a.pfValue[c]:l),r.isArcRadius.push("arc-radius"===(void 0!==s.pfValue[c]?s.pfValue[c]:h))}},findLoopPoints:function(e,t,r,i){var n=e._private.rscratch,a=t.dirCounts,t=t.srcPos,s=(s=e.pstyle("control-point-distances"))?s.pfValue[0]:void 0,o=e.pstyle("loop-direction").pfValue,l=e.pstyle("loop-sweep").pfValue,e=e.pstyle("control-point-step-size").pfValue;n.edgeType="self",i&&(r=0,e=s),s=(i=o-Math.PI/2)-l/2,i+=l/2,r=void 0===a[o=o+"_"+l]?a[o]=0:++a[o],n.ctrlpts=[t.x+1.4*Math.cos(s)*e*(r/3+1),t.y+1.4*Math.sin(s)*e*(r/3+1),t.x+1.4*Math.cos(i)*e*(r/3+1),t.y+1.4*Math.sin(i)*e*(r/3+1)]},findCompoundLoopPoints:function(e,t,r,i){var n=e._private.rscratch,a=(n.edgeType="compound",t.srcPos),s=t.tgtPos,o=t.srcW,l=t.srcH,h=t.tgtW,t=t.tgtH,c=e.pstyle("control-point-step-size").pfValue,e=(e=e.pstyle("control-point-distances"))?e.pfValue[0]:void 0,i=(i&&(r=0,c=e),{x:a.x-o/2,y:a.y-l/2}),e={x:s.x-h/2,y:s.y-t/2},a={x:Math.min(i.x,e.x),y:Math.min(i.y,e.y)},l=Math.max(.5,Math.log(.01*o)),s=Math.max(.5,Math.log(.01*h));n.ctrlpts=[a.x,a.y-(1+Math.pow(50,1.12)/100)*c*(r/3+1)*l,a.x-(1+Math.pow(50,1.12)/100)*c*(r/3+1)*s,a.y]},findStraightEdgePoints:function(e){e._private.rscratch.edgeType="straight"},findBezierPoints:function(e,t,r,i,n){var a=e._private.rscratch,s=e.pstyle("control-point-step-size").pfValue,o=e.pstyle("control-point-distances"),l=e.pstyle("control-point-weights"),h=o&&l?Math.min(o.value.length,l.value.length):1,c=o?o.pfValue[0]:void 0,u=l.value[0],d=i;a.edgeType=d?"multibezier":"bezier",a.ctrlpts=[];for(var p=0;p<h;p++){var g=(.5-t.eles.length/2+r)*s*(n?-1:1),f=Hie(g),f=(d&&(c=o?o.pfValue[p]:s,u=l.value[p]),void 0!==(m=i?c:void 0!==c?f*c:void 0)?m:g),m=1-u,g=u,y=this.findMidptPtsEtc(e,t),v=y.midptPts,x=v.x1*m+v.x2*g;a.ctrlpts.push(x+(y=y.vectorNormInverse).x*f,v.y1*m+v.y2*g+y.y*f)}},findTaxiPoints:function(e,t){var r=e._private.rscratch,i=(r.edgeType="segments","vertical"),n="horizontal",a=t.posPts,s=t.srcW,o=t.srcH,l=t.tgtW,t=t.tgtH,h="node-position"!==e.pstyle("edge-distances").value,c=e.pstyle("taxi-direction").value,u=c,d=e.pstyle("taxi-turn"),p="%"===d.units,g=(d=d.pfValue)<0,f=e.pstyle("taxi-turn-min-distance").pfValue,m=h?(s+l)/2:0,y=h?(o+t)/2:0,v=a.x2-a.x1,x=a.y2-a.y1,m=(b=mt(function(e,t){return 0<e?Math.max(e-t,0):Math.min(e+t,0)},"subDWH"))(v,m),b=b(x,y),y=!1,T=("auto"===u?c=Math.abs(m)>Math.abs(b)?n:i:"upward"===u||"downward"===u?(c=i,y=!0):"leftward"!==u&&"rightward"!==u||(c=n,y=!0),(n=c===i)?b:m),i=Hie(c=n?x:v),b=!1;y&&(p||g)||!("downward"===u&&c<0||"upward"===u&&0<c||"leftward"===u&&0<c||"rightward"===u&&c<0)||(T=(i*=-1)*Math.abs(T),b=!0),m=p?(d<0?1+d:d)*T:(d<0?T:0)+d*i,g=(y=mt(function(e){return Math.abs(e)<f||Math.abs(e)>=Math.abs(T)},"getIsTooClose"))(m),u=y(Math.abs(T)-Math.abs(m)),!g&&!u||b?n?(c=a.y1+m+(h?o/2*i:0),x=a.x1,t=a.x2,r.segpts=[x,c,t,c]):(p=a.x1+m+(h?s/2*i:0),u=a.y1,d=a.y2,r.segpts=[p,u,p,d]):n?(p=Math.abs(c)<=o/2,d=Math.abs(v)<=l/2,p?(y=(a.x1+a.x2)/2,g=a.y1,u=a.y2,r.segpts=[y,g,y,u]):d?(b=(a.y1+a.y2)/2,v=a.x1,l=a.x2,r.segpts=[v,b,l,b]):r.segpts=[a.x1,a.y2]):(p=Math.abs(c)<=s/2,g=Math.abs(x)<=t/2,p?(y=(a.y1+a.y2)/2,u=a.x1,d=a.x2,r.segpts=[u,y,d,y]):g?(v=(a.x1+a.x2)/2,l=a.y1,b=a.y2,r.segpts=[v,l,v,b]):r.segpts=[a.x2,a.y1]),r.isRound&&(y=e.pstyle("taxi-radius").value,g="arc-radius"===e.pstyle("radius-type").value[0],r.radii=new Array(r.segpts.length/2).fill(y),r.isArcRadius=new Array(r.segpts.length/2).fill(g))},tryToCorrectInvalidPoints:function(e,t){var r,i,n,a,s,o,l,h,c,u,d,p,g,f,m,y,v,x,b,T,k,w,C=e._private.rscratch;"bezier"===C.edgeType&&(m=t.srcPos,r=t.tgtPos,i=t.srcW,n=t.srcH,a=t.tgtW,s=t.tgtH,w=t.srcShape,o=t.tgtShape,v=t.srcCornerRadius,l=t.tgtCornerRadius,x=t.srcRs,t=t.tgtRs,y=!ce(C.startX)||!ce(C.startY),f=!ce(C.arrowStartX)||!ce(C.arrowStartY),h=!ce(C.endX)||!ce(C.endY),c=!ce(C.arrowEndX)||!ce(C.arrowEndY),u=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,b=(T=Xie({x:C.ctrlpts[0],y:C.ctrlpts[1]},{x:C.startX,y:C.startY}))<u,p=(d=Xie({x:C.ctrlpts[0],y:C.ctrlpts[1]},{x:C.endX,y:C.endY}))<u,g=!1,(y||f||b)&&(g=!0,y=C.ctrlpts[0]-m.x,f=C.ctrlpts[1]-m.y,k=y/(y=Math.sqrt(y*y+f*f)),f/=y,y=Math.max(i,n),y={x:C.ctrlpts[0]+2*k*y,y:C.ctrlpts[1]+2*f*y},w=w.intersectLine(m.x,m.y,i,n,y.x,y.y,0,v,x),b?(C.ctrlpts[0]=C.ctrlpts[0]+k*(u-T),C.ctrlpts[1]=C.ctrlpts[1]+f*(u-T)):(C.ctrlpts[0]=w[0]+k*u,C.ctrlpts[1]=w[1]+f*u)),(h||c||p)&&(g=!0,m=C.ctrlpts[0]-r.x,y=C.ctrlpts[1]-r.y,x=m/(v=Math.sqrt(m*m+y*y)),b=y/v,T=Math.max(i,n),k={x:C.ctrlpts[0]+2*x*T,y:C.ctrlpts[1]+2*b*T},w=o.intersectLine(r.x,r.y,a,s,k.x,k.y,0,l,t),p?(C.ctrlpts[0]=C.ctrlpts[0]+x*(u-d),C.ctrlpts[1]=C.ctrlpts[1]+b*(u-d)):(C.ctrlpts[0]=w[0]+x*u,C.ctrlpts[1]=w[1]+b*u)),g)&&this.findEndpoints(e)},storeAllpts:function(e){var t,r,i,n,a=e._private.rscratch;if("multibezier"===a.edgeType||"bezier"===a.edgeType||"self"===a.edgeType||"compound"===a.edgeType){a.allpts=[],a.allpts.push(a.startX,a.startY);for(var s,o=0;o+1<a.ctrlpts.length;o+=2)a.allpts.push(a.ctrlpts[o],a.ctrlpts[o+1]),o+3<a.ctrlpts.length&&a.allpts.push((a.ctrlpts[o]+a.ctrlpts[o+2])/2,(a.ctrlpts[o+1]+a.ctrlpts[o+3])/2);a.allpts.push(a.endX,a.endY),a.ctrlpts.length/2%2==0?(s=a.allpts.length/2-1,a.midX=a.allpts[s],a.midY=a.allpts[s+1]):(s=a.allpts.length/2-3,a.midX=Qie(a.allpts[s],a.allpts[s+2],a.allpts[s+4],.5),a.midY=Qie(a.allpts[s+1],a.allpts[s+3],a.allpts[s+5],.5))}else if("straight"===a.edgeType)a.allpts=[a.startX,a.startY,a.endX,a.endY],a.midX=(a.startX+a.endX+a.arrowStartX+a.arrowEndX)/4,a.midY=(a.startY+a.endY+a.arrowStartY+a.arrowEndY)/4;else if("segments"===a.edgeType){if(a.allpts=[],a.allpts.push(a.startX,a.startY),a.allpts.push.apply(a.allpts,a.segpts),a.allpts.push(a.endX,a.endY),a.isRound){a.roundCorners=[];for(var l=2;l+3<a.allpts.length;l+=2){var h=a.radii[l/2-1],c=a.isArcRadius[l/2-1];a.roundCorners.push(pee({x:a.allpts[l-2],y:a.allpts[l-1]},{x:a.allpts[l],y:a.allpts[l+1],radius:h},{x:a.allpts[l+2],y:a.allpts[l+3]},h,c))}}a.segpts.length%4==0?(e=a.segpts.length/2,a.midX=(a.segpts[s=e-2]+a.segpts[e])/2,a.midY=(a.segpts[1+s]+a.segpts[1+e])/2):(s=a.segpts.length/2-1,a.isRound?(e={x:a.segpts[s],y:a.segpts[1+s]},0===(t=a.roundCorners[s/2]).radius?(r=a.segpts[2+s],n=a.segpts[3+s],a.midX=e.x,a.midY=e.y,a.midVector=[e.y-n,r-e.x]):(n=[e.x-t.cx,e.y-t.cy],i=t.radius/Math.sqrt(Math.pow(n[0],2)+Math.pow(n[1],2)),n=n.map(function(e){return e*i}),a.midX=t.cx+n[0],a.midY=t.cy+n[1],a.midVector=n)):(a.midX=a.segpts[s],a.midY=a.segpts[1+s]))}},checkForInvalidEdgeWarning:function(e){var t=e[0]._private.rscratch;t.nodesOverlap||ce(t.startX)&&ce(t.startY)&&ce(t.endX)&&ce(t.endY)?t.loggedErr=!1:t.loggedErr||(t.loggedErr=!0,hie("Edge `"+e.id()+"` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap."))},findEdgeControlPoints:function(e){var D=this;if(e&&0!==e.length){for(var M=this,O=M.cy.hasCompoundNodes(),B=new Tie,P=mt(function(e,t){return[].concat(aQ(e),[t?1:0]).join("-")},"getKey"),$=[],t=[],r=0;r<e.length;r++){var i,n,a,s=e[r],o=s._private,l=s.pstyle("curve-style").value;!s.removed()&&s.takesUpSpace()&&("haystack"===l?t.push(s):(i="unbundled-bezier"===l||Hte(l,"segments")||"straight"===l||"straight-triangle"===l||Hte(l,"taxi"),l="unbundled-bezier"===l||"bezier"===l,n=o.source,o=o.target,n=[n.poolIndex(),o.poolIndex()].sort(),o=P(n,i),null==(a=B.get(o))&&(a={eles:[]},$.push({pairId:n,edgeIsUnbundled:i}),B.set(o,a)),a.eles.push(s),i&&(a.hasUnbundled=!0),l&&(a.hasBezier=!0)))}for(var h=mt(function(){var e=$[F],t=e.pairId,t=P(t,e.edgeIsUnbundled),r=B.get(t),i=(r.hasUnbundled||(e=r.eles[0].parallelEdges().filter(function(e){return e.isBundledBezier()}),yie(r.eles),e.forEach(function(e){return r.eles.push(e)}),r.eles.sort(function(e,t){return e.poolIndex()-t.poolIndex()})),(t=r.eles[0]).source()),n=t.target(),a=(i.poolIndex()>n.poolIndex()&&(e=i,i=n,n=e),r.srcPos=i.position()),s=r.tgtPos=n.position(),o=r.srcW=i.outerWidth(),l=r.srcH=i.outerHeight(),h=r.tgtW=n.outerWidth(),c=r.tgtH=n.outerHeight(),u=r.srcShape=M.nodeShapes[D.getNodeShape(i)],d=r.tgtShape=M.nodeShapes[D.getNodeShape(n)],p=r.srcCornerRadius="auto"===i.pstyle("corner-radius").value?"auto":i.pstyle("corner-radius").pfValue,g=r.tgtCornerRadius="auto"===n.pstyle("corner-radius").value?"auto":n.pstyle("corner-radius").pfValue,f=r.tgtRs=n._private.rscratch,m=r.srcRs=i._private.rscratch;r.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var y=0;y<r.eles.length;y++){var v,x,b,T,k,w,C,E,S,_=r.eles[y],A=_[0]._private.rscratch,L=_.pstyle("curve-style").value,R="unbundled-bezier"===L||Hte(L,"segments")||Hte(L,"taxi"),I=!i.same(_.source()),N=(r.calculatedIntersection||i===n||!r.hasBezier&&!r.hasUnbundled||(r.calculatedIntersection=!0,N=u.intersectLine(a.x,a.y,o,l,s.x,s.y,0,p,m),v=r.srcIntn=N,x=d.intersectLine(s.x,s.y,h,c,a.x,a.y,0,g,f),b=r.tgtIntn=x,T=r.intersectionPts={x1:N[0],x2:x[0],y1:N[1],y2:x[1]},k=r.posPts={x1:a.x,x2:s.x,y1:a.y,y2:s.y},E=x[1]-N[1],C=x[0]-N[0],w=Math.sqrt(C*C+E*E),ce(w)&&hce<=w||(w=Math.sqrt(Math.max(C*C,.01)+Math.max(E*E,.01))),C=r.vector={x:C,y:E},S={x:-(E=r.vectorNorm={x:C.x/w,y:C.y/w}).y,y:E.x},r.nodesOverlap=!ce(w)||d.checkPoint(N[0],N[1],0,h,c,s.x,s.y,g,f)||u.checkPoint(x[0],x[1],0,o,l,a.x,a.y,p,m),r.vectorNormInverse=S,w={nodesOverlap:r.nodesOverlap,dirCounts:r.dirCounts,calculatedIntersection:!0,hasBezier:r.hasBezier,hasUnbundled:r.hasUnbundled,eles:r.eles,srcPos:s,srcRs:f,tgtPos:a,tgtRs:m,srcW:h,srcH:c,tgtW:o,tgtH:l,srcIntn:b,tgtIntn:v,srcShape:d,tgtShape:u,posPts:{x1:k.x2,y1:k.y2,x2:k.x1,y2:k.y1},intersectionPts:{x1:T.x2,y1:T.y2,x2:T.x1,y2:T.y1},vector:{x:-C.x,y:-C.y},vectorNorm:{x:-E.x,y:-E.y},vectorNormInverse:{x:-S.x,y:-S.y}}),I?w:r);A.nodesOverlap=N.nodesOverlap,A.srcIntn=N.srcIntn,A.tgtIntn=N.tgtIntn,A.isRound=L.startsWith("round"),O&&(i.isParent()||i.isChild()||n.isParent()||n.isChild())&&(i.parents().anySame(n)||n.parents().anySame(i)||i.same(n)&&i.isParent())?D.findCompoundLoopPoints(_,N,y,R):i===n?D.findLoopPoints(_,N,y,R):L.endsWith("segments")?D.findSegmentsPoints(_,N):L.endsWith("taxi")?D.findTaxiPoints(_,N):"straight"===L||!R&&r.eles.length%2==1&&y===Math.floor(r.eles.length/2)?D.findStraightEdgePoints(_):D.findBezierPoints(_,N,y,R,I),D.findEndpoints(_),D.tryToCorrectInvalidPoints(_,N),D.checkForInvalidEdgeWarning(_),D.storeAllpts(_),D.storeEdgeProjections(_),D.calculateArrowAngles(_),D.recalculateEdgeLabelProjections(_),D.calculateLabelAngles(_)}},"_loop"),F=0;F<$.length;F++)h();this.findHaystackPoints(t)}}},mt(gee,"getPts"),Oce.getSegmentPoints=function(e){var t=e[0]._private.rscratch;if(this.recalculateRenderedStyle(e),"segments"===t.edgeType)return gee(t.segpts)},Oce.getControlPoints=function(e){var t=e[0]._private.rscratch;if(this.recalculateRenderedStyle(e),"bezier"===(e=t.edgeType)||"multibezier"===e||"self"===e||"compound"===e)return gee(t.ctrlpts)},Oce.getEdgeMidpoint=function(e){var t=e[0]._private.rscratch;return this.recalculateRenderedStyle(e),{x:t.midX,y:t.midY}},Bce={manualEndptToPx:function(e,t){var r,i=e.position(),n=e.outerWidth(),a=e.outerHeight(),s=e._private.rscratch;return 2===t.value.length?(r=[t.pfValue[0],t.pfValue[1]],"%"===t.units[0]&&(r[0]=r[0]*n),"%"===t.units[1]&&(r[1]=r[1]*a),r[0]+=i.x,r[1]+=i.y,r):(r=t.pfValue[0],r=-Math.PI/2+r,t=2*Math.max(n,a),r=[i.x+Math.cos(r)*t,i.y+Math.sin(r)*t],this.nodeShapes[this.getNodeShape(e)].intersectLine(i.x,i.y,n,a,r[0],r[1],0,"auto"===e.pstyle("corner-radius").value?"auto":e.pstyle("corner-radius").pfValue,s))},findEndpoints:function(e){var t,r=e.source()[0],i=e.target()[0],n=r.position(),a=i.position(),s=e.pstyle("target-arrow-shape").value,o=e.pstyle("source-arrow-shape").value,l=e.pstyle("target-distance-from-node").pfValue,h=e.pstyle("source-distance-from-node").pfValue,c=r._private.rscratch,u=i._private.rscratch,d=e.pstyle("curve-style").value,p=e._private.rscratch,g=p.edgeType,d=Hte(d,"taxi"),f="self"===g||"compound"===g,m="bezier"===g||"multibezier"===g||f,y="bezier"!==g,v="straight"===g||"segments"===g,g="segments"===g,x=m||y||v,f=f||d,d=e.pstyle("source-endpoint"),b=f?"outside-to-node":d.value,T="auto"===r.pstyle("corner-radius").value?"auto":r.pstyle("corner-radius").pfValue,k=e.pstyle("target-endpoint"),f=f?"outside-to-node":k.value,w="auto"===i.pstyle("corner-radius").value?"auto":i.pstyle("corner-radius").pfValue;p.srcManEndpt=d;var C,E,S,_,A=null!=(A=2===(null==(p.tgtManEndpt=k)||null==(A=k.pfValue)?void 0:A.length)?k.pfValue:null)?A:[0,0],L=null!=(L=2===(null==d||null==(L=d.pfValue)?void 0:L.length)?d.pfValue:null)?L:[0,0],i=(m?(m=[p.ctrlpts[0],p.ctrlpts[1]],_=y?[p.ctrlpts[p.ctrlpts.length-2],p.ctrlpts[p.ctrlpts.length-1]]:m,E=m):v&&(y=g?p.segpts.slice(0,2):[a.x+A[0],a.y+A[1]],_=g?p.segpts.slice(p.segpts.length-2):[n.x+L[0],n.y+L[1]],E=y),"inside-to-node"===f?t=[a.x,a.y]:k.units?t=this.manualEndptToPx(i,k):"outside-to-line"===f?t=p.tgtIntn:("outside-to-node"===f||"outside-to-node-or-label"===f?S=_:"outside-to-line"!==f&&"outside-to-line-or-label"!==f||(S=[n.x,n.y]),t=this.nodeShapes[this.getNodeShape(i)].intersectLine(a.x,a.y,i.outerWidth(),i.outerHeight(),S[0],S[1],0,w,u),"outside-to-node-or-label"!==f&&"outside-to-line-or-label"!==f||(v=(m=i._private.rscratch).labelWidth,A=m.labelX,g=m.labelY,L=v/2,y=m.labelHeight/2,"top"===(k=i.pstyle("text-valign").value)?g-=y:"bottom"===k&&(g+=y),"left"===(w=i.pstyle("text-halign").value)?A-=L:"right"===w&&(A+=L),0<(u=Dne(S[0],S[1],[A-L,g-y,A+L,g-y,A+L,g+y,A-L,g+y],a.x,a.y)).length&&(v=Kie(f=n,zie(t)),(m=Kie(f,zie(u)))<(k=v)&&(t=u,k=m),2<u.length)&&Kie(f,{x:u[2],y:u[3]})<k&&(t=[u[2],u[3]]))),One(t,_,this.arrowShapes[s].spacing(e)+l)),w=One(t,_,this.arrowShapes[s].gap(e)+l),w=(p.endX=w[0],p.endY=w[1],p.arrowEndX=i[0],p.arrowEndY=i[1],"inside-to-node"===b?t=[n.x,n.y]:d.units?t=this.manualEndptToPx(r,d):"outside-to-line"===b?t=p.srcIntn:("outside-to-node"===b||"outside-to-node-or-label"===b?C=E:"outside-to-line"!==b&&"outside-to-line-or-label"!==b||(C=[a.x,a.y]),t=this.nodeShapes[this.getNodeShape(r)].intersectLine(n.x,n.y,r.outerWidth(),r.outerHeight(),C[0],C[1],0,T,c),"outside-to-node-or-label"!==b&&"outside-to-line-or-label"!==b||(A=(S=r._private.rscratch).labelWidth,L=S.labelX,g=S.labelY,y=A/2,v=S.labelHeight/2,"top"===(m=r.pstyle("text-valign").value)?g-=v:"bottom"===m&&(g+=v),"left"===(f=r.pstyle("text-halign").value)?L-=y:"right"===f&&(L+=y),0<(k=Dne(C[0],C[1],[L-y,g-v,L+y,g-v,L+y,g+v,L-y,g+v],n.x,n.y)).length&&(_=Kie(u=a,zie(t)),(s=Kie(u,zie(k)))<(l=_)&&(t=[k[0],k[1]],l=s),2<k.length)&&Kie(u,{x:k[2],y:k[3]})<l&&(t=[k[2],k[3]]))),One(t,E,this.arrowShapes[o].spacing(e)+h)),i=One(t,E,this.arrowShapes[o].gap(e)+h);p.startX=i[0],p.startY=i[1],p.arrowStartX=w[0],p.arrowStartY=w[1],x&&(ce(p.startX)&&ce(p.startY)&&ce(p.endX)&&ce(p.endY)?p.badLine=!1:p.badLine=!0)},getSourceEndpoint:function(e){var t=e[0]._private.rscratch;return"haystack"!==(this.recalculateRenderedStyle(e),t.edgeType)?{x:t.arrowStartX,y:t.arrowStartY}:{x:t.haystackPts[0],y:t.haystackPts[1]}},getTargetEndpoint:function(e){var t=e[0]._private.rscratch;return"haystack"!==(this.recalculateRenderedStyle(e),t.edgeType)?{x:t.arrowEndX,y:t.arrowEndY}:{x:t.haystackPts[2],y:t.haystackPts[3]}}},Pce={},mt(fee,"pushBezierPts"),Pce.storeEdgeProjections=function(e){var t=e._private,r=t.rscratch,i=r.edgeType;if(t.rstyle.bezierPts=null,t.rstyle.linePts=null,t.rstyle.haystackPts=null,"multibezier"===i||"bezier"===i||"self"===i||"compound"===i){t.rstyle.bezierPts=[];for(var n=0;n+5<r.allpts.length;n+=4)fee(this,e,r.allpts.slice(n,n+6))}else if("segments"===i)for(var a=t.rstyle.linePts=[],n=0;n+1<r.allpts.length;n+=2)a.push({x:r.allpts[n],y:r.allpts[n+1]});else"haystack"===i&&(i=r.haystackPts,t.rstyle.haystackPts=[{x:i[0],y:i[1]},{x:i[2],y:i[3]}]);t.rstyle.arrowWidth=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth},Pce.recalculateEdgeProjections=function(e){this.findEdgeControlPoints(e)},$ce={recalculateNodeLabelProjection:function(e){var t=e.pstyle("label").strValue;if(!$te(t)){var r,i,t=e._private,n=e.width(),a=e.height(),s=e.padding(),o=e.position(),l=e.pstyle("text-halign").strValue,h=e.pstyle("text-valign").strValue,c=t.rscratch,t=t.rstyle;switch(l){case"left":r=o.x-n/2-s;break;case"right":r=o.x+n/2+s;break;default:r=o.x}switch(h){case"top":i=o.y-a/2-s;break;case"bottom":i=o.y+a/2+s;break;default:i=o.y}c.labelX=r,c.labelY=i,t.labelX=r,t.labelY=i,this.calculateLabelAngles(e),this.applyLabelDimensions(e)}}},cce=mt(function(e,t){return t=Math.atan(t/e),0===e&&t<0&&(t*=-1),t},"lineAngleFromDelta"),uce=mt(function(e,t){var r=t.x-e.x;return cce(r,t.y-e.y)},"lineAngle"),dce=mt(function(e,t,r,i){var n=tne(0,i-.001,1),i=tne(0,i+.001,1),n=Jie(e,t,r,n),e=Jie(e,t,r,i);return uce(n,e)},"bezierAngle"),$ce.recalculateEdgeLabelProjections=function(C){var E,S,_,e,d=C._private,A=d.rscratch,p=this,L={mid:C.pstyle("label").strValue,source:C.pstyle("source-label").strValue,target:C.pstyle("target-label").strValue};(L.mid||L.source||L.target)&&(E={x:A.midX,y:A.midY},(S=mt(function(e,t,r){bie(d.rscratch,e,t,r),bie(d.rstyle,e,t,r)},"setRs"))("labelX",null,E.x),S("labelY",null,E.y),e=cce(A.midDispX,A.midDispY),S("labelAutoAngle",null,e),_=mt(function(){if(_.cache)return _.cache;for(var e=[],t=0;t+5<A.allpts.length;t+=4){var r={x:A.allpts[t],y:A.allpts[t+1]},i={x:A.allpts[t+2],y:A.allpts[t+3]},n={x:A.allpts[t+4],y:A.allpts[t+5]};e.push({p0:r,p1:i,p2:n,startDist:0,length:0,segments:[]})}var a=d.rstyle.bezierPts,s=p.bezierProjPcts.length;function o(e,t,r,i,n){var a=Xie(t,r),s=e.segments[e.segments.length-1],t={p0:t,p1:r,t0:i,t1:n,startDist:s?s.startDist+s.length:0,length:a};e.segments.push(t),e.length+=a}mt(o,"addSegment");for(var l=0;l<e.length;l++){var h=e[l],c=e[l-1];c&&(h.startDist=c.startDist+c.length),o(h,h.p0,a[l*s],0,p.bezierProjPcts[0]);for(var u=0;u<s-1;u++)o(h,a[l*s+u],a[l*s+u+1],p.bezierProjPcts[u],p.bezierProjPcts[u+1]);o(h,a[l*s+s-1],h.p2,p.bezierProjPcts[s-1],1)}return _.cache=e},"createControlPointInfo"),(e=mt(function(e){var t,r="source"===e;if(L[e]){var i=C.pstyle(e+"-text-offset").pfValue;switch(A.edgeType){case"self":case"compound":case"bezier":case"multibezier":for(var n,a=_(),s=0,o=0,l=0;l<a.length;l++){for(var h=a[r?l:a.length-1-l],c=0;c<h.segments.length;c++){var u=h.segments[r?c:h.segments.length-1-c],d=l===a.length-1&&c===h.segments.length-1,s=o;if(i<=(o+=u.length)||d){n={cp:h,segment:u};break}}if(n)break}var p=n.cp,g=(i-s)/(m=n.segment).length,f=m.t1-m.t0,m=r?m.t0+f*g:m.t1-f*g,m=tne(0,m,1);E=Jie(p.p0,p.p1,p.p2,m),t=dce(p.p0,p.p1,p.p2,m);break;case"straight":case"segments":case"haystack":for(var y,v,x,b,T=0,k=A.allpts.length,w=0;w+3<k&&(b=r?(x={x:A.allpts[w],y:A.allpts[w+1]},{x:A.allpts[w+2],y:A.allpts[w+3]}):(x={x:A.allpts[k-2-w],y:A.allpts[k-1-w]},{x:A.allpts[k-4-w],y:A.allpts[k-3-w]}),v=T,!(i<=(T+=y=Xie(x,b))));w+=2);f=tne(0,(i-v)/y,1),E=ene(x,b,f),t=uce(x,b)}S("labelX",e,E.x),S("labelY",e,E.y),S("labelAutoAngle",e,t)}},"calculateEndProjection"))("source"),e("target"),this.applyLabelDimensions(C))},$ce.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},$ce.applyPrefixedLabelDimensions=function(e,t){var r,i,n,a=e._private,s=this.getLabelText(e,t),o=Xre(s,e._private.labelDimsKey);xie(a.rscratch,"prefixedLabelDimsKey",t)!==o&&(bie(a.rscratch,"prefixedLabelDimsKey",t,o),o=this.calculateLabelDimensions(e,s),s=e.pstyle("line-height").pfValue,e=e.pstyle("text-wrap").strValue,r=xie(a.rscratch,"labelWrapCachedLines",t)||[],e="wrap"!==e?1:Math.max(r.length,1),i=(r=o.height/e)*s,n=o.width,o=o.height+(e-1)*(s-1)*r,bie(a.rstyle,"labelWidth",t,n),bie(a.rscratch,"labelWidth",t,n),bie(a.rstyle,"labelHeight",t,o),bie(a.rscratch,"labelHeight",t,o),bie(a.rscratch,"labelLineHeight",t,i))},$ce.getLabelText=function(e,r){var i=e._private,t=e.pstyle((r?r+"-":"")+"label").strValue,n=e.pstyle("text-transform").value,a=mt(function(e,t){return t?(bie(i.rscratch,e,r,t),t):xie(i.rscratch,e,r)},"rscratch");if(!t)return"";if("none"!=n&&("uppercase"==n?t=t.toUpperCase():"lowercase"==n&&(t=t.toLowerCase())),"wrap"===(n=e.pstyle("text-wrap").value)){var s=a("labelKey");if(null!=s&&a("labelWrapKey")===s)return a("labelWrapCachedText");for(var o=t.split(`
`),l=e.pstyle("text-max-width").pfValue,h="anywhere"===e.pstyle("text-overflow-wrap").value,c=[],u=/[\s\u200b]+|$/g,d=0;d<o.length;d++){var p=o[d],g=this.calculateLabelDimensions(e,p).width;if(h&&(p=p.split("").join("")),l<g){var f,m="",y=0,v=QZ(p.matchAll(u));try{for(v.s();!(f=v.n()).done;){var x=f.value,b=x[0],T=p.substring(y,x.index),y=x.index+b.length,k=0===m.length?T:m+T+b;this.calculateLabelDimensions(e,k).width<=l?m+=T+b:(m&&c.push(m),m=T+b)}}catch(e){v.e(e)}finally{v.f()}m.match(/^[\s\u200b]+$/)||c.push(m)}else c.push(p)}a("labelWrapCachedLines",c),t=a("labelWrapCachedText",c.join(`
`)),a("labelWrapKey",s)}else if("ellipsis"===n){var w=e.pstyle("text-max-width").pfValue,C="",E=!1;if(this.calculateLabelDimensions(e,t).width<w)return t;for(var S=0;S<t.length&&!(w<this.calculateLabelDimensions(e,C+t[S]+"…").width);S++)C+=t[S],S===t.length-1&&(E=!0);return E||(C+="…"),C}return t},$ce.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,r=e.pstyle("text-halign").strValue;if("auto"!==t)return t;if(!e.isNode())return"center";switch(r){case"left":return"right";case"right":return"left";default:return"center"}},$ce.calculateLabelDimensions=function(e,t){var r=this.cy.window().document,i=e.pstyle("font-style").strValue,n=e.pstyle("font-size").pfValue,a=e.pstyle("font-family").strValue,e=e.pstyle("font-weight").strValue,s=this.labelCalcCanvas,o=this.labelCalcCanvasContext;s||(s=this.labelCalcCanvas=r.createElement("canvas"),o=this.labelCalcCanvasContext=s.getContext("2d"),(r=s.style).position="absolute",r.left="-9999px",r.top="-9999px",r.zIndex="-1",r.visibility="hidden",r.pointerEvents="none"),o.font="".concat(i," ").concat(e," ").concat(n,"px ").concat(a);for(var l=0,h=0,c=t.split(`
`),u=0;u<c.length;u++){var d=c[u],d=o.measureText(d),d=Math.ceil(d.width),p=n,l=Math.max(d,l);h+=p}return{width:l+=0,height:h+=0}},$ce.calculateLabelAngle=function(e,t){var r=e._private.rscratch,i=e.isEdge();return"none"===(t=(e=e.pstyle((t?t+"-":"")+"text-rotation")).strValue)?0:i&&"autorotate"===t?r.labelAutoAngle:"autorotate"===t?0:e.pfValue},pce=!($ce.calculateLabelAngles=function(e){var t=e.isEdge(),r=e._private.rscratch;r.labelAngle=this.calculateLabelAngle(e),t&&(r.sourceLabelAngle=this.calculateLabelAngle(e,"source"),r.targetLabelAngle=this.calculateLabelAngle(e,"target"))}),gce={},[_ce,Mce,Oce,Bce,Pce,$ce,{getNodeShape:function(e){var t=e.pstyle("shape").value;return"cutrectangle"===t&&(e.width()<28||e.height()<28)?(pce||(hie("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),pce=!0),"rectangle"):e.isParent()?"rectangle"===t||"roundrectangle"===t||"round-rectangle"===t||"cutrectangle"===t||"cut-rectangle"===t||"barrel"===t?t:"rectangle":"polygon"===t?(e=e.pstyle("shape-polygon-points").value,this.nodeShapes.makePolygon(e).name):t}},{registerCalculationListeners:function(){var s=this.cy,o=s.collection(),l=this,h=mt(function(e){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];if(o.merge(e),t)for(var r=0;r<e.length;r++){var i=e[r]._private.rstyle;i.clean=!1,i.cleanConnected=!1}},"enqueue"),e=(l.binder(s).on("bounds.* dirty.*",mt(function(e){e=e.target,h(e)},"onDirtyBounds")).on("style.* background.*",mt(function(e){e=e.target,h(e,!1)},"onDirtyStyle")),mt(function(e){if(e){var t=l.onUpdateEleCalcsFns;o.cleanStyle();for(var r=0;r<o.length;r++){var i=o[r],n=i._private.rstyle;i.isNode()&&!n.cleanConnected&&(h(i.connectedEdges()),n.cleanConnected=!0)}if(t)for(var a=0;a<t.length;a++)(0,t[a])(e,o);l.recalculateRenderedStyle(o),o=s.collection()}},"updateEleCalcs"));l.flushRenderedStyleQueue=function(){e(!0)},l.beforeRender(e,l.beforeRenderPriorities.eleCalcs)},onUpdateEleCalcs:function(e){(this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[]).push(e)},recalculateRenderedStyle:function(e,t){var r=mt(function(e){return e._private.rstyle.cleanConnected},"isCleanConnected");if(0!==e.length){var i=[],n=[];if(!this.destroyed){void 0===t&&(t=!0);for(var a=0;a<e.length;a++){var s=e[a],o=s._private,l=o.rstyle;!s.isEdge()||r(s.source())&&r(s.target())||(l.clean=!1),s.isEdge()&&s.isBundledBezier()&&s.parallelEdges().some(function(e){return!e._private.rstyle.clean&&e.isBundledBezier()})&&(l.clean=!1),t&&l.clean||s.removed()||"none"===s.pstyle("display").value||(("nodes"===o.group?n:i).push(s),l.clean=!0)}for(var h=0;h<n.length;h++){var c=n[h],u=c._private.rstyle,d=c.position();this.recalculateNodeLabelProjection(c),u.nodeX=d.x,u.nodeY=d.y,u.nodeW=c.pstyle("width").pfValue,u.nodeH=c.pstyle("height").pfValue}this.recalculateEdgeProjections(i);for(var p=0;p<i.length;p++){var g=i[p]._private,f=g.rstyle;f.srcX=(g=g.rscratch).arrowStartX,f.srcY=g.arrowStartY,f.tgtX=g.arrowEndX,f.tgtY=g.arrowEndY,f.midX=g.midX,f.midY=g.midY,f.labelAngle=g.labelAngle,f.sourceLabelAngle=g.sourceLabelAngle,f.targetLabelAngle=g.targetLabelAngle}}}}},{updateCachedGrabbedEles:function(){var e=this.cachedZSortedEles;if(e){e.drag=[],e.nondrag=[];for(var t=[],r=0;r<e.length;r++){var i=(n=e[r])._private.rscratch;(n.grabbed()&&!n.isParent()?t:i.inDragLayer?e.drag:e.nondrag).push(n)}for(r=0;r<t.length;r++){var n=t[r];e.drag.push(n)}}},invalidateCachedZSortedEles:function(){this.cachedZSortedEles=null},getCachedZSortedEles:function(e){var t;return e||!this.cachedZSortedEles?((t=this.cy.mutableElements().toArray()).sort(Xle),t.interactive=t.filter(function(e){return e.interactive()}),this.cachedZSortedEles=t,this.updateCachedGrabbedEles()):t=this.cachedZSortedEles,t}}].forEach(function(e){Qte(gce,e)}),Kce={getCachedImage:function(e,t,r){var i,n=this.imageCache=this.imageCache||{},a=n[e];return a?(a.image.complete||a.image.addEventListener("load",r),a.image):((i=(a=n[e]=n[e]||{}).image=new Image).addEventListener("load",r),i.addEventListener("error",function(){i.error=!0}),"data:"!==e.substring(0,"data:".length).toLowerCase()&&(i.crossOrigin=t="null"===t?null:t),i.src=e,i)}},Jce={registerBinding:function(e,t,r,i){var n=Array.prototype.slice.apply(arguments,[1]);if(Array.isArray(e)){for(var a=[],s=0;s<e.length;s++){var o,l=e[s];void 0!==l&&(o=this.binder(l),a.push(o.on.apply(o,n)))}return a}return(o=this.binder(e)).on.apply(o,n)},binder:function(n){var a=this,e=a.cy.window(),s=n===e||n===e.document||n===e.document.body||Fte(n);if(null==a.supportsPassiveEvents){var t=!1;try{var r=Object.defineProperty({},"passive",{get:mt(function(){return t=!0},"get")});e.addEventListener("test",null,r)}catch{}a.supportsPassiveEvents=t}return{on:e=mt(function(e,t,r){var i=Array.prototype.slice.call(arguments);return s&&a.supportsPassiveEvents&&(i[2]={capture:r??!1,passive:!1,once:!1}),a.bindings.push({target:n,args:i}),(n.addEventListener||n.on).apply(n,i),this},"on"),addEventListener:e,addListener:e,bind:e}},nodeIsDraggable:function(e){return e&&e.isNode()&&!e.locked()&&e.grabbable()},nodeIsGrabbable:function(e){return this.nodeIsDraggable(e)&&e.interactive()},load:function(){var c,u,d,h,I=this,e=I.cy.window(),p=mt(function(e){return e.selected()},"isSelected"),k=mt(function(e){if((e=e.getRootNode())&&11===e.nodeType&&void 0!==e.host)return e},"getShadowRoot"),N=mt(function(e,t,r,i){null==e&&(e=I.cy);for(var n=0;n<t.length;n++)e.emit({originalEvent:r,type:t[n],position:i})},"triggerEvents"),x=mt(function(e){return e.shiftKey||e.metaKey||e.ctrlKey},"isMultSelKeyDown"),j=mt(function(e,t){var r=!0;if(I.cy.hasCompoundNodes()&&e&&e.pannable()){for(var i=0;t&&i<t.length;i++)if((e=t[i]).isNode()&&e.isParent()&&!e.pannable()){r=!1;break}}else r=!0;return r},"allowPanningPassthrough"),w=mt(function(e){e[0]._private.grabbed=!0},"setGrabbed"),C=mt(function(e){e[0]._private.grabbed=!1},"setFreed"),i=mt(function(e){e[0]._private.rscratch.inDragLayer=!0},"setInDragLayer"),E=mt(function(e){e[0]._private.rscratch.inDragLayer=!1},"setOutDragLayer"),S=mt(function(e){e[0]._private.rscratch.isGrabTarget=!0},"setGrabTarget"),_=mt(function(e){e[0]._private.rscratch.isGrabTarget=!1},"removeGrabTarget"),n=mt(function(e,t){(t=t.addToList).has(e)||!e.grabbable()||e.locked()||(t.merge(e),w(e))},"addToDragList"),A=mt(function(e,t){!e.cy().hasCompoundNodes()||null==t.inDragLayer&&null==t.addToList||(e=e.descendants(),t.inDragLayer&&(e.forEach(i),e.connectedEdges().forEach(i)),t.addToList&&n(e,t))},"addDescendantsToDrag"),D=mt(function(e,t){t=t||{};var r=e.cy().hasCompoundNodes();t.inDragLayer&&(e.forEach(i),e.neighborhood().stdFilter(function(e){return!r||e.isEdge()}).forEach(i)),t.addToList&&e.forEach(function(e){n(e,t)}),A(e,t),R(e,{inDragLayer:t.inDragLayer}),I.updateCachedGrabbedEles()},"addNodesToDrag"),L=D,M=mt(function(e){e&&(I.getCachedZSortedEles().forEach(function(e){C(e),E(e),_(e)}),I.updateCachedGrabbedEles())},"freeDraggedElements"),R=mt(function(e,t){var r;null==t.inDragLayer&&null==t.addToList||!e.cy().hasCompoundNodes()||(r=e.ancestors().orphans()).same(e)||(e=(r=r.descendants().spawnSelf().merge(r).unmerge(e).unmerge(e.descendants())).connectedEdges(),t.inDragLayer&&(e.forEach(i),r.forEach(i)),t.addToList&&r.forEach(function(e){n(e,t)}))},"updateAncestorsInDragLayer"),V=mt(function(){null!=document.activeElement&&null!=document.activeElement.blur&&document.activeElement.blur()},"blurActiveDomElement"),t=typeof MutationObserver<"u",Y=typeof ResizeObserver<"u",r=(t?(I.removeObserver=new MutationObserver(function(e){for(var t=0;t<e.length;t++){var r=e[t].removedNodes;if(r)for(var i=0;i<r.length;i++)if(r[i]===I.container){I.destroy();break}}}),I.container.parentNode&&I.removeObserver.observe(I.container.parentNode,{childList:!0})):I.registerBinding(I.container,"DOMNodeRemoved",function(e){I.destroy()}),Bre(function(){I.cy.resize()},100)),t=(t&&(I.styleObserver=new MutationObserver(r),I.styleObserver.observe(I.container,{attributes:!0})),I.registerBinding(e,"resize",r),Y&&(I.resizeObserver=new ResizeObserver(r),I.resizeObserver.observe(I.container)),mt(function(e,t){for(;null!=e;)t(e),e=e.parentNode},"forEachUp")),a=mt(function(){I.invalidateContainerClientCoordsCache()},"invalidateCoords"),H=(t(I.container,function(e){I.registerBinding(e,"transitionend",a),I.registerBinding(e,"animationend",a),I.registerBinding(e,"scroll",a)}),I.registerBinding(I.container,"contextmenu",function(e){e.preventDefault()}),mt(function(){return 0!==I.selection[4]},"inBoxSelection")),O=mt(function(e){for(var t=I.findContainerClientCoords(),r=t[0],i=t[1],n=t[2],a=t[3],s=e.touches||[e],o=!1,l=0;l<s.length;l++){var h=s[l];if(r<=h.clientX&&h.clientX<=r+n&&i<=h.clientY&&h.clientY<=i+a){o=!0;break}}if(!o)return!1;for(var c=I.container,u=e.target.parentNode,d=!1;u;){if(u===c){d=!0;break}u=u.parentNode}return!!d},"eventInContainer"),Y=(I.registerBinding(I.container,"mousedown",mt(function(t){var e,r,i,n,a,s,o,l,h,c;!O(t)||1===I.hoverData.which&&1!==t.which||(t.preventDefault(),V(),I.hoverData.capture=!0,I.hoverData.which=t.which,e=I.cy,r=I.projectIntoViewport((o=[t.clientX,t.clientY])[0],o[1]),i=I.selection,a=(n=I.findNearestElements(r[0],r[1],!0,!1))[0],h=I.dragData.possibleDragElements,I.hoverData.mdownPos=r,I.hoverData.mdownGPos=o,s=mt(function(e){return{originalEvent:t,type:e,position:{x:r[0],y:r[1]}}},"makeEvent"),o=mt(function(){I.hoverData.tapholdCancelled=!1,clearTimeout(I.hoverData.tapholdTimeout),I.hoverData.tapholdTimeout=setTimeout(function(){I.hoverData.tapholdCancelled||(I.hoverData.down||e).emit(s("taphold"))},I.tapholdDuration)},"checkForTaphold"),3==t.which?(I.hoverData.cxtStarted=!0,l={originalEvent:t,type:"cxttapstart",position:{x:r[0],y:r[1]}},a?(a.activate(),a.emit(l),I.hoverData.down=a):e.emit(l),I.hoverData.downTime=(new Date).getTime(),I.hoverData.cxtDragged=!1):1==t.which&&(a&&a.activate(),null!=a&&I.nodeIsGrabbable(a)&&(l=mt(function(e){e.emit(s("grab"))},"triggerGrab"),S(a),a.selected()?(h=I.dragData.possibleDragElements=e.collection(),c=e.$(function(e){return e.isNode()&&e.selected()&&I.nodeIsGrabbable(e)}),D(c,{addToList:h}),a.emit(s("grabon")),c.forEach(l)):(h=I.dragData.possibleDragElements=e.collection(),L(a,{addToList:h}),a.emit(s("grabon")).emit(s("grab"))),I.redrawHint("eles",!0),I.redrawHint("drag",!0)),I.hoverData.down=a,I.hoverData.downs=n,I.hoverData.downTime=(new Date).getTime(),N(a,["mousedown","tapstart","vmousedown"],t,{x:r[0],y:r[1]}),null==a?(i[4]=1,I.data.bgActivePosistion={x:r[0],y:r[1]},I.redrawHint("select",!0),I.redraw()):a.pannable()&&(i[4]=1),o()),i[0]=i[2]=r[0],i[1]=i[3]=r[1])},"mousedownHandler"),!1),k(I.container)),g=(I.registerBinding([e,Y],"mousemove",mt(function(t){if(I.hoverData.capture||O(t)){var e,r,i,n=!1,a=I.cy,s=a.zoom(),o=[t.clientX,t.clientY],l=I.projectIntoViewport(o[0],o[1]),h=I.hoverData.mdownPos,c=I.hoverData.mdownGPos,u=I.selection,d=null,p=(I.hoverData.draggingEles||I.hoverData.dragging||I.hoverData.selecting||(d=I.findNearestElement(l[0],l[1],!0,!1)),I.hoverData.last),g=I.hoverData.down,f=[l[0]-u[2],l[1]-u[3]],m=I.dragData.possibleDragElements,c=(c&&(e=o[0]-c[0],o=o[1]-c[1],I.hoverData.isOverThresholdDrag=e=e*e+o*o>=I.desktopTapThreshold2),x(t)),o=(e&&(I.hoverData.tapholdCancelled=!0),mt(function(){var e=I.hoverData.dragDelta=I.hoverData.dragDelta||[];0===e.length?(e.push(f[0]),e.push(f[1])):(e[0]+=f[0],e[1]+=f[1])},"updateDragDelta")),y=(n=!0,N(d,["mousemove","vmousemove","tapdrag"],t,{x:l[0],y:l[1]}),mt(function(e){return{originalEvent:t,type:e,position:{x:l[0],y:l[1]}}},"makeEvent")),v=mt(function(){I.data.bgActivePosistion=void 0,I.hoverData.selecting||a.emit(y("boxstart")),u[4]=1,I.hoverData.selecting=!0,I.redrawHint("select",!0),I.redraw()},"goIntoBoxMode");if(3===I.hoverData.which?e&&(r=y("cxtdrag"),(g||a).emit(r),I.hoverData.cxtDragged=!0,!I.hoverData.cxtOver||d!==I.hoverData.cxtOver)&&(I.hoverData.cxtOver&&I.hoverData.cxtOver.emit(y("cxtdragout")),I.hoverData.cxtOver=d)&&d.emit(y("cxtdragover")):I.hoverData.dragging?(n=!0,a.panningEnabled()&&a.userPanningEnabled()&&(I.hoverData.justStartedPan?(r=I.hoverData.mdownPos,i={x:(l[0]-r[0])*s,y:(l[1]-r[1])*s},I.hoverData.justStartedPan=!1):i={x:f[0]*s,y:f[1]*s},a.panBy(i),a.emit(y("dragpan")),I.hoverData.dragged=!0),l=I.projectIntoViewport(t.clientX,t.clientY)):1!=u[4]||null!=g&&!g.pannable()?(g&&g.pannable()&&g.active()&&g.unactivate(),g&&g.grabbed()||d==p||(p&&N(p,["mouseout","tapdragout"],t,{x:l[0],y:l[1]}),d&&N(d,["mouseover","tapdragover"],t,{x:l[0],y:l[1]}),I.hoverData.last=d),g&&(e?a.boxSelectionEnabled()&&c?(g&&g.grabbed()&&(M(m),g.emit(y("freeon")),m.emit(y("free")),I.dragData.didDrag)&&(g.emit(y("dragfreeon")),m.emit(y("dragfree"))),v()):g&&g.grabbed()&&I.nodeIsDraggable(g)&&((r=!I.dragData.didDrag)&&I.redrawHint("eles",!0),I.dragData.didDrag=!0,I.hoverData.draggingEles||D(m,{inDragLayer:!0}),s={x:0,y:0},ce(f[0])&&ce(f[1])&&(s.x+=f[0],s.y+=f[1],r)&&((i=I.hoverData.dragDelta)&&ce(i[0])&&ce(i[1])&&(s.x+=i[0],s.y+=i[1])),I.hoverData.draggingEles=!0,m.silentShift(s).emit(y("position")).emit(y("drag")),I.redrawHint("drag",!0),I.redraw()):o()),n=!0):e&&(I.hoverData.dragging||!a.boxSelectionEnabled()||!c&&a.panningEnabled()&&a.userPanningEnabled()?!I.hoverData.selecting&&a.panningEnabled()&&a.userPanningEnabled()&&j(g,I.hoverData.downs)&&(I.hoverData.dragging=!0,I.hoverData.justStartedPan=!0,u[4]=0,I.data.bgActivePosistion=zie(h),I.redrawHint("select",!0),I.redraw()):v(),g)&&g.pannable()&&g.active()&&g.unactivate(),u[2]=l[0],u[3]=l[1],n)return t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1}},"mousemoveHandler"),!1),I.registerBinding(e,"mouseup",mt(function(t){var e,r,i,n,a,s,o,l,h;1===I.hoverData.which&&1!==t.which&&I.hoverData.capture||I.hoverData.capture&&(I.hoverData.capture=!1,e=I.cy,r=I.projectIntoViewport(t.clientX,t.clientY),i=I.selection,l=I.findNearestElement(r[0],r[1],!0,!1),n=I.dragData.possibleDragElements,a=I.hoverData.down,h=x(t),I.data.bgActivePosistion&&(I.redrawHint("select",!0),I.redraw()),I.hoverData.tapholdCancelled=!0,I.data.bgActivePosistion=void 0,a&&a.unactivate(),s=mt(function(e){return{originalEvent:t,type:e,position:{x:r[0],y:r[1]}}},"makeEvent"),3===I.hoverData.which?(o=s("cxttapend"),(a||e).emit(o),I.hoverData.cxtDragged||(o=s("cxttap"),(a||e).emit(o)),I.hoverData.cxtDragged=!1,I.hoverData.which=null):1===I.hoverData.which&&(N(l,["mouseup","tapend","vmouseup"],t,{x:r[0],y:r[1]}),I.dragData.didDrag||I.hoverData.dragged||I.hoverData.selecting||I.hoverData.isOverThresholdDrag||(N(a,["click","tap","vclick"],t,{x:r[0],y:r[1]}),u=!1,t.timeStamp-d<=e.multiClickDebounceTime()?(c&&clearTimeout(c),u=!0,d=null,N(a,["dblclick","dbltap","vdblclick"],t,{x:r[0],y:r[1]})):(c=setTimeout(function(){u||N(a,["oneclick","onetap","voneclick"],t,{x:r[0],y:r[1]})},e.multiClickDebounceTime()),d=t.timeStamp)),null!=a||I.dragData.didDrag||I.hoverData.selecting||I.hoverData.dragged||x(t)||(e.$(p).unselect(["tapunselect"]),0<n.length&&I.redrawHint("eles",!0),I.dragData.possibleDragElements=n=e.collection()),l!=a||I.dragData.didDrag||I.hoverData.selecting||null==l||!l._private.selectable||(I.hoverData.dragging||("additive"===e.selectionType()||h?l.selected()?l.unselect(["tapunselect"]):l.select(["tapselect"]):h||(e.$(p).unmerge(l).unselect(["tapunselect"]),l.select(["tapselect"]))),I.redrawHint("eles",!0)),I.hoverData.selecting&&(o=e.collection(I.getAllInBox(i[0],i[1],i[2],i[3])),I.redrawHint("select",!0),0<o.length&&I.redrawHint("eles",!0),e.emit(s("boxend")),l=mt(function(e){return e.selectable()&&!e.selected()},"eleWouldBeSelected"),"additive"===e.selectionType()||h||e.$(p).unmerge(o).unselect(),o.emit(s("box")).stdFilter(l).select().emit(s("boxselect")),I.redraw()),I.hoverData.dragging&&(I.hoverData.dragging=!1,I.redrawHint("select",!0),I.redrawHint("eles",!0),I.redraw()),i[4]||(I.redrawHint("drag",!0),I.redrawHint("eles",!0),h=a&&a.grabbed(),M(n),h&&(a.emit(s("freeon")),n.emit(s("free")),I.dragData.didDrag)&&(a.emit(s("dragfreeon")),n.emit(s("dragfree"))))),i[4]=0,I.hoverData.down=null,I.hoverData.cxtStarted=!1,I.hoverData.draggingEles=!1,I.hoverData.selecting=!1,I.hoverData.isOverThresholdDrag=!1,I.dragData.didDrag=!1,I.hoverData.dragged=!1,I.hoverData.dragDelta=[],I.hoverData.mdownPos=null,I.hoverData.mdownGPos=null,I.hoverData.which=null)},"mouseupHandler"),!1),[]),f=1e5,X=mt(function(e,t){for(var r=0;r<e.length;r++)if(e[r]%t!=0)return!1;return!0},"allAreDivisibleBy"),K=mt(function(e){for(var t=Math.abs(e[0]),r=1;r<e.length;r++)if(Math.abs(e[r])!==t)return!1;return!0},"allAreSameMagnitude"),Z=mt(function(e){var t,r,i,n=!1,a=e.deltaY;if(null==a&&(null!=e.wheelDeltaY?a=e.wheelDeltaY/4:null!=e.wheelDelta&&(a=e.wheelDelta/4)),0!==a){if(null==h)if(4<=g.length){var s,o=g;if((h=X(o,5))||(s=Math.abs(o[0]),h=K(o)&&5<s),h)for(var l=0;l<o.length;l++)f=Math.min(Math.abs(o[l]),f)}else g.push(a),n=!0;else h&&(f=Math.min(Math.abs(a),f));I.scrollingPage||(r=(s=I.cy).zoom(),i=s.pan(),r=[(t=I.projectIntoViewport(e.clientX,e.clientY))[0]*r+i.x,t[1]*r+i.y],I.hoverData.draggingEles||I.hoverData.dragging||I.hoverData.cxtStarted||H()?e.preventDefault():s.panningEnabled()&&s.userPanningEnabled()&&s.zoomingEnabled()&&s.userZoomingEnabled()&&(e.preventDefault(),I.data.wheelZooming=!0,clearTimeout(I.data.wheelTimeout),I.data.wheelTimeout=setTimeout(function(){I.data.wheelZooming=!1,I.redrawHint("eles",!0),I.redraw()},150),i=(a=n&&5<Math.abs(a)?5*Hie(a):a)/-250,h&&(i=i/f*3),i*=I.wheelSensitivity,1===e.deltaMode&&(i*=33),n=s.zoom()*Math.pow(10,i),"gesturechange"===e.type&&(n=I.gestureStartZoom*e.scale),s.zoom({level:n,renderedPosition:{x:r[0],y:r[1]}}),s.emit({type:"gesturechange"===e.type?"pinchzoom":"scrollzoom",originalEvent:e,position:{x:t[0],y:t[1]}})))}},"wheelHandler");I.registerBinding(I.container,"wheel",Z,!0),I.registerBinding(e,"scroll",mt(function(e){I.scrollingPage=!0,clearTimeout(I.scrollingPageTimeout),I.scrollingPageTimeout=setTimeout(function(){I.scrollingPage=!1},250)},"scrollHandler"),!0),I.registerBinding(I.container,"gesturestart",mt(function(e){I.gestureStartZoom=I.cy.zoom(),I.hasTouchStarted||e.preventDefault()},"gestureStartHandler"),!0),I.registerBinding(I.container,"gesturechange",function(e){I.hasTouchStarted||Z(e)},!0),I.registerBinding(I.container,"mouseout",mt(function(e){var t=I.projectIntoViewport(e.clientX,e.clientY);I.cy.emit({originalEvent:e,type:"mouseout",position:{x:t[0],y:t[1]}})},"mouseOutHandler"),!1),I.registerBinding(I.container,"mouseover",mt(function(e){var t=I.projectIntoViewport(e.clientX,e.clientY);I.cy.emit({originalEvent:e,type:"mouseover",position:{x:t[0],y:t[1]}})},"mouseOverHandler"),!1);var B,P,$,F,z,q,W,U,G,m,y,Q,J,ee,te,re,v,b,T,s,ie,ne,ae,se,oe,o,l,le=mt(function(e,t,r,i){return Math.sqrt((r-e)*(r-e)+(i-t)*(i-t))},"distance"),he=mt(function(e,t,r,i){return(r-e)*(r-e)+(i-t)*(i-t)},"distanceSq");I.registerBinding(I.container,"touchstart",J=mt(function(t){if(I.hasTouchStarted=!0,O(t)){V(),I.touchData.capture=!0,I.data.bgActivePosistion=void 0;var e,r,i=I.cy,n=I.touchData.now,a=I.touchData.earlier,s=(t.touches[0]&&(e=I.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),n[0]=e[0],n[1]=e[1]),t.touches[1]&&(e=I.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),n[2]=e[0],n[3]=e[1]),t.touches[2]&&(e=I.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),n[4]=e[0],n[5]=e[1]),mt(function(e){return{originalEvent:t,type:e,position:{x:n[0],y:n[1]}}},"makeEvent"));if(t.touches[1]){I.touchData.singleTouchMoved=!0,M(I.dragData.touchDragEles);var o=I.findContainerClientCoords(),o=(U=o[0],G=o[1],m=o[2],y=o[3],B=t.touches[0].clientX-U,P=t.touches[0].clientY-G,$=t.touches[1].clientX-U,F=t.touches[1].clientY-G,Q=0<=B&&B<=m&&0<=$&&$<=m&&0<=P&&P<=y&&0<=F&&F<=y,i.pan()),l=i.zoom();if(z=le(B,P,$,F),q=he(B,P,$,F),W=[((m=[(B+$)/2,(P+F)/2])[0]-o.x)/l,(m[1]-o.y)/l],q<4e4&&!t.touches[2])return o=I.findNearestElement(n[0],n[1],!0,!0),l=I.findNearestElement(n[2],n[3],!0,!0),o&&o.isNode()?(o.activate().emit(s("cxttapstart")),I.touchData.start=o):l&&l.isNode()?(l.activate().emit(s("cxttapstart")),I.touchData.start=l):i.emit(s("cxttapstart")),I.touchData.start&&(I.touchData.start._private.grabbed=!1),I.touchData.cxt=!0,I.touchData.cxtDragged=!1,I.data.bgActivePosistion=void 0,void I.redraw()}if(t.touches[2]?i.boxSelectionEnabled()&&t.preventDefault():t.touches[1]||t.touches[0]&&(null!=(l=(o=I.findNearestElements(n[0],n[1],!0,!0))[0])&&(l.activate(),I.touchData.start=l,I.touchData.starts=o,I.nodeIsGrabbable(l))&&(o=I.dragData.touchDragEles=i.collection(),I.redrawHint("eles",!(r=null)),I.redrawHint("drag",!0),l.selected()?(r=i.$(function(e){return e.selected()&&I.nodeIsGrabbable(e)}),D(r,{addToList:o})):L(l,{addToList:o}),S(l),l.emit(s("grabon")),r?r.forEach(function(e){e.emit(s("grab"))}):l.emit(s("grab"))),N(l,["touchstart","tapstart","vmousedown"],t,{x:n[0],y:n[1]}),null==l&&(I.data.bgActivePosistion={x:e[0],y:e[1]},I.redrawHint("select",!0),I.redraw()),I.touchData.singleTouchMoved=!1,I.touchData.singleTouchStartTime=+new Date,clearTimeout(I.touchData.tapholdTimeout),I.touchData.tapholdTimeout=setTimeout(function(){!1!==I.touchData.singleTouchMoved||I.pinching||I.touchData.selecting||N(I.touchData.start,["taphold"],t,{x:n[0],y:n[1]})},I.tapholdDuration)),1<=t.touches.length){for(var h=I.touchData.startPosition=[null,null,null,null,null,null],c=0;c<n.length;c++)h[c]=a[c]=n[c];i=t.touches[0],I.touchData.startGPosition=[i.clientX,i.clientY]}}},"touchstartHandler"),!1),I.registerBinding(e,"touchmove",ee=mt(function(t){var e=I.touchData.capture;if(e||O(t)){var r=I.selection,i=I.cy,n=I.touchData.now,a=I.touchData.earlier,s=i.zoom(),o=(t.touches[0]&&(A=I.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),n[0]=A[0],n[1]=A[1]),t.touches[1]&&(A=I.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),n[2]=A[0],n[3]=A[1]),t.touches[2]&&(A=I.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),n[4]=A[0],n[5]=A[1]),mt(function(e){return{originalEvent:t,type:e,position:{x:n[0],y:n[1]}}},"makeEvent")),l=I.touchData.startGPosition;if(e&&t.touches[0]&&l){for(var h=[],c=0;c<n.length;c++)h[c]=n[c]-a[c];var u=t.touches[0].clientX-l[0],d=t.touches[0].clientY-l[1],p=u*u+d*d>=I.touchTapThreshold2}if(e&&I.touchData.cxt&&(t.preventDefault(),b=t.touches[0].clientX-U,T=t.touches[0].clientY-G,k=t.touches[1].clientX-U,w=t.touches[1].clientY-G,2.25<=(l=he(b,T,k,w))/q||22500<=l)&&(I.touchData.cxt=!1,I.data.bgActivePosistion=void 0,I.redrawHint("select",!0),g=o("cxttapend"),I.touchData.start?(I.touchData.start.unactivate().emit(g),I.touchData.start=null):i.emit(g)),e&&I.touchData.cxt){var g=o("cxtdrag"),f=(I.data.bgActivePosistion=void 0,I.redrawHint("select",!0),(I.touchData.start||i).emit(g),I.touchData.start&&(I.touchData.start._private.grabbed=!1),I.touchData.cxtDragged=!0,I.findNearestElement(n[0],n[1],!0,!0));(!I.touchData.cxtOver||f!==I.touchData.cxtOver)&&(I.touchData.cxtOver&&I.touchData.cxtOver.emit(o("cxtdragout")),I.touchData.cxtOver=f)&&f.emit(o("cxtdragover"))}else if(e&&t.touches[2]&&i.boxSelectionEnabled())t.preventDefault(),I.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,I.touchData.selecting||i.emit(o("boxstart")),I.touchData.selecting=!0,I.touchData.didSelect=!0,r[4]=1,r&&0!==r.length&&void 0!==r[0]?(r[2]=(n[0]+n[2]+n[4])/3,r[3]=(n[1]+n[3]+n[5])/3):(r[0]=(n[0]+n[2]+n[4])/3,r[1]=(n[1]+n[3]+n[5])/3,r[2]=(n[0]+n[2]+n[4])/3+1,r[3]=(n[1]+n[3]+n[5])/3+1),I.redrawHint("select",!0),I.redraw();else if(e&&t.touches[1]&&!I.touchData.didSelect&&i.zoomingEnabled()&&i.panningEnabled()&&i.userZoomingEnabled()&&i.userPanningEnabled()){if(t.preventDefault(),I.data.bgActivePosistion=void 0,I.redrawHint("select",!0),C=I.dragData.touchDragEles){I.redrawHint("drag",!0);for(var m=0;m<C.length;m++){var y=C[m]._private;y.grabbed=!1,y.rscratch.inDragLayer=!1}}var v,x,l=I.touchData.start,b=t.touches[0].clientX-U,T=t.touches[0].clientY-G,k=t.touches[1].clientX-U,w=t.touches[1].clientY-G,r=(g=le(b,T,k,w))/z;Q&&(x=(b-B+(k-$))/2,S=(T-P+(w-F))/2,r=(R=i.zoom())*r,E=i.pan(),L=W[0]*R+E.x,v=W[1]*R+E.y,x={x:-r/R*(L-E.x-x)+L,y:-r/R*(v-E.y-S)+v},l&&l.active()&&(C=I.dragData.touchDragEles,M(C),I.redrawHint("drag",!0),I.redrawHint("eles",!0),l.unactivate().emit(o("freeon")),C.emit(o("free")),I.dragData.didDrag)&&(l.emit(o("dragfreeon")),C.emit(o("dragfree"))),i.viewport({zoom:r,pan:x,cancelOnFailedZoom:!0}),i.emit(o("pinchzoom")),z=g,B=b,P=T,$=k,F=w,I.pinching=!0),t.touches[0]&&(A=I.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),n[0]=A[0],n[1]=A[1]),t.touches[1]&&(A=I.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),n[2]=A[0],n[3]=A[1]),t.touches[2]&&(A=I.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),n[4]=A[0],n[5]=A[1])}else if(t.touches[0]&&!I.touchData.didSelect){var C,E,S,_,A,L=I.touchData.start,R=I.touchData.last;if(I.hoverData.draggingEles||I.swipePanning||(f=I.findNearestElement(n[0],n[1],!0,!0)),e&&null!=L&&t.preventDefault(),e&&null!=L&&I.nodeIsDraggable(L)&&(p?(C=I.dragData.touchDragEles,(E=!I.dragData.didDrag)&&D(C,{inDragLayer:!0}),I.dragData.didDrag=!0,S={x:0,y:0},ce(h[0])&&ce(h[1])&&(S.x+=h[0],S.y+=h[1],E)&&(I.redrawHint("eles",!0),(_=I.touchData.dragDelta)&&ce(_[0])&&ce(_[1])&&(S.x+=_[0],S.y+=_[1])),I.hoverData.draggingEles=!0,C.silentShift(S).emit(o("position")).emit(o("drag")),I.redrawHint("drag",!0),I.touchData.startPosition[0]==a[0]&&I.touchData.startPosition[1]==a[1]&&I.redrawHint("eles",!0),I.redraw()):0===(_=I.touchData.dragDelta=I.touchData.dragDelta||[]).length?(_.push(h[0]),_.push(h[1])):(_[0]+=h[0],_[1]+=h[1])),N(L||f,["touchmove","tapdrag","vmousemove"],t,{x:n[0],y:n[1]}),L&&L.grabbed()||f==R||(R&&R.emit(o("tapdragout")),!f)||f.emit(o("tapdragover")),I.touchData.last=f,e)for(m=0;m<n.length;m++)n[m]&&I.touchData.startPosition[m]&&p&&(I.touchData.singleTouchMoved=!0);e&&(null==L||L.pannable())&&i.panningEnabled()&&i.userPanningEnabled()&&(j(L,I.touchData.starts)&&(t.preventDefault(),I.data.bgActivePosistion||(I.data.bgActivePosistion=zie(I.touchData.startPosition)),I.swipePanning?(i.panBy({x:h[0]*s,y:h[1]*s}),i.emit(o("dragpan"))):p&&(I.swipePanning=!0,i.panBy({x:u*s,y:d*s}),i.emit(o("dragpan")),L)&&(L.unactivate(),I.redrawHint("select",!0),I.touchData.start=null)),A=I.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),n[0]=A[0],n[1]=A[1])}for(c=0;c<n.length;c++)a[c]=n[c];e&&0<t.touches.length&&!I.hoverData.draggingEles&&!I.swipePanning&&null!=I.data.bgActivePosistion&&(I.data.bgActivePosistion=void 0,I.redrawHint("select",!0),I.redraw())}},"touchmoveHandler"),!1),I.registerBinding(e,"touchcancel",te=mt(function(e){var t=I.touchData.start;I.touchData.capture=!1,t&&t.unactivate()},"touchcancelHandler")),I.registerBinding(e,"touchend",re=mt(function(t){var e=I.touchData.start;if(I.touchData.capture){0===t.touches.length&&(I.touchData.capture=!1),t.preventDefault();var r,i=I.selection,n=(I.swipePanning=!1,I.hoverData.draggingEles=!1,I.cy),a=n.zoom(),s=I.touchData.now,o=I.touchData.earlier,l=(t.touches[0]&&(l=I.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY),s[0]=l[0],s[1]=l[1]),t.touches[1]&&(l=I.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),s[2]=l[0],s[3]=l[1]),t.touches[2]&&(l=I.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),s[4]=l[0],s[5]=l[1]),mt(function(e){return{originalEvent:t,type:e,position:{x:s[0],y:s[1]}}},"makeEvent"));if(e&&e.unactivate(),I.touchData.cxt)r=l("cxttapend"),(e||n).emit(r),I.touchData.cxtDragged||(r=l("cxttap"),(e||n).emit(r)),I.touchData.start&&(I.touchData.start._private.grabbed=!1),I.touchData.cxt=!1,I.touchData.start=null,I.redraw();else{!t.touches[2]&&n.boxSelectionEnabled()&&I.touchData.selecting&&(I.touchData.selecting=!1,r=n.collection(I.getAllInBox(i[0],i[1],i[2],i[3])),i[0]=void 0,i[1]=void 0,i[2]=void 0,i[3]=void 0,i[4]=0,I.redrawHint("select",!0),n.emit(l("boxend")),i=mt(function(e){return e.selectable()&&!e.selected()},"eleWouldBeSelected"),r.emit(l("box")).stdFilter(i).select().emit(l("boxselect")),r.nonempty()&&I.redrawHint("eles",!0),I.redraw()),e?.unactivate(),t.touches[2]?(I.data.bgActivePosistion=void 0,I.redrawHint("select",!0)):t.touches[1]||t.touches[0]||(t.touches[0],I.data.bgActivePosistion=void 0,I.redrawHint("select",!0),i=I.dragData.touchDragEles,null!=e?(r=e._private.grabbed,M(i),I.redrawHint("drag",!0),I.redrawHint("eles",!0),r&&(e.emit(l("freeon")),i.emit(l("free")),I.dragData.didDrag)&&(e.emit(l("dragfreeon")),i.emit(l("dragfree"))),N(e,["touchend","tapend","vmouseup","tapdragout"],t,{x:s[0],y:s[1]}),e.unactivate(),I.touchData.start=null):(r=I.findNearestElement(s[0],s[1],!0,!0),N(r,["touchend","tapend","vmouseup","tapdragout"],t,{x:s[0],y:s[1]})),r=((i=I.touchData.startPosition[0]-s[0])*i+(l=I.touchData.startPosition[1]-s[1])*l)*a*a,I.touchData.singleTouchMoved||(e||n.$(":selected").unselect(["tapunselect"]),N(e,["tap","vclick"],t,{x:s[0],y:s[1]}),v=!1,t.timeStamp-T<=n.multiClickDebounceTime()?(b&&clearTimeout(b),v=!0,T=null,N(e,["dbltap","vdblclick"],t,{x:s[0],y:s[1]})):(b=setTimeout(function(){v||N(e,["onetap","voneclick"],t,{x:s[0],y:s[1]})},n.multiClickDebounceTime()),T=t.timeStamp)),null!=e&&!I.dragData.didDrag&&e._private.selectable&&r<I.touchTapThreshold2&&!I.pinching&&("single"===n.selectionType()?(n.$(p).unmerge(e).unselect(["tapunselect"]),e.select(["tapselect"])):e.selected()?e.unselect(["tapunselect"]):e.select(["tapselect"]),I.redrawHint("eles",!0)),I.touchData.singleTouchMoved=!0);for(var h=0;h<s.length;h++)o[h]=s[h];I.dragData.didDrag=!1,0===t.touches.length&&(I.touchData.dragDelta=[],I.touchData.startPosition=[null,null,null,null,null,null],I.touchData.startGPosition=null,I.touchData.didSelect=!1),t.touches.length<2&&(1===t.touches.length&&(I.touchData.startGPosition=[t.touches[0].clientX,t.touches[0].clientY]),I.pinching=!1,I.redrawHint("eles",!0),I.redraw())}}},"touchendHandler"),!1),"u"<typeof TouchEvent&&(s=[],ie=mt(function(e){return{clientX:e.clientX,clientY:e.clientY,force:1,identifier:e.pointerId,pageX:e.pageX,pageY:e.pageY,radiusX:e.width/2,radiusY:e.height/2,screenX:e.screenX,screenY:e.screenY,target:e.target}},"makeTouch"),ne=mt(function(e){return{event:e,touch:ie(e)}},"makePointer"),ae=mt(function(e){s.push(ne(e))},"addPointer"),se=mt(function(e){for(var t=0;t<s.length;t++)if(s[t].event.pointerId===e.pointerId)return void s.splice(t,1)},"removePointer"),oe=mt(function(t){var e=s.filter(function(e){return e.event.pointerId===t.pointerId})[0];e.event=t,e.touch=ie(t)},"updatePointer"),o=mt(function(e){e.touches=s.map(function(e){return e.touch})},"addTouchesToEvent"),l=mt(function(e){return"mouse"===e.pointerType||4===e.pointerType},"pointerIsMouse"),I.registerBinding(I.container,"pointerdown",function(e){l(e)||(e.preventDefault(),ae(e),o(e),J(e))}),I.registerBinding(I.container,"pointerup",function(e){l(e)||(se(e),o(e),re(e))}),I.registerBinding(I.container,"pointercancel",function(e){l(e)||(se(e),o(e),te(e))}),I.registerBinding(I.container,"pointermove",function(e){l(e)||(e.preventDefault(),oe(e),o(e),ee(e))}))}},sue={generatePolygon:function(e,t){return this.nodeShapes[e]={renderer:this,name:e,points:t,draw:mt(function(e,t,r,i,n,a){this.renderer.nodeShapeImpl("polygon",e,t,r,i,n,this.points)},"draw"),intersectLine:mt(function(e,t,r,i,n,a,s,o){return Dne(n,a,this.points,e,t,r/2,i/2,s)},"intersectLine"),checkPoint:mt(function(e,t,r,i,n,a,s,o){return wne(e,t,this.points,a,s,i,n,[0,-1],r)},"checkPoint"),hasMiterBounds:"rectangle"!==e,miterBounds:mt(function(e,t,r,i,n,a){return RQ(this.points,e,t,r,i,n)},"miterBounds")}},generateEllipse:function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:mt(function(e,t,r,i,n,a){this.renderer.nodeShapeImpl(this.name,e,t,r,i,n)},"draw"),intersectLine:mt(function(e,t,r,i,n,a,s,o){return _ne(n,a,e,t,r/2+s,i/2+s)},"intersectLine"),checkPoint:mt(function(e,t,r,i,n,a,s,o){return Ane(e,t,i,n,a,s,r)},"checkPoint")}},generateRoundPolygon:function(e,m){return this.nodeShapes[e]={renderer:this,name:e,points:m,getOrCreateCorners:mt(function(e,t,r,i,n,a,s){if(void 0===a[s]||a[s+"-cx"]!==e||a[s+"-cy"]!==t){a[s]=new Array(m.length/2),a[s+"-cx"]=e,a[s+"-cy"]=t;var o=r/2,l=i/2;n="auto"===n?zne(r,i):n;for(var h=new Array(m.length/2),c=0;c<m.length/2;c++)h[c]={x:e+o*m[2*c],y:t+l*m[2*c+1]};for(var u,d,p=h.length,g=h[p-1],f=0;f<p;f++)u=h[f%p],d=h[(f+1)%p],a[s][f]=pee(g,u,d,n),g=u}return a[s]},"getOrCreateCorners"),draw:mt(function(e,t,r,i,n,a,s){this.renderer.nodeShapeImpl("round-polygon",e,t,r,i,n,this.points,this.getOrCreateCorners(t,r,i,n,a,s,"drawCorners"))},"draw"),intersectLine:mt(function(e,t,r,i,n,a,s,o,l){return Mne(n,a,this.points,e,t,r,i,s,this.getOrCreateCorners(e,t,r,i,o,l,"corners"))},"intersectLine"),checkPoint:mt(function(e,t,r,i,n,a,s,o,l){return Cne(e,t,this.points,a,s,i,n,this.getOrCreateCorners(a,s,i,n,o,l,"corners"))},"checkPoint")}},generateRoundRectangle:function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:Bne(4,0),draw:mt(function(e,t,r,i,n,a){this.renderer.nodeShapeImpl(this.name,e,t,r,i,n,this.points,a)},"draw"),intersectLine:mt(function(e,t,r,i,n,a,s,o){return fne(n,a,e,t,r,i,s,o)},"intersectLine"),checkPoint:mt(function(e,t,r,i,n,a,s,o){var l=i/2,h=n/2,c=(o="auto"===o?Fne(i,n):o,2*(o=Math.min(l,h,o)));return!!(wne(e,t,this.points,a,s,i,n-c,[0,-1],r)||wne(e,t,this.points,a,s,i-c,n,[0,-1],r)||Ane(e,t,c,c,a-l+o,s-h+o,r)||Ane(e,t,c,c,a+l-o,s-h+o,r)||Ane(e,t,c,c,a+l-o,s+h-o,r)||Ane(e,t,c,c,a-l+o,s+h-o,r))},"checkPoint")}},generateCutRectangle:function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:qne(),points:Bne(4,0),draw:mt(function(e,t,r,i,n,a){this.renderer.nodeShapeImpl(this.name,e,t,r,i,n,null,a)},"draw"),generateCutTrianglePts:mt(function(e,t,r,i,n){var a=r-(e/=2),r=r+e;return{topLeft:[a,(e=i-(t/=2))+(n="auto"===n?this.cornerLength:n),a+n,e,a+n,e+n],topRight:[r-n,e,r,e+n,r-n,e+n],bottomRight:[r,(i+=t)-n,r-n,i,r-n,i-n],bottomLeft:[a+n,i,a,i-n,a+n,i-n]}},"generateCutTrianglePts"),intersectLine:mt(function(e,t,r,i,n,a,s,o){return r=this.generateCutTrianglePts(r+2*s,i+2*s,e,t,o),i=[].concat.apply([],[r.topLeft.splice(0,4),r.topRight.splice(0,4),r.bottomRight.splice(0,4),r.bottomLeft.splice(0,4)]),Dne(n,a,i,e,t)},"intersectLine"),checkPoint:mt(function(e,t,r,i,n,a,s,o){return o="auto"===o?this.cornerLength:o,!(!wne(e,t,this.points,a,s,i,n-2*o,[0,-1],r)&&!wne(e,t,this.points,a,s,i-2*o,n,[0,-1],r))||(o=this.generateCutTrianglePts(i,n,a,s),kne(e,t,o.topLeft))||kne(e,t,o.topRight)||kne(e,t,o.bottomRight)||kne(e,t,o.bottomLeft)},"checkPoint")}},generateBarrel:function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:Bne(4,0),draw:mt(function(e,t,r,i,n,a){this.renderer.nodeShapeImpl(this.name,e,t,r,i,n)},"draw"),intersectLine:mt(function(e,t,r,i,n,a,s,o){return r=this.generateBarrelBezierPts(r+2*s,i+2*s,e,t),i=mt(function(e){var t=Jie({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.15),r=Jie({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.5),i=Jie({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.85);return[e[0],e[1],t.x,t.y,r.x,r.y,i.x,i.y,e[4],e[5]]},"approximateBarrelCurvePts"),s=[].concat(i(r.topLeft),i(r.topRight),i(r.bottomRight),i(r.bottomLeft)),Dne(n,a,s,e,t)},"intersectLine"),generateBarrelBezierPts:mt(function(e,t,r,i){var n=t/2,a=r-(s=e/2),r=r+s,s=i-n,i=i+n,t=(n=Une(e,t)).heightOffset,o=n.widthOffset;return(e={topLeft:[a,s+t,a+(n=n.ctrlPtOffsetPct*e),s,a+o,s],topRight:[r-o,s,r-n,s,r,s+t],bottomRight:[r,i-t,r-n,i,r-o,i],bottomLeft:[a+o,i,a+n,i,a,i-t]}).topLeft.isTop=!0,e.topRight.isTop=!0,e.bottomLeft.isBottom=!0,e.bottomRight.isBottom=!0,e},"generateBarrelBezierPts"),checkPoint:mt(function(e,t,r,i,n,a,s,o){var l=(h=Une(i,n)).heightOffset,h=h.widthOffset;if(wne(e,t,this.points,a,s,i,n-2*l,[0,-1],r)||wne(e,t,this.points,a,s,i-2*h,n,[0,-1],r))return!0;for(var c=this.generateBarrelBezierPts(i,n,a,s),u=mt(function(e,t,r){var i=r[4],n=r[2],a=r[0],s=r[5],r=r[1],o=Math.min(i,a),l=Math.max(i,a),h=Math.min(s,r),s=Math.max(s,r);return o<=e&&e<=l&&h<=t&&t<=s&&(r=Wne(i,n,a),0<(o=vne(r[0],r[1],r[2],e).filter(function(e){return 0<=e&&e<=1})).length)?o[0]:null},"getCurveT"),d=Object.keys(c),p=0;p<d.length;p++){var g=c[d[p]],f=u(e,t,g);if(null!=f){var m=g[5],y=g[3],v=g[1],m=Qie(m,y,v,f);if(g.isTop&&m<=t||g.isBottom&&t<=m)return!0}}return!1},"checkPoint")}},generateBottomRoundrectangle:function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:Bne(4,0),draw:mt(function(e,t,r,i,n,a){this.renderer.nodeShapeImpl(this.name,e,t,r,i,n,this.points,a)},"draw"),intersectLine:mt(function(e,t,r,i,n,a,s,o){var l=t-(i/2+s);return 0<(l=Ine(n,a,e,t,e-(r/2+s),l,e+(r/2+s),l,!1)).length?l:fne(n,a,e,t,r,i,s,o)},"intersectLine"),checkPoint:mt(function(e,t,r,i,n,a,s,o){var l,h,c=2*(o="auto"===o?Fne(i,n):o);return!(!wne(e,t,this.points,a,s,i,n-c,[0,-1],r)&&!wne(e,t,this.points,a,s,i-c,n,[0,-1],r)&&!(kne(e,t,[a-(l=i/2+2*r),s-(h=n/2+2*r),a-l,s,a+l,s,a+l,s-h])||Ane(e,t,c,c,a+i/2-o,s+n/2-o,r)||Ane(e,t,c,c,a-i/2+o,s+n/2-o,r)))},"checkPoint")}},registerNodeShapes:function(){var e=this.nodeShapes={},r=this,t=(this.generateEllipse(),this.generatePolygon("triangle",Bne(3,0)),this.generateRoundPolygon("round-triangle",Bne(3,0)),this.generatePolygon("rectangle",Bne(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle(),[0,1,1,0,0,-1,-1,0]),i=(this.generatePolygon("diamond",t),this.generateRoundPolygon("round-diamond",t),this.generatePolygon("pentagon",Bne(5,0)),this.generateRoundPolygon("round-pentagon",Bne(5,0)),this.generatePolygon("hexagon",Bne(6,0)),this.generateRoundPolygon("round-hexagon",Bne(6,0)),this.generatePolygon("heptagon",Bne(7,0)),this.generateRoundPolygon("round-heptagon",Bne(7,0)),this.generatePolygon("octagon",Bne(8,0)),this.generateRoundPolygon("round-octagon",Bne(8,0)),new Array(20)),n=$ne(5,0),a=$ne(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var o=0;o<a.length/2;o++)a[2*o]*=s,a[2*o+1]*=s;for(o=0;o<5;o++)i[4*o]=n[2*o],i[4*o+1]=n[2*o+1],i[4*o+2]=a[2*o],i[4*o+3]=a[2*o+1];i=Pne(i),this.generatePolygon("star",i),this.generatePolygon("vee",[-1,-1,0,-.333,1,-1,0,1]),this.generatePolygon("rhomboid",[-1,-1,.333,-1,1,1,-.333,1]),this.generatePolygon("right-rhomboid",[-.333,-1,1,-1,.333,1,-1,1]),this.nodeShapes.concavehexagon=this.generatePolygon("concave-hexagon",[-1,-.95,-.75,0,-1,.95,1,.95,.75,0,1,-.95]),this.generatePolygon("tag",t=[-1,-1,.25,-1,1,0,.25,1,-1,1]),this.generateRoundPolygon("round-tag",t),e.makePolygon=function(e){var t="polygon-"+e.join("$");return this[t]||r.generatePolygon(t,e)}}},oue={timeToRender:function(){return this.redrawTotalTime/this.redrawCount},redraw:function(e){e=e||fie(),void 0===this.averageRedrawTime&&(this.averageRedrawTime=0),void 0===this.lastRedrawTime&&(this.lastRedrawTime=0),void 0===this.lastDrawTime&&(this.lastDrawTime=0),this.requestedFrame=!0,this.renderOptions=e},beforeRender:function(e,t){var r;this.destroyed||(null==t&&oie("Priority is not optional for beforeRender"),(r=this.beforeRenderCallbacks).push({fn:e,priority:t}),r.sort(function(e,t){return t.priority-e.priority}))}},fce=mt(function(e,t,r){for(var i=e.beforeRenderCallbacks,n=0;n<i.length;n++)i[n].fn(t,r)},"beforeRenderCallbacks"),oue.startRenderLoop=function(){var i,n=this,a=n.cy;n.renderLoopStarted||(n.renderLoopStarted=!0,i=mt(function(e){var t,r;n.destroyed||(a.batching()||(n.requestedFrame&&!n.skipFrame?(fce(n,!0,e),t=qre(),n.render(n.renderOptions),r=n.lastDrawTime=qre(),void 0===n.averageRedrawTime&&(n.averageRedrawTime=r-t),void 0===n.redrawCount&&(n.redrawCount=0),n.redrawCount++,void 0===n.redrawTotalTime&&(n.redrawTotalTime=0),n.redrawTotalTime+=r-=t,n.lastRedrawTime=r,n.averageRedrawTime=n.averageRedrawTime/2+r/2,n.requestedFrame=!1):fce(n,!1,e)),n.skipFrame=!1,zre(i))},"renderFn"),zre(i))},Fce=mt(function(e){this.init(e)},"BaseRenderer"),(yce=(mce=Fce).prototype).clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],yce.init=function(e){var t,r,i,n,a=this,s=(a.options=e,a.cy=e.cy,a.container=e.cy.container()),o=a.cy.window();o&&(r=(t=o.document).head,i="__________cytoscape_container",n=null!=t.getElementById("__________cytoscape_stylesheet"),s.className.indexOf(i)<0&&(s.className=(s.className||"")+" "+i),n||((n=t.createElement("style")).id="__________cytoscape_stylesheet",n.textContent="."+i+" { position: relative; }",r.insertBefore(n,r.children[0])),"static"===o.getComputedStyle(s).getPropertyValue("position"))&&hie("A Cytoscape container has style position:static and so can not use UI extensions properly"),a.selection=[void 0,void 0,void 0,void 0,0],a.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],a.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},a.dragData={possibleDragElements:[]},a.touchData={start:null,capture:!1,startPosition:[null,null,null,null,null,null],singleTouchStartTime:null,singleTouchMoved:!0,now:[null,null,null,null,null,null],earlier:[null,null,null,null,null,null]},a.redraws=0,a.showFps=e.showFps,a.debug=e.debug,a.webgl=e.webgl,a.hideEdgesOnViewport=e.hideEdgesOnViewport,a.textureOnViewport=e.textureOnViewport,a.wheelSensitivity=e.wheelSensitivity,a.motionBlurEnabled=e.motionBlur,a.forcedPixelRatio=ce(e.pixelRatio)?e.pixelRatio:null,a.motionBlur=e.motionBlur,a.motionBlurOpacity=e.motionBlurOpacity,a.motionBlurTransparency=1-a.motionBlurOpacity,a.motionBlurPxRatio=1,a.mbPxRBlurry=1,a.minMbLowQualFrames=4,a.fullQualityMb=!1,a.clearedForMotionBlur=[],a.desktopTapThreshold=e.desktopTapThreshold,a.desktopTapThreshold2=e.desktopTapThreshold*e.desktopTapThreshold,a.touchTapThreshold=e.touchTapThreshold,a.touchTapThreshold2=e.touchTapThreshold*e.touchTapThreshold,a.tapholdDuration=500,a.bindings=[],a.beforeRenderCallbacks=[],a.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},a.registerNodeShapes(),a.registerArrowShapes(),a.registerCalculationListeners()},yce.notify=function(e,t){var r=this,i=r.cy;this.destroyed||("init"===e?r.load():"destroy"===e?r.destroy():(("add"===e||"remove"===e||"move"===e&&i.hasCompoundNodes()||"load"===e||"zorder"===e||"mount"===e)&&r.invalidateCachedZSortedEles(),"viewport"===e&&r.redrawHint("select",!0),"gc"===e&&r.redrawHint("gc",!0),"load"!==e&&"resize"!==e&&"mount"!==e||(r.invalidateContainerClientCoordsCache(),r.matchCanvasSize(r.container)),r.redrawHint("eles",!0),r.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()))},yce.destroy=function(){var e=this;e.destroyed=!0,e.cy.stopAnimationLoop();for(var t=0;t<e.bindings.length;t++){var r=e.bindings[t],i=r.target;(i.off||i.removeEventListener).apply(i,r.args)}if(e.bindings=[],e.beforeRenderCallbacks=[],e.onUpdateEleCalcsFns=[],e.removeObserver&&e.removeObserver.disconnect(),e.styleObserver&&e.styleObserver.disconnect(),e.resizeObserver&&e.resizeObserver.disconnect(),e.labelCalcDiv)try{document.body.removeChild(e.labelCalcDiv)}catch{}},yce.isHeadless=function(){return!1},[zce,gce,Kce,Jce,sue,oue].forEach(function(e){Qte(yce,e)}),te={setupDequeueing:mt(function(f){return mt(function(){var d,e,t,p=this,g=this.renderer;p.dequeueingSetup||(p.dequeueingSetup=!0,d=Bre(function(){g.redrawHint("eles",!0),g.redrawHint("drag",!0),g.redraw()},f.deqRedrawThreshold),e=mt(function(e,t){var r=qre(),i=g.averageRedrawTime,n=g.lastRedrawTime,a=[],s=g.cy.extent(),o=g.getPixelRatio();for(e||g.flushRenderedStyleQueue();;){var l=(h=qre())-r,h=h-t;if(n<1e3/60){if(h>=f.deqFastCost*(1e3/60-(e?i:0)))break}else if(e){if(l>=f.deqCost*n||l>=f.deqAvgCost*i)break}else if(h>=f.deqNoDrawCost*(1e3/60))break;var c=f.deq(p,o,s);if(!(0<c.length))break;for(var u=0;u<c.length;u++)a.push(c[u])}0<a.length&&(f.onDeqd(p,a),!e)&&f.shouldRedraw(p,a,o,s)&&d()},"dequeue"),t=f.priority||sie,g.beforeRender(e,t(p)))},"setupDequeueingImpl")},"setupDequeueing")},mt(R,"ElementTextureCacheLookup"),vce=ZZ(R,[{key:"getIdsFor",value:mt(function(e){null==e&&oie("Can not get id list for null key");var t=this.idsByKey,r=this.idsByKey.get(e);return r||(r=new kie,t.set(e,r)),r},"getIdsFor")},{key:"addIdForKey",value:mt(function(e,t){null!=e&&this.getIdsFor(e).add(t)},"addIdForKey")},{key:"deleteIdForKey",value:mt(function(e,t){null!=e&&this.getIdsFor(e).delete(t)},"deleteIdForKey")},{key:"getNumberOfIdsForKey",value:mt(function(e){return null==e?0:this.getIdsFor(e).size},"getNumberOfIdsForKey")},{key:"updateKeyMappingFor",value:mt(function(e){var t=e.id(),r=this.keyForId.get(t),e=this.getKey(e);this.deleteIdForKey(r,t),this.addIdForKey(e,t),this.keyForId.set(t,e)},"updateKeyMappingFor")},{key:"deleteKeyMappingFor",value:mt(function(e){var e=e.id(),t=this.keyForId.get(e);this.deleteIdForKey(t,e),this.keyForId.delete(e)},"deleteKeyMappingFor")},{key:"keyHasChangedFor",value:mt(function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)},"keyHasChangedFor")},{key:"isInvalid",value:mt(function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)},"isInvalid")},{key:"getCachesAt",value:mt(function(e){var t=this.cachesByLvl,r=this.lvls,i=t.get(e);return i||(i=new Tie,t.set(e,i),r.push(e)),i},"getCachesAt")},{key:"getCache",value:mt(function(e,t){return this.getCachesAt(t).get(e)},"getCache")},{key:"get",value:mt(function(e,t){var r=this.getKey(e);return null!=(r=this.getCache(r,t))&&this.updateKeyMappingFor(e),r},"get")},{key:"getForCachedKey",value:mt(function(e,t){return e=this.keyForId.get(e.id()),this.getCache(e,t)},"getForCachedKey")},{key:"hasCache",value:mt(function(e,t){return this.getCachesAt(t).has(e)},"hasCache")},{key:"has",value:mt(function(e,t){return e=this.getKey(e),this.hasCache(e,t)},"has")},{key:"setCache",value:mt(function(e,t,r){r.key=e,this.getCachesAt(t).set(e,r)},"setCache")},{key:"set",value:mt(function(e,t,r){var i=this.getKey(e);this.setCache(i,t,r),this.updateKeyMappingFor(e)},"set")},{key:"deleteCache",value:mt(function(e,t){this.getCachesAt(t).delete(e)},"deleteCache")},{key:"delete",value:mt(function(e,t){e=this.getKey(e),this.deleteCache(e,t)},"_delete")},{key:"invalidateKey",value:mt(function(t){var r=this;this.lvls.forEach(function(e){return r.deleteCache(t,e)})},"invalidateKey")},{key:"invalidate",value:mt(function(e){var t=e.id(),t=this.keyForId.get(t);return this.deleteKeyMappingFor(e),(e=this.doesEleInvalidateKey(e))&&this.invalidateKey(t),e||0===this.getNumberOfIdsForKey(t)},"invalidate")}]),xce={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},bce=lue({getKey:null,doesEleInvalidateKey:nie,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:iie,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),Tce=mt(function(e,t){this.renderer=e,this.onDequeues=[],e=bce(t),Qte(this,e),this.lookup=new vce(e.getKey,e.doesEleInvalidateKey),this.setupDequeueing()},"ElementTextureCache"),(uue=Tce.prototype).reasons=xce,uue.getTextureQueue=function(e){return this.eleImgCaches=this.eleImgCaches||{},this.eleImgCaches[e]=this.eleImgCaches[e]||[]},uue.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},uue.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new Lie(function(e,t){return t.reqs-e.reqs})},uue.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},uue.getElement=function(e,t,r,i,n){var a=this,s=this.renderer,o=s.cy.zoom(),l=this.lookup;if(!t||0===t.w||0===t.h||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(Yie(o*r)):i)<-4)i=-4;else if(7.99<=o||3<i)return null;var o=Math.pow(2,i),h=t.h*o,c=t.w*o,u=s.eleTextBiggerThanMin(e,o);if(!this.isVisible(e,u))return null;if((s=l.get(e,i))&&s.invalidated&&(s.invalidated=!1,s.texture.invalidatedWidth-=s.width),!s){var d=h<=25?25:h<=50?50:50*Math.ceil(h/50);if(1024<h||1024<c)return null;var p=(m=a.getTextureQueue(d))[m.length-2],g=mt(function(){return a.recycleTexture(d,c)||a.addTexture(d,c)},"addNewTxr");(p=(p=p||m[m.length-1])||g()).width-p.usedWidth<c&&(p=g());for(var f,m=mt(function(e){return e&&e.scaledLabelShown===u},"scalableFrom"),g=n&&n===xce.dequeue,y=n&&n===xce.highQuality,n=n&&n===xce.downscale,v=i+1;v<=3;v++){var x=l.get(e,v);if(x){f=x;break}}var b,T=f&&f.level===i+1?f:null,k=mt(function(){p.context.drawImage(T.texture.canvas,T.x,0,T.width,T.height,p.usedWidth,0,c,h)},"downscale");if(p.context.setTransform(1,0,0,1,0,0),p.context.clearRect(p.usedWidth,0,c,d),m(T))k();else if(m(f)){if(!y)return a.queueElement(e,f.level-1),f;for(var w=f.level;i<w;w--)T=a.getElement(e,t,r,w,xce.downscale);k()}else{if(!g&&!y&&!n)for(var C=i-1;-4<=C;C--){var E=l.get(e,C);if(E){b=E;break}}if(m(b))return a.queueElement(e,i),b;p.context.translate(p.usedWidth,0),p.context.scale(o,o),this.drawElement(p.context,e,t,u,!1),p.context.scale(1/o,1/o),p.context.translate(-p.usedWidth,0)}s={x:p.usedWidth,texture:p,level:i,scale:o,width:c,height:h,scaledLabelShown:u},p.usedWidth+=Math.ceil(8+c),p.eleCaches.push(s),l.set(e,i,s),a.checkTextureFullness(p)}return s},uue.invalidateElements=function(e){for(var t=0;t<e.length;t++)this.invalidateElement(e[t])},uue.invalidateElement=function(e){var t=this.lookup,r=[];if(t.isInvalid(e)){for(var i=-4;i<=3;i++){var n=t.getForCachedKey(e,i);n&&r.push(n)}if(t.invalidate(e))for(var a=0;a<r.length;a++){var s=r[a],o=s.texture;o.invalidatedWidth+=s.width,s.invalidated=!0,this.checkTextureUtility(o)}this.removeFromQueue(e)}},uue.checkTextureUtility=function(e){e.invalidatedWidth>=.2*e.width&&this.retireTexture(e)},uue.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);.8<e.usedWidth/e.width&&10<=e.fullnessChecks?mie(t,e):e.fullnessChecks++},uue.retireTexture=function(e){var t=e.height,r=this.getTextureQueue(t),i=this.lookup;mie(r,e),e.retired=!0;for(var n=e.eleCaches,a=0;a<n.length;a++){var s=n[a];i.deleteCache(s.key,s.level)}yie(n),this.getRetiredTextureQueue(t).push(e)},uue.addTexture=function(e,t){var r={};return this.getTextureQueue(e).push(r),r.eleCaches=[],r.height=e,r.width=Math.max(1024,t),r.usedWidth=0,r.invalidatedWidth=0,r.fullnessChecks=0,r.canvas=this.renderer.makeOffscreenCanvas(r.width,r.height),r.context=r.canvas.getContext("2d"),r},uue.recycleTexture=function(e,t){for(var r=this.getTextureQueue(e),i=this.getRetiredTextureQueue(e),n=0;n<i.length;n++){var a=i[n];if(a.width>=t)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,yie(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),mie(i,a),r.push(a),a}},uue.queueElement=function(e,t){var r=this.getElementQueue(),i=this.getElementKeyToQueue(),n=this.getKey(e),a=i[n];a?(a.level=Math.max(a.level,t),a.eles.merge(e),a.reqs++,r.updateItem(a)):(a={eles:e.spawn().merge(e),level:t,reqs:1,key:n},r.push(a),i[n]=a)},uue.dequeue=function(e){for(var t=this.getElementQueue(),r=this.getElementKeyToQueue(),i=[],n=this.lookup,a=0;a<1&&0<t.size();a++){var s=t.pop(),o=s.key,l=s.eles[0],h=n.hasCache(l,s.level);r[o]=null,h||(i.push(s),o=this.getBoundingBox(l),this.getElement(l,o,e,s.level,xce.dequeue))}return i},uue.removeFromQueue=function(e){var t=this.getElementQueue(),r=this.getElementKeyToQueue(),i=this.getKey(e),n=r[i];null!=n&&(1===n.eles.length?(n.reqs=rie,t.updateItem(n),t.pop(),r[i]=null):n.eles.unmerge(e))},uue.onDequeue=function(e){this.onDequeues.push(e)},uue.offDequeue=function(e){mie(this.onDequeues,e)},uue.setupDequeueing=te.setupDequeueing({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:mt(function(e,t,r){return e.dequeue(t,r)},"deq"),onDeqd:mt(function(e,t){for(var r=0;r<e.onDequeues.length;r++)(0,e.onDequeues[r])(t)},"onDeqd"),shouldRedraw:mt(function(e,t,r,i){for(var n=0;n<t.length;n++)for(var a=t[n].eles,s=0;s<a.length;s++){var o=a[s].boundingBox();if(cne(o,i))return!0}return!1},"shouldRedraw"),priority:mt(function(e){return e.renderer.beforeRenderPriorities.eleTxrDeq},"priority")}),kce=mt(function(e){var r=this,t=(e=r.renderer=e).cy,t=(r.layersByLevel={},r.firstGet=!0,r.lastInvalidationTime=qre()-500,r.skipping=!1,r.eleTxrDeqs=t.collection(),r.scheduleElementRefinement=Bre(function(){r.refineElementTextures(r.eleTxrDeqs),r.eleTxrDeqs.unmerge(r.eleTxrDeqs)},50),e.beforeRender(function(e,t){t-r.lastInvalidationTime<=250?r.skipping=!0:r.skipping=!1},e.beforeRenderPriorities.lyrTxrSkip),mt(function(e,t){return t.reqs-e.reqs},"qSort"));r.layersQueue=new Lie(t),r.setupDequeueing()},"LayeredTextureCache"),mue=kce.prototype,wce=0,Cce=Math.pow(2,53)-1,mue.makeLayer=function(e,t){var r=Math.pow(2,t),i=Math.ceil(e.w*r),n=Math.ceil(e.h*r),a=this.renderer.makeOffscreenCanvas(i,n),t=(e={id:wce=++wce%Cce,bb:e,level:t,width:i,height:n,canvas:a,context:a.getContext("2d"),eles:[],elesQueue:[],reqs:0}).context,i=-e.bb.x1,n=-e.bb.y1;return t.scale(r,r),t.translate(i,n),e},mue.getLayers=function(n,e,a){var s=this,t=s.renderer.cy.zoom(),r=s.firstGet;if(s.firstGet=!1,null==a)if((a=Math.ceil(Yie(t*e)))<-4)a=-4;else if(3.99<=t||2<a)return null;s.validateLayersElesOrdering(a,n);var o,l,h=s.layersByLevel,c=Math.pow(2,a),u=h[a]=h[a]||[],t=s.levelIsComplete(a,n),i=mt(function(){var r=mt(function(e){if(s.validateLayersElesOrdering(e,n),s.levelIsComplete(e,n))return l=h[e],!0},"canUseAsTmpLvl"),e=mt(function(e){if(!l)for(var t=a+e;-4<=t&&t<=2&&!r(t);t+=e);},"checkLvls");e(1),e(-1);for(var t=u.length-1;0<=t;t--){var i=u[t];i.invalid&&mie(u,i)}},"checkTempLevels");if(t)return u;i();var d=mt(function(){if(!o){o=rne();for(var e=0;e<n.length;e++)ane(o,n[e].boundingBox())}return o},"getBb"),p=mt(function(e){var t=(e=e||{}).after,r=(d(),Math.ceil(o.w*c)),i=Math.ceil(o.h*c);return 32767<r||32767<i||16e6<r*i?null:(r=s.makeLayer(o,a),null!=t?(i=u.indexOf(t)+1,u.splice(i,0,r)):void 0!==e.insert&&!e.insert||u.unshift(r),r)},"makeLayer");if(s.skipping&&!r)return null;for(var g=null,f=+n.length,m=!r,y=0;y<n.length;y++){var v=n[y],x=v._private.rscratch,b=(x=x.imgLayerCaches=x.imgLayerCaches||{})[a];if(b)g=b;else{if((!g||g.eles.length>=f||!pne(g.bb,v.boundingBox()))&&!(g=p({insert:!0,after:g})))return null;l||m?s.queueLayer(g,v):s.drawEleInLayer(g,v,a,e),g.eles.push(v),x[a]=g}}return l||(m?null:u)},mue.getEleLevelForLayerLevel=function(e,t){return e},mue.drawEleInLayer=function(e,t,r,i){var n=this.renderer,e=e.context,a=t.boundingBox();0!==a.w&&0!==a.h&&t.visible()&&(r=this.getEleLevelForLayerLevel(r,i),n.setImgSmoothing(e,!1),n.drawCachedElement(e,t,null,null,r,!0),n.setImgSmoothing(e,!0))},mue.levelIsComplete=function(e,t){var r=this.layersByLevel[e];if(!r||0===r.length)return!1;for(var i=0,n=0;n<r.length;n++){var a=r[n];if(0<a.reqs||a.invalid)return!1;i+=a.eles.length}return i===t.length},mue.validateLayersElesOrdering=function(e,t){var r=this.layersByLevel[e];if(r)for(var i=0;i<r.length;i++){for(var n=r[i],a=-1,s=0;s<t.length;s++)if(n.eles[0]===t[s]){a=s;break}if(a<0)this.invalidateLayer(n);else for(var o=a,s=0;s<n.eles.length;s++)if(n.eles[s]!==t[o+s]){this.invalidateLayer(n);break}}},mue.updateElementsInLayers=function(e,t){for(var r=Dte(e[0]),i=0;i<e.length;i++)for(var n=r?null:e[i],a=r?e[i]:e[i].ele,s=a._private.rscratch,o=s.imgLayerCaches=s.imgLayerCaches||{},l=-4;l<=2;l++){var h=o[l];!h||n&&this.getEleLevelForLayerLevel(h.level)!==n.level||t(h,a,n)}},mue.haveLayers=function(){for(var e=!1,t=-4;t<=2;t++){var r=this.layersByLevel[t];if(r&&0<r.length){e=!0;break}}return e},mue.invalidateElements=function(e){var i=this;0!==e.length&&(i.lastInvalidationTime=qre(),0!==e.length)&&i.haveLayers()&&i.updateElementsInLayers(e,mt(function(e,t,r){i.invalidateLayer(e)},"invalAssocLayers"))},mue.invalidateLayer=function(e){if(this.lastInvalidationTime=qre(),!e.invalid){var t=e.level,r=e.eles,i=this.layersByLevel[t];mie(i,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var n=0;n<r.length;n++){var a=r[n]._private.rscratch.imgLayerCaches;a&&(a[t]=null)}}},mue.refineElementTextures=function(e){var a=this;a.updateElementsInLayers(e,mt(function(e,t,r){var i=e.replacement;if(i||((i=e.replacement=a.makeLayer(e.bb,e.level)).replaces=e,i.eles=e.eles),!i.reqs)for(var n=0;n<i.eles.length;n++)a.queueLayer(i,i.eles[n])},"refineEachEle"))},mue.enqueueElementRefinement=function(e){this.eleTxrDeqs.merge(e),this.scheduleElementRefinement()},mue.queueLayer=function(e,t){var r=this.layersQueue,i=e.elesQueue,n=i.hasId=i.hasId||{};if(!e.replacement){if(t){if(n[t.id()])return;i.push(t),n[t.id()]=!0}e.reqs?(e.reqs++,r.updateItem(e)):(e.reqs=1,r.push(e))}},mue.dequeue=function(e){for(var t=this.layersQueue,r=[],i=0;i<1&&0!==t.size();){var n,a=t.peek();a.replacement||a.replaces&&a!==a.replaces.replacement||a.invalid?t.pop():((n=a.elesQueue.shift())&&(this.drawEleInLayer(a,n,a.level,e),i++),0===r.length&&r.push(!0),0===a.elesQueue.length&&(t.pop(),a.reqs=0,a.replaces&&this.applyLayerReplacement(a),this.requestRedraw()))}return r},mue.applyLayerReplacement=function(e){var t=this.layersByLevel[e.level],r=e.replaces,i=t.indexOf(r);if(!(i<0||r.invalid)){t[i]=e;for(var n=0;n<e.eles.length;n++){var a=e.eles[n]._private;(a=a.imgLayerCaches=a.imgLayerCaches||{})&&(a[e.level]=e)}this.requestRedraw()}},mue.requestRedraw=Bre(function(){var e=this.renderer;e.redrawHint("eles",!0),e.redrawHint("drag",!0),e.redraw()},100),mue.setupDequeueing=te.setupDequeueing({deqRedrawThreshold:50,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:mt(function(e,t){return e.dequeue(t)},"deq"),onDeqd:sie,shouldRedraw:iie,priority:mt(function(e){return e.renderer.beforeRenderPriorities.lyrTxrDeq},"priority")}),Ece={},mt(mee,"polygon"),mt(yee,"triangleBackcurve"),mt(vee,"triangleTee"),mt(xee,"circleTriangle"),mt(bee,"circle$1"),Ece.arrowShapeImpl=function(e){return(Sce=Sce||{polygon:mee,"triangle-backcurve":yee,"triangle-tee":vee,"circle-triangle":xee,"triangle-cross":vee,circle:bee})[e]},_ce={drawElement:function(e,t,r,i,n,a){t.isNode()?this.drawNode(e,t,r,i,n,a):this.drawEdge(e,t,r,i,n,a)},drawElementOverlay:function(e,t){t.isNode()?this.drawNodeOverlay(e,t):this.drawEdgeOverlay(e,t)},drawElementUnderlay:function(e,t){t.isNode()?this.drawNodeUnderlay(e,t):this.drawEdgeUnderlay(e,t)},drawCachedElementPortion:function(e,t,r,i,n,a,s,o){var l,h,c,u,d,p,g,f=r.getBoundingBox(t);0!==f.w&&0!==f.h&&(null!=(i=r.getElement(t,f,i,n,a))?0!==(n=o(this,t))&&(a=s(this,t),o=f.x1,s=f.y1,l=f.w,f=f.h,p=0!==a?(c=(u=r.getRotationPoint(t)).x,e.translate(c,u=u.y),e.rotate(a),(h=this.getImgSmoothing(e))||this.setImgSmoothing(e,!0),d=(p=r.getRotationOffset(t)).x,p.y):(d=o,s),1!==n&&(g=e.globalAlpha,e.globalAlpha=g*n),e.drawImage(i.texture.canvas,i.x,0,i.width,i.height,d,p,l,f),1!==n&&(e.globalAlpha=g),0!==a)&&(e.rotate(-a),e.translate(-c,-u),h||this.setImgSmoothing(e,!1)):r.drawElement(e,t))}},Ace=mt(function(){return 0},"getZeroRotation"),Lce=mt(function(e,t){return e.getTextAngle(t,null)},"getLabelRotation"),Rce=mt(function(e,t){return e.getTextAngle(t,"source")},"getSourceLabelRotation"),Ice=mt(function(e,t){return e.getTextAngle(t,"target")},"getTargetLabelRotation"),Nce=mt(function(e,t){return t.effectiveOpacity()},"getOpacity"),Dce=mt(function(e,t){return t.pstyle("text-opacity").pfValue*t.effectiveOpacity()},"getTextOpacity"),_ce.drawCachedElement=function(e,t,r,i,n,a){var s=(h=this.data).eleTxrCache,o=h.lblTxrCache,l=h.slbTxrCache,h=h.tlbTxrCache,c=t.boundingBox(),a=!0===a?s.reasons.highQuality:null;0===c.w||0===c.h||!t.visible()||i&&!cne(c,i)||(c=t.isEdge(),i=t.element()._private.rscratch.badLine,this.drawElementUnderlay(e,t),this.drawCachedElementPortion(e,t,s,r,n,a,Ace,Nce),c&&i||this.drawCachedElementPortion(e,t,o,r,n,a,Lce,Dce),c&&!i&&(this.drawCachedElementPortion(e,t,l,r,n,a,Rce,Dce),this.drawCachedElementPortion(e,t,h,r,n,a,Ice,Dce)),this.drawElementOverlay(e,t))},_ce.drawElements=function(e,t){for(var r=0;r<t.length;r++)this.drawElement(e,t[r])},_ce.drawCachedElements=function(e,t,r,i){for(var n=0;n<t.length;n++)this.drawCachedElement(e,t[n],r,i)},_ce.drawCachedNodes=function(e,t,r,i){for(var n=0;n<t.length;n++){var a=t[n];a.isNode()&&this.drawCachedElement(e,a,r,i)}},_ce.drawLayeredElements=function(e,t,r,i){var n=this.data.lyrTxrCache.getLayers(t,r);if(n)for(var a=0;a<n.length;a++){var s=n[a],o=s.bb;0!==o.w&&0!==o.h&&e.drawImage(s.canvas,o.x1,o.y1,o.w,o.h)}else this.drawCachedElements(e,t,r,i)},Mce={drawEdge:function(t,r,e){var i,n,a,s,o,l,h,c,u,d,p,g,f,m,y,v,x,b=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],T=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],k=!(5<arguments.length&&void 0!==arguments[5])||arguments[5],w=this,C=r._private.rscratch;k&&!r.visible()||C.badLine||null==C.allpts||isNaN(C.allpts[0])||(e&&t.translate(-(i=e).x1,-i.y1),d=k?r.pstyle("opacity").value:1,k=k?r.pstyle("line-opacity").value:1,n=r.pstyle("curve-style").value,a=r.pstyle("line-style").value,s=r.pstyle("width").pfValue,o=r.pstyle("line-cap").value,l=r.pstyle("line-outline-width").value,h=r.pstyle("line-outline-color").value,u=c=d*k,d=mt(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:c;"straight-triangle"===n?(w.eleStrokeStyle(t,r,e),w.drawEdgeTrianglePath(r,t,C.allpts)):(t.lineWidth=s,t.lineCap=o,w.eleStrokeStyle(t,r,e),w.drawEdgePath(r,t,C.allpts,a),t.lineCap="butt")},"drawLine"),k=mt(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:c;t.lineWidth=s+l,t.lineCap=o,0<l?(w.colorStrokeStyle(t,h[0],h[1],h[2],e),"straight-triangle"===n?w.drawEdgeTrianglePath(r,t,C.allpts):(w.drawEdgePath(r,t,C.allpts,a),t.lineCap="butt")):t.lineCap="butt"},"drawLineOutline"),p=mt(function(){T&&w.drawEdgeOverlay(t,r)},"drawOverlay"),g=mt(function(){T&&w.drawEdgeUnderlay(t,r)},"drawUnderlay"),f=mt(function(){w.drawArrowheads(t,r,0<arguments.length&&void 0!==arguments[0]?arguments[0]:u)},"drawArrows"),m=mt(function(){w.drawElementText(t,r,null,b)},"drawText"),t.lineJoin="round","yes"===r.pstyle("ghost").value?(y=r.pstyle("ghost-offset-x").pfValue,v=r.pstyle("ghost-offset-y").pfValue,x=r.pstyle("ghost-opacity").value,x*=c,t.translate(y,v),d(x),f(x),t.translate(-y,-v)):k(),g(),d(),f(),p(),m(),e&&t.translate(i.x1,i.y1))}},Oce=mt(function(o){if(["overlay","underlay"].includes(o))return function(e,t){var r,i,n,a,s;t.visible()&&0!==(r=t.pstyle("".concat(o,"-opacity")).value)&&(i=this.usePaths(),n=t._private.rscratch,a=2*t.pstyle("".concat(o,"-padding")).pfValue,s=t.pstyle("".concat(o,"-color")).value,e.lineWidth=a,"self"!==n.edgeType||i?e.lineCap="round":e.lineCap="butt",this.colorStrokeStyle(e,s[0],s[1],s[2],r),this.drawEdgePath(t,e,n.allpts,"solid"))};throw new Error("Invalid state")},"drawEdgeOverlayUnderlay"),Mce.drawEdgeOverlay=Oce("overlay"),Mce.drawEdgeUnderlay=Oce("underlay"),Mce.drawEdgePath=function(e,t,r,i){var n,a=e._private.rscratch,s=t,o=!1,l=this.usePaths(),h=e.pstyle("line-dash-pattern").pfValue,c=e.pstyle("line-dash-offset").pfValue;if(l&&(e=r.join("$"),a.pathCacheKey&&a.pathCacheKey===e?(n=t=a.pathCache,o=!0):(n=t=new Path2D,a.pathCacheKey=e,a.pathCache=n)),s.setLineDash)switch(i){case"dotted":s.setLineDash([1,1]);break;case"dashed":s.setLineDash(h),s.lineDashOffset=c;break;case"solid":s.setLineDash([])}if(!o&&!a.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(r[0],r[1]),a.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var u=2;u+3<r.length;u+=4)t.quadraticCurveTo(r[u],r[u+1],r[u+2],r[u+3]);break;case"straight":case"haystack":for(var d=2;d+1<r.length;d+=2)t.lineTo(r[d],r[d+1]);break;case"segments":if(a.isRound){var p,g=QZ(a.roundCorners);try{for(g.s();!(p=g.n()).done;)dee(t,p.value)}catch(e){g.e(e)}finally{g.f()}t.lineTo(r[r.length-2],r[r.length-1])}else for(var f=2;f+1<r.length;f+=2)t.lineTo(r[f],r[f+1])}t=s,l?t.stroke(n):t.stroke(),t.setLineDash&&t.setLineDash([])},Mce.drawEdgeTrianglePath=function(e,t,r){t.fillStyle=t.strokeStyle;for(var i=e.pstyle("width").pfValue,n=0;n+1<r.length;n+=2){var a=[r[n+2]-r[n],r[n+3]-r[n+1]],s=Math.sqrt(a[0]*a[0]+a[1]*a[1]),s=[(a=[a[1]/s,-a[0]/s])[0]*i/2,a[1]*i/2];t.beginPath(),t.moveTo(r[n]-s[0],r[n+1]-s[1]),t.lineTo(r[n]+s[0],r[n+1]+s[1]),t.lineTo(r[n+2],r[n+3]),t.closePath(),t.fill()}},Mce.drawArrowheads=function(e,t,r){var i=t._private.rscratch,n="haystack"===i.edgeType;n||this.drawArrowhead(e,t,"source",i.arrowStartX,i.arrowStartY,i.srcArrowAngle,r),this.drawArrowhead(e,t,"mid-target",i.midX,i.midY,i.midtgtArrowAngle,r),this.drawArrowhead(e,t,"mid-source",i.midX,i.midY,i.midsrcArrowAngle,r),n||this.drawArrowhead(e,t,"target",i.arrowEndX,i.arrowEndY,i.tgtArrowAngle,r)},Mce.drawArrowhead=function(e,t,r,i,n,a,s){var o,l,h,c,u,d,p;isNaN(i)||null==i||isNaN(n)||null==n||isNaN(a)||null==a||"none"!==(o=t.pstyle(r+"-arrow-shape").value)&&(l="hollow"===t.pstyle(r+"-arrow-fill").value?"both":"filled",h=t.pstyle(r+"-arrow-fill").value,c=t.pstyle("width").pfValue,u="match-line"===(p=t.pstyle(r+"-arrow-width")).value?c:p.pfValue,"%"===p.units&&(u*=c),p=t.pstyle("opacity").value,d=e.globalCompositeOperation,1===(s=void 0===s?p:s)&&"hollow"!==h||(e.globalCompositeOperation="destination-out",this.colorFillStyle(e,255,255,255,1),this.colorStrokeStyle(e,255,255,255,1),this.drawArrowShape(t,e,l,c,o,u,i,n,a),e.globalCompositeOperation=d),p=t.pstyle(r+"-arrow-color").value,this.colorFillStyle(e,p[0],p[1],p[2],s),this.colorStrokeStyle(e,p[0],p[1],p[2],s),this.drawArrowShape(t,e,h,c,o,u,i,n,a))},Mce.drawArrowShape=function(e,t,r,i,n,a,s,o,l){var h,c,u,d=this.usePaths()&&"triangle-cross"!==n,p=!1,g=t,f={x:s,y:o},e=e.pstyle("arrow-scale").value,e=this.getArrowWidth(i,e),m=this.arrowShapes[n];d&&(null!=(u=(c=this.arrowPathCache=this.arrowPathCache||[])[n=Xre(n)])?(h=t=u,p=!0):(h=t=new Path2D,c[n]=h)),p||(t.beginPath&&t.beginPath(),d?m.draw(t,1,0,{x:0,y:0},1):m.draw(t,e,l,f,i),t.closePath&&t.closePath()),t=g,d&&(t.translate(s,o),t.rotate(l),t.scale(e,e)),"filled"!==r&&"both"!==r||(d?t.fill(h):t.fill()),"hollow"!==r&&"both"!==r||(t.lineWidth=a/(d?e:1),t.lineJoin="miter",d?t.stroke(h):t.stroke()),d&&(t.scale(1/e,1/e),t.rotate(-l),t.translate(-s,-o))},Bce={safeDrawImage:function(e,t,r,i,n,a,s,o,l,h){if(!(n<=0||a<=0||l<=0||h<=0))try{e.drawImage(t,r,i,n,a,s,o,l,h)}catch(e){hie(e)}},drawInscribedImage:function(e,t,r,i,n){var a,s,o,l=(h=r.position()).x,h=h.y,c=r.cy().style(),u=(c=c.getIndexedStyle.bind(c))(r,"background-fit","value",i),d=c(r,"background-repeat","value",i),p=r.width(),g=r.height(),f=2*r.padding(),p=p+("inner"===c(r,"background-width-relative-to","value",i)?0:f),g=g+("inner"===c(r,"background-height-relative-to","value",i)?0:f),f=r._private.rscratch,m="node"===c(r,"background-clip","value",i),n=c(r,"background-image-opacity","value",i)*n,y=c(r,"background-image-smoothing","value",i),v=r.pstyle("corner-radius").value,x=("auto"!==v&&(v=r.pstyle("corner-radius").pfValue),t.width||t.cachedW),b=t.height||t.cachedH,T=(null!=x&&null!=b||(document.body.appendChild(t),x=t.cachedW=t.width||t.offsetWidth,b=t.cachedH=t.height||t.offsetHeight,document.body.removeChild(t)),x),k=b;"auto"!==c(r,"background-width","value",i)&&(T="%"===c(r,"background-width","units",i)?c(r,"background-width","pfValue",i)*p:c(r,"background-width","pfValue",i)),"auto"!==c(r,"background-height","value",i)&&(k="%"===c(r,"background-height","units",i)?c(r,"background-height","pfValue",i)*g:c(r,"background-height","pfValue",i)),0!==T&&0!==k&&("contain"===u?(T*=a=Math.min(p/T,g/k),k*=a):"cover"===u&&(T*=a=Math.max(p/T,g/k),k*=a),u=l-p/2,a=c(r,"background-position-x","units",i),s=c(r,"background-position-x","pfValue",i),u+="%"===a?(p-T)*s:s,a=c(r,"background-offset-x","units",i),s=c(r,"background-offset-x","pfValue",i),u+="%"===a?(p-T)*s:s,a=h-g/2,s=c(r,"background-position-y","units",i),o=c(r,"background-position-y","pfValue",i),a+="%"===s?(g-k)*o:o,s=c(r,"background-offset-y","units",i),o=c(r,"background-offset-y","pfValue",i),a+="%"===s?(g-k)*o:o,f.pathCache&&(u-=l,a-=h,h=l=0),c=e.globalAlpha,e.globalAlpha=n,i=this.getImgSmoothing(e),s=!1,"no"===y&&i?(this.setImgSmoothing(e,!1),s=!0):"yes"!==y||i||(this.setImgSmoothing(e,!0),s=!0),"no-repeat"===d?(m&&(e.save(),f.pathCache?e.clip(f.pathCache):(this.nodeShapes[this.getNodeShape(r)].draw(e,l,h,p,g,v,f),e.clip())),this.safeDrawImage(e,t,0,0,x,b,u,a,T,k),m&&e.restore()):(o=e.createPattern(t,d),e.fillStyle=o,this.nodeShapes[this.getNodeShape(r)].draw(e,l,h,p,g,v,f),e.translate(u,a),e.fill(),e.translate(-u,-a)),e.globalAlpha=c,s)&&this.setImgSmoothing(e,i)}},Pce={eleTextBiggerThanMin:function(e,t){var r,i;return t||(i=e.cy().zoom(),r=this.getPixelRatio(),i=Math.ceil(Yie(i*r)),t=Math.pow(2,i)),!(e.pstyle("font-size").pfValue*t<e.pstyle("min-zoomed-font-size").pfValue)},drawElementText:function(e,t,r,i,n){var a=!(5<arguments.length&&void 0!==arguments[5])||arguments[5];if(null==i){if(a&&!this.eleTextBiggerThanMin(t))return}else if(!1===i)return;if(t.isNode()){if(!(i=t.pstyle("label"))||!i.value)return;i=this.getLabelJustification(t),e.textAlign=i}else{var i=t.element()._private.rscratch.badLine,s=t.pstyle("label"),o=t.pstyle("source-label"),l=t.pstyle("target-label");if(i||(!s||!s.value)&&(!o||!o.value)&&(!l||!l.value))return;e.textAlign="center"}e.textBaseline="bottom";var h,i=!r;r&&e.translate(-(h=r).x1,-h.y1),null==n?(this.drawText(e,t,null,i,a),t.isEdge()&&(this.drawText(e,t,"source",i,a),this.drawText(e,t,"target",i,a))):this.drawText(e,t,n,i,a),r&&e.translate(h.x1,h.y1)},getFontCache:function(e){var t;this.fontCaches=this.fontCaches||[];for(var r=0;r<this.fontCaches.length;r++)if((t=this.fontCaches[r]).context===e)return t;return this.fontCaches.push(t={context:e}),t},setupTextStyle:function(e,t){var r=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],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,r=r?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,o=t.pstyle("text-outline-opacity").value*r,l=t.pstyle("color").value,t=t.pstyle("text-outline-color").value;e.font=i+" "+s+" "+n+" "+a,e.lineJoin="round",this.colorFillStyle(e,l[0],l[1],l[2],r),this.colorStrokeStyle(e,t[0],t[1],t[2],o)}},mt(Tee,"circle"),mt(kee,"roundRect"),Pce.getTextAngle=function(e,t){var r=e._private.rscratch,i=e.pstyle((t?t+"-":"")+"text-rotation");return"autorotate"===i.strValue?(r=xie(r,"labelAngle",t),e.isEdge()?r:0):"none"===i.strValue?0:i.pfValue},Pce.drawText=function(e,t,r){var i=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],n=t._private.rscratch,a=(u=!(4<arguments.length&&void 0!==arguments[4])||arguments[4])?t.effectiveOpacity():1;if(!u||0!==a&&0!==t.pstyle("text-opacity").value){var s,o,l=xie(n,"labelX",r="main"===r?null:r),h=xie(n,"labelY",r),c=this.getLabelText(t,r);if(null!=c&&""!==c&&!isNaN(l)&&!isNaN(h)){this.setupTextStyle(e,t,u);var u=r?r+"-":"",d=xie(n,"labelWidth",r),p=xie(n,"labelHeight",r),g=t.pstyle(u+"text-margin-x").pfValue,u=t.pstyle(u+"text-margin-y").pfValue,f=t.isEdge(),m=t.pstyle("text-halign").value,y=t.pstyle("text-valign").value;switch(f&&(y=m="center"),l+=g,h+=u,0!==(f=i?this.getTextAngle(t,r):0)&&(s=l,o=h,e.translate(s,o),e.rotate(f),h=l=0),y){case"top":break;case"center":h+=p/2;break;case"bottom":h+=p}var g=t.pstyle("text-background-opacity").value,u=t.pstyle("text-border-opacity").value,v=t.pstyle("text-border-width").pfValue,i=t.pstyle("text-background-padding").pfValue,x="round-rectangle"===(b=t.pstyle("text-background-shape").strValue)||"roundrectangle"===b,b="circle"===b;if(0<g||0<v&&0<u){var T=e.fillStyle,k=e.strokeStyle,O=e.lineWidth,w=t.pstyle("text-background-color").value,C=t.pstyle("text-border-color").value,E=t.pstyle("text-border-style").value,S=0<g,_=0<v&&0<u,A=l-i;switch(m){case"left":A-=d;break;case"center":A-=d/2}var L=h-p-i,R=d+2*i,i=p+2*i;if(S&&(e.fillStyle="rgba(".concat(w[0],",").concat(w[1],",").concat(w[2],",").concat(g*a,")")),_&&(e.strokeStyle="rgba(".concat(C[0],",").concat(C[1],",").concat(C[2],",").concat(u*a,")"),e.lineWidth=v,e.setLineDash))switch(E){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=v/4,e.setLineDash([]);break;default:e.setLineDash([])}x?(e.beginPath(),kee(e,A,L,R,i,2)):b?(e.beginPath(),Tee(e,A,L,R,i)):(e.beginPath(),e.rect(A,L,R,i)),S&&e.fill(),_&&e.stroke(),_&&"double"===E&&(w=v/2,e.beginPath(),x?kee(e,A+w,L+w,R-2*w,i-2*w,2):e.rect(A+w,L+w,R-2*w,i-2*w),e.stroke()),e.fillStyle=T,e.strokeStyle=k,e.lineWidth=O,e.setLineDash&&e.setLineDash([])}var I=2*t.pstyle("text-outline-width").pfValue;if(0<I&&(e.lineWidth=I),"wrap"===t.pstyle("text-wrap").value){var N=xie(n,"labelWrapCachedLines",r),D=xie(n,"labelLineHeight",r),g=d/2;switch("auto"!==(C=this.getLabelJustification(t))&&("left"===m?"left"===C?l+=-d:"center"===C&&(l+=-g):"center"===m?"left"===C?l+=-g:"right"===C&&(l+=g):"right"===m&&("center"===C?l+=g:"right"===C&&(l+=d))),y){case"top":h-=(N.length-1)*D;break;case"center":case"bottom":h-=(N.length-1)*D}for(var M=0;M<N.length;M++)0<I&&e.strokeText(N[M],l,h),e.fillText(N[M],l,h),h+=D}else 0<I&&e.strokeText(c,l,h),e.fillText(c,l,h);0!==f&&(e.rotate(-f),e.translate(-s,-o))}}},$ce={drawNode:function(w,C,e){var O=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],t=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],r=!(5<arguments.length&&void 0!==arguments[5])||arguments[5],E=this,s=C._private,o=s.rscratch,S=C.position();if(ce(S.x)&&ce(S.y)&&(!r||C.visible())){var i,l=r?C.effectiveOpacity():1,_=E.usePaths(),n=!1,r=C.padding(),A=C.width()+2*r,L=C.height()+2*r;e&&w.translate(-(i=e).x1,-i.y1);for(var a=C.pstyle("background-image").value,h=new Array(a.length),c=new Array(a.length),B=0,u=0;u<a.length;u++){var P,d=a[u];(h[u]=null!=d&&"none"!==d)&&(P=C.cy().style().getIndexedStyle(C,"background-image-crossorigin","value",u),B++,c[u]=E.getCachedImage(d,P,function(){s.backgroundTimestamp=Date.now(),C.emitAndNotify("background")}))}var p,g,f,m,y,v=C.pstyle("background-blacken").value,R=C.pstyle("border-width").pfValue,$=C.pstyle("background-opacity").value*l,x=C.pstyle("border-color").value,F=C.pstyle("border-style").value,z=C.pstyle("border-join").value,q=C.pstyle("border-cap").value,I=C.pstyle("border-position").value,W=C.pstyle("border-dash-pattern").pfValue,U=C.pstyle("border-dash-offset").pfValue,G=C.pstyle("border-opacity").value*l,N=C.pstyle("outline-width").pfValue,b=C.pstyle("outline-color").value,j=C.pstyle("outline-style").value,V=C.pstyle("outline-opacity").value*l,D=C.pstyle("outline-offset").value,M=C.pstyle("corner-radius").value,r=("auto"!==M&&(M=C.pstyle("corner-radius").pfValue),mt(function(){E.eleFillStyle(w,C,0<arguments.length&&void 0!==arguments[0]?arguments[0]:$)},"setupShapeColor")),Y=mt(function(){E.colorStrokeStyle(w,x[0],x[1],x[2],0<arguments.length&&void 0!==arguments[0]?arguments[0]:G)},"setupBorderColor"),H=mt(function(){E.colorStrokeStyle(w,b[0],b[1],b[2],0<arguments.length&&void 0!==arguments[0]?arguments[0]:V)},"setupOutlineColor"),X=mt(function(e,t,r,i){var n,a=E.nodePathCache=E.nodePathCache||[],i=Kre("polygon"===r?r+","+i.join(","):r,""+t,""+e,""+M),t=!1;return null!=(r=a[i])?(t=!0,o.pathCache=n=r):(n=new Path2D,a[i]=o.pathCache=n),{path:n,cacheHit:t}},"getPath"),T=C.pstyle("shape").strValue,k=C.pstyle("shape-polygon-points").pfValue,k=(_&&(w.translate(S.x,S.y),T=X(A,L,T,k),p=T.path,n=T.cacheHit),mt(function(){var e;n||(e=_?{x:0,y:0}:S,E.nodeShapes[E.getNodeShape(C)].draw(p||w,e.x,e.y,A,L,M,o)),_?w.fill(p):w.fill()},"drawShape")),T=mt(function(){for(var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:l,t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],r=s.backgrounding,i=0,n=0;n<c.length;n++){var a=C.cy().style().getIndexedStyle(C,"background-image-containment","value",n);t&&"over"===a||!t&&"inside"===a?i++:h[n]&&c[n].complete&&!c[n].error&&(i++,E.drawInscribedImage(w,c[n],C,n,e))}s.backgrounding=i!==B,r!==s.backgrounding&&C.updateStyle(!1)},"drawImages"),K=mt(function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:l;E.hasPie(C)&&(E.drawPie(w,C,t),e)&&(_||E.nodeShapes[E.getNodeShape(C)].draw(w,S.x,S.y,A,L,M,o))},"drawPie"),Z=mt(function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:l;E.hasStripe(C)&&(w.save(),_?w.clip(o.pathCache):(E.nodeShapes[E.getNodeShape(C)].draw(w,S.x,S.y,A,L,M,o),w.clip()),E.drawStripe(w,C,t),w.restore(),e)&&(_||E.nodeShapes[E.getNodeShape(C)].draw(w,S.x,S.y,A,L,M,o))},"drawStripe"),Q=mt(function(){var e=0<v?0:255;0!==v&&(E.colorFillStyle(w,e,e,e,(0<v?v:-v)*(0<arguments.length&&void 0!==arguments[0]?arguments[0]:l)),_?w.fill(p):w.fill())},"darken"),J=mt(function(){if(0<R){if(w.lineWidth=R,w.lineCap=q,w.lineJoin=z,w.setLineDash)switch(F){case"dotted":w.setLineDash([1,1]);break;case"dashed":w.setLineDash(W),w.lineDashOffset=U;break;case"solid":case"double":w.setLineDash([])}var e;"center"!==I?(w.save(),w.lineWidth*=2,"inside"===I?_?w.clip(p):w.clip():((e=new Path2D).rect(-A/2-R,-L/2-R,A+2*R,L+2*R),e.addPath(p),w.clip(e,"evenodd")),_?w.stroke(p):w.stroke(),w.restore()):_?w.stroke(p):w.stroke(),"double"===F&&(w.lineWidth=R/3,e=w.globalCompositeOperation,w.globalCompositeOperation="destination-out",_?w.stroke(p):w.stroke(),w.globalCompositeOperation=e),w.setLineDash&&w.setLineDash([])}},"drawBorder"),ee=mt(function(){if(0<N){if(w.lineWidth=N,w.lineCap="butt",w.setLineDash)switch(j){case"dotted":w.setLineDash([1,1]);break;case"dashed":w.setLineDash([4,2]);break;case"solid":case"double":w.setLineDash([])}var e,t=S,r=(_&&(t={x:0,y:0}),E.getNodeShape(C)),i="inside"===I?0:R,n=("outside"===I&&(i*=2),(A+i+(N+D))/A),a=(L+i+(N+D))/L,s=A*n,o=L*a,l=E.nodeShapes[r].points;if(_&&(e=X(s,o,r,l).path),"ellipse"===r)E.drawEllipsePath(e||w,t.x,t.y,s,o);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(r)){var h=0,c=0,u=0;"round-diamond"===r?h=1.4*(i+D+N):"round-heptagon"===r?(h=1.075*(i+D+N),u=-(i/2+D+N)/35):"round-hexagon"===r?h=1.12*(i+D+N):"round-pentagon"===r?(h=1.13*(i+D+N),u=-(i/2+D+N)/15):"round-tag"===r?(h=1.12*(i+D+N),c=.07*(i/2+N+D)):"round-triangle"===r&&(h=(i+D+N)*(Math.PI/2),u=-(i+D/2+N)/Math.PI),0!==h&&(s=A*(n=(A+h)/A),["round-hexagon","round-tag"].includes(r)||(o=L*(a=(L+h)/L)));for(var d=s/2,p=o/2,g=(M="auto"===M?zne(s,o):M)+(i+N+D)/2,f=new Array(l.length/2),m=new Array(l.length/2),y=0;y<l.length/2;y++)f[y]={x:t.x+c+d*l[2*y],y:t.y+u+p*l[2*y+1]};for(var v,x,b=f.length,T=f[b-1],k=0;k<b;k++)v=f[k%b],x=f[(k+1)%b],m[k]=pee(T,v,x,g),T=v;E.drawRoundPolygonPath(e||w,t.x+c,t.y+u,A*n,L*a,l,m)}else["roundrectangle","round-rectangle"].includes(r)?(M="auto"===M?Fne(s,o):M,E.drawRoundRectanglePath(e||w,t.x,t.y,s,o,M+(i+N+D)/2)):["cutrectangle","cut-rectangle"].includes(r)?(M="auto"===M?qne():M,E.drawCutRectanglePath(e||w,t.x,t.y,s,o,null,M+(i+N+D)/4)):["bottomroundrectangle","bottom-round-rectangle"].includes(r)?(M="auto"===M?Fne(s,o):M,E.drawBottomRoundRectanglePath(e||w,t.x,t.y,s,o,M+(i+N+D)/2)):"barrel"===r?E.drawBarrelPath(e||w,t.x,t.y,s,o):(l=r.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(r)?Ene(Sne(l,(i+N+D)/A)):Ene(Sne(l,-(i+N+D)/A)),E.drawPolygonPath(e||w,t.x,t.y,A,L,l));_?w.stroke(e):w.stroke(),"double"===j&&(w.lineWidth=i/3,h=w.globalCompositeOperation,w.globalCompositeOperation="destination-out",_?w.stroke(e):w.stroke(),w.globalCompositeOperation=h),w.setLineDash&&w.setLineDash([])}},"drawOutline"),te=mt(function(){t&&E.drawNodeOverlay(w,C,S,A,L)},"drawOverlay"),re=mt(function(){t&&E.drawNodeUnderlay(w,C,S,A,L)},"drawUnderlay"),ie=mt(function(){E.drawElementText(w,C,null,O)},"drawText");"yes"===C.pstyle("ghost").value&&(g=C.pstyle("ghost-offset-x").pfValue,f=C.pstyle("ghost-offset-y").pfValue,y=(m=C.pstyle("ghost-opacity").value)*l,w.translate(g,f),H(),ee(),r(m*$),k(),T(y,!0),Y(m*G),J(),K(0!==v||0!==R),Z(0!==v||0!==R),T(y,!1),Q(y),w.translate(-g,-f)),_&&w.translate(-S.x,-S.y),re(),_&&w.translate(S.x,S.y),H(),ee(),r(),k(),T(l,!0),Y(),J(),K(0!==v||0!==R),Z(0!==v||0!==R),T(l,!1),Q(),_&&w.translate(-S.x,-S.y),ie(),te(),e&&w.translate(i.x1,i.y1)}}},Fce=mt(function(u){if(["overlay","underlay"].includes(u))return function(e,t,r,i,n){var a,s,o,l,h,c;t.visible()&&(a=t.pstyle("".concat(u,"-padding")).pfValue,s=t.pstyle("".concat(u,"-opacity")).value,o=t.pstyle("".concat(u,"-color")).value,l=t.pstyle("".concat(u,"-shape")).value,h=t.pstyle("".concat(u,"-corner-radius")).value,0<s)&&(r=r||t.position(),null!=i&&null!=n||(c=t.padding(),i=t.width()+2*c,n=t.height()+2*c),this.colorFillStyle(e,o[0],o[1],o[2],s),this.nodeShapes[l].draw(e,r.x,r.y,i+2*a,n+2*a,h),e.fill())};throw new Error("Invalid state")},"drawNodeOverlayUnderlay"),$ce.drawNodeOverlay=Fce("overlay"),$ce.drawNodeUnderlay=Fce("underlay"),$ce.hasPie=function(e){return(e=e[0])._private.hasPie},$ce.hasStripe=function(e){return(e=e[0])._private.hasStripe},$ce.drawPie=function(e,t,r,i){t=t[0],i=i||t.position();var n,a=t.cy().style(),s=t.pstyle("pie-size"),o=t.pstyle("pie-hole"),l=t.pstyle("pie-start-angle").pfValue,h=i.x,c=i.y,i=t.width(),u=t.height(),d=Math.min(i,u)/2,p=0;if(this.usePaths()&&(c=h=0),"%"===s.units?d*=s.pfValue:void 0!==s.pfValue&&(d=s.pfValue/2),"%"===o.units?n=d*o.pfValue:void 0!==o.pfValue&&(n=o.pfValue/2),!(d<=n))for(var g=1;g<=a.pieBackgroundN;g++){var f=t.pstyle("pie-"+g+"-background-size").value,m=t.pstyle("pie-"+g+"-background-color").value,y=t.pstyle("pie-"+g+"-background-opacity").value*r,v=f/100,x=(1<v+p&&(v=1-p),1.5*Math.PI+2*Math.PI*p),b=(x+=l)+2*Math.PI*v;0===f||1<=p||1<p+v||(0===n?(e.beginPath(),e.moveTo(h,c),e.arc(h,c,d,x,b)):(e.beginPath(),e.arc(h,c,d,x,b),e.arc(h,c,n,b,x,!0)),e.closePath(),this.colorFillStyle(e,m[0],m[1],m[2],y),e.fill(),p+=v)}},$ce.drawStripe=function(e,t,r,i){t=t[0],i=i||t.position();var n=t.cy().style(),a=i.x,s=i.y,i=t.width(),o=t.height(),l=0,h=this.usePaths(),c=(e.save(),t.pstyle("stripe-direction").value),u=t.pstyle("stripe-size");switch(c){case"vertical":break;case"righward":e.rotate(-Math.PI/2)}var d=i,p=o;"%"===u.units?(d*=u.pfValue,p*=u.pfValue):void 0!==u.pfValue&&(d=u.pfValue,p=u.pfValue),h&&(s=a=0),s-=d/2,a-=p/2;for(var g=1;g<=n.stripeBackgroundN;g++){var f=t.pstyle("stripe-"+g+"-background-size").value,m=t.pstyle("stripe-"+g+"-background-color").value,y=t.pstyle("stripe-"+g+"-background-opacity").value*r,v=f/100;1<v+l&&(v=1-l),0===f||1<=l||1<l+v||(e.beginPath(),e.rect(a,s+p*l,d,p*v),e.closePath(),this.colorFillStyle(e,m[0],m[1],m[2],y),e.fill(),l+=v)}e.restore()},zce={getPixelRatio:function(){var e,t=this.data.contexts[0];return null!=this.forcedPixelRatio?this.forcedPixelRatio:(e=this.cy.window(),t=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1,(e.devicePixelRatio||1)/t)},paintCache:function(e){for(var t,r=this.paintCaches=this.paintCaches||[],i=!0,n=0;n<r.length;n++)if((t=r[n]).context===e){i=!1;break}return i&&r.push(t={context:e}),t},createGradientStyleFor:function(e,t,r,i,n){var a=this.usePaths(),s=r.pstyle(t+"-gradient-stop-colors").value,o=r.pstyle(t+"-gradient-stop-positions").pfValue;if("radial-gradient"===i)i=r.isEdge()?(t=r.sourceEndpoint(),i=r.targetEndpoint(),l=r.midpoint(),t=Xie(t,l),Xie(i,l)):(l=a?{x:0,y:0}:r.position(),t=r.paddedWidth(),r.paddedHeight()),h=e.createRadialGradient(l.x,l.y,0,l.x,l.y,Math.max(t,i));else if(r.isEdge())var l=r.sourceEndpoint(),t=r.targetEndpoint(),h=e.createLinearGradient(l.x,l.y,t.x,t.y);else{var c=a?{x:0,y:0}:r.position(),u=r.paddedWidth()/2,d=r.paddedHeight()/2;switch(r.pstyle("background-gradient-direction").value){case"to-bottom":h=e.createLinearGradient(c.x,c.y-d,c.x,c.y+d);break;case"to-top":h=e.createLinearGradient(c.x,c.y+d,c.x,c.y-d);break;case"to-left":h=e.createLinearGradient(c.x+u,c.y,c.x-u,c.y);break;case"to-right":h=e.createLinearGradient(c.x-u,c.y,c.x+u,c.y);break;case"to-bottom-right":case"to-right-bottom":h=e.createLinearGradient(c.x-u,c.y-d,c.x+u,c.y+d);break;case"to-top-right":case"to-right-top":h=e.createLinearGradient(c.x-u,c.y+d,c.x+u,c.y-d);break;case"to-bottom-left":case"to-left-bottom":h=e.createLinearGradient(c.x+u,c.y-d,c.x-u,c.y+d);break;case"to-top-left":case"to-left-top":h=e.createLinearGradient(c.x+u,c.y+d,c.x-u,c.y-d)}}if(!h)return null;for(var p=o.length===s.length,g=s.length,f=0;f<g;f++)h.addColorStop(p?o[f]:f/(g-1),"rgba("+s[f][0]+","+s[f][1]+","+s[f][2]+","+n+")");return h},gradientFillStyle:function(e,t,r,i){if(!(t=this.createGradientStyleFor(e,"background",t,r,i)))return null;e.fillStyle=t},colorFillStyle:function(e,t,r,i,n){e.fillStyle="rgba("+t+","+r+","+i+","+n+")"},eleFillStyle:function(e,t,r){var i=t.pstyle("background-fill").value;"linear-gradient"===i||"radial-gradient"===i?this.gradientFillStyle(e,t,i,r):(i=t.pstyle("background-color").value,this.colorFillStyle(e,i[0],i[1],i[2],r))},gradientStrokeStyle:function(e,t,r,i){if(!(t=this.createGradientStyleFor(e,"line",t,r,i)))return null;e.strokeStyle=t},colorStrokeStyle:function(e,t,r,i,n){e.strokeStyle="rgba("+t+","+r+","+i+","+n+")"},eleStrokeStyle:function(e,t,r){var i=t.pstyle("line-fill").value;"linear-gradient"===i||"radial-gradient"===i?this.gradientStrokeStyle(e,t,i,r):(i=t.pstyle("line-color").value,this.colorStrokeStyle(e,i[0],i[1],i[2],r))},matchCanvasSize:function(e){var t,r=this,i=r.data,n=(s=r.findContainerClientCoords())[2],a=s[3],s=r.getPixelRatio(),o=r.motionBlurPxRatio,l=n*(s=e!==r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE]&&e!==r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG]?s:o),h=a*s;if(l!==r.canvasWidth||h!==r.canvasHeight){r.fontCaches=null,(e=i.canvasContainer).style.width=n+"px",e.style.height=a+"px";for(var c=0;c<r.CANVAS_LAYERS;c++)(t=i.canvases[c]).width=l,t.height=h,t.style.width=n+"px",t.style.height=a+"px";for(c=0;c<r.BUFFER_COUNT;c++)(t=i.bufferCanvases[c]).width=l,t.height=h,t.style.width=n+"px",t.style.height=a+"px";s<=(r.textureMult=1)&&(t=i.bufferCanvases[r.TEXTURE_BUFFER],r.textureMult=2,t.width=l*r.textureMult,t.height=h*r.textureMult),r.canvasWidth=l,r.canvasHeight=h,r.pixelRatio=s}},renderTo:function(e,t,r,i){this.render({forcedContext:e,forcedZoom:t,forcedPan:r,drawAllLayers:!0,forcedPxRatio:i})},clearCanvas:function(){var t=this,e=t.data;function r(e){e.clearRect(0,0,t.canvasWidth,t.canvasHeight)}mt(r,"clear"),r(e.contexts[t.NODE]),r(e.contexts[t.DRAG])},render:function(e){var s=this,t=(e=e||fie(),s.cy),o=e.forcedContext,l=e.drawAllLayers,r=e.drawOnlyNodeLayer,h=e.forcedZoom,c=e.forcedPan,i=void 0===e.forcedPxRatio?this.getPixelRatio():e.forcedPxRatio,u=s.data,n=u.canvasNeedsRedraw,a=s.textureOnViewport&&!o&&(s.pinching||s.hoverData.dragging||s.swipePanning||s.data.wheelZooming),d=(void 0!==e.motionBlur?e:s).motionBlur,p=s.motionBlurPxRatio,g=t.hasCompoundNodes(),f=s.hoverData.draggingEles,m=!(!s.hoverData.selecting&&!s.touchData.selecting),y=d=d&&!o&&s.motionBlurEnabled&&!m,m=(o||(s.prevPxRatio!==i&&(s.invalidateContainerClientCoordsCache(),s.matchCanvasSize(s.container),s.redrawHint("eles",!0),s.redrawHint("drag",!0)),s.prevPxRatio=i),!o&&s.motionBlurTimeout&&clearTimeout(s.motionBlurTimeout),d&&(null==s.mbFrames&&(s.mbFrames=0),s.mbFrames++,s.mbFrames<3&&(y=!1),s.mbFrames>s.minMbLowQualFrames)&&(s.motionBlurPxRatio=s.mbPxRBlurry),s.clearingMotionBlur&&(s.motionBlurPxRatio=1),s.textureDrawLastFrame&&!a&&(n[s.NODE]=!0,n[s.SELECT_BOX]=!0),t.style()),v=t.zoom(),x=void 0!==h?h:v,b=t.pan(),T={x:b.x,y:b.y},k={zoom:v,pan:{x:b.x,y:b.y}},w=(void 0===(w=s.prevViewport)||k.zoom!==w.zoom||k.pan.x!==w.pan.x||k.pan.y!==w.pan.y||f&&!g||(s.motionBlurPxRatio=1),x*=i,(T=c||T).x*=i,T.y*=i,s.getCachedZSortedEles());function C(e,t,r,i,n){var a=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",s.colorFillStyle(e,255,255,255,s.motionBlurTransparency),e.fillRect(t,r,i,n),e.globalCompositeOperation=a}function E(e,t){var r,i,n,a=s.clearingMotionBlur||e!==u.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]&&e!==u.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]?(r=T,i=x,n=s.canvasWidth,s.canvasHeight):(r={x:b.x*p,y:b.y*p},i=v*p,n=s.canvasWidth*p,s.canvasHeight*p);e.setTransform(1,0,0,1,0,0),"motionBlur"===t?C(e,0,0,n,a):o||void 0!==t&&!t||e.clearRect(0,0,n,a),l||(e.translate(r.x,r.y),e.scale(i,i)),c&&e.translate(c.x,c.y),h&&e.scale(h,h)}mt(C,"mbclear"),mt(E,"setContextTransform"),a||(s.textureDrawLastFrame=!1),a?(s.textureDrawLastFrame=!0,s.textureCache||(s.textureCache={},s.textureCache.bb=t.mutableElements().boundingBox(),s.textureCache.texture=s.data.bufferCanvases[s.TEXTURE_BUFFER],(f=s.data.bufferContexts[s.TEXTURE_BUFFER]).setTransform(1,0,0,1,0,0),f.clearRect(0,0,s.canvasWidth*s.textureMult,s.canvasHeight*s.textureMult),s.render({forcedContext:f,drawOnlyNodeLayer:!0,forcedPxRatio:i*s.textureMult}),(k=s.textureCache.viewport={zoom:t.zoom(),pan:t.pan(),width:s.canvasWidth,height:s.canvasHeight}).mpan={x:(0-k.pan.x)/k.zoom,y:(0-k.pan.y)/k.zoom}),n[s.DRAG]=!1,n[s.NODE]=!1,S=u.contexts[s.NODE],g=s.textureCache.texture,k=s.textureCache.viewport,S.setTransform(1,0,0,1,0,0),d?C(S,0,0,k.width,k.height):S.clearRect(0,0,k.width,k.height),f=m.core("outside-texture-bg-color").value,m=m.core("outside-texture-bg-opacity").value,s.colorFillStyle(S,f[0],f[1],f[2],m),S.fillRect(0,0,k.width,k.height),v=t.zoom(),E(S,!1),S.clearRect(k.mpan.x,k.mpan.y,k.width/k.zoom/i,k.height/k.zoom/i),S.drawImage(g,k.mpan.x,k.mpan.y,k.width/k.zoom/i,k.height/k.zoom/i)):s.textureOnViewport&&!o&&(s.textureCache=null);var S,_,f=t.extent(),m=s.pinching||s.hoverData.dragging||s.swipePanning||s.data.wheelZooming||s.hoverData.draggingEles||s.cy.animated(),g=s.hideEdgesOnViewport&&m;(m=[])[s.NODE]=!n[s.NODE]&&d&&!s.clearedForMotionBlur[s.NODE]||s.clearingMotionBlur,m[s.NODE]&&(s.clearedForMotionBlur[s.NODE]=!0),m[s.DRAG]=!n[s.DRAG]&&d&&!s.clearedForMotionBlur[s.DRAG]||s.clearingMotionBlur,m[s.DRAG]&&(s.clearedForMotionBlur[s.DRAG]=!0),(n[s.NODE]||l||r||m[s.NODE])&&(_=d&&!m[s.NODE]&&1!==p,E(S=o||(_?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]:u.contexts[s.NODE]),d&&!_?"motionBlur":void 0),g?s.drawCachedNodes(S,w.nondrag,i,f):s.drawLayeredElements(S,w.nondrag,i,f),s.debug&&s.drawDebugPoints(S,w.nondrag),l||d||(n[s.NODE]=!1)),!r&&(n[s.DRAG]||l||m[s.DRAG])&&(_=d&&!m[s.DRAG]&&1!==p,E(S=o||(_?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]:u.contexts[s.DRAG]),d&&!_?"motionBlur":void 0),g?s.drawCachedNodes(S,w.drag,i,f):s.drawCachedElements(S,w.drag,i,f),s.debug&&s.drawDebugPoints(S,w.drag),l||d||(n[s.DRAG]=!1)),this.drawSelectionRectangle(e,E),d&&1!==p&&(r=u.contexts[s.NODE],_=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_NODE],g=u.contexts[s.DRAG],i=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_DRAG],f=mt(function(e,t,r){e.setTransform(1,0,0,1,0,0),r||!y?e.clearRect(0,0,s.canvasWidth,s.canvasHeight):C(e,0,0,s.canvasWidth,s.canvasHeight),r=p,e.drawImage(t,0,0,s.canvasWidth*r,s.canvasHeight*r,0,0,s.canvasWidth,s.canvasHeight)},"drawMotionBlur"),(n[s.NODE]||m[s.NODE])&&(f(r,_,m[s.NODE]),n[s.NODE]=!1),n[s.DRAG]||m[s.DRAG])&&(f(g,i,m[s.DRAG]),n[s.DRAG]=!1),s.prevViewport=k,s.clearingMotionBlur&&(s.clearingMotionBlur=!1,s.motionBlurCleared=!0,s.motionBlur=!0),d&&(s.motionBlurTimeout=setTimeout(function(){s.motionBlurTimeout=null,s.clearedForMotionBlur[s.NODE]=!1,s.clearedForMotionBlur[s.DRAG]=!1,s.motionBlur=!1,s.clearingMotionBlur=!a,s.mbFrames=0,n[s.NODE]=!0,n[s.DRAG]=!0,s.redraw()},100)),o||t.emit("render")},drawSelectionRectangle:function(e,t){var r,i=this,n=i.cy,a=i.data,n=n.style(),s=e.drawOnlyNodeLayer,o=e.drawAllLayers,l=a.canvasNeedsRedraw;(i.showFps||!s&&l[i.SELECT_BOX]&&!o)&&(t(s=e.forcedContext||a.contexts[i.SELECT_BOX]),1==i.selection[4]&&(i.hoverData.selecting||i.touchData.selecting)&&(r=i.cy.zoom(),t=n.core("selection-box-border-width").value/r,s.lineWidth=t,s.fillStyle="rgba("+n.core("selection-box-color").value[0]+","+n.core("selection-box-color").value[1]+","+n.core("selection-box-color").value[2]+","+n.core("selection-box-opacity").value+")",s.fillRect(i.selection[0],i.selection[1],i.selection[2]-i.selection[0],i.selection[3]-i.selection[1]),0<t)&&(s.strokeStyle="rgba("+n.core("selection-box-border-color").value[0]+","+n.core("selection-box-border-color").value[1]+","+n.core("selection-box-border-color").value[2]+","+n.core("selection-box-opacity").value+")",s.strokeRect(i.selection[0],i.selection[1],i.selection[2]-i.selection[0],i.selection[3]-i.selection[1])),a.bgActivePosistion&&!i.hoverData.selecting&&(r=i.cy.zoom(),e=a.bgActivePosistion,s.fillStyle="rgba("+n.core("active-bg-color").value[0]+","+n.core("active-bg-color").value[1]+","+n.core("active-bg-color").value[2]+","+n.core("active-bg-opacity").value+")",s.beginPath(),s.arc(e.x,e.y,n.core("active-bg-size").pfValue/r,0,2*Math.PI),s.fill()),t=i.lastRedrawTime,i.showFps&&t&&(e="1 frame = "+(t=Math.round(t))+" ms = "+(a=Math.round(1e3/t))+" fps",s.setTransform(1,0,0,1,0,0),s.fillStyle="rgba(255, 0, 0, 0.75)",s.strokeStyle="rgba(255, 0, 0, 0.75)",s.font="30px Arial",qce||(n=s.measureText(e),qce=n.actualBoundingBoxAscent),s.fillText(e,0,qce),s.strokeRect(0,qce+10,250,20),s.fillRect(0,qce+10,250*Math.min(a/60,1),20)),o||(l[i.SELECT_BOX]=!1))}},mt(wee,"compileShader"),mt(Cee,"createProgram"),mt(Eee,"createTextureCanvas"),mt(See,"getEffectivePanZoom"),mt(_ee,"getEffectiveZoom"),mt(Aee,"modelToRenderedPosition"),mt(Lee,"isSimpleShape"),mt(Ree,"arrayEqual"),mt(Iee,"toWebGLColor"),mt(Nee,"indexToVec4"),mt(Dee,"vec4ToIndex"),mt(Mee,"createTexture"),mt(Oee,"getTypeInfo"),mt(Bee,"createTypedArray"),mt(Pee,"createTypedArrayView"),mt($ee,"createBufferStaticDraw"),mt(Fee,"createBufferDynamicDraw"),mt(zee,"create3x3MatrixBufferDynamicDraw"),mt(qee,"createPickingFrameBuffer"),Wce=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)}),mt(Wee,"create"),mt(Uee,"identity"),mt(Gee,"multiply"),mt(jee,"translate"),mt(Vee,"rotate"),mt(Yee,"scale"),mt(Hee,"projection"),mt(N,"Atlas"),Uce=ZZ(N,[{key:"lock",value:mt(function(){this.locked=!0},"lock")},{key:"getKeys",value:mt(function(){return new Set(this.keyToLocation.keys())},"getKeys")},{key:"getScale",value:mt(function(e){var t=e.w,e=e.h,r=this.texHeight,i=this.texSize,n=t*(r/=e),a=e*r;return i<n&&(n=t*(r=i/t),a=e*r),{scale:r,texW:n,texH:a}},"getScale")},{key:"draw",value:mt(function(e,i,n){var l=this;if(this.locked)throw new Error("can't draw, atlas is locked");var h=this.texSize,t=this.texRows,c=this.texHeight,a=(r=this.getScale(i)).scale,u=r.texW,d=r.texH,p=mt(function(e,t){var r;n&&t&&(t=t.context,r=e.x,e=c*e.row,t.save(),t.translate(r,e),t.scale(a,a),n(t,i),t.restore())},"drawAt"),g=[null,null],r=mt(function(){p(l.freePointer,l.canvas),g[0]={x:l.freePointer.x,y:l.freePointer.row*c,w:u,h:d},g[1]={x:l.freePointer.x+u,y:l.freePointer.row*c,w:0,h:d},l.freePointer.x+=u,l.freePointer.x==h&&(l.freePointer.x=0,l.freePointer.row++)},"drawNormal"),s=mt(function(){var e=l.scratch,t=l.canvas,r=(e.clear(),p({x:0,row:0},e),h-l.freePointer.x),i=u-r,n=c,a=l.freePointer.x,s=l.freePointer.row*c,o=r;t.context.drawImage(e,0,0,o,n,a,s,o,n),g[0]={x:a,y:s,w:o,h:d},a=(l.freePointer.row+1)*c,s=i,t&&t.context.drawImage(e,r,0,s,n,0,a,s,n),g[1]={x:0,y:a,w:s,h:d},l.freePointer.x=i,l.freePointer.row++},"drawWrapped"),o=mt(function(){l.freePointer.x=0,l.freePointer.row++},"moveToStartOfNextRow");if(this.freePointer.x+u<=h)r();else{if(this.freePointer.row>=t-1)return!1;(this.freePointer.x!==h&&this.enableWrapping?s:(o(),r))()}return this.keyToLocation.set(e,g),this.needsBuffer=!0,g},"draw")},{key:"getOffsets",value:mt(function(e){return this.keyToLocation.get(e)},"getOffsets")},{key:"isEmpty",value:mt(function(){return 0===this.freePointer.x&&0===this.freePointer.row},"isEmpty")},{key:"canFit",value:mt(function(e){var t,r;return!this.locked&&(t=this.texSize,r=this.texRows,e=this.getScale(e).texW,!(this.freePointer.x+e>t)||this.freePointer.row<r-1)},"canFit")},{key:"bufferIfNeeded",value:mt(function(e){this.texture||(this.texture=Mee(e,this.debugID)),this.needsBuffer&&(this.texture.buffer(this.canvas),this.needsBuffer=!1,this.locked)&&(this.canvas=null,this.scratch=null)},"bufferIfNeeded")},{key:"dispose",value:mt(function(){this.texture&&(this.texture.deleteTexture(),this.texture=null),this.canvas=null,this.scratch=null,this.locked=!0},"dispose")}]),mt(I,"AtlasCollection"),Gce=ZZ(I,[{key:"getKeys",value:mt(function(){return new Set(this.styleKeyToAtlas.keys())},"getKeys")},{key:"_createAtlas",value:mt(function(){var e=this.r,t=this.texSize,r=this.texRows,i=this.createTextureCanvas;return new Uce(e,t,r,i)},"_createAtlas")},{key:"_getScratchCanvas",value:mt(function(){var e,t,r,i;return this.scratch||(e=this.r,t=this.texSize,i=this.texRows,r=this.createTextureCanvas,i=Math.floor(t/i),this.scratch=r(e,t,i,"scratch")),this.scratch},"_getScratchCanvas")},{key:"draw",value:mt(function(e,t,r){var i=this.styleKeyToAtlas.get(e);return i||((i=this.atlases[this.atlases.length-1])&&i.canFit(t)||(i&&i.lock(),i=this._createAtlas(),this.atlases.push(i)),i.draw(e,t,r),this.styleKeyToAtlas.set(e,i)),i},"draw")},{key:"getAtlas",value:mt(function(e){return this.styleKeyToAtlas.get(e)},"getAtlas")},{key:"hasAtlas",value:mt(function(e){return this.styleKeyToAtlas.has(e)},"hasAtlas")},{key:"markKeyForGC",value:mt(function(e){this.markedKeys.add(e)},"markKeyForGC")},{key:"gc",value:mt(function(){var h=this,c=this.markedKeys;if(0===c.size)console.log("nothing to garbage collect");else{var u,d=[],p=new Map,g=null,e=QZ(this.atlases);try{var t=mt(function(){var t=u.value,e=t.getKeys(),r=Xee(c,e);if(0===r.size)return d.push(t),e.forEach(function(e){return p.set(e,t)}),1;g||(g=h._createAtlas(),d.push(g));var i,n=QZ(e);try{for(n.s();!(i=n.n()).done;){var a,s,o,l=i.value;r.has(l)||(s=(a=nQ(t.getOffsets(l),2))[0],o=a[1],g.canFit({w:s.w+o.w,h:s.h})||(g.lock(),g=h._createAtlas(),d.push(g)),t.canvas&&(h._copyTextureToNewAtlas(l,t,g),p.set(l,g)))}}catch(e){n.e(e)}finally{n.f()}t.dispose()},"_loop");for(e.s();!(u=e.n()).done;)t()}catch(t){e.e(t)}finally{e.f()}this.atlases=d,this.styleKeyToAtlas=p,this.markedKeys=new Set}},"gc")},{key:"_copyTextureToNewAtlas",value:mt(function(e,t,r){var i,n,a,s=nQ(t.getOffsets(e),2),o=s[0];0===(s=s[1]).w?r.draw(e,o,function(e){e.drawImage(t.canvas,o.x,o.y,o.w,o.h,0,0,o.w,o.h)}):((i=this._getScratchCanvas()).clear(),i.context.drawImage(t.canvas,o.x,o.y,o.w,o.h,0,0,o.w,o.h),i.context.drawImage(t.canvas,s.x,s.y,s.w,s.h,o.w,0,s.w,s.h),n=o.w+s.w,a=o.h,r.draw(e,{w:n,h:a},function(e){e.drawImage(i,0,0,n,a,0,0,n,a)}))},"_copyTextureToNewAtlas")},{key:"getCounts",value:mt(function(){return{keyCount:this.styleKeyToAtlas.size,atlasCount:new Set(this.styleKeyToAtlas.values()).size}},"getCounts")}]),mt(Xee,"intersection"),mt(O,"AtlasManager"),jce=ZZ(O,[{key:"getAtlasSize",value:mt(function(){return this.atlasSize},"getAtlasSize")},{key:"addAtlasCollection",value:mt(function(e,t){var r=(i=this.globalOptions).webglTexSize,t=t.texRows,i=this._cacheScratchCanvas(i.createTextureCanvas),r=new Gce(this.r,r,t,i);this.collections.set(e,r)},"addAtlasCollection")},{key:"addRenderType",value:mt(function(e,t){var r=t.collection;if(!this.collections.has(r))throw new Error("invalid atlas collection name '".concat(r,"'"));r=this.collections.get(r),r=Qte({type:e,atlasCollection:r},t),this.renderTypes.set(e,r)},"addRenderType")},{key:"getRenderTypeOpts",value:mt(function(e){return this.renderTypes.get(e)},"getRenderTypeOpts")},{key:"getAtlasCollection",value:mt(function(e){return this.collections.get(e)},"getAtlasCollection")},{key:"_cacheScratchCanvas",value:mt(function(n){var a=-1,s=-1,o=null;return function(e,t,r,i){return i?o=o&&t==a&&r==s?o:n(e,a=t,s=r):n(e,t,r)}},"_cacheScratchCanvas")},{key:"_key",value:mt(function(e,t){return"".concat(e,"-").concat(t)},"_key")},{key:"invalidate",value:mt(function(e){var t,n=this,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=r.forceRedraw,a=void 0!==i&&i,s=void 0===(i=r.filterEle)?function(){return!0}:i,o=void 0===(i=r.filterType)?function(){return!0}:i,l=!1,h=!1,c=QZ(e);try{for(c.s();!(t=c.n()).done;){var u=t.value;if(s(u)){var d,p=QZ(this.renderTypes.values());try{var g=mt(function(){var t,e,r=d.value,i=r.type;o(i)&&(t=n.collections.get(r.collection),e=r.getKey(u),e=Array.isArray(e)?e:[e],a?(e.forEach(function(e){return t.markKeyForGC(e)}),h=!0):(r=r.getID?r.getID(u):u.id(),i=n._key(i,r),void 0===(r=n.typeAndIdToKey.get(i))||Ree(e,r)||(l=!0,n.typeAndIdToKey.delete(i),r.forEach(function(e){return t.markKeyForGC(e)}))))},"_loop2");for(p.s();!(d=p.n()).done;)g()}catch(e){p.e(e)}finally{p.f()}}}}catch(e){c.e(e)}finally{c.f()}return h&&(this.gc(),l=!1),l},"invalidate")},{key:"gc",value:mt(function(){var e,t=QZ(this.collections.values());try{for(t.s();!(e=t.n()).done;)e.value.gc()}catch(e){t.e(e)}finally{t.f()}},"gc")},{key:"getOrCreateAtlas",value:mt(function(t,e,r,i){var n,a=this.renderTypes.get(e),s=this.collections.get(a.collection),o=!1,s=s.draw(i,r,function(e){a.drawClipped?(e.save(),e.beginPath(),e.rect(0,0,r.w,r.h),e.clip(),a.drawElement(e,t,r,!0,!0),e.restore()):a.drawElement(e,t,r,!0,!0),o=!0});return o&&(n=a.getID?a.getID(t):t.id(),e=this._key(e,n),this.typeAndIdToKey.has(e)?this.typeAndIdToKey.get(e).push(i):this.typeAndIdToKey.set(e,[i])),s},"getOrCreateAtlas")},{key:"getAtlasInfo",value:mt(function(n,a){var s=this,o=this.renderTypes.get(a),e=o.getKey(n);return(Array.isArray(e)?e:[e]).map(function(e){var t=o.getBoundingBox(n,e),r=s.getOrCreateAtlas(n,a,t,e),i=(e=nQ(r.getOffsets(e),2))[0];return{atlas:r,tex:i,tex1:i,tex2:e[1],bb:t}})},"getAtlasInfo")},{key:"getDebugInfo",value:mt(function(){var e,t=[],r=QZ(this.collections);try{for(r.s();!(e=r.n()).done;){var i=nQ(e.value,2),n=i[0],a=i[1].getCounts(),s=a.keyCount;t.push({type:n,keyCount:s,atlasCount:a.atlasCount})}}catch(e){r.e(e)}finally{r.f()}return t},"getDebugInfo")}]),mt(M,"AtlasBatchManager"),Vce=ZZ(M,[{key:"getMaxAtlasesPerBatch",value:mt(function(){return this.maxAtlasesPerBatch},"getMaxAtlasesPerBatch")},{key:"getAtlasSize",value:mt(function(){return this.atlasSize},"getAtlasSize")},{key:"getIndexArray",value:mt(function(){return Array.from({length:this.maxAtlasesPerBatch},function(e,t){return t})},"getIndexArray")},{key:"startBatch",value:mt(function(){this.batchAtlases=[]},"startBatch")},{key:"getAtlasCount",value:mt(function(){return this.batchAtlases.length},"getAtlasCount")},{key:"getAtlases",value:mt(function(){return this.batchAtlases},"getAtlases")},{key:"canAddToCurrentBatch",value:mt(function(e){return this.batchAtlases.length!==this.maxAtlasesPerBatch||this.batchAtlases.includes(e)},"canAddToCurrentBatch")},{key:"getAtlasIndexForBatch",value:mt(function(e){var t=this.batchAtlases.indexOf(e);if(t<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(e),t=this.batchAtlases.length-1}return t},"getAtlasIndexForBatch")}]),Yce={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},Hce={IGNORE:1,USE_BB:2},mt(D,"ElementDrawingWebGL"),Xce=ZZ(D,[{key:"addAtlasCollection",value:mt(function(e,t){this.atlasManager.addAtlasCollection(e,t)},"addAtlasCollection")},{key:"addTextureAtlasRenderType",value:mt(function(e,t){this.atlasManager.addRenderType(e,t)},"addTextureAtlasRenderType")},{key:"addSimpleShapeRenderType",value:mt(function(e,t){this.simpleShapeOptions.set(e,t)},"addSimpleShapeRenderType")},{key:"invalidate",value:mt(function(e){var t=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).type,r=this.atlasManager;return t?r.invalidate(e,{filterType:mt(function(e){return e===t},"filterType"),forceRedraw:!0}):r.invalidate(e)},"invalidate")},{key:"gc",value:mt(function(){this.atlasManager.gc()},"gc")},{key:"_createShaderProgram",value:mt(function(e){var t=this.gl,r=`#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(0,`) {
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(4," || aVertType == ").concat(7,`
|| aVertType == `).concat(5," || aVertType == ").concat(6,`) { // 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(1,`) {
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(2,`) {
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(3,` && vid < 3) {
// massage the first triangle into an edge arrow
if(vid == 0)
position = vec2(-0.15, -0.3);
if(vid == 1)
position = vec2( 0.0, 0.0);
if(vid == 2)
position = vec2( 0.15, -0.3);
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
vColor = aColor;
}
else {
gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space
}
vAtlasId = aAtlasId;
vVertType = aVertType;
vIndex = aIndex;
}
`),i=this.batchManager.getIndexArray(),n=Cee(t,r,`#version 300 es
precision highp float;
// declare texture unit for each texture atlas in the batch
`.concat(i.map(function(e){return"uniform sampler2D uTexture".concat(e,";")}).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(`
float circleSD(vec2 p, float r) {
return distance(vec2(0), p) - r; // signed distance
}
`,`
`).concat(`
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);
}
`,`
`).concat(`
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;
}
`,`
`).concat(`
float ellipseSD(vec2 p, vec2 ab) {
p = abs( p ); // symmetry
// find root with Newton solver
vec2 q = ab*(p-ab);
float w = (q.x<q.y)? 1.570796327 : 0.0;
for( int i=0; i<5; i++ ) {
vec2 cs = vec2(cos(w),sin(w));
vec2 u = ab*vec2( cs.x,cs.y);
vec2 v = ab*vec2(-cs.y,cs.x);
w = w + dot(p-u,v)/(dot(p-u,u)+dot(v,v));
}
// compute final point and distance
float d = length(p-ab*vec2(cos(w),sin(w)));
// return signed distance
return (dot(p/ab,p/ab)>1.0) ? d : -d;
}
`,`
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(0,`) {
// look up the texel from the texture unit
`).concat(i.map(function(e){return"if(vAtlasId == ".concat(e,") outColor = texture(uTexture").concat(e,", vTexCoord);")}).join(`
else `),`
}
else if(vVertType == `).concat(3,`) {
// 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(4,` && 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(4," || vVertType == ").concat(7,`
|| vVertType == `).concat(5," || vVertType == ").concat(6,`) { // 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(4,`) {
d = rectangleSD(p, b);
} else if(vVertType == `).concat(7,` && w == h) {
d = circleSD(p, b.x); // faster than ellipse
} else if(vVertType == `).concat(7,`) {
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(e.picking?`if(outColor.a == 0.0) discard;
else outColor = vIndex;`:"",`
}
`));n.aPosition=t.getAttribLocation(n,"aPosition"),n.aIndex=t.getAttribLocation(n,"aIndex"),n.aVertType=t.getAttribLocation(n,"aVertType"),n.aTransform=t.getAttribLocation(n,"aTransform"),n.aAtlasId=t.getAttribLocation(n,"aAtlasId"),n.aTex=t.getAttribLocation(n,"aTex"),n.aPointAPointB=t.getAttribLocation(n,"aPointAPointB"),n.aPointCPointD=t.getAttribLocation(n,"aPointCPointD"),n.aLineWidth=t.getAttribLocation(n,"aLineWidth"),n.aColor=t.getAttribLocation(n,"aColor"),n.aCornerRadius=t.getAttribLocation(n,"aCornerRadius"),n.aBorderColor=t.getAttribLocation(n,"aBorderColor"),n.uPanZoomMatrix=t.getUniformLocation(n,"uPanZoomMatrix"),n.uAtlasSize=t.getUniformLocation(n,"uAtlasSize"),n.uBGColor=t.getUniformLocation(n,"uBGColor"),n.uZoom=t.getUniformLocation(n,"uZoom"),n.uTextures=[];for(var a=0;a<this.batchManager.getMaxAtlasesPerBatch();a++)n.uTextures.push(t.getUniformLocation(n,"uTexture".concat(a)));return n},"_createShaderProgram")},{key:"_createVAO",value:mt(function(){var e=[0,0,1,0,1,1,0,0,1,1,0,1],t=(this.vertexCount=e.length/2,this.maxInstances),r=this.gl,i=this.program,n=r.createVertexArray();return r.bindVertexArray(n),$ee(r,"vec2",i.aPosition,e),this.transformBuffer=zee(r,t,i.aTransform),this.indexBuffer=Fee(r,t,"vec4",i.aIndex),this.vertTypeBuffer=Fee(r,t,"int",i.aVertType),this.atlasIdBuffer=Fee(r,t,"int",i.aAtlasId),this.texBuffer=Fee(r,t,"vec4",i.aTex),this.pointAPointBBuffer=Fee(r,t,"vec4",i.aPointAPointB),this.pointCPointDBuffer=Fee(r,t,"vec4",i.aPointCPointD),this.lineWidthBuffer=Fee(r,t,"vec2",i.aLineWidth),this.colorBuffer=Fee(r,t,"vec4",i.aColor),this.cornerRadiusBuffer=Fee(r,t,"vec4",i.aCornerRadius),this.borderColorBuffer=Fee(r,t,"vec4",i.aBorderColor),r.bindVertexArray(null),n},"_createVAO")},{key:"buffers",get:mt(function(){var t=this;return this._buffers||(this._buffers=Object.keys(this).filter(function(e){return Hte(e,"Buffer")}).map(function(e){return t[e]})),this._buffers},"get")},{key:"startFrame",value:mt(function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Yce.SCREEN;this.panZoomMatrix=e,this.renderTarget=t,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()},"startFrame")},{key:"startBatch",value:mt(function(){this.instanceCount=0,this.batchManager.startBatch()},"startBatch")},{key:"endFrame",value:mt(function(){this.endBatch()},"endFrame")},{key:"_isVisible",value:mt(function(e,t){return!!e.visible()&&(!t||!t.isVisible||t.isVisible(e))},"_isVisible")},{key:"drawTexture",value:mt(function(e,t,r){var i=this.atlasManager,n=this.batchManager,a=i.getRenderTypeOpts(r);if(this._isVisible(e,a)&&(!e.isEdge()||this._isValidEdge(e))){if(this.renderTarget.picking&&a.getTexPickingMode){var s=a.getTexPickingMode(e);if(s===Hce.IGNORE)return;if(s==Hce.USE_BB)return void this.drawPickingRectangle(e,t,r)}var o,l=QZ(i.getAtlasInfo(e,r));try{for(l.s();!(o=l.n()).done;){var h=o.value,c=h.atlas,u=h.tex1,d=h.tex2;n.canAddToCurrentBatch(c)||this.endBatch();for(var p=n.getAtlasIndexForBatch(c),g=0,f=[[u,!0],[d,!1]];g<f.length;g++){var m,y,v,x=nQ(f[g],2),b=x[0],T=x[1];0!=b.w&&(m=this.instanceCount,this.vertTypeBuffer.getView(m)[0]=0,Nee(t,this.indexBuffer.getView(m)),this.atlasIdBuffer.getView(m)[0]=p,(y=this.texBuffer.getView(m))[0]=b.x,y[1]=b.y,y[2]=b.w,y[3]=b.h,v=this.transformBuffer.getMatrixView(m),this.setTransformMatrix(e,v,a,h,T),this.instanceCount++,T||this.wrappedCount++,this.instanceCount>=this.maxInstances)&&this.endBatch()}}}catch(e){l.e(e)}finally{l.f()}}},"drawTexture")},{key:"setTransformMatrix",value:mt(function(e,t,r,i){var n,a,s=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],o=0;r.shapeProps&&r.shapeProps.padding&&(o=e.pstyle(r.shapeProps.padding).pfValue),i?(a=i.bb,n=(n=i.tex1).w/(n.w+i.tex2.w),i=this._getAdjustedBB(a,o,s,s?n:1-n),this._applyTransformMatrix(t,i,r,e)):(a=r.getBoundingBox(e),s=this._getAdjustedBB(a,o,!0,1),this._applyTransformMatrix(t,s,r,e))},"setTransformMatrix")},{key:"_applyTransformMatrix",value:mt(function(e,t,r,i){Uee(e);var n,a,s=0!==(s=r.getRotation?r.getRotation(i):0)?(jee(e,e,[(n=r.getRotationPoint(i)).x,n.y]),Vee(e,e,s),a=(n=r.getRotationOffset(i)).x+(t.xOffset||0),n.y+(t.yOffset||0)):(a=t.x1,t.y1);jee(e,e,[a,s]),Yee(e,e,[t.w,t.h])},"_applyTransformMatrix")},{key:"_getAdjustedBB",value:mt(function(e,t,r,i){var n=e.x1,a=e.y1,s=e.w,o=e.h,t=(t&&(n-=t,a-=t,s+=2*t,o+=2*t),0),l=s*i;return r&&i<1?s=l:!r&&i<1&&(n+=t=s-l,s=l),{x1:n,y1:a,w:s,h:o,xOffset:t,yOffset:e.yOffset}},"_getAdjustedBB")},{key:"drawPickingRectangle",value:mt(function(e,t,r){var r=this.atlasManager.getRenderTypeOpts(r),i=this.instanceCount;this.vertTypeBuffer.getView(i)[0]=4,Nee(t,this.indexBuffer.getView(i)),Iee([0,0,0],1,this.colorBuffer.getView(i)),t=this.transformBuffer.getMatrixView(i),this.setTransformMatrix(e,t,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()},"drawPickingRectangle")},{key:"drawNode",value:mt(function(e,t,r){var i,n,a,s,o=this.simpleShapeOptions.get(r);this._isVisible(e,o)&&(s=o.shapeProps,void 0===(n=this._getVertTypeForShape(e,s.shape))||o.isSimple&&!o.isSimple(e)?this.drawTexture(e,t,r):(r=this.instanceCount,5!==(this.vertTypeBuffer.getView(r)[0]=n)&&6!==n||(i=o.getBoundingBox(e),i=this._getCornerRadius(e,s.radius,i),(a=this.cornerRadiusBuffer.getView(r))[0]=i,a[1]=i,a[2]=i,a[3]=i,6===n&&(a[0]=0,a[2]=0)),Nee(t,this.indexBuffer.getView(r)),Iee(e.pstyle(s.color).value,e.pstyle(s.opacity).value,this.colorBuffer.getView(r)),(i=this.lineWidthBuffer.getView(r))[0]=0,i[1]=0,s.border&&0<(n=e.pstyle("border-width").value)&&(Iee(e.pstyle("border-color").value,e.pstyle("border-opacity").value,this.borderColorBuffer.getView(r)),"inside"===(a=e.pstyle("border-position").value)?(i[0]=0,i[1]=-n):"outside"===a?(i[0]=n,i[1]=0):(i[0]=t=n/2,i[1]=-t)),s=this.transformBuffer.getMatrixView(r),this.setTransformMatrix(e,s,o),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()))},"drawNode")},{key:"_getVertTypeForShape",value:mt(function(e,t){switch(e.pstyle(t).value){case"rectangle":return 4;case"ellipse":return 7;case"roundrectangle":case"round-rectangle":return 5;case"bottom-round-rectangle":return 6;default:return}},"_getVertTypeForShape")},{key:"_getCornerRadius",value:mt(function(e,t,r){var i=r.w,r=r.h;return"auto"===e.pstyle(t).value?Fne(i,r):(e=e.pstyle(t).pfValue,Math.min(e,r/2,i/2))},"_getCornerRadius")},{key:"drawEdgeArrow",value:mt(function(e,t,r){var i,n,a,s,o,l;e.visible()&&(l=e._private.rscratch,l="source"===r?(i=l.arrowStartX,n=l.arrowStartY,l.srcArrowAngle):(i=l.arrowEndX,n=l.arrowEndY,l.tgtArrowAngle),isNaN(i)||null==i||isNaN(n)||null==n||isNaN(l)||null==l||"none"!==e.pstyle(r+"-arrow-shape").value&&(r=e.pstyle(r+"-arrow-color").value,a=e.pstyle("opacity").value*e.pstyle("line-opacity").value,s=e.pstyle("width").pfValue,e=e.pstyle("arrow-scale").value,s=this.r.getArrowWidth(s,e),e=this.instanceCount,Uee(o=this.transformBuffer.getMatrixView(e)),jee(o,o,[i,n]),Yee(o,o,[s,s]),Vee(o,o,l),this.vertTypeBuffer.getView(e)[0]=3,Nee(t,this.indexBuffer.getView(e)),Iee(r,a,this.colorBuffer.getView(e)),this.instanceCount++,this.instanceCount>=this.maxInstances)&&this.endBatch())},"drawEdgeArrow")},{key:"drawEdgeLine",value:mt(function(e,t){if(e.visible()){var r=this._getEdgePoints(e);if(r){var i=e.pstyle("opacity").value,n=e.pstyle("line-opacity").value,a=e.pstyle("width").pfValue,s=e.pstyle("line-color").value,o=i*n;if(r.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),4==r.length)e=this.instanceCount,this.vertTypeBuffer.getView(e)[0]=1,Nee(t,this.indexBuffer.getView(e)),Iee(s,o,this.colorBuffer.getView(e)),this.lineWidthBuffer.getView(e)[0]=a,(i=this.pointAPointBBuffer.getView(e))[0]=r[0],i[1]=r[1],i[2]=r[2],i[3]=r[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch();else for(var l=0;l<r.length-2;l+=2){var h=this.instanceCount,c=(this.vertTypeBuffer.getView(h)[0]=2,Nee(t,this.indexBuffer.getView(h)),Iee(s,o,this.colorBuffer.getView(h)),this.lineWidthBuffer.getView(h)[0]=a,r[l-2]),u=r[l-1],d=r[l],p=r[l+1],g=r[l+2],f=r[l+3],m=r[l+4],y=r[l+5],v=(0==l&&(c=2*d-g+.001,u=2*p-f+.001),l==r.length-4&&(m=2*g-d+.001,y=2*f-p+.001),this.pointAPointBBuffer.getView(h));v[0]=c,v[1]=u,v[2]=d,v[3]=p,(c=this.pointCPointDBuffer.getView(h))[0]=g,c[1]=f,c[2]=m,c[3]=y,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},"drawEdgeLine")},{key:"_isValidEdge",value:mt(function(e){return!((e=e._private.rscratch).badLine||null==e.allpts||isNaN(e.allpts[0]))},"_isValidEdge")},{key:"_getEdgePoints",value:mt(function(e){var t=e._private.rscratch;if(this._isValidEdge(e))return 4==(t=t.allpts).length?t:(e=this._getNumSegments(e),this._getCurveSegmentPoints(t,e))},"_getEdgePoints")},{key:"_getNumSegments",value:mt(function(e){return Math.min(Math.max(15,5),this.maxInstances)},"_getNumSegments")},{key:"_getCurveSegmentPoints",value:mt(function(e,t){if(4==e.length)return e;for(var r=Array(2*(t+1)),i=0;i<=t;i++)0==i?(r[0]=e[0],r[1]=e[1]):i==t?(r[2*i]=e[e.length-2],r[2*i+1]=e[e.length-1]):this._setCurvePoint(e,i/t,r,2*i);return r},"_getCurveSegmentPoints")},{key:"_setCurvePoint",value:mt(function(e,t,r,i){if(!(e.length<=2)){for(var n=Array(e.length-2),a=0;a<n.length;a+=2){var s=(1-t)*e[a]+t*e[a+2],o=(1-t)*e[a+1]+t*e[a+3];n[a]=s,n[a+1]=o}return this._setCurvePoint(n,t,r,i)}r[i]=e[0],r[i+1]=e[1]},"_setCurvePoint")},{key:"endBatch",value:mt(function(){var e=this.gl,t=this.vao,r=this.vertexCount,i=this.instanceCount;if(0!==i){var n,a=this.renderTarget.picking?this.pickingProgram:this.program,s=(e.useProgram(a),e.bindVertexArray(t),QZ(this.buffers));try{for(s.s();!(n=s.n()).done;)n.value.bufferSubData(i)}catch(e){s.e(e)}finally{s.f()}for(var o=this.batchManager.getAtlases(),l=0;l<o.length;l++)o[l].bufferIfNeeded(e);for(var h=0;h<o.length;h++)e.activeTexture(e.TEXTURE0+h),e.bindTexture(e.TEXTURE_2D,o[h].texture),e.uniform1i(a.uTextures[h],h);e.uniform1f(a.uZoom,_ee(this.r)),e.uniformMatrix3fv(a.uPanZoomMatrix,!1,this.panZoomMatrix),e.uniform1i(a.uAtlasSize,this.batchManager.getAtlasSize()),t=Iee(this.bgColor,1),e.uniform4fv(a.uBGColor,t),e.drawArraysInstanced(e.TRIANGLES,0,r,i),e.bindVertexArray(null),e.bindTexture(e.TEXTURE_2D,null),this.debug&&this.batchDebugInfo.push({count:i,atlasCount:o.length}),this.startBatch()}},"endBatch")},{key:"getDebugInfo",value:mt(function(){var e=this.atlasManager.getDebugInfo(),t=e.reduce(function(e,t){return e+t.atlasCount},0),r=this.batchDebugInfo,i=r.reduce(function(e,t){return e+t.count},0);return{atlasInfo:e,totalAtlases:t,wrappedCount:this.wrappedCount,simpleCount:this.simpleCount,batchCount:r.length,batchInfo:r,totalInstances:i}},"getDebugInfo")}]),Kce={initWebgl:function(e,t){var i=this,r=i.data.contexts[i.WEBGL],r=(e.bgColor=Kee(i),e.webglTexSize=Math.min(e.webglTexSize,r.getParameter(r.MAX_TEXTURE_SIZE)),e.webglTexRows=Math.min(e.webglTexRows,54),e.webglTexRowsNodes=Math.min(e.webglTexRowsNodes,54),e.webglBatchSize=Math.min(e.webglBatchSize,16384),e.webglTexPerBatch=Math.min(e.webglTexPerBatch,r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS)),i.webglDebug=e.webglDebug,i.webglDebugShowAtlases=e.webglDebugShowAtlases,i.pickingFrameBuffer=qee(r),i.pickingFrameBuffer.needsDraw=!0,i.drawing=new Xce(i,r,e),mt(function(t){return function(e){return i.getTextAngle(e,t)}},"getLabelRotation")),n=mt(function(t){return function(e){return(e=e.pstyle(t))&&e.value}},"isLabelVisible"),a=mt(function(t){return function(e){return 0<e.pstyle("".concat(t,"-opacity")).value}},"isLayerVisible"),s=mt(function(e){return"yes"===e.pstyle("text-events").strValue?Hce.USE_BB:Hce.IGNORE},"getTexPickingMode"),o=mt(function(e){var t=(r=e.position()).x,r=r.y,i=e.outerWidth();return{w:i,h:e=e.outerHeight(),x1:t-i/2,y1:r-e/2}},"getBBForSimpleShape"),l=(i.drawing.addAtlasCollection("node",{texRows:e.webglTexRowsNodes}),i.drawing.addAtlasCollection("label",{texRows:e.webglTexRows}),i.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:t.getStyleKey,getBoundingBox:t.getElementBox,drawElement:t.drawElement}),i.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:o,isSimple:Lee,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),i.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:o,isVisible:a("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),i.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:o,isVisible:a("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),i.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:s,getKey:Zce(t.getLabelKey,null),getBoundingBox:Qce(t.getLabelBox,null),drawClipped:!0,drawElement:t.drawLabel,getRotation:r(null),getRotationPoint:t.getLabelRotationPoint,getRotationOffset:t.getLabelRotationOffset,isVisible:n("label")}),i.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:s,getKey:Zce(t.getSourceLabelKey,"source"),getBoundingBox:Qce(t.getSourceLabelBox,"source"),drawClipped:!0,drawElement:t.drawSourceLabel,getRotation:r("source"),getRotationPoint:t.getSourceLabelRotationPoint,getRotationOffset:t.getSourceLabelRotationOffset,isVisible:n("source-label")}),i.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:s,getKey:Zce(t.getTargetLabelKey,"target"),getBoundingBox:Qce(t.getTargetLabelBox,"target"),drawClipped:!0,drawElement:t.drawTargetLabel,getRotation:r("target"),getRotationPoint:t.getTargetLabelRotationPoint,getRotationOffset:t.getTargetLabelRotationOffset,isVisible:n("target-label")}),Bre(function(){console.log("garbage collect flag set"),i.data.gc=!0},1e4));i.onUpdateEleCalcs(function(e,t){var r=!1;t&&0<t.length&&(r|=i.drawing.invalidate(t)),r&&l()}),Qee(i)}},mt(Kee,"getBGColor"),mt(Zee,"getLabelLines"),Zce=mt(function(t,i){return function(e){var r=t(e);return 1<(e=Zee(e,i)).length?e.map(function(e,t){return"".concat(r,"_").concat(t)}):r}},"getStyleKeysForLabel"),Qce=mt(function(n,a){return function(e,t){var r=n(e);if("string"==typeof t){var i=t.indexOf("_");if(0<i)return t=Number(t.substring(i+1)),i=Zee(e,a),e=r.h/i.length,t=r.y1+(i=e*t),{x1:r.x1,w:r.w,y1:t,h:e,yOffset:i}}return r}},"getBoundingBoxForLabel"),mt(Qee,"overrideCanvasRendererFunctions"),mt(Jee,"clearWebgl"),mt(ete,"clearCanvas"),mt(tte,"createPanZoomMatrix"),mt(rte,"setContextTransform"),mt(ite,"drawSelectionRectangle"),mt(nte,"drawAxes"),mt(ate,"drawAtlases"),mt(ste,"getPickingIndexes"),mt(ote,"findNearestElementsWebgl"),mt(lte,"drawEle"),mt(hte,"renderWebgl"),Jce={drawPolygonPath:function(e,t,r,i,n,a){var s=i/2,o=n/2;e.beginPath&&e.beginPath(),e.moveTo(t+s*a[0],r+o*a[1]);for(var l=1;l<a.length/2;l++)e.lineTo(t+s*a[2*l],r+o*a[2*l+1]);e.closePath()},drawRoundPolygonPath:function(t,e,r,i,n,a,s){s.forEach(function(e){return dee(t,e)}),t.closePath()},drawRoundRectanglePath:function(e,t,r,i,n,a){var s=i/2,o=n/2,i="auto"===a?Fne(i,n):Math.min(a,o,s);e.beginPath&&e.beginPath(),e.moveTo(t,r-o),e.arcTo(t+s,r-o,t+s,r,i),e.arcTo(t+s,r+o,t,r+o,i),e.arcTo(t-s,r+o,t-s,r,i),e.arcTo(t-s,r-o,t,r-o,i),e.lineTo(t,r-o),e.closePath()},drawBottomRoundRectanglePath:function(e,t,r,i,n,a){var s=i/2,o=n/2,i="auto"===a?Fne(i,n):a;e.beginPath&&e.beginPath(),e.moveTo(t,r-o),e.lineTo(t+s,r-o),e.lineTo(t+s,r),e.arcTo(t+s,r+o,t,r+o,i),e.arcTo(t-s,r+o,t-s,r,i),e.lineTo(t-s,r-o),e.lineTo(t,r-o),e.closePath()},drawCutRectanglePath:function(e,t,r,i,n,a,s){i/=2,n/=2,s="auto"===s?qne():s,e.beginPath&&e.beginPath(),e.moveTo(t-i+s,r-n),e.lineTo(t+i-s,r-n),e.lineTo(t+i,r-n+s),e.lineTo(t+i,r+n-s),e.lineTo(t+i-s,r+n),e.lineTo(t-i+s,r+n),e.lineTo(t-i,r+n-s),e.lineTo(t-i,r-n+s),e.closePath()},drawBarrelPath:function(e,t,r,i,n){var a=t-(s=i/2),t=t+s,s=r-(o=n/2),r=r+o,i=(o=Une(i,n)).widthOffset,n=o.heightOffset,o=o.ctrlPtOffsetPct*i;e.beginPath&&e.beginPath(),e.moveTo(a,s+n),e.lineTo(a,r-n),e.quadraticCurveTo(a+o,r,a+i,r),e.lineTo(t-i,r),e.quadraticCurveTo(t-o,r,t,r-n),e.lineTo(t,s+n),e.quadraticCurveTo(t-o,s,t-i,s),e.lineTo(a+i,s),e.quadraticCurveTo(a+o,s,a,s+n),e.closePath()}},eue=Math.sin(0),tue=Math.cos(0),rue={},iue={},nue=Math.PI/40,aue=0*Math.PI;aue<2*Math.PI;aue+=nue)rue[aue]=Math.sin(aue),iue[aue]=Math.cos(aue);Jce.drawEllipsePath=function(e,t,r,i,n){if(e.beginPath&&e.beginPath(),e.ellipse)e.ellipse(t,r,i/2,n/2,0,0,2*Math.PI);else for(var a,s,o=i/2,l=n/2,h=0*Math.PI;h<2*Math.PI;h+=nue)a=t-o*rue[h]*eue+o*iue[h]*tue,s=r+l*iue[h]*eue+l*rue[h]*tue,0===h?e.moveTo(a,s):e.lineTo(a,s);e.closePath()},sue={createBuffer:function(e,t){var r=document.createElement("canvas");return r.width=e,r.height=t,[r,r.getContext("2d")]},bufferCanvasImage:function(e){var t=this.cy,r=t.mutableElements().boundingBox(),i=this.findContainerClientCoords(),n=e.full?Math.ceil(r.w):i[2],i=e.full?Math.ceil(r.h):i[3],a=ce(e.maxWidth)||ce(e.maxHeight),s=this.getPixelRatio(),o=1,l=(void 0!==e.scale?(n*=e.scale,i*=e.scale,o=e.scale):a&&(h=l=1/0,ce(e.maxWidth)&&(l=o*e.maxWidth/n),ce(e.maxHeight)&&(h=o*e.maxHeight/i),n*=o=Math.min(l,h),i*=o),a||(n*=s,i*=s,o*=s),document.createElement("canvas")),h=(l.width=n,l.height=i,l.style.width=n+"px",l.style.height=i+"px",l.getContext("2d"));return 0<n&&0<i&&(h.clearRect(0,0,n,i),h.globalCompositeOperation="source-over",a=this.getCachedZSortedEles(),e.full?(h.translate(-r.x1*o,-r.y1*o),h.scale(o,o),this.drawElements(h,a),h.scale(1/o,1/o),h.translate(r.x1*o,r.y1*o)):(r={x:(s=t.pan()).x*o,y:s.y*o},o*=t.zoom(),h.translate(r.x,r.y),h.scale(o,o),this.drawElements(h,a),h.scale(1/o,1/o),h.translate(-r.x,-r.y)),e.bg)&&(h.globalCompositeOperation="destination-over",h.fillStyle=e.bg,h.rect(0,0,n,i),h.fill()),l}},mt(cte,"b64ToBlob"),mt(ute,"b64UriToB64"),mt(dte,"output"),sue.png=function(e){return dte(e,this.bufferCanvasImage(e),"image/png")},sue.jpg=function(e){return dte(e,this.bufferCanvasImage(e),"image/jpeg")},oue={nodeShapeImpl:function(e,t,r,i,n,a,s,o){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,o);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(t,r,i,n,a,o);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(t,r,i,n,a,s,o);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(t,r,i,n,a,o);case"barrel":return this.drawBarrelPath(t,r,i,n,a)}}},(hue=(lue=pte).prototype).CANVAS_LAYERS=3,hue.SELECT_BOX=0,hue.DRAG=1,hue.NODE=2,hue.WEBGL=3,hue.CANVAS_TYPES=["2d","2d","2d","webgl2"],hue.BUFFER_COUNT=3,hue.TEXTURE_BUFFER=0,hue.MOTIONBLUR_BUFFER_NODE=1,hue.MOTIONBLUR_BUFFER_DRAG=2,mt(pte,"CanvasRenderer"),hue.redrawHint=function(e,t){switch(e){case"eles":this.data.canvasNeedsRedraw[hue.NODE]=t;break;case"drag":this.data.canvasNeedsRedraw[hue.DRAG]=t;break;case"select":this.data.canvasNeedsRedraw[hue.SELECT_BOX]=t;break;case"gc":this.data.gc=!0}},cue=typeof Path2D<"u",hue.path2dEnabled=function(e){if(void 0===e)return this.pathsEnabled;this.pathsEnabled=!!e},hue.usePaths=function(){return cue&&this.pathsEnabled},hue.setImgSmoothing=function(e,t){null!=e.imageSmoothingEnabled?e.imageSmoothingEnabled=t:(e.webkitImageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t)},hue.getImgSmoothing=function(e){return null!=e.imageSmoothingEnabled?e.imageSmoothingEnabled:e.webkitImageSmoothingEnabled||e.mozImageSmoothingEnabled||e.msImageSmoothingEnabled},hue.makeOffscreenCanvas=function(e,t){var r;return"undefined"!==("u"<typeof OffscreenCanvas?"undefined":lQ(OffscreenCanvas))?r=new OffscreenCanvas(e,t):((r=this.cy.window().document.createElement("canvas")).width=e,r.height=t),r},[Ece,_ce,Mce,Bce,Pce,$ce,zce,Kce,Jce,sue,oue].forEach(function(e){Qte(hue,e)}),uue=[{type:"layout",extensions:Uhe},{type:"renderer",extensions:[{name:"null",impl:uee},{name:"base",impl:mce},{name:"canvas",impl:lue}]}],due={},pue={},mt(gte,"setExtension"),mt(fte,"getExtension"),mt(mte,"setModule"),mt(yte,"getModule"),gue=mt(function(){return 2===arguments.length?fte.apply(null,arguments):3===arguments.length?gte.apply(null,arguments):4===arguments.length?yte.apply(null,arguments):5===arguments.length?mte.apply(null,arguments):void oie("Invalid extension access syntax")},"extension"),che.prototype.extension=gue,uue.forEach(function(t){t.extensions.forEach(function(e){gte(t.type,e.name,e.impl)})}),fue=mt(function(){if(!(this instanceof fue))return new fue;this.length=0},"Stylesheet"),(mue=fue.prototype).instanceString=function(){return"stylesheet"},mue.selector=function(e){var t=this.length++;return this[t]={selector:e,properties:[]},this},mue.css=function(e,t){var r=this.length-1;if(Ete(e))this[r].properties.push({name:e,value:t});else if(Ate(e))for(var i=e,n=Object.keys(i),a=0;a<n.length;a++){var s=n[a],o=i[s];null!=o&&null!=(s=lhe.properties[s]||lhe.properties[jte(s)])&&(s=s.name,this[r].properties.push({name:s,value:o}))}return this},mue.style=mue.css,mue.generateStyle=function(e){return e=new lhe(e),this.appendToStyle(e)},mue.appendToStyle=function(e){for(var t=0;t<this.length;t++){var r=this[t],i=r.selector,n=r.properties;e.selector(i);for(var a=0;a<n.length;a++){var s=n[a];e.css(s.name,s.value)}}return e},(yue=mt(function(e){return Ate(e=void 0===e?{}:e)?new che(e):Ete(e)?gue.apply(gue,arguments):void 0},"cytoscape")).use=function(e){var t=Array.prototype.slice.call(arguments,1);return t.unshift(yue),e.apply(null,t),this},yue.warnings=function(e){return lie(e)},yue.version="3.33.1",yue.stylesheet=yue.Stylesheet=fue}),xue=tYe((r,i)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof r?r.layoutBase=t():e.layoutBase=t()},"webpackUniversalModuleDefinition")(r,function(){return r=[function(e,t,r){function i(){}mt(i,"LayoutConstants"),i.QUALITY=1,i.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,i.DEFAULT_INCREMENTAL=!1,i.DEFAULT_ANIMATION_ON_LAYOUT=!0,i.DEFAULT_ANIMATION_DURING_LAYOUT=!1,i.DEFAULT_ANIMATION_PERIOD=50,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,i.DEFAULT_GRAPH_MARGIN=15,i.NODE_DIMENSIONS_INCLUDE_LABELS=!1,i.SIMPLE_NODE_HALF_SIZE=(i.SIMPLE_NODE_SIZE=40)/2,i.EMPTY_COMPOUND_NODE_SIZE=40,i.MIN_EDGE_LENGTH=1,i.INITIAL_WORLD_BOUNDARY=(i.WORLD_BOUNDARY=1e6)/1e3,i.WORLD_CENTER_X=1200,i.WORLD_CENTER_Y=900,e.exports=i},function(e,t,r){var i,n=r(2),a=r(8),s=r(9);function o(e,t,r){n.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=e,this.target=t}for(i in mt(o,"LEdge"),o.prototype=Object.create(n.prototype),n)o[i]=n[i];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(e,t){for(var r=this.getOtherEnd(e),i=t.getGraphManager().getRoot();;){if(r.getOwner()==t)return r;if(r.getOwner()==i)break;r=r.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o},function(e,t,r){function i(e){this.vGraphObject=e}mt(i,"LGraphObject"),e.exports=i},function(e,t,r){var i,n=r(2),a=r(10),s=r(13),o=r(0),l=r(16),h=r(4);function c(e,t,r,i){n.call(this,i=null==r&&null==i?t:i),null!=e.graphManager&&(e=e.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=i,this.edges=[],this.graphManager=e,this.rect=null!=r&&null!=t?new s(t.x,t.y,r.width,r.height):new s}for(i in mt(c,"LNode"),c.prototype=Object.create(n.prototype),n)c[i]=n[i];c.prototype.getEdges=function(){return this.edges},c.prototype.getChild=function(){return this.child},c.prototype.getOwner=function(){return this.owner},c.prototype.getWidth=function(){return this.rect.width},c.prototype.setWidth=function(e){this.rect.width=e},c.prototype.getHeight=function(){return this.rect.height},c.prototype.setHeight=function(e){this.rect.height=e},c.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},c.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},c.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},c.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},c.prototype.getRect=function(){return this.rect},c.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},c.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},c.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},c.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},c.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},c.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},c.prototype.getEdgeListToNode=function(t){var r=[],i=this;return i.edges.forEach(function(e){if(e.target==t){if(e.source!=i)throw"Incorrect edge source!";r.push(e)}}),r},c.prototype.getEdgesBetween=function(t){var r=[],i=this;return i.edges.forEach(function(e){if(e.source!=i&&e.target!=i)throw"Incorrect edge source and/or target";e.target!=t&&e.source!=t||r.push(e)}),r},c.prototype.getNeighborsList=function(){var t=new Set,r=this;return r.edges.forEach(function(e){if(e.source==r)t.add(e.target);else{if(e.target!=r)throw"Incorrect incidency!";t.add(e.source)}}),t},c.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),r=0;r<e.length;r++)e[r].withChildren().forEach(function(e){t.add(e)});return t},c.prototype.getNoOfChildren=function(){var e=0;if(null==this.child)e=1;else for(var t=this.child.getNodes(),r=0;r<t.length;r++)e+=t[r].getNoOfChildren();return 0==e?1:e},c.prototype.getEstimatedSize=function(){if(this.estimatedSize==a.MIN_VALUE)throw"assert failed";return this.estimatedSize},c.prototype.calcEstimatedSize=function(){return null==this.child?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},c.prototype.scatter=function(){var e=-o.INITIAL_WORLD_BOUNDARY,t=o.INITIAL_WORLD_BOUNDARY,t=o.WORLD_CENTER_X+l.nextDouble()*(t-e)+e,e=-o.INITIAL_WORLD_BOUNDARY,r=o.INITIAL_WORLD_BOUNDARY,r=o.WORLD_CENTER_Y+l.nextDouble()*(r-e)+e;this.rect.x=t,this.rect.y=r},c.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";var e,t;0!=this.getChild().getNodes().length&&((t=this.getChild()).updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),o.NODE_DIMENSIONS_INCLUDE_LABELS)&&(e=t.getRight()-t.getLeft(),t=t.getBottom()-t.getTop(),this.labelWidth>e&&(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)),this.labelHeight>t)&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-t)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-t),this.setHeight(this.labelHeight))},c.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},c.prototype.transform=function(e){(t=this.rect.x)>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY),(r=this.rect.y)>o.WORLD_BOUNDARY?r=o.WORLD_BOUNDARY:r<-o.WORLD_BOUNDARY&&(r=-o.WORLD_BOUNDARY);var t=new h(t,r),r=e.inverseTransformPoint(t);this.setLocation(r.x,r.y)},c.prototype.getLeft=function(){return this.rect.x},c.prototype.getRight=function(){return this.rect.x+this.rect.width},c.prototype.getTop=function(){return this.rect.y},c.prototype.getBottom=function(){return this.rect.y+this.rect.height},c.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},e.exports=c},function(e,t,r){function i(e,t){null==e&&null==t?(this.x=0,this.y=0):(this.x=e,this.y=t)}mt(i,"PointD"),i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.setX=function(e){this.x=e},i.prototype.setY=function(e){this.y=e},i.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},i.prototype.getCopy=function(){return new i(this.x,this.y)},i.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=i},function(e,t,r){var i,n=r(2),d=r(10),a=r(0),s=r(6),o=r(3),l=r(1),p=r(13),h=r(12),c=r(11);function u(e,t,r){n.call(this,r),this.estimatedSize=d.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,null!=t&&t instanceof s?this.graphManager=t:null!=t&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(i in mt(u,"LGraph"),u.prototype=Object.create(n.prototype),n)u[i]=n[i];u.prototype.getNodes=function(){return this.nodes},u.prototype.getEdges=function(){return this.edges},u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getParent=function(){return this.parent},u.prototype.getLeft=function(){return this.left},u.prototype.getRight=function(){return this.right},u.prototype.getTop=function(){return this.top},u.prototype.getBottom=function(){return this.bottom},u.prototype.isConnected=function(){return this.isConnected},u.prototype.add=function(e,t,r){if(null==t&&null==r){var i=e;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1<this.getNodes().indexOf(i))throw"Node already in graph!";return(i.owner=this).getNodes().push(i),i}if(i=e,!(-1<this.getNodes().indexOf(t)&&-1<this.getNodes().indexOf(r)))throw"Source or target not in graph!";if(t.owner!=r.owner||t.owner!=this)throw"Both owners must be this graph!";return t.owner!=r.owner?null:(i.source=t,i.target=r,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),r!=t&&r.edges.push(i),i)},u.prototype.remove=function(e){var t=e;if(e instanceof o){if(null==t)throw"Node is null!";if(null==t.owner||t.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var r,i=t.edges.slice(),n=i.length,a=0;a<n;a++)((r=i[a]).isInterGraph?this.graphManager:r.source.owner).remove(r);if(-1==(s=this.nodes.indexOf(t)))throw"Node not in owner node list!";this.nodes.splice(s,1)}else if(e instanceof l){if(null==(r=e))throw"Edge is null!";if(null==r.source||null==r.target)throw"Source and/or target is null!";if(null==r.source.owner||null==r.target.owner||r.source.owner!=this||r.target.owner!=this)throw"Source and/or target owner is invalid!";var s,t=r.source.edges.indexOf(r),e=r.target.edges.indexOf(r);if(!(-1<t&&-1<e))throw"Source and/or target doesn't know this edge!";if(r.source.edges.splice(t,1),r.target!=r.source&&r.target.edges.splice(e,1),-1==(s=r.source.owner.getEdges().indexOf(r)))throw"Not in owner's edge list!";r.source.owner.getEdges().splice(s,1)}},u.prototype.updateLeftTop=function(){for(var e,t=d.MAX_VALUE,r=d.MAX_VALUE,i=this.getNodes(),n=i.length,a=0;a<n;a++){var s,o=i[a];(s=o.getTop())<t&&(t=s),(s=o.getLeft())<r&&(r=s)}return t==d.MAX_VALUE?null:(e=null!=i[0].getParent().paddingLeft?i[0].getParent().paddingLeft:this.margin,this.left=r-e,this.top=t-e,new h(this.left,this.top))},u.prototype.updateBounds=function(e){for(var t,r,i=d.MAX_VALUE,n=-d.MAX_VALUE,a=d.MAX_VALUE,s=-d.MAX_VALUE,o=this.nodes,l=o.length,h=0;h<l;h++){var c=o[h];e&&null!=c.child&&c.updateBounds(),(t=c.getLeft())<i&&(i=t),n<(t=c.getRight())&&(n=t),(t=c.getTop())<a&&(a=t),s<(t=c.getBottom())&&(s=t)}var u=new p(i,a,n-i,s-a);i==d.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),r=null!=o[0].getParent().paddingLeft?o[0].getParent().paddingLeft:this.margin,this.left=u.x-r,this.right=u.x+u.width+r,this.top=u.y-r,this.bottom=u.y+u.height+r},u.calculateBounds=function(e){for(var t=d.MAX_VALUE,r=-d.MAX_VALUE,i=d.MAX_VALUE,n=-d.MAX_VALUE,a=e.length,s=0;s<a;s++){var o,l=e[s];(o=l.getLeft())<t&&(t=o),r<(o=l.getRight())&&(r=o),(o=l.getTop())<i&&(i=o),n<(o=l.getBottom())&&(n=o)}return new p(t,i,r-t,n-i)},u.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==d.MIN_VALUE)throw"assert failed";return this.estimatedSize},u.prototype.calcEstimatedSize=function(){for(var e=0,t=this.nodes,r=t.length,i=0;i<r;i++)e+=t[i].calcEstimatedSize();return this.estimatedSize=0==e?a.EMPTY_COMPOUND_NODE_SIZE:e/Math.sqrt(this.nodes.length),this.estimatedSize},u.prototype.updateConnected=function(){var t=this;if(0==this.nodes.length)this.isConnected=!0;else{var r,i=new c,n=new Set,e=this.nodes[0];for(e.withChildren().forEach(function(e){i.push(e),n.add(e)});0!==i.length;)for(var a,s,o=(a=(e=i.shift()).getEdges()).length,l=0;l<o;l++)null==(s=a[l].getOtherEndInGraph(e,this))||n.has(s)||s.withChildren().forEach(function(e){i.push(e),n.add(e)});this.isConnected=!1,n.size>=this.nodes.length&&(r=0,n.forEach(function(e){e.owner==t&&r++}),r==this.nodes.length)&&(this.isConnected=!0)}},e.exports=u},function(e,t,r){var h,c=r(1);function i(e){h=r(5),this.layout=e,this.graphs=[],this.edges=[]}mt(i,"LGraphManager"),i.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),e=this.add(e,t);return this.setRootGraph(e),this.rootGraph},i.prototype.add=function(e,t,r,i,n){if(null==r&&null==i&&null==n){if(null==e)throw"Graph is null!";if(null==t)throw"Parent node is null!";if(-1<this.graphs.indexOf(e))throw"Graph already in this graph mgr!";if(this.graphs.push(e),null!=e.parent)throw"Already has a parent!";if(null!=t.child)throw"Already has a child!";return(e.parent=t).child=e}if(n=r,r=e,e=(i=t).getOwner(),t=n.getOwner(),null==e||e.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==t||t.getGraphManager()!=this)throw"Target not in this graph mgr!";if(e==t)return r.isInterGraph=!1,e.add(r,i,n);if(r.isInterGraph=!0,r.source=i,r.target=n,-1<this.edges.indexOf(r))throw"Edge already in inter-graph edge list!";if(this.edges.push(r),null==r.source||null==r.target)throw"Edge source and/or target is null!";if(-1!=r.source.edges.indexOf(r)||-1!=r.target.edges.indexOf(r))throw"Edge already in source and/or target incidency list!";return r.source.edges.push(r),r.target.edges.push(r),r},i.prototype.remove=function(e){if(e instanceof h){var t=e;if(t.getGraphManager()!=this)throw"Graph not in this graph mgr";if(t!=this.rootGraph&&(null==t.parent||t.parent.graphManager!=this))throw"Invalid parent node!";for(var r,i=[],n=(i=i.concat(t.getEdges())).length,a=0;a<n;a++)r=i[a],t.remove(r);for(var s,o=[],n=(o=o.concat(t.getNodes())).length,a=0;a<n;a++)s=o[a],t.remove(s);t==this.rootGraph&&this.setRootGraph(null);var l=this.graphs.indexOf(t);this.graphs.splice(l,1),t.parent=null}else if(e instanceof c){if(null==(r=e))throw"Edge is null!";if(!r.isInterGraph)throw"Not an inter-graph edge!";if(null==r.source||null==r.target)throw"Source and/or target is null!";if(-1==r.source.edges.indexOf(r)||-1==r.target.edges.indexOf(r))throw"Source and/or target doesn't know this edge!";if(l=r.source.edges.indexOf(r),r.source.edges.splice(l,1),l=r.target.edges.indexOf(r),r.target.edges.splice(l,1),null==r.source.owner||null==r.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==r.source.owner.getGraphManager().edges.indexOf(r))throw"Not in owner graph manager's edge list!";l=r.source.owner.getGraphManager().edges.indexOf(r),r.source.owner.getGraphManager().edges.splice(l,1)}},i.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},i.prototype.getGraphs=function(){return this.graphs},i.prototype.getAllNodes=function(){if(null==this.allNodes){for(var e=[],t=this.getGraphs(),r=t.length,i=0;i<r;i++)e=e.concat(t[i].getNodes());this.allNodes=e}return this.allNodes},i.prototype.resetAllNodes=function(){this.allNodes=null},i.prototype.resetAllEdges=function(){this.allEdges=null},i.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},i.prototype.getAllEdges=function(){if(null==this.allEdges){for(var e=[],t=this.getGraphs(),r=(t.length,0);r<t.length;r++)e=e.concat(t[r].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},i.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},i.prototype.setAllNodesToApplyGravitation=function(e){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=e},i.prototype.getRoot=function(){return this.rootGraph},i.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";null==(this.rootGraph=e).parent&&(e.parent=this.layout.newNode("Root node"))},i.prototype.getLayout=function(){return this.layout},i.prototype.isOneAncestorOfOther=function(e,t){if(null==e||null==t)throw"assert failed";if(e==t)return!0;for(var r,i=e.getOwner();null!=(r=i.getParent());){if(r==t)return!0;if(null==(i=r.getOwner()))break}for(i=t.getOwner();null!=(r=i.getParent());){if(r==e)return!0;if(null==(i=r.getOwner()))break}return!1},i.prototype.calcLowestCommonAncestors=function(){for(var e,t,r,i,n,a=this.getAllEdges(),s=a.length,o=0;o<s;o++)if(t=(e=a[o]).source,r=e.target,e.lca=null,(e.sourceInLca=t)==(e.targetInLca=r))e.lca=t.getOwner();else{for(i=t.getOwner();null==e.lca;){for(n=(e.targetInLca=r).getOwner();null==e.lca;){if(n==i){e.lca=n;break}if(n==this.rootGraph)break;if(null!=e.lca)throw"assert failed";e.targetInLca=n.getParent(),n=e.targetInLca.getOwner()}if(i==this.rootGraph)break;null==e.lca&&(e.sourceInLca=i.getParent(),i=e.sourceInLca.getOwner())}if(null==e.lca)throw"assert failed"}},i.prototype.calcLowestCommonAncestor=function(e,t){if(e==t)return e.getOwner();for(var r=e.getOwner();null!=r;){for(var i=t.getOwner();null!=i;){if(i==r)return i;i=i.getParent().getOwner()}r=r.getParent().getOwner()}return r},i.prototype.calcInclusionTreeDepths=function(e,t){null==e&&null==t&&(e=this.rootGraph,t=1);for(var r,i=e.getNodes(),n=i.length,a=0;a<n;a++)(r=i[a]).inclusionTreeDepth=t,null!=r.child&&this.calcInclusionTreeDepths(r.child,t+1)},i.prototype.includesInvalidEdge=function(){for(var e,t=this.edges.length,r=0;r<t;r++)if(e=this.edges[r],this.isOneAncestorOfOther(e.source,e.target))return!0;return!1},e.exports=i},function(e,t,r){var i,n=r(0);function a(){}for(i in mt(a,"FDLayoutConstants"),n)a[i]=n[i];a.MAX_ITERATIONS=2500,a.DEFAULT_EDGE_LENGTH=50,a.DEFAULT_SPRING_STRENGTH=.45,a.DEFAULT_REPULSION_STRENGTH=4500,a.DEFAULT_GRAVITY_STRENGTH=.4,a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,a.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,a.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,a.COOLING_ADAPTATION_FACTOR=.33,a.ADAPTATION_LOWER_NODE_LIMIT=1e3,a.ADAPTATION_UPPER_NODE_LIMIT=5e3,a.MAX_NODE_DISPLACEMENT=3*(a.MAX_NODE_DISPLACEMENT_INCREMENTAL=100),a.MIN_REPULSION_DIST=a.DEFAULT_EDGE_LENGTH/10,a.CONVERGENCE_CHECK_PERIOD=100,a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,a.MIN_EDGE_LENGTH=1,a.GRID_CALCULATION_CHECK_PERIOD=10,e.exports=a},function(e,t,r){var c=r(12);function i(){}mt(i,"IGeometry"),i.calcSeparationAmount=function(e,t,r,i){if(!e.intersects(t))throw"assert failed";var n=new Array(2),a=(this.decideDirectionsForOverlappingNodes(e,t,n),r[0]=Math.min(e.getRight(),t.getRight())-Math.max(e.x,t.x),r[1]=Math.min(e.getBottom(),t.getBottom())-Math.max(e.y,t.y),e.getX()<=t.getX()&&e.getRight()>=t.getRight()?r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom())),Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()))),t=(a=t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()?1:a)*r[0],e=r[1]/a;r[0]<e?e=r[0]:t=r[1],r[0]=-1*n[0]*(e/2+i),r[1]=-1*n[1]*(t/2+i)},i.decideDirectionsForOverlappingNodes=function(e,t,r){e.getCenterX()<t.getCenterX()?r[0]=-1:r[0]=1,e.getCenterY()<t.getCenterY()?r[1]=-1:r[1]=1},i.getIntersection2=function(e,t,r){var i=e.getCenterX(),n=e.getCenterY(),a=t.getCenterX(),s=t.getCenterY();if(e.intersects(t))return r[0]=i,r[1]=n,r[2]=a,r[3]=s,!0;var o=e.getX(),l=e.getY(),h=e.getRight(),c=e.getX(),u=e.getBottom(),d=e.getRight(),p=e.getWidthHalf(),g=e.getHeightHalf(),f=t.getX(),m=t.getY(),y=t.getRight(),v=t.getX(),x=t.getBottom(),b=t.getRight(),T=t.getWidthHalf(),k=t.getHeightHalf(),w=!1,C=!1;if(i===a){if(s<n)return r[0]=i,r[1]=l,r[2]=a,r[3]=x,!1;n<s&&(r[0]=i,r[1]=u,r[2]=a,r[3]=m)}else if(n===s){if(a<i)return r[0]=o,r[1]=n,r[2]=y,r[3]=s,!1;i<a&&(r[0]=h,r[1]=n,r[2]=f,r[3]=s)}else{var e=e.height/e.width,t=t.height/t.width,E=(s-n)/(a-i),S=void 0,_=void 0,A=void 0;if(-e==E?(a<i?(r[0]=c,r[1]=u):(r[0]=h,r[1]=l),w=!0):e==E&&(a<i?(r[0]=o,r[1]=l):(r[0]=d,r[1]=u),w=!0),-t==E?(i<a?(r[2]=v,r[3]=x):(r[2]=y,r[3]=m),C=!0):t==E&&(i<a?(r[2]=f,r[3]=m):(r[2]=b,r[3]=x),C=!0),w&&C)return!1;if(h=a<i?s<n?(S=this.getCardinalDirection(e,E,4),this.getCardinalDirection(t,E,2)):(S=this.getCardinalDirection(-e,E,3),this.getCardinalDirection(-t,E,1)):s<n?(S=this.getCardinalDirection(-e,E,1),this.getCardinalDirection(-t,E,3)):(S=this.getCardinalDirection(e,E,2),this.getCardinalDirection(t,E,4)),!w)switch(S){case 1:_=l,r[0]=i+-g/E,r[1]=_;break;case 2:_=n+p*E,r[0]=d,r[1]=_;break;case 3:_=u,r[0]=i+g/E,r[1]=_;break;case 4:_=n+-p*E,r[0]=c,r[1]=_}if(!C)switch(h){case 1:A=m,r[2]=a+-k/E,r[3]=A;break;case 2:A=s+T*E,r[2]=b,r[3]=A;break;case 3:A=x,r[2]=a+k/E,r[3]=A;break;case 4:A=s+-T*E,r[2]=v,r[3]=A}}return!1},i.getCardinalDirection=function(e,t,r){return t<e?r:1+r%4},i.getIntersection=function(e,t,r,i){var n,a,s,o,l,h;return null==i?this.getIntersection2(e,t,r):(n=e.x,a=t.x,l=r.x,o=a*(e=e.y)-n*(t=t.y),h=(s=i.x)*(r=r.y)-l*(i=i.y),0==(i=(t-=e)*(e=l-s)-(l=i-r)*(s=n-a))?null:new c((s*h-e*o)/i,(l*o-t*h)/i))},i.angleOfVector=function(e,t,r,i){var n=void 0;return e!==r?(n=Math.atan((i-t)/(r-e)),r<e?n+=Math.PI:i<t&&(n+=this.TWO_PI)):n=i<t?this.ONE_AND_HALF_PI:this.HALF_PI,n},i.doIntersect=function(e,t,r,i){var n=e.x,e=e.y,a=t.x,t=t.y,s=r.x,r=r.y,o=i.x,l=(a-n)*((i=i.y)-r)-(o-s)*(t-e);return 0!=l&&(t=((e-t)*(o-n)+(a-n)*(i-e))/l,0<(a=((i-r)*(o-n)+(s-o)*(i-e))/l))&&a<1&&0<t&&t<1},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,e.exports=i},function(e,t,r){function i(){}mt(i,"IMath"),i.sign=function(e){return 0<e?1:e<0?-1:0},i.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},i.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=i},function(e,t,r){function i(){}mt(i,"Integer"),i.MAX_VALUE=2147483647,i.MIN_VALUE=-2147483648,e.exports=i},function(e,t,r){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}mt(i,"defineProperties"),mt(n,"_classCallCheck");var a,s,o=mt(function(e){return{value:e,next:null,prev:null}},"nodeFrom"),l=mt(function(e,t,r,i){return null!==e?e.next=t:i.head=t,null!==r?r.prev=t:i.tail=t,t.prev=e,t.next=r,i.length++,t},"add"),h=mt(function(e,t){var r=e.prev,i=e.next;return null!==r?r.next=i:t.head=i,null!==i?i.prev=r:t.tail=r,e.prev=e.next=null,t.length--,e},"_remove");function c(e){var t=this;n(this,c),this.length=0,this.head=null,this.tail=null,e?.forEach(function(e){return t.push(e)})}mt(c,"LinkedList"),a=c,s=[{key:"size",value:mt(function(){return this.length},"size")},{key:"insertBefore",value:mt(function(e,t){return l(t.prev,o(e),t,this)},"insertBefore")},{key:"insertAfter",value:mt(function(e,t){return l(t,o(e),t.next,this)},"insertAfter")},{key:"insertNodeBefore",value:mt(function(e,t){return l(t.prev,e,t,this)},"insertNodeBefore")},{key:"insertNodeAfter",value:mt(function(e,t){return l(t,e,t.next,this)},"insertNodeAfter")},{key:"push",value:mt(function(e){return l(this.tail,o(e),null,this)},"push")},{key:"unshift",value:mt(function(e){return l(null,o(e),this.head,this)},"unshift")},{key:"remove",value:mt(function(e){return h(e,this)},"remove")},{key:"pop",value:mt(function(){return h(this.tail,this).value},"pop")},{key:"popNode",value:mt(function(){return h(this.tail,this)},"popNode")},{key:"shift",value:mt(function(){return h(this.head,this).value},"shift")},{key:"shiftNode",value:mt(function(){return h(this.head,this)},"shiftNode")},{key:"get_object_at",value:mt(function(e){if(e<=this.length()){for(var t=1,r=this.head;t<e;)r=r.next,t++;return r.value}},"get_object_at")},{key:"set_object_at",value:mt(function(e,t){if(e<=this.length()){for(var r=1,i=this.head;r<e;)i=i.next,r++;i.value=t}},"set_object_at")}],i(a.prototype,s),e.exports=c},function(e,t,r){function i(e,t,r){this.x=null,(this.y=null)==e&&null==t&&null==r?(this.x=0,this.y=0):"number"==typeof e&&"number"==typeof t&&null==r?(this.x=e,this.y=t):"Point"==e.constructor.name&&null==t&&null==r&&(this.x=(r=e).x,this.y=r.y)}mt(i,"Point"),i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.getLocation=function(){return new i(this.x,this.y)},i.prototype.setLocation=function(e,t,r){"Point"==e.constructor.name&&null==t&&null==r?this.setLocation((r=e).x,r.y):"number"==typeof e&&"number"==typeof t&&null==r&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},i.prototype.move=function(e,t){this.x=e,this.y=t},i.prototype.translate=function(e,t){this.x+=e,this.y+=t},i.prototype.equals=function(e){return"Point"==e.constructor.name?this.x==e.x&&this.y==e.y:this==e},i.prototype.toString=function(){return(new i).constructor.name+"[x="+this.x+",y="+this.y+"]"},e.exports=i},function(e,t,r){function i(e,t,r,i){this.x=0,this.y=0,this.width=0,this.height=0,null!=e&&null!=t&&null!=r&&null!=i&&(this.x=e,this.y=t,this.width=r,this.height=i)}mt(i,"RectangleD"),i.prototype.getX=function(){return this.x},i.prototype.setX=function(e){this.x=e},i.prototype.getY=function(){return this.y},i.prototype.setY=function(e){this.y=e},i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(e){this.width=e},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(e){this.height=e},i.prototype.getRight=function(){return this.x+this.width},i.prototype.getBottom=function(){return this.y+this.height},i.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},i.prototype.getCenterX=function(){return this.x+this.width/2},i.prototype.getMinX=function(){return this.getX()},i.prototype.getMaxX=function(){return this.getX()+this.width},i.prototype.getCenterY=function(){return this.y+this.height/2},i.prototype.getMinY=function(){return this.getY()},i.prototype.getMaxY=function(){return this.getY()+this.height},i.prototype.getWidthHalf=function(){return this.width/2},i.prototype.getHeightHalf=function(){return this.height/2},e.exports=i},function(e,t,r){var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function n(){}mt(n,"UniqueIDGeneretor"),n.lastID=0,n.createID=function(e){return n.isPrimitive(e)?e:(null==e.uniqueID&&(e.uniqueID=n.getString(),n.lastID++),e.uniqueID)},n.getString=function(e){return"Object#"+(null==e?n.lastID:e)},n.isPrimitive=function(e){var t="u"<typeof e?"undefined":i(e);return null==e||"object"!=t&&"function"!=t},e.exports=n},function(e,t,r){function g(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}mt(g,"_toConsumableArray");var i=r(0),n=r(6),a=r(3),s=r(1),o=r(5),l=r(4),h=r(17),c=r(27);function u(e){c.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new n(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=e&&(this.isRemoteUse=e)}mt(u,"Layout"),u.RANDOM_SEED=1,(u.prototype=Object.create(c.prototype)).getGraphManager=function(){return this.graphManager},u.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},u.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},u.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},u.prototype.newGraphManager=function(){var e=new n(this);return this.graphManager=e},u.prototype.newGraph=function(e){return new o(null,this.graphManager,e)},u.prototype.newNode=function(e){return new a(this.graphManager,e)},u.prototype.newEdge=function(e){return new s(null,null,e)},u.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},u.prototype.runLayout=function(){var e;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),e=!this.checkLayoutSuccess()&&this.layout(),"during"!==i.ANIMATE&&(e&&!this.isSubLayout&&this.doPostLayout(),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,e)},u.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},u.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var e=this.graphManager.getAllEdges(),t=0;t<e.length;t++)e[t];for(var r=this.graphManager.getRoot().getNodes(),t=0;t<r.length;t++)r[t];this.update(this.graphManager.getRoot())}},u.prototype.update=function(e){if(null==e)this.update2();else if(e instanceof a){var t=e;if(null!=t.getChild())for(var r=t.getChild().getNodes(),i=0;i<r.length;i++)update(r[i]);null!=t.vGraphObject&&t.vGraphObject.update(t)}else e instanceof s?null!=e.vGraphObject&&e.vGraphObject.update(e):e instanceof o&&null!=e.vGraphObject&&e.vGraphObject.update(e)},u.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},u.prototype.transform=function(e){if(null==e)this.transform(new l(0,0));else{var t=new h,r=this.graphManager.getRoot().updateLeftTop();if(null!=r){t.setWorldOrgX(e.x),t.setWorldOrgY(e.y),t.setDeviceOrgX(r.x),t.setDeviceOrgY(r.y);for(var i=this.getAllNodes(),n=0;n<i.length;n++)i[n].transform(t)}}},u.prototype.positionNodesRandomly=function(e){if(null==e)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var t,r,i=e.getNodes(),n=0;n<i.length;n++)null==(r=(t=i[n]).getChild())||0==r.getNodes().length?t.scatter():(this.positionNodesRandomly(r),t.updateBounds())},u.prototype.getFlatForest=function(){for(var e=[],t=!0,r=this.graphManager.getRoot().getNodes(),i=!0,n=0;n<r.length;n++)null!=r[n].getChild()&&(i=!1);if(i)for(var a=new Set,s=[],o=new Map,l=(l=[]).concat(r);0<l.length&&t;){for(s.push(l[0]);0<s.length&&t;){var h=s[0];s.splice(0,1),a.add(h);for(var c=h.getEdges(),n=0;n<c.length;n++){var u=c[n].getOtherEnd(h);if(o.get(h)!=u){if(a.has(u)){t=!1;break}s.push(u),o.set(u,h)}}}if(t){var d=[].concat(g(a));for(e.push(d),n=0;n<d.length;n++){var p=d[n];-1<(p=l.indexOf(p))&&l.splice(p,1)}a=new Set,o=new Map}else e=[]}return e},u.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],r=e.source,i=this.graphManager.calcLowestCommonAncestor(e.source,e.target),n=0;n<e.bendpoints.length;n++){var a=this.newNode(null),s=(a.setRect(new Point(0,0),new Dimension(1,1)),i.add(a),this.newEdge(null));this.graphManager.add(s,r,a),t.add(a),r=a}return s=this.newEdge(null),this.graphManager.add(s,r,e.target),this.edgeToDummyNodes.set(e,t),(e.isInterGraph()?this.graphManager:i).remove(e),t},u.prototype.createBendpointsFromDummyNodes=function(){for(var e=(e=[]).concat(this.graphManager.getAllEdges()),e=[].concat(g(this.edgeToDummyNodes.keys())).concat(e),t=0;t<e.length;t++){var r=e[t];if(0<r.bendpoints.length){for(var i=this.edgeToDummyNodes.get(r),n=0;n<i.length;n++){var a=i[n],s=new l(a.getCenterX(),a.getCenterY()),o=r.bendpoints.get(n);o.x=s.x,o.y=s.y,a.getOwner().remove(a)}this.graphManager.add(r,r.source,r.target)}}},u.transform=function(e,t,r,i){var n,a;return null!=r&&null!=i?(n=t,e<=50?n-=(t-t/r)/50*(50-e):n+=(t*i-t)/50*(e-50),n):(r=e<=50?(a=9*t/500,t/10):(a=9*t/50,-8*t),a*e+r)},u.findCenterOfTree=function(e){var t=(t=[]).concat(e),r=[],i=new Map,n=!1,a=null;1!=t.length&&2!=t.length||(n=!0,a=t[0]);for(var s=0;s<t.length;s++){var o=(h=t[s]).getNeighborsList().size;i.set(h,h.getNeighborsList().size),1==o&&r.push(h)}for(l=(l=[]).concat(r);!n;){[].concat(l);for(var l=[],s=0;s<t.length;s++){var h=t[s],c=t.indexOf(h);0<=c&&t.splice(c,1),h.getNeighborsList().forEach(function(e){var t;r.indexOf(e)<0&&(1==(t=i.get(e)-1)&&l.push(e),i.set(e,t))})}r=r.concat(l),1!=t.length&&2!=t.length||(n=!0,a=t[0])}return a},u.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=u},function(e,t,r){function i(){}mt(i,"RandomSeed"),i.seed=1,i.x=0,i.nextDouble=function(){return(i.x=1e4*Math.sin(i.seed++))-Math.floor(i.x)},e.exports=i},function(e,t,r){var i=r(4);function n(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}mt(n,"Transform"),n.prototype.getWorldOrgX=function(){return this.lworldOrgX},n.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},n.prototype.getWorldOrgY=function(){return this.lworldOrgY},n.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},n.prototype.getWorldExtX=function(){return this.lworldExtX},n.prototype.setWorldExtX=function(e){this.lworldExtX=e},n.prototype.getWorldExtY=function(){return this.lworldExtY},n.prototype.setWorldExtY=function(e){this.lworldExtY=e},n.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},n.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},n.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},n.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},n.prototype.getDeviceExtX=function(){return this.ldeviceExtX},n.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},n.prototype.getDeviceExtY=function(){return this.ldeviceExtY},n.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},n.prototype.transformX=function(e){var t=this.lworldExtX;return 0!=t?this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/t:0},n.prototype.transformY=function(e){var t=this.lworldExtY;return 0!=t?this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/t:0},n.prototype.inverseTransformX=function(e){var t=this.ldeviceExtX;return 0!=t?this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/t:0},n.prototype.inverseTransformY=function(e){var t=this.ldeviceExtY;return 0!=t?this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/t:0},n.prototype.inverseTransformPoint=function(e){return new i(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=n},function(e,t,r){function d(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}mt(d,"_toConsumableArray");var i,n=r(15),p=r(7),o=r(0),h=r(8),c=r(9);function a(){n.call(this),this.useSmartIdealEdgeLengthCalculation=p.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=p.DEFAULT_EDGE_LENGTH,this.springConstant=p.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=p.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=p.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=p.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=p.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=p.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*p.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=p.MAX_ITERATIONS}for(i in mt(a,"FDLayout"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];a.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=p.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},a.prototype.calcIdealEdgeLengths=function(){for(var e,t,r,i,n,a=this.getGraphManager().getAllEdges(),s=0;s<a.length;s++)(e=a[s]).idealLength=this.idealEdgeLength,e.isInterGraph&&(t=e.getSource(),r=e.getTarget(),i=e.getSourceInLca().getEstimatedSize(),n=e.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(e.idealLength+=i+n-2*o.SIMPLE_NODE_SIZE),i=e.getLca().getInclusionTreeDepth(),e.idealLength+=p.DEFAULT_EDGE_LENGTH*p.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(t.getInclusionTreeDepth()+r.getInclusionTreeDepth()-2*i))},a.prototype.initSpringEmbedder=function(){var e=this.getAllNodes().length;this.incremental?(e>p.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*p.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-p.ADAPTATION_LOWER_NODE_LIMIT)/(p.ADAPTATION_UPPER_NODE_LIMIT-p.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-p.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=p.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>p.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(p.COOLING_ADAPTATION_FACTOR,1-(e-p.ADAPTATION_LOWER_NODE_LIMIT)/(p.ADAPTATION_UPPER_NODE_LIMIT-p.ADAPTATION_LOWER_NODE_LIMIT)*(1-p.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=p.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var e,t=this.getAllEdges(),r=0;r<t.length;r++)e=t[r],this.calcSpringForce(e,e.idealLength)},a.prototype.calcRepulsionForces=function(){var e,t,r,i,n,a=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],s=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%p.GRID_CALCULATION_CHECK_PERIOD==1&&a&&this.updateGrid(),n=new Set,e=0;e<o.length;e++)r=o[e],this.calculateRepulsionForceOfANode(r,n,a,s),n.add(r);else for(e=0;e<o.length;e++)for(r=o[e],t=e+1;t<o.length;t++)i=o[t],r.getOwner()==i.getOwner()&&this.calcRepulsionForce(r,i)},a.prototype.calcGravitationalForces=function(){for(var e,t=this.getAllNodesToApplyGravitation(),r=0;r<t.length;r++)e=t[r],this.calcGravitationalForce(e)},a.prototype.moveNodes=function(){for(var e=this.getAllNodes(),t=0;t<e.length;t++)e[t].move()},a.prototype.calcSpringForce=function(e,t){var r,i,n=e.getSource(),a=e.getTarget();if(this.uniformLeafNodeSizes&&null==n.getChild()&&null==a.getChild())e.updateLengthSimple();else if(e.updateLength(),e.isOverlapingSourceAndTarget)return;0!=(r=e.getLength())&&(i=(t=this.springConstant*(r-t))*(e.lengthX/r),e=e.lengthY/r*t,n.springForceX+=i,n.springForceY+=e,a.springForceX-=i,a.springForceY-=e)},a.prototype.calcRepulsionForce=function(e,t){var r,i,n,a=e.getRect(),s=t.getRect(),o=new Array(2),l=new Array(4);a.intersects(s)?(h.calcSeparationAmount(a,s,o,p.DEFAULT_EDGE_LENGTH/2),i=2*o[0],n=2*o[1],o=e.noOfChildren*t.noOfChildren/(e.noOfChildren+t.noOfChildren),e.repulsionForceX-=o*i,e.repulsionForceY-=o*n,t.repulsionForceX+=o*i,t.repulsionForceY+=o*n):(o=this.uniformLeafNodeSizes&&null==e.getChild()&&null==t.getChild()?(r=s.getCenterX()-a.getCenterX(),s.getCenterY()-a.getCenterY()):(h.getIntersection(a,s,l),r=l[2]-l[0],l[3]-l[1]),a=(r=Math.abs(r)<p.MIN_REPULSION_DIST?c.sign(r)*p.MIN_REPULSION_DIST:r)*r+(o=Math.abs(o)<p.MIN_REPULSION_DIST?c.sign(o)*p.MIN_REPULSION_DIST:o)*o,s=Math.sqrt(a),n=(l=this.repulsionConstant*e.noOfChildren*t.noOfChildren/a)*o/s,e.repulsionForceX-=i=l*r/s,e.repulsionForceY-=n,t.repulsionForceX+=i,t.repulsionForceY+=n)},a.prototype.calcGravitationalForce=function(e){var t,r=e.getOwner(),i=(r.getRight()+r.getLeft())/2,n=(r.getTop()+r.getBottom())/2,i=e.getCenterX()-i,n=e.getCenterY()-n,a=Math.abs(i)+e.getWidth()/2,s=Math.abs(n)+e.getHeight()/2;e.getOwner()==this.graphManager.getRoot()?((t=r.getEstimatedSize()*this.gravityRangeFactor)<a||t<s)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*n):((t=r.getEstimatedSize()*this.compoundGravityRangeFactor)<a||t<s)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*n*this.compoundGravityConstant)},a.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,e||t},a.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},a.prototype.calcNoOfChildrenForAllNodes=function(){for(var e,t=this.graphManager.getAllNodes(),r=0;r<t.length;r++)(e=t[r]).noOfChildren=e.getNoOfChildren()},a.prototype.calcGrid=function(e){for(var t=parseInt(Math.ceil((e.getRight()-e.getLeft())/this.repulsionRange)),r=parseInt(Math.ceil((e.getBottom()-e.getTop())/this.repulsionRange)),i=new Array(t),n=0;n<t;n++)i[n]=new Array(r);for(n=0;n<t;n++)for(var a=0;a<r;a++)i[n][a]=new Array;return i},a.prototype.addNodeToGrid=function(e,t,r){for(var i=parseInt(Math.floor((e.getRect().x-t)/this.repulsionRange)),n=parseInt(Math.floor((e.getRect().width+e.getRect().x-t)/this.repulsionRange)),a=parseInt(Math.floor((e.getRect().y-r)/this.repulsionRange)),s=parseInt(Math.floor((e.getRect().height+e.getRect().y-r)/this.repulsionRange)),o=i;o<=n;o++)for(var l=a;l<=s;l++)this.grid[o][l].push(e),e.setGridCoordinates(i,n,a,s)},a.prototype.updateGrid=function(){var e,t,r=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),e=0;e<r.length;e++)t=r[e],this.addNodeToGrid(t,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},a.prototype.calculateRepulsionForceOfANode=function(e,t,r,i){if(this.totalIterations%p.GRID_CALCULATION_CHECK_PERIOD==1&&r||i){var n=new Set;e.surrounding=new Array;for(var a=this.grid,s=e.startX-1;s<e.finishX+2;s++)for(var o=e.startY-1;o<e.finishY+2;o++)if(!(s<0||o<0||s>=a.length||o>=a[0].length))for(var l=0;l<a[s][o].length;l++){var h,c,u=a[s][o][l];e.getOwner()!=u.getOwner()||e==u||t.has(u)||n.has(u)||(h=Math.abs(e.getCenterX()-u.getCenterX())-(e.getWidth()/2+u.getWidth()/2),c=Math.abs(e.getCenterY()-u.getCenterY())-(e.getHeight()/2+u.getHeight()/2),h<=this.repulsionRange&&c<=this.repulsionRange&&n.add(u))}e.surrounding=[].concat(d(n))}for(s=0;s<e.surrounding.length;s++)this.calcRepulsionForce(e,e.surrounding[s])},a.prototype.calcRepulsionRange=function(){return 0},e.exports=a},function(e,t,r){var i,n=r(1),a=r(7);function s(e,t,r){n.call(this,e,t,r),this.idealLength=a.DEFAULT_EDGE_LENGTH}for(i in mt(s,"FDLayoutEdge"),s.prototype=Object.create(n.prototype),n)s[i]=n[i];e.exports=s},function(e,t,r){var i,n=r(3);function a(e,t,r,i){n.call(this,e,t,r,i),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(i in mt(a,"FDLayoutNode"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];a.prototype.setGridCoordinates=function(e,t,r,i){this.startX=e,this.finishX=t,this.startY=r,this.finishY=i},e.exports=a},function(e,t,r){function i(e,t){this.width=0,this.height=0,null!==e&&null!==t&&(this.height=t,this.width=e)}mt(i,"DimensionD"),i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(e){this.width=e},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(e){this.height=e},e.exports=i},function(e,t,r){var i=r(14);function n(){this.map={},this.keys=[]}mt(n,"HashMap"),n.prototype.put=function(e,t){var r=i.createID(e);this.contains(r)||(this.map[r]=t,this.keys.push(e))},n.prototype.contains=function(e){return i.createID(e),null!=this.map[e]},n.prototype.get=function(e){return e=i.createID(e),this.map[e]},n.prototype.keySet=function(){return this.keys},e.exports=n},function(e,t,r){var i=r(14);function n(){this.set={}}mt(n,"HashSet"),n.prototype.add=function(e){var t=i.createID(e);this.contains(t)||(this.set[t]=e)},n.prototype.remove=function(e){delete this.set[i.createID(e)]},n.prototype.clear=function(){this.set={}},n.prototype.contains=function(e){return this.set[i.createID(e)]==e},n.prototype.isEmpty=function(){return 0===this.size()},n.prototype.size=function(){return Object.keys(this.set).length},n.prototype.addAllTo=function(e){for(var t=Object.keys(this.set),r=t.length,i=0;i<r;i++)e.push(this.set[t[i]])},n.prototype.size=function(){return Object.keys(this.set).length},n.prototype.addAll=function(e){for(var t=e.length,r=0;r<t;r++){var i=e[r];this.add(i)}},e.exports=n},function(e,t,r){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}mt(i,"defineProperties"),mt(n,"_classCallCheck");var a,s,o=r(11),r=(mt(l,"Quicksort"),a=l,s=[{key:"_quicksort",value:mt(function(e,t,r){var i;t<r&&(i=this._partition(e,t,r),this._quicksort(e,t,i),this._quicksort(e,i+1,r))},"_quicksort")},{key:"_partition",value:mt(function(e,t,r){for(var i=this._get(e,t),n=t,a=r;;){for(;this.compareFunction(i,this._get(e,a));)a--;for(;this.compareFunction(this._get(e,n),i);)n++;if(!(n<a))return a;this._swap(e,n,a),n++,a--}},"_partition")},{key:"_get",value:mt(function(e,t){return e instanceof o?e.get_object_at(t):e[t]},"_get")},{key:"_set",value:mt(function(e,t,r){e instanceof o?e.set_object_at(t,r):e[t]=r},"_set")},{key:"_swap",value:mt(function(e,t,r){var i=this._get(e,t);this._set(e,t,this._get(e,r)),this._set(e,r,i)},"_swap")},{key:"_defaultCompareFunction",value:mt(function(e,t){return e<t},"_defaultCompareFunction")}],i(a.prototype,s),l);function l(e,t){n(this,l),null===t&&void 0===t||(this.compareFunction=this._defaultCompareFunction),t=void 0,t=e instanceof o?e.size():e.length,this._quicksort(e,0,t-1)}e.exports=r},function(e,t,r){var i,n;function a(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:-1,n=4<arguments.length&&void 0!==arguments[4]?arguments[4]:-1;h(this,c),this.sequence1=e,this.sequence2=t,this.match_score=r,this.mismatch_penalty=i,this.gap_penalty=n,this.iMax=e.length+1,this.jMax=t.length+1,this.grid=new Array(this.iMax);for(var a=0;a<this.iMax;a++){this.grid[a]=new Array(this.jMax);for(var s=0;s<this.jMax;s++)this.grid[a][s]=0}this.tracebackGrid=new Array(this.iMax);for(var o=0;o<this.iMax;o++){this.tracebackGrid[o]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[o][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}mt(a,"defineProperties"),mt(h,"_classCallCheck"),mt(c,"NeedlemanWunsch"),i=c,n=[{key:"getScore",value:mt(function(){return this.score},"getScore")},{key:"getAlignments",value:mt(function(){return this.alignments},"getAlignments")},{key:"computeGrids",value:mt(function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var t=1;t<this.iMax;t++)this.grid[t][0]=this.grid[t-1][0]+this.gap_penalty,this.tracebackGrid[t][0]=[!1,!0,!1];for(var r=1;r<this.iMax;r++)for(var i=1;i<this.jMax;i++){var n=[this.sequence1[r-1]===this.sequence2[i-1]?this.grid[r-1][i-1]+this.match_score:this.grid[r-1][i-1]+this.mismatch_penalty,this.grid[r-1][i]+this.gap_penalty,this.grid[r][i-1]+this.gap_penalty],a=this.arrayAllMaxIndexes(n);this.grid[r][i]=n[a[0]],this.tracebackGrid[r][i]=[a.includes(0),a.includes(1),a.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]},"computeGrids")},{key:"alignmentTraceback",value:mt(function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});e[0];){var t=e[0],r=this.tracebackGrid[t.pos[0]][t.pos[1]];r[0]&&e.push({pos:[t.pos[0]-1,t.pos[1]-1],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),r[1]&&e.push({pos:[t.pos[0]-1,t.pos[1]],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:"-"+t.seq2}),r[2]&&e.push({pos:[t.pos[0],t.pos[1]-1],seq1:"-"+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),0===t.pos[0]&&0===t.pos[1]&&this.alignments.push({sequence1:t.seq1,sequence2:t.seq2}),e.shift()}return this.alignments},"alignmentTraceback")},{key:"getAllIndexes",value:mt(function(e,t){for(var r=[],i=-1;-1!==(i=e.indexOf(t,i+1));)r.push(i);return r},"getAllIndexes")},{key:"arrayAllMaxIndexes",value:mt(function(e){return this.getAllIndexes(e,Math.max.apply(null,e))},"arrayAllMaxIndexes")}],a(i.prototype,n),e.exports=c},function(e,t,r){var i=mt(function(){},"layoutBase");i.FDLayout=r(18),i.FDLayoutConstants=r(7),i.FDLayoutEdge=r(19),i.FDLayoutNode=r(20),i.DimensionD=r(21),i.HashMap=r(22),i.HashSet=r(23),i.IGeometry=r(8),i.IMath=r(9),i.Integer=r(10),i.Point=r(12),i.PointD=r(4),i.RandomSeed=r(16),i.RectangleD=r(13),i.Transform=r(17),i.UniqueIDGeneretor=r(14),i.Quicksort=r(24),i.LinkedList=r(11),i.LGraphObject=r(2),i.LGraph=r(5),i.LEdge=r(1),i.LGraphManager=r(6),i.LNode=r(3),i.Layout=r(15),i.LayoutConstants=r(0),i.NeedlemanWunsch=r(25),e.exports=i},function(e,t,r){function i(){this.listeners=[]}mt(i,"Emitter");var n=i.prototype;n.addListener=function(e,t){this.listeners.push({event:e,callback:t})},n.removeListener=function(e,t){for(var r=this.listeners.length;0<=r;r--){var i=this.listeners[r];i.event===e&&i.callback===t&&this.listeners.splice(r,1)}},n.emit=function(e,t){for(var r=0;r<this.listeners.length;r++){var i=this.listeners[r];e===i.event&&i.callback(t)}},e.exports=i}],n={},mt(i,"__webpack_require__"),i.m=r,i.c=n,i.i=function(e){return e},i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},i.n=function(e){var t=e&&e.__esModule?mt(function(){return e.default},"getDefault"):mt(function(){return e},"getModuleExports");return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=26);function i(e){var t;return(n[e]||(t=n[e]={i:e,l:!1,exports:{}},r[e].call(t.exports,t,t.exports,i),t.l=!0,t)).exports}var r,n})}),bue=tYe((r,i)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t(xue()):"function"==typeof define&&define.amd?define(["layout-base"],t):"object"==typeof r?r.coseBase=t(xue()):e.coseBase=t(e.layoutBase)},"webpackUniversalModuleDefinition")(r,function(r){return n=[function(e,t){e.exports=r},function(e,t,r){var i,n=r(0).FDLayoutConstants;function a(){}for(i in mt(a,"CoSEConstants"),n)a[i]=n[i];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=a},function(e,t,r){var i,n=r(0).FDLayoutEdge;function a(e,t,r){n.call(this,e,t,r)}for(i in mt(a,"CoSEEdge"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];e.exports=a},function(e,t,r){var i,n=r(0).LGraph;function a(e,t,r){n.call(this,e,t,r)}for(i in mt(a,"CoSEGraph"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];e.exports=a},function(e,t,r){var i,n=r(0).LGraphManager;function a(e){n.call(this,e)}for(i in mt(a,"CoSEGraphManager"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];e.exports=a},function(e,t,r){var i,n=r(0).FDLayoutNode,a=r(0).IMath;function s(e,t,r,i){n.call(this,e,t,r,i)}for(i in mt(s,"CoSENode"),s.prototype=Object.create(n.prototype),n)s[i]=n[i];s.prototype.move=function(){var e=this.graphManager.getLayout();this.displacementX=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*a.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),e.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},s.prototype.propogateDisplacementToChildren=function(e,t){for(var r,i=this.getChild().getNodes(),n=0;n<i.length;n++)null==(r=i[n]).getChild()?(r.moveBy(e,t),r.displacementX+=e,r.displacementY+=t):r.propogateDisplacementToChildren(e,t)},s.prototype.setPred1=function(e){this.pred1=e},s.prototype.getPred1=function(){return pred1},s.prototype.getPred2=function(){return pred2},s.prototype.setNext=function(e){this.next=e},s.prototype.getNext=function(){return next},s.prototype.setProcessed=function(e){this.processed=e},s.prototype.isProcessed=function(){return processed},e.exports=s},function(e,t,r){var i,n=r(0).FDLayout,a=r(4),s=r(3),c=r(5),o=r(2),u=r(1),g=r(0).FDLayoutConstants,d=r(0).LayoutConstants,p=r(0).Point,f=r(0).PointD,m=r(0).Layout,y=r(0).Integer,v=r(0).IGeometry,l=r(0).LGraph,h=r(0).Transform;function x(){n.call(this),this.toBeTiled={}}for(i in mt(x,"CoSELayout"),x.prototype=Object.create(n.prototype),n)x[i]=n[i];x.prototype.newGraphManager=function(){var e=new a(this);return this.graphManager=e},x.prototype.newGraph=function(e){return new s(null,this.graphManager,e)},x.prototype.newNode=function(e){return new c(this.graphManager,e)},x.prototype.newEdge=function(e){return new o(null,null,e)},x.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.isSubLayout||(u.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=u.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=u.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=g.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=g.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=g.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=g.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/g.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=g.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},x.prototype.layout=function(){return d.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.prototype.classicLayout=function(){var e,t,r;return 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?u.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),t=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(e){return t.has(e)}),this.graphManager.setAllNodesToApplyGravitation(r)):0<(e=this.getFlatForest()).length?this.positionNodesRadially(e):(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),t=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(e){return t.has(e)}),this.graphManager.setAllNodesToApplyGravitation(r),this.positionNodesRandomly()),this.initSpringEmbedder(),this.runSpringEmbedder(),!0},x.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(0<this.prunedNodesAll.length))return!0;this.isTreeGrowing=!0}if(this.totalIterations%g.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(0<this.prunedNodesAll.length))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(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))}var t;if(this.isTreeGrowing&&(this.growTreeIterations%10==0&&(0<this.prunedNodesAll.length?(this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation(),t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)}),this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=g.DEFAULT_COOLING_FACTOR_INCREMENTAL):(this.isTreeGrowing=!1,this.isGrowthFinished=!0)),this.growTreeIterations++),this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=g.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var e=!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(e,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},r=0;r<e.length;r++){var i=e[r].rect,n=e[r].id;t[n]={id:n,x:i.getCenterX(),y:i.getCenterY(),w:i.width,h:i.height}}return t},x.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var e=!1;if("during"===g.ANIMATE)this.emit("layoutstarted");else{for(;!e;)e=this.tick();this.graphManager.updateBounds()}},x.prototype.calculateNodesToApplyGravitationTo=function(){for(var e,t=[],r=this.graphManager.getGraphs(),i=r.length,n=0;n<i;n++)(e=r[n]).updateConnected(),e.isConnected||(t=t.concat(e.getNodes()));return t},x.prototype.createBendpoints=function(){for(var e=(e=[]).concat(this.graphManager.getAllEdges()),t=new Set,r=0;r<e.length;r++){var i=e[r];if(!t.has(i)){var n=i.getSource(),a=i.getTarget();if(n==a)i.getBendpoints().push(new f),i.getBendpoints().push(new f),this.createDummyNodesForBendpoints(i),t.add(i);else{var s=(s=(s=[]).concat(n.getEdgeListToNode(a))).concat(a.getEdgeListToNode(n));if(!t.has(s[0])){if(1<s.length)for(var o=0;o<s.length;o++){var l=s[o];l.getBendpoints().push(new f),this.createDummyNodesForBendpoints(l)}s.forEach(function(e){t.add(e)})}}}if(t.size==e.length)break}},x.prototype.positionNodesRadially=function(e){for(var t=new p(0,0),r=Math.ceil(Math.sqrt(e.length)),i=0,n=0,a=0,s=new f(0,0),o=0;o<e.length;o++){o%r==0&&(n=i,(a=0)!=o&&(n+=u.DEFAULT_COMPONENT_SEPERATION),i=0);var l=e[o],h=m.findCenterOfTree(l);t.x=a,t.y=n,(s=x.radialLayout(l,h,t)).y>i&&(i=Math.floor(s.y)),a=Math.floor(s.x+u.DEFAULT_COMPONENT_SEPERATION)}this.transform(new f(d.WORLD_CENTER_X-s.x/2,d.WORLD_CENTER_Y-s.y/2))},x.radialLayout=function(e,t,r){var i=Math.max(this.maxDiagonalInTree(e),u.DEFAULT_RADIAL_SEPARATION),t=(x.branchRadialLayout(t,null,0,359,0,i),l.calculateBounds(e)),n=new h;n.setDeviceOrgX(t.getMinX()),n.setDeviceOrgY(t.getMinY()),n.setWorldOrgX(r.x),n.setWorldOrgY(r.y);for(var a=0;a<e.length;a++)e[a].transform(n);return i=new f(t.getMaxX(),t.getMaxY()),n.inverseTransformPoint(i)},x.branchRadialLayout=function(e,t,r,i,n,a){(s=(i-r+1)/2)<0&&(s+=180);var s=(s+r)%360*v.TWO_PI/360,o=(Math.cos(s),n*Math.cos(s)),s=n*Math.sin(s),l=(e.setCenter(o,s),[]),h=(l=l.concat(e.getEdges())).length;null!=t&&h--;for(var c=0,u=l.length,d=e.getEdgesBetween(t);1<d.length;){var p=d[0];d.splice(0,1),0<=(p=l.indexOf(p))&&l.splice(p,1),u--,h--}for(var o=null!=t?(l.indexOf(d[0])+1)%u:0,g=Math.abs(i-r)/h,f=o;c!=h;f=++f%u){var m=l[f].getOtherEnd(e);m!=t&&(x.branchRadialLayout(m,e,m=(r+c*g)%360,(m+g)%360,n+a,a),c++)}},x.maxDiagonalInTree=function(e){for(var t=y.MIN_VALUE,r=0;r<e.length;r++){var i=e[r].getDiagonal();t<i&&(t=i)}return t},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var l=this,h={};this.memberGroups={},this.idToDummyNode={};for(var e=[],t=this.graphManager.getAllNodes(),r=0;r<t.length;r++){var i=(n=t[r]).getParent();0!==this.getNodeDegreeWithChildren(n)||null!=i.id&&this.getToBeTiled(i)||e.push(n)}for(r=0;r<e.length;r++){var n,a=(n=e[r]).getParent().id;"u"<typeof h[a]&&(h[a]=[]),h[a]=h[a].concat(n)}Object.keys(h).forEach(function(e){if(1<h[e].length){var t="DummyCompound_"+e,r=(l.memberGroups[t]=h[e],h[e][0].getParent()),i=new c(l.graphManager),n=(i.id=t,i.paddingLeft=r.paddingLeft||0,i.paddingRight=r.paddingRight||0,i.paddingBottom=r.paddingBottom||0,i.paddingTop=r.paddingTop||0,l.idToDummyNode[t]=i,l.getGraphManager().add(l.newGraph(),i)),a=r.getChild();a.add(i);for(var s=0;s<h[e].length;s++){var o=h[e][s];a.remove(o),n.add(o)}}})},x.prototype.clearCompounds=function(){var e={},t={};this.performDFSOnCompounds();for(var r=0;r<this.compoundOrder.length;r++)t[this.compoundOrder[r].id]=this.compoundOrder[r],e[this.compoundOrder[r].id]=[].concat(this.compoundOrder[r].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[r].getChild()),this.compoundOrder[r].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(e,t)},x.prototype.clearZeroDegreeMembers=function(){var r=this,i=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(e){var t=r.idToDummyNode[e];i[e]=r.tileNodes(r.memberGroups[e],t.paddingLeft+t.paddingRight),t.rect.width=i[e].width,t.rect.height=i[e].height})},x.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;0<=e;e--){var t=this.compoundOrder[e],r=t.id;this.adjustLocations(this.tiledMemberPack[r],t.rect.x,t.rect.y,t.paddingLeft,t.paddingTop)}},x.prototype.repopulateZeroDegreeMembers=function(){var i=this,n=this.tiledZeroDegreePack;Object.keys(n).forEach(function(e){var t=i.idToDummyNode[e],r=t.paddingLeft;i.adjustLocations(n[e],t.rect.x,t.rect.y,r,t.paddingTop)})},x.prototype.getToBeTiled=function(e){var t=e.id;if(null!=this.toBeTiled[t])return this.toBeTiled[t];if(null==(e=e.getChild()))return this.toBeTiled[t]=!1;for(var r=e.getNodes(),i=0;i<r.length;i++){var n=r[i];if(0<this.getNodeDegree(n))return this.toBeTiled[t]=!1;if(null==n.getChild())this.toBeTiled[n.id]=!1;else if(!this.getToBeTiled(n))return this.toBeTiled[t]=!1}return this.toBeTiled[t]=!0},x.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),r=0,i=0;i<t.length;i++){var n=t[i];n.getSource().id!==n.getTarget().id&&(r+=1)}return r},x.prototype.getNodeDegreeWithChildren=function(e){var t=this.getNodeDegree(e);if(null!=e.getChild())for(var r=e.getChild().getNodes(),i=0;i<r.length;i++){var n=r[i];t+=this.getNodeDegreeWithChildren(n)}return t},x.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},x.prototype.fillCompexOrderByDFS=function(e){for(var t=0;t<e.length;t++){var r=e[t];null!=r.getChild()&&this.fillCompexOrderByDFS(r.getChild().getNodes()),this.getToBeTiled(r)&&this.compoundOrder.push(r)}},x.prototype.adjustLocations=function(e,t,r,i,n){r+=n;for(var a=t+=i,s=0;s<e.rows.length;s++){var o=e.rows[s];t=a;for(var l=0,h=0;h<o.length;h++){var c=o[h];c.rect.x=t,c.rect.y=r,t+=c.rect.width+e.horizontalPadding,c.rect.height>l&&(l=c.rect.height)}r+=l+e.verticalPadding}},x.prototype.tileCompoundMembers=function(r,i){var n=this;this.tiledMemberPack=[],Object.keys(r).forEach(function(e){var t=i[e];n.tiledMemberPack[e]=n.tileNodes(r[e],t.paddingLeft+t.paddingRight),t.rect.width=n.tiledMemberPack[e].width,t.rect.height=n.tiledMemberPack[e].height})},x.prototype.tileNodes=function(e,t){var r={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:u.TILING_PADDING_VERTICAL,horizontalPadding:u.TILING_PADDING_HORIZONTAL};e.sort(function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:e.rect.width*e.rect.height<t.rect.width*t.rect.height?1:0});for(var i=0;i<e.length;i++){var n=e[i];0==r.rows.length?this.insertNodeToRow(r,n,0,t):this.canAddHorizontal(r,n.rect.width,n.rect.height)?this.insertNodeToRow(r,n,this.getShortestRowIndex(r),t):this.insertNodeToRow(r,n,r.rows.length,t),this.shiftToLastRow(r)}return r},x.prototype.insertNodeToRow=function(e,t,r,i){r==e.rows.length&&(e.rows.push([]),e.rowWidth.push(i),e.rowHeight.push(0));var i=e.rowWidth[r]+t.rect.width,i=(0<e.rows[r].length&&(i+=e.horizontalPadding),e.rowWidth[r]=i,e.width<i&&(e.width=i),t.rect.height),n=(0<r&&(i+=e.verticalPadding),0);i>e.rowHeight[r]&&(n=e.rowHeight[r],e.rowHeight[r]=i,n=e.rowHeight[r]-n),e.height+=n,e.rows[r].push(t)},x.prototype.getShortestRowIndex=function(e){for(var t=-1,r=Number.MAX_VALUE,i=0;i<e.rows.length;i++)e.rowWidth[i]<r&&(t=i,r=e.rowWidth[i]);return t},x.prototype.getLongestRowIndex=function(e){for(var t=-1,r=Number.MIN_VALUE,i=0;i<e.rows.length;i++)e.rowWidth[i]>r&&(t=i,r=e.rowWidth[i]);return t},x.prototype.canAddHorizontal=function(e,t,r){var i,n,a=this.getShortestRowIndex(e);return a<0||(n=e.rowWidth[a])+e.horizontalPadding+t<=e.width||(i=0,e.rowHeight[a]<r&&0<a&&(i=r+e.verticalPadding-e.rowHeight[a]),a=t+e.horizontalPadding<=e.width-n?(e.height+i)/(n+t+e.horizontalPadding):(e.height+i)/e.width,i=r+e.verticalPadding,(a<1?1/a:a)<((n=e.width<t?(e.height+i)/t:(e.height+i)/e.width)<1?1/n:n))},x.prototype.shiftToLastRow=function(e){var t=this.getLongestRowIndex(e),r=e.rowWidth.length-1,i=e.rows[t],n=i[i.length-1],a=n.width+e.horizontalPadding;if(e.width-e.rowWidth[r]>a&&t!=r){i.splice(-1,1),e.rows[r].push(n),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[r]=e.rowWidth[r]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var s=Number.MIN_VALUE,o=0;o<i.length;o++)i[o].height>s&&(s=i[o].height);0<t&&(s+=e.verticalPadding),a=e.rowHeight[t]+e.rowHeight[r],e.rowHeight[t]=s,e.rowHeight[r]<n.height+e.verticalPadding&&(e.rowHeight[r]=n.height+e.verticalPadding),n=e.rowHeight[t]+e.rowHeight[r],e.height+=n-a,this.shiftToLastRow(e)}},x.prototype.tilingPreLayout=function(){u.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},x.prototype.tilingPostLayout=function(){u.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},x.prototype.reduceTrees=function(){for(var e,t=[],r=!0;r;){for(var i=this.graphManager.getAllNodes(),n=[],r=!1,a=0;a<i.length;a++)1!=(e=i[a]).getEdges().length||e.getEdges()[0].isInterGraph||null!=e.getChild()||(n.push([e,e.getEdges()[0],e.getOwner()]),r=!0);if(1==r){for(var s=[],o=0;o<n.length;o++)1==n[o][0].getEdges().length&&(s.push(n[o]),n[o][0].getOwner().remove(n[o][0]));t.push(s),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=t},x.prototype.growTree=function(e){for(var t,r=e[e.length-1],i=0;i<r.length;i++)t=r[i],this.findPlaceforPrunedNode(t),t[2].add(t[0]),t[2].add(t[1],t[1].source,t[1].target);e.splice(e.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},x.prototype.findPlaceforPrunedNode=function(e){var t=e[0],r=(e=t==e[1].source?e[1].target:e[1].source).startX,i=e.finishX,n=e.startY,a=e.finishY,s=[0,0,0,0];if(0<n)for(var o=r;o<=i;o++)s[0]+=this.grid[o][n-1].length+this.grid[o][n].length-1;if(i<this.grid.length-1)for(o=n;o<=a;o++)s[1]+=this.grid[i+1][o].length+this.grid[i][o].length-1;if(a<this.grid[0].length-1)for(o=r;o<=i;o++)s[2]+=this.grid[o][a+1].length+this.grid[o][a].length-1;if(0<r)for(o=n;o<=a;o++)s[3]+=this.grid[r-1][o].length+this.grid[r][o].length-1;for(var l,h,c,u,d=y.MAX_VALUE,p=0;p<s.length;p++)s[p]<d?(d=s[p],l=1,h=p):s[p]==d&&l++;3==l&&0==d?0==s[0]&&0==s[1]&&0==s[2]?c=1:0==s[0]&&0==s[1]&&0==s[3]?c=0:0==s[0]&&0==s[2]&&0==s[3]?c=3:0==s[1]&&0==s[2]&&0==s[3]&&(c=2):c=2==l&&0==d?(u=Math.floor(2*Math.random()),0==s[0]&&0==s[1]?0==u?0:1:0==s[0]&&0==s[2]?0==u?0:2:0==s[0]&&0==s[3]?0==u?0:3:0==s[1]&&0==s[2]?0==u?1:2:0==s[1]&&0==s[3]?0==u?1:3:0==u?2:3):4==l&&0==d?u=Math.floor(4*Math.random()):h,0==c?t.setCenter(e.getCenterX(),e.getCenterY()-e.getHeight()/2-g.DEFAULT_EDGE_LENGTH-t.getHeight()/2):1==c?t.setCenter(e.getCenterX()+e.getWidth()/2+g.DEFAULT_EDGE_LENGTH+t.getWidth()/2,e.getCenterY()):2==c?t.setCenter(e.getCenterX(),e.getCenterY()+e.getHeight()/2+g.DEFAULT_EDGE_LENGTH+t.getHeight()/2):t.setCenter(e.getCenterX()-e.getWidth()/2-g.DEFAULT_EDGE_LENGTH-t.getWidth()/2,e.getCenterY())},e.exports=x},function(e,t,r){var i={};i.layoutBase=r(0),i.CoSEConstants=r(1),i.CoSEEdge=r(2),i.CoSEGraph=r(3),i.CoSEGraphManager=r(4),i.CoSELayout=r(6),i.CoSENode=r(5),e.exports=i}],a={},mt(i,"__webpack_require__"),i.m=n,i.c=a,i.i=function(e){return e},i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},i.n=function(e){var t=e&&e.__esModule?mt(function(){return e.default},"getDefault"):mt(function(){return e},"getModuleExports");return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=7);function i(e){var t;return(a[e]||(t=a[e]={i:e,l:!1,exports:{}},n[e].call(t.exports,t,t.exports,i),t.l=!0,t)).exports}var n,a})}),Tue=tYe((r,i)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t(bue()):"function"==typeof define&&define.amd?define(["cose-base"],t):"object"==typeof r?r.cytoscapeCoseBilkent=t(bue()):e.cytoscapeCoseBilkent=t(e.coseBase)},"webpackUniversalModuleDefinition")(r,function(r){return n=[function(e,t){e.exports=r},function(e,t,r){var i=r(0).layoutBase.LayoutConstants,n=r(0).layoutBase.FDLayoutConstants,a=r(0).CoSEConstants,g=r(0).CoSELayout,u=r(0).CoSENode,d=r(0).layoutBase.PointD,p=r(0).layoutBase.DimensionD,s={ready:mt(function(){},"ready"),stop:mt(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 o(e,t){var r,i={};for(r in e)i[r]=e[r];for(r in t)i[r]=t[r];return i}function l(e){this.options=o(s,e),h(this.options)}mt(o,"extend"),mt(l,"_CoSELayout");var h=mt(function(e){null!=e.nodeRepulsion&&(a.DEFAULT_REPULSION_STRENGTH=n.DEFAULT_REPULSION_STRENGTH=e.nodeRepulsion),null!=e.idealEdgeLength&&(a.DEFAULT_EDGE_LENGTH=n.DEFAULT_EDGE_LENGTH=e.idealEdgeLength),null!=e.edgeElasticity&&(a.DEFAULT_SPRING_STRENGTH=n.DEFAULT_SPRING_STRENGTH=e.edgeElasticity),null!=e.nestingFactor&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),null!=e.gravity&&(a.DEFAULT_GRAVITY_STRENGTH=n.DEFAULT_GRAVITY_STRENGTH=e.gravity),null!=e.numIter&&(a.MAX_ITERATIONS=n.MAX_ITERATIONS=e.numIter),null!=e.gravityRange&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=n.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),null!=e.gravityCompound&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),null!=e.gravityRangeCompound&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),null!=e.initialEnergyOnIncremental&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=n.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),"draft"==e.quality?i.QUALITY=0:"proof"==e.quality?i.QUALITY=2:i.QUALITY=1,a.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!e.randomize,a.ANIMATE=n.ANIMATE=i.ANIMATE=e.animate,a.TILE=e.tile,a.TILING_PADDING_VERTICAL="function"==typeof e.tilingPaddingVertical?e.tilingPaddingVertical.call():e.tilingPaddingVertical,a.TILING_PADDING_HORIZONTAL="function"==typeof e.tilingPaddingHorizontal?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal},"getUserOptions"),r=(l.prototype.run=function(){var s,o,l=this.options,h=(this.idToLNode={},this.layout=new g),c=this,e=(c.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this}),h.newGraphManager()),t=(this.gm=e,this.options.eles.nodes()),r=this.options.eles.edges();this.root=e.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(t),h);for(var i=0;i<r.length;i++){var n=r[i],a=this.idToLNode[n.data("source")],u=this.idToLNode[n.data("target")];a!==u&&0==a.getEdgesBetween(u).length&&(e.add(h.newEdge(),a,u).id=n.id())}var d=mt(function(e,t){return t=(e="number"==typeof e?t:e).data("id"),{x:(e=c.idToLNode[t]).getRect().getCenterX(),y:e.getRect().getCenterY()}},"getPositions"),p=mt(function e(){for(var t,a,r=mt(function(){l.fit&&l.cy.fit(l.eles,l.padding),s||(s=!0,c.cy.one("layoutready",l.ready),c.cy.trigger({type:"layoutready",layout:c}))},"afterReposition"),i=c.options.refresh,n=0;n<i&&!t;n++)t=c.stopped||c.layout.tick();t?(h.checkLayoutSuccess()&&!h.isSubLayout&&h.doPostLayout(),h.tilingPostLayout&&h.tilingPostLayout(),h.isLayoutFinished=!0,c.options.eles.nodes().positions(d),r(),c.cy.one("layoutstop",c.options.stop),c.cy.trigger({type:"layoutstop",layout:c}),o&&cancelAnimationFrame(o),s=!1):(a=c.layout.getPositionsData(),l.eles.nodes().positions(function(e,t){if(!(e="number"==typeof e?t:e).isParent()){for(var r=e.id(),i=a[r],n=e;null==i&&(i=a[n.data("parent")]||a["DummyCompound_"+n.data("parent")],a[r]=i,null!=(n=n.parent()[0])););return null!=i?{x:i.x,y:i.y}:{x:e.position("x"),y:e.position("y")}}}),r(),o=requestAnimationFrame(e))},"iterateAnimated");return h.addListener("layoutstarted",function(){"during"===c.options.animate&&(o=requestAnimationFrame(p))}),h.runLayout(),"during"!==this.options.animate&&(c.options.eles.nodes().not(":parent").layoutPositions(c,c.options,d),s=!1),this},l.prototype.getTopMostNodes=function(e){for(var i={},t=0;t<e.length;t++)i[e[t].id()]=!0;return e.filter(function(e,t){for(var r=(e="number"==typeof e?t:e).parent()[0];null!=r;){if(i[r.id()])return!1;r=r.parent()[0]}return!0})},l.prototype.processChildrenList=function(e,t,r){for(var i=t.length,n=0;n<i;n++){var a,s,o,l=t[n],h=l.children(),c=l.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});(c=null!=l.outerWidth()&&null!=l.outerHeight()?e.add(new u(r.graphManager,new d(l.position("x")-c.w/2,l.position("y")-c.h/2),new p(parseFloat(c.w),parseFloat(c.h)))):e.add(new u(this.graphManager))).id=l.data("id"),c.paddingLeft=parseInt(l.css("padding")),c.paddingTop=parseInt(l.css("padding")),c.paddingRight=parseInt(l.css("padding")),c.paddingBottom=parseInt(l.css("padding")),this.options.nodeDimensionsIncludeLabels&&l.isParent()&&(o=l.boundingBox({includeLabels:!0,includeNodes:!1}).w,a=l.boundingBox({includeLabels:!0,includeNodes:!1}).h,s=l.css("text-halign"),c.labelWidth=o,c.labelHeight=a,c.labelPos=s),this.idToLNode[l.data("id")]=c,isNaN(c.rect.x)&&(c.rect.x=0),isNaN(c.rect.y)&&(c.rect.y=0),null!=h&&0<h.length&&(o=r.getGraphManager().add(r.newGraph(),c),this.processChildrenList(o,h,r))}},l.prototype.stop=function(){return this.stopped=!0,this},mt(function(e){e("layout","cose-bilkent",l)},"register"));typeof cytoscape<"u"&&r(cytoscape),e.exports=r}],a={},mt(i,"__webpack_require__"),i.m=n,i.c=a,i.i=function(e){return e},i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},i.n=function(e){var t=e&&e.__esModule?mt(function(){return e.default},"getDefault"):mt(function(){return e},"getModuleExports");return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=1);function i(e){var t;return(a[e]||(t=a[e]={i:e,l:!1,exports:{}},n[e].call(t.exports,t,t.exports,i),t.l=!0,t)).exports}var n,a})});function kue(e,i){e.forEach(t=>{let r={id:t.id,labelText:t.label,height:t.height,width:t.width,padding:t.padding??0};Object.keys(t).forEach(e=>{["id","label","height","width","padding","x","y"].includes(e)||(r[e]=t[e])}),i.add({group:"nodes",data:r,position:{x:t.x??0,y:t.y??0}})})}function wue(e,i){e.forEach(t=>{let r={id:t.id,source:t.start,target:t.end};Object.keys(t).forEach(e=>{["id","start","end"].includes(e)||(r[e]=t[e])}),i.add({group:"edges",data:r})})}function Cue(i){return new Promise(t=>{let e=Q("body").append("div").attr("id","cy").attr("style","display:none"),r=yue({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});e.remove(),kue(i.nodes,r),wue(i.edges,r),r.nodes().forEach(function(t){t.layoutDimensions=()=>{var e=t.data();return{w:e.width,h:e.height}}}),r.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),r.ready(e=>{B.info("Cytoscape ready",e),t(r)})})}function Eue(e){return e.nodes().map(e=>{let t=e.data(),r=e.position(),i={id:t.id,x:r.x,y:r.y};return Object.keys(t).forEach(e=>{"id"!==e&&(i[e]=t[e])}),i})}function Sue(e){return e.edges().map(e=>{let t=e.data(),r=e._private.rscratch,i={id:t.id,source:t.source,target:t.target,startX:r.startX,startY:r.startY,midX:r.midX,midY:r.midY,endX:r.endX,endY:r.endY};return Object.keys(t).forEach(e=>{["id","source","target"].includes(e)||(i[e]=t[e])}),i})}var _ue,Aue=i(()=>{vue(),_ue=U(Tue(),1),Sk(),e(),yue.use(_ue.default),mt(kue,"addNodes"),mt(wue,"addEdges"),mt(Cue,"createCytoscapeInstance"),mt(Eue,"extractPositionedNodes"),mt(Sue,"extractPositionedEdges")});async function Lue(e,t){B.debug("Starting cose-bilkent layout algorithm");try{Rue(e);var r=await Cue(e),i=Eue(r),n=Sue(r);return B.debug(`Layout completed: ${i.length} nodes, ${n.length} edges`),{nodes:i,edges:n}}catch(e){throw B.error("Error in cose-bilkent layout algorithm:",e),e}}function Rue(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))return!0;throw new Error("Edges array is required in layout data")}var Iue,Nue=i(()=>{e(),Aue(),mt(Lue,"executeCoseBilkentLayout"),mt(Rue,"validateLayoutData")}),Due=i(()=>{Nue(),Iue=mt(async(n,e,{insertCluster:a,insertEdge:s,insertEdgeLabel:o,insertMarkers:t,insertNode:l,log:h,positionEdgeLabel:c},{})=>{let u={},d={},r=e.select("g"),p=(t(r,n.markers,n.type,n.diagramId),r.insert("g").attr("class","subgraphs")),g=r.insert("g").attr("class","edgePaths"),f=r.insert("g").attr("class","edgeLabels"),m=r.insert("g").attr("class","nodes"),i=(h.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(n.nodes.map(async e=>{var t,r,i;e.isGroup?(t={...e},d[e.id]=t,u[e.id]=t,await a(p,e)):(t={...e},u[e.id]=t,i=(r=await l(m,e,{config:n.config,dir:n.direction||"TB"})).node().getBBox(),t.width=i.width,t.height=i.height,t.domId=r,h.debug(`Node ${e.id} dimensions: ${i.width}x`+i.height))})),h.debug("Running cose-bilkent layout algorithm"),{...n,nodes:n.nodes.map(e=>{var t=u[e.id];return{...e,width:t.width,height:t.height}})}),y=await Lue(i,n.config);h.debug("Positioning nodes based on layout results"),y.nodes.forEach(e=>{var t=u[e.id];t?.domId&&(t.domId.attr("transform",`translate(${e.x}, ${e.y})`),t.x=e.x,t.y=e.y,h.debug(`Positioned node ${t.id} at center (${e.x}, ${e.y})`))}),y.edges.forEach(t=>{var e=n.edges.find(e=>e.id===t.id);e&&(e.points=[{x:t.startX,y:t.startY},{x:t.midX,y:t.midY},{x:t.endX,y:t.endY}])}),h.debug("Inserting and positioning edges"),await Promise.all(n.edges.map(async t=>{await o(f,t);var e,r=u[t.start??""],i=u[t.end??""];r&&i&&(e=(e=y.edges.find(e=>e.id===t.id))?(h.debug("APA01 positionedEdge",e),{...t}):{...t,points:[{x:r.x||0,y:r.y||0},{x:i.x||0,y:i.y||0}]},r=s(g,e,d,n.type,r,i,n.diagramId),c(e,r))})),h.debug("Cose-bilkent rendering completed")},"render")}),Mue={};sYe(Mue,{render:()=>Oue});var Oue,Bue,Pue,$ue,Fue,zue,que,Wue,Uue,Gue,jue,Vue,Yue,Hue,Xue,Kue,Zue,Que,Jue,ede=i(()=>{Due(),Oue=Iue}),tde=i(()=>{dP(),e(),Bue={},Pue=mt(e=>{for(var t of e)Bue[t.name]=t},"registerLayoutLoaders"),mt(()=>{Pue([{name:"dagre",loader:mt(async()=>Promise.resolve().then(()=>(jZ(),WZ)),"loader")},{name:"cose-bilkent",loader:mt(async()=>Promise.resolve().then(()=>(ede(),Mue)),"loader")}])},"registerDefaultLayoutLoaders")(),$ue=mt(async(e,t)=>{if(!(e.layoutAlgorithm in Bue))throw new Error("Unknown layout algorithm: "+e.layoutAlgorithm);if(e.diagramId)for(var r of e.nodes){var i=r.domId||r.id;r.domId=e.diagramId+"-"+i}var n=Bue[e.layoutAlgorithm],a=await n.loader(),{theme:s,themeVariables:o}=e.config,{useGradient:o,gradientStart:l,gradientStop:h}=o,c=t.attr("id");return t.append("defs").append("filter").attr("id",c+"-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",s?.includes("dark")?"#FFFFFF":"#000000"),t.append("defs").append("filter").attr("id",c+"-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",s?.includes("dark")?"#FFFFFF":"#000000"),o&&((c=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%")).append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),c.append("svg:stop").attr("offset","100%").attr("stop-color",h).attr("stop-opacity",1)),a.render(e,t,cP,{algorithm:n.algorithm})},"render"),Fue=mt((e="",{fallback:t="dagre"}={})=>{if(e in Bue)return e;if(t in Bue)return B.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")}),rde=i(()=>{Rc(),e(),zue=mt((e,t,r,i)=>{e.attr("class",r);var{width:r,height:n,x:a,y:s}=que(e,t),i=(xc(e,n,r,i),Wue(a,s,r,n,t));e.attr("viewBox",i),B.debug(`viewBox configured: ${i} with padding: `+t)},"setupViewPortForSVG"),que=mt((e,t)=>({width:(e=e.node()?.getBBox()||{width:0,height:0,x:0,y:0}).width+2*t,height:e.height+2*t,x:e.x,y:e.y}),"calculateDimensionsWithPadding"),Wue=mt((e,t,r,i,n)=>e-n+` ${t-n} ${r} `+i,"createViewBox")}),ide=i(()=>{ju(),e(),QO(),tde(),rde(),S7(),Uue=mt(function(e,t){return t.db.getClasses()},"getClasses"),Gue=mt(async function(e,t,r,i){B.info("REF0:"),B.info("Drawing state diagram (v2)",t);var{securityLevel:n,flowchart:a,layout:s}=P(),o=(i.db.setDiagramId(t),B.debug("Before getData: "),i.db.getData()),n=(B.debug("Data: ",o),$O(t,n)),l=i.db.getDirection(),s=(o.type=i.type,o.layoutAlgorithm=Fue(s),"dagre"===o.layoutAlgorithm&&"elk"===s&&B.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."),o.direction=l,o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["point","circle","cross"],o.diagramId=t,B.debug("REF1:",o),await $ue(o,n),o.config.flowchart?.diagramPadding??8);k7.insertTitle(n,"flowchartTitleText",a?.titleTopMargin||0,i.db.getDiagramTitle()),zue(n,s,"flowchart",a?.useMaxWidth||!1)},"draw"),jue={getClasses:Uue,draw:Gue}}),nde=i(()=>{function B(){this.yy={}}var e=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),P=[1,4],$=[1,3],F=[1,5],z=[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],q=[2,2],W=[1,13],U=[1,14],G=[1,15],j=[1,16],V=[1,23],Y=[1,25],H=[1,26],X=[1,27],t=[1,50],r=[1,49],K=[1,29],Z=[1,30],Q=[1,31],J=[1,32],ee=[1,33],i=[1,45],n=[1,47],a=[1,43],s=[1,48],o=[1,44],l=[1,51],h=[1,46],c=[1,52],u=[1,53],te=[1,34],re=[1,35],ie=[1,36],ne=[1,37],ae=[1,38],se=[1,58],d=[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],p=[1,62],g=[1,61],f=[1,63],oe=[8,9,11,75,77,78],le=[1,79],he=[1,92],ce=[1,97],ue=[1,96],de=[1,93],pe=[1,89],ge=[1,95],fe=[1,91],me=[1,98],ye=[1,94],ve=[1,99],xe=[1,90],be=[8,9,10,11,40,75,77,78],m=[8,9,10,11,40,46,75,77,78],y=[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],Te=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],ke=[44,60,89,102,105,106,109,111,114,115,116],we=[1,122],Ce=[1,123],Ee=[1,125],Se=[1,124],_e=[44,60,62,74,89,102,105,106,109,111,114,115,116],Ae=[1,134],Le=[1,148],Re=[1,149],Ie=[1,150],Ne=[1,151],De=[1,136],Me=[1,138],Oe=[1,142],Be=[1,143],Pe=[1,144],$e=[1,145],Fe=[1,146],ze=[1,147],qe=[1,152],We=[1,153],Ue=[1,132],Ge=[1,133],je=[1,140],Ve=[1,135],Ye=[1,139],He=[1,137],Xe=[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],Ke=[1,155],Ze=[1,157],v=[8,9,11],x=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],b=[1,177],T=[1,173],k=[1,174],w=[1,178],C=[1,175],E=[1,176],Qe=[77,116,119],S=[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],Je=[10,106],et=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],_=[1,248],A=[1,246],L=[1,250],R=[1,244],I=[1,245],N=[1,247],D=[1,249],M=[1,251],tt=[1,269],rt=[8,9,11,106],O=[8,9,10,11,60,84,105,106,109,110,111,112],P={trace:mt(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:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 2:this.$=[];break;case 3:(!Array.isArray(a[o])||0<a[o].length)&&a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 183:this.$=a[o];break;case 11:i.setDirection("TB"),this.$="TB";break;case 12:i.setDirection(a[o-1]),this.$=a[o-1];break;case 27:this.$=a[o-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=i.addSubGraph(a[o-6],a[o-1],a[o-4]);break;case 34:this.$=i.addSubGraph(a[o-3],a[o-1],a[o-3]);break;case 35:this.$=i.addSubGraph(void 0,a[o-1],void 0);break;case 37:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 38:case 39:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 43:this.$=a[o-1]+a[o];break;case 44:this.$=a[o];break;case 45:i.addVertex(a[o-1][a[o-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[o]),i.addLink(a[o-3].stmt,a[o-1],a[o-2]),this.$={stmt:a[o-1],nodes:a[o-1].concat(a[o-3].nodes)};break;case 46:i.addLink(a[o-2].stmt,a[o],a[o-1]),this.$={stmt:a[o],nodes:a[o].concat(a[o-2].nodes)};break;case 47:i.addLink(a[o-3].stmt,a[o-1],a[o-2]),this.$={stmt:a[o-1],nodes:a[o-1].concat(a[o-3].nodes)};break;case 48:this.$={stmt:a[o-1],nodes:a[o-1]};break;case 49:i.addVertex(a[o-1][a[o-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[o]),this.$={stmt:a[o-1],nodes:a[o-1],shapeData:a[o]};break;case 50:this.$={stmt:a[o],nodes:a[o]};break;case 51:this.$=[a[o]];break;case 52:i.addVertex(a[o-5][a[o-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[o-4]),this.$=a[o-5].concat(a[o]);break;case 53:this.$=a[o-4].concat(a[o]);break;case 54:this.$=a[o];break;case 55:this.$=a[o-2],i.setClass(a[o-2],a[o]);break;case 56:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"square");break;case 57:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"doublecircle");break;case 58:this.$=a[o-5],i.addVertex(a[o-5],a[o-2],"circle");break;case 59:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"ellipse");break;case 60:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"stadium");break;case 61:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"subroutine");break;case 62:this.$=a[o-7],i.addVertex(a[o-7],a[o-1],"rect",void 0,void 0,void 0,Object.fromEntries([[a[o-5],a[o-3]]]));break;case 63:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"cylinder");break;case 64:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"round");break;case 65:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"diamond");break;case 66:this.$=a[o-5],i.addVertex(a[o-5],a[o-2],"hexagon");break;case 67:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"odd");break;case 68:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"trapezoid");break;case 69:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"inv_trapezoid");break;case 70:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"lean_right");break;case 71:this.$=a[o-3],i.addVertex(a[o-3],a[o-1],"lean_left");break;case 72:this.$=a[o],i.addVertex(a[o]);break;case 73:a[o-1].text=a[o],this.$=a[o-1];break;case 74:case 75:a[o-2].text=a[o-1],this.$=a[o-2];break;case 76:this.$=a[o];break;case 77:var l=i.destructLink(a[o],a[o-2]);this.$={type:l.type,stroke:l.stroke,length:l.length,text:a[o-1]};break;case 78:l=i.destructLink(a[o],a[o-2]),this.$={type:l.type,stroke:l.stroke,length:l.length,text:a[o-1],id:a[o-3]};break;case 79:this.$={text:a[o],type:"text"};break;case 80:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 81:this.$={text:a[o],type:"string"};break;case 82:this.$={text:a[o],type:"markdown"};break;case 83:l=i.destructLink(a[o]),this.$={type:l.type,stroke:l.stroke,length:l.length};break;case 84:l=i.destructLink(a[o]),this.$={type:l.type,stroke:l.stroke,length:l.length,id:a[o-1]};break;case 85:this.$=a[o-1];break;case 86:this.$={text:a[o],type:"text"};break;case 87:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 88:this.$={text:a[o],type:"string"};break;case 89:case 104:this.$={text:a[o],type:"markdown"};break;case 101:this.$={text:a[o],type:"text"};break;case 102:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 103:this.$={text:a[o],type:"text"};break;case 105:this.$=a[o-4],i.addClass(a[o-2],a[o]);break;case 106:this.$=a[o-4],i.setClass(a[o-2],a[o]);break;case 107:case 115:this.$=a[o-1],i.setClickEvent(a[o-1],a[o]);break;case 108:case 116:this.$=a[o-3],i.setClickEvent(a[o-3],a[o-2]),i.setTooltip(a[o-3],a[o]);break;case 109:this.$=a[o-2],i.setClickEvent(a[o-2],a[o-1],a[o]);break;case 110:this.$=a[o-4],i.setClickEvent(a[o-4],a[o-3],a[o-2]),i.setTooltip(a[o-4],a[o]);break;case 111:this.$=a[o-2],i.setLink(a[o-2],a[o]);break;case 112:this.$=a[o-4],i.setLink(a[o-4],a[o-2]),i.setTooltip(a[o-4],a[o]);break;case 113:this.$=a[o-4],i.setLink(a[o-4],a[o-2],a[o]);break;case 114:this.$=a[o-6],i.setLink(a[o-6],a[o-4],a[o]),i.setTooltip(a[o-6],a[o-2]);break;case 117:this.$=a[o-1],i.setLink(a[o-1],a[o]);break;case 118:this.$=a[o-3],i.setLink(a[o-3],a[o-2]),i.setTooltip(a[o-3],a[o]);break;case 119:this.$=a[o-3],i.setLink(a[o-3],a[o-2],a[o]);break;case 120:this.$=a[o-5],i.setLink(a[o-5],a[o-4],a[o]),i.setTooltip(a[o-5],a[o-2]);break;case 121:this.$=a[o-4],i.addVertex(a[o-2],void 0,void 0,a[o]);break;case 122:this.$=a[o-4],i.updateLink([a[o-2]],a[o]);break;case 123:this.$=a[o-4],i.updateLink(a[o-2],a[o]);break;case 124:this.$=a[o-8],i.updateLinkInterpolate([a[o-6]],a[o-2]),i.updateLink([a[o-6]],a[o]);break;case 125:this.$=a[o-8],i.updateLinkInterpolate(a[o-6],a[o-2]),i.updateLink(a[o-6],a[o]);break;case 126:this.$=a[o-6],i.updateLinkInterpolate([a[o-4]],a[o]);break;case 127:this.$=a[o-6],i.updateLinkInterpolate(a[o-4],a[o]);break;case 128:case 130:this.$=[a[o]];break;case 129:case 131:a[o-2].push(a[o]),this.$=a[o-2];break;case 133:this.$=a[o-1]+a[o];break;case 181:this.$=a[o];break;case 182:case 184:this.$=a[o-1]+""+a[o];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"}}},"anonymous"),table:[{3:1,4:2,9:P,10:$,12:F},{1:[3]},e(z,q,{5:6}),{4:7,9:P,10:$,12:F},{4:8,9:P,10:$,12:F},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:W,9:U,10:G,11:j,20:17,22:18,23:19,24:20,25:21,26:22,27:V,33:24,34:Y,36:H,38:X,42:28,43:39,44:t,45:40,47:41,60:r,84:K,85:Z,86:Q,87:J,88:ee,89:i,102:n,105:a,106:s,109:o,111:l,113:42,114:h,115:c,116:u,121:te,122:re,123:ie,124:ne,125:ae},e(z,[2,9]),e(z,[2,10]),e(z,[2,11]),{8:[1,55],9:[1,56],10:se,15:54,18:57},e(d,[2,3]),e(d,[2,4]),e(d,[2,5]),e(d,[2,6]),e(d,[2,7]),e(d,[2,8]),{8:p,9:g,11:f,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:p,9:g,11:f,21:68},{8:p,9:g,11:f,21:69},{8:p,9:g,11:f,21:70},{8:p,9:g,11:f,21:71},{8:p,9:g,11:f,21:72},{8:p,9:g,10:[1,73],11:f,21:74},e(d,[2,36]),{35:[1,75]},{37:[1,76]},e(d,[2,39]),e(oe,[2,50],{18:77,39:78,10:se,40:le}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:he,44:ce,60:ue,80:[1,87],89:de,95:[1,84],97:[1,85],101:86,105:pe,106:ge,109:fe,111:me,114:ye,115:ve,116:xe,120:88},e(d,[2,185]),e(d,[2,186]),e(d,[2,187]),e(d,[2,188]),e(d,[2,189]),e(be,[2,51]),e(be,[2,54],{46:[1,100]}),e(m,[2,72],{113:113,29:[1,101],44:t,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:r,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:i,102:n,105:a,106:s,109:o,111:l,114:h,115:c,116:u}),e(y,[2,181]),e(y,[2,142]),e(y,[2,143]),e(y,[2,144]),e(y,[2,145]),e(y,[2,146]),e(y,[2,147]),e(y,[2,148]),e(y,[2,149]),e(y,[2,150]),e(y,[2,151]),e(y,[2,152]),e(z,[2,12]),e(z,[2,18]),e(z,[2,19]),{9:[1,114]},e(Te,[2,26],{18:115,10:se}),e(d,[2,27]),{42:116,43:39,44:t,45:40,47:41,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:42,114:h,115:c,116:u},e(d,[2,40]),e(d,[2,41]),e(d,[2,42]),e(ke,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:we,81:Ce,116:Ee,119:Se},{75:[1,126],77:[1,127]},e(_e,[2,83]),e(d,[2,28]),e(d,[2,29]),e(d,[2,30]),e(d,[2,31]),e(d,[2,32]),{10:Ae,12:Le,14:Re,27:Ie,28:128,32:Ne,44:De,60:Me,75:Oe,80:[1,130],81:[1,131],83:141,84:Be,85:Pe,86:$e,87:Fe,88:ze,89:qe,90:We,91:129,105:Ue,109:Ge,111:je,114:Ve,115:Ye,116:He},e(Xe,q,{5:154}),e(d,[2,37]),e(d,[2,38]),e(oe,[2,48],{44:Ke}),e(oe,[2,49],{18:156,10:se,40:Ze}),e(be,[2,44]),{44:t,47:158,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:42,114:h,115:c,116:u},{102:[1,159],103:160,105:[1,161]},{44:t,47:162,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:42,114:h,115:c,116:u},{44:t,47:163,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:42,114:h,115:c,116:u},e(v,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},e(v,[2,115],{120:168,10:[1,167],14:he,44:ce,60:ue,89:de,105:pe,106:ge,109:fe,111:me,114:ye,115:ve,116:xe}),e(v,[2,117],{10:[1,169]}),e(x,[2,183]),e(x,[2,170]),e(x,[2,171]),e(x,[2,172]),e(x,[2,173]),e(x,[2,174]),e(x,[2,175]),e(x,[2,176]),e(x,[2,177]),e(x,[2,178]),e(x,[2,179]),e(x,[2,180]),{44:t,47:170,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:42,114:h,115:c,116:u},{30:171,67:b,80:T,81:k,82:172,116:w,117:C,118:E},{30:179,67:b,80:T,81:k,82:172,116:w,117:C,118:E},{30:181,50:[1,180],67:b,80:T,81:k,82:172,116:w,117:C,118:E},{30:182,67:b,80:T,81:k,82:172,116:w,117:C,118:E},{30:183,67:b,80:T,81:k,82:172,116:w,117:C,118:E},{30:184,67:b,80:T,81:k,82:172,116:w,117:C,118:E},{109:[1,185]},{30:186,67:b,80:T,81:k,82:172,116:w,117:C,118:E},{30:187,65:[1,188],67:b,80:T,81:k,82:172,116:w,117:C,118:E},{30:189,67:b,80:T,81:k,82:172,116:w,117:C,118:E},{30:190,67:b,80:T,81:k,82:172,116:w,117:C,118:E},{30:191,67:b,80:T,81:k,82:172,116:w,117:C,118:E},e(y,[2,182]),e(z,[2,20]),e(Te,[2,25]),e(oe,[2,46],{39:192,18:193,10:se,40:le}),e(ke,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:b,80:T,81:k,82:172,116:w,117:C,118:E},{77:[1,197],79:198,116:Ee,119:Se},e(Qe,[2,79]),e(Qe,[2,81]),e(Qe,[2,82]),e(Qe,[2,168]),e(Qe,[2,169]),{76:199,79:121,80:we,81:Ce,116:Ee,119:Se},e(_e,[2,84]),{8:p,9:g,10:Ae,11:f,12:Le,14:Re,21:201,27:Ie,29:[1,200],32:Ne,44:De,60:Me,75:Oe,83:141,84:Be,85:Pe,86:$e,87:Fe,88:ze,89:qe,90:We,91:202,105:Ue,109:Ge,111:je,114:Ve,115:Ye,116:He},e(S,[2,101]),e(S,[2,103]),e(S,[2,104]),e(S,[2,157]),e(S,[2,158]),e(S,[2,159]),e(S,[2,160]),e(S,[2,161]),e(S,[2,162]),e(S,[2,163]),e(S,[2,164]),e(S,[2,165]),e(S,[2,166]),e(S,[2,167]),e(S,[2,90]),e(S,[2,91]),e(S,[2,92]),e(S,[2,93]),e(S,[2,94]),e(S,[2,95]),e(S,[2,96]),e(S,[2,97]),e(S,[2,98]),e(S,[2,99]),e(S,[2,100]),{6:11,7:12,8:W,9:U,10:G,11:j,20:17,22:18,23:19,24:20,25:21,26:22,27:V,32:[1,203],33:24,34:Y,36:H,38:X,42:28,43:39,44:t,45:40,47:41,60:r,84:K,85:Z,86:Q,87:J,88:ee,89:i,102:n,105:a,106:s,109:o,111:l,113:42,114:h,115:c,116:u,121:te,122:re,123:ie,124:ne,125:ae},{10:se,18:204},{44:[1,205]},e(be,[2,43]),{10:[1,206],44:t,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:113,114:h,115:c,116:u},{10:[1,207]},{10:[1,208],106:[1,209]},e(Je,[2,128]),{10:[1,210],44:t,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:113,114:h,115:c,116:u},{10:[1,211],44:t,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:113,114:h,115:c,116:u},{80:[1,212]},e(v,[2,109],{10:[1,213]}),e(v,[2,111],{10:[1,214]}),{80:[1,215]},e(x,[2,184]),{80:[1,216],98:[1,217]},e(be,[2,55],{113:113,44:t,60:r,89:i,102:n,105:a,106:s,109:o,111:l,114:h,115:c,116:u}),{31:[1,218],67:b,82:219,116:w,117:C,118:E},e(et,[2,86]),e(et,[2,88]),e(et,[2,89]),e(et,[2,153]),e(et,[2,154]),e(et,[2,155]),e(et,[2,156]),{49:[1,220],67:b,82:219,116:w,117:C,118:E},{30:221,67:b,80:T,81:k,82:172,116:w,117:C,118:E},{51:[1,222],67:b,82:219,116:w,117:C,118:E},{53:[1,223],67:b,82:219,116:w,117:C,118:E},{55:[1,224],67:b,82:219,116:w,117:C,118:E},{57:[1,225],67:b,82:219,116:w,117:C,118:E},{60:[1,226]},{64:[1,227],67:b,82:219,116:w,117:C,118:E},{66:[1,228],67:b,82:219,116:w,117:C,118:E},{30:229,67:b,80:T,81:k,82:172,116:w,117:C,118:E},{31:[1,230],67:b,82:219,116:w,117:C,118:E},{67:b,69:[1,231],71:[1,232],82:219,116:w,117:C,118:E},{67:b,69:[1,234],71:[1,233],82:219,116:w,117:C,118:E},e(oe,[2,45],{18:156,10:se,40:Ze}),e(oe,[2,47],{44:Ke}),e(ke,[2,75]),e(ke,[2,74]),{62:[1,235],67:b,82:219,116:w,117:C,118:E},e(ke,[2,77]),e(Qe,[2,80]),{77:[1,236],79:198,116:Ee,119:Se},{30:237,67:b,80:T,81:k,82:172,116:w,117:C,118:E},e(Xe,q,{5:238}),e(S,[2,102]),e(d,[2,35]),{43:239,44:t,45:40,47:41,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:42,114:h,115:c,116:u},{10:se,18:240},{10:_,60:A,84:L,92:241,105:R,107:242,108:243,109:I,110:N,111:D,112:M},{10:_,60:A,84:L,92:252,104:[1,253],105:R,107:242,108:243,109:I,110:N,111:D,112:M},{10:_,60:A,84:L,92:254,104:[1,255],105:R,107:242,108:243,109:I,110:N,111:D,112:M},{105:[1,256]},{10:_,60:A,84:L,92:257,105:R,107:242,108:243,109:I,110:N,111:D,112:M},{44:t,47:258,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:42,114:h,115:c,116:u},e(v,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},e(v,[2,116]),e(v,[2,118],{10:[1,262]}),e(v,[2,119]),e(m,[2,56]),e(et,[2,87]),e(m,[2,57]),{51:[1,263],67:b,82:219,116:w,117:C,118:E},e(m,[2,64]),e(m,[2,59]),e(m,[2,60]),e(m,[2,61]),{109:[1,264]},e(m,[2,63]),e(m,[2,65]),{66:[1,265],67:b,82:219,116:w,117:C,118:E},e(m,[2,67]),e(m,[2,68]),e(m,[2,70]),e(m,[2,69]),e(m,[2,71]),e([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),e(ke,[2,78]),{31:[1,266],67:b,82:219,116:w,117:C,118:E},{6:11,7:12,8:W,9:U,10:G,11:j,20:17,22:18,23:19,24:20,25:21,26:22,27:V,32:[1,267],33:24,34:Y,36:H,38:X,42:28,43:39,44:t,45:40,47:41,60:r,84:K,85:Z,86:Q,87:J,88:ee,89:i,102:n,105:a,106:s,109:o,111:l,113:42,114:h,115:c,116:u,121:te,122:re,123:ie,124:ne,125:ae},e(be,[2,53]),{43:268,44:t,45:40,47:41,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:42,114:h,115:c,116:u},e(v,[2,121],{106:tt}),e(rt,[2,130],{108:270,10:_,60:A,84:L,105:R,109:I,110:N,111:D,112:M}),e(O,[2,132]),e(O,[2,134]),e(O,[2,135]),e(O,[2,136]),e(O,[2,137]),e(O,[2,138]),e(O,[2,139]),e(O,[2,140]),e(O,[2,141]),e(v,[2,122],{106:tt}),{10:[1,271]},e(v,[2,123],{106:tt}),{10:[1,272]},e(Je,[2,129]),e(v,[2,105],{106:tt}),e(v,[2,106],{113:113,44:t,60:r,89:i,102:n,105:a,106:s,109:o,111:l,114:h,115:c,116:u}),e(v,[2,110]),e(v,[2,112],{10:[1,273]}),e(v,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:p,9:g,11:f,21:278},e(d,[2,34]),e(be,[2,52]),{10:_,60:A,84:L,105:R,107:279,108:243,109:I,110:N,111:D,112:M},e(O,[2,133]),{14:he,44:ce,60:ue,89:de,101:280,105:pe,106:ge,109:fe,111:me,114:ye,115:ve,116:xe,120:88},{14:he,44:ce,60:ue,89:de,101:281,105:pe,106:ge,109:fe,111:me,114:ye,115:ve,116:xe,120:88},{98:[1,282]},e(v,[2,120]),e(m,[2,58]),{30:283,67:b,80:T,81:k,82:172,116:w,117:C,118:E},e(m,[2,66]),e(Xe,q,{5:284}),e(rt,[2,131],{108:270,10:_,60:A,84:L,105:R,109:I,110:N,111:D,112:M}),e(v,[2,126],{120:168,10:[1,285],14:he,44:ce,60:ue,89:de,105:pe,106:ge,109:fe,111:me,114:ye,115:ve,116:xe}),e(v,[2,127],{120:168,10:[1,286],14:he,44:ce,60:ue,89:de,105:pe,106:ge,109:fe,111:me,114:ye,115:ve,116:xe}),e(v,[2,114]),{31:[1,287],67:b,82:219,116:w,117:C,118:E},{6:11,7:12,8:W,9:U,10:G,11:j,20:17,22:18,23:19,24:20,25:21,26:22,27:V,32:[1,288],33:24,34:Y,36:H,38:X,42:28,43:39,44:t,45:40,47:41,60:r,84:K,85:Z,86:Q,87:J,88:ee,89:i,102:n,105:a,106:s,109:o,111:l,113:42,114:h,115:c,116:u,121:te,122:re,123:ie,124:ne,125:ae},{10:_,60:A,84:L,92:289,105:R,107:242,108:243,109:I,110:N,111:D,112:M},{10:_,60:A,84:L,92:290,105:R,107:242,108:243,109:I,110:N,111:D,112:M},e(m,[2,62]),e(d,[2,33]),e(v,[2,124],{106:tt}),e(v,[2,125],{106:tt})],defaultActions:{},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",h=0,c=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,T,k,w,C,E,S={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===x||"u"<typeof x)&&(x=v()),o[T]&&o[T][x]))||!k.length||!k[0]){var _,A=[];for(w in o[T])this.terminals_[w]&&2<w&&A.push("'"+this.terminals_[w]+"'");_=g.showPosition?"Parse error on line "+(h+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(c=g.yyleng,l=g.yytext,h=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],S.$=a[a.length-C],S._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(E=this.performAction.apply(S,[l,c,h,f.yy,k[1],a,s].concat(p)))<"u")return E;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),E=o[i[i.length-2]][i[i.length-1]],i.push(E);break;case 3:return!0}}return!0},"parse")},$={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:mt(function(e,t,r,i){switch(r){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"),t.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:return t.yytext=t.yytext.replace(/\n\s*/g,"<br/>"),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:case 36:case 37:return e.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:case 41:case 42:case 43:return 98;case 44:return this.popState(),13;case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:return this.popState(),14;case 55:return 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 125;case 60:return 78;case 61:return 105;case 62:return 111;case 63:return 46;case 64:return 60;case 65:return 44;case 66:return 8;case 67:return 106;case 68:return 115;case 69:return this.popState(),77;case 70:return this.pushState("edgeText"),75;case 71:return 119;case 72:return this.popState(),77;case 73:return this.pushState("thickEdgeText"),75;case 74:return 119;case 75:return this.popState(),77;case 76:return this.pushState("dottedEdgeText"),75;case 77:return 119;case 78:return 77;case 79:return this.popState(),53;case 80:return"TEXT";case 81:return this.pushState("ellipseText"),52;case 82:return this.popState(),55;case 83:return this.pushState("text"),54;case 84:return this.popState(),57;case 85:return this.pushState("text"),56;case 86:return 58;case 87:return this.pushState("text"),67;case 88:return this.popState(),64;case 89:return this.pushState("text"),63;case 90:return this.popState(),49;case 91:return this.pushState("text"),48;case 92:return this.popState(),69;case 93:return this.popState(),71;case 94:return 117;case 95:return this.pushState("trapText"),68;case 96:return this.pushState("trapText"),70;case 97:return 118;case 98:return 67;case 99:return 90;case 100:return"SEP";case 101:return 89;case 102:return 115;case 103:return 111;case 104:return 44;case 105:return 109;case 106:return 114;case 107:return 116;case 108:return this.popState(),62;case 109:return this.pushState("text"),62;case 110:return this.popState(),51;case 111:return this.pushState("text"),50;case 112:return this.popState(),31;case 113:return this.pushState("text"),29;case 114:return this.popState(),66;case 115:return this.pushState("text"),65;case 116:return"TEXT";case 117:return"QUOTE";case 118:return 9;case 119:return 10;case 120:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*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,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeData:{rules:[8,11,12,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackargs:{rules:[17,18,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackname:{rules:[14,15,16,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},href:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},click:{rules:[21,24,33,34,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dottedEdgeText:{rules:[21,24,75,77,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},thickEdgeText:{rules:[21,24,72,74,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},edgeText:{rules:[21,24,69,71,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},trapText:{rules:[21,24,78,81,83,85,89,91,92,93,94,95,96,109,111,113,115],inclusive:!1},ellipseText:{rules:[21,24,78,79,80,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},text:{rules:[21,24,78,81,82,83,84,85,88,89,90,91,95,96,108,109,110,111,112,113,114,115,116],inclusive:!1},vertex:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr:{rules:[3,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_title:{rules:[1,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},md_string:{rules:[19,20,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},string:{rules:[21,22,23,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,73,75,76,78,81,83,85,86,87,89,91,95,96,97,98,99,100,101,102,103,104,105,106,107,109,111,113,115,117,118,119,120],inclusive:!0}}};P.lexer=$,mt(B,"Parser"),(Vue=new((B.prototype=P).Parser=B)).parser=Vue,Yue=Vue}),ade=i(()=>{nde(),(Hue=Object.assign({},Yue)).parse=e=>(e=e.replace(/}\s*\n/g,`}
`),Yue.parse(e)),Xue=Hue}),sde=i(()=>{Kue=mt(()=>`
/* 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")}),ode=i(()=>{oi(),sde(),Zue=mt((e,t)=>{var r=(n=ct)(e,"r"),i=n(e,"g"),n=n(e,"b");return lt(r,i,n,t)},"fade"),Que=mt(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;
}
// .flowchart-label .text-outer-tspan {
// text-anchor: middle;
// }
// .flowchart-label .text-inner-tspan {
// text-anchor: start;
// }
.node .katex path {
fill: #000;
stroke: #000;
stroke-width: 1px;
}
.rough-node .label,.node .label, .image-shape .label, .icon-shape .label {
text-align: center;
}
.node.clickable {
cursor: pointer;
}
.root .anchor path {
fill: ${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: ${Zue(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;
}
${Kue()}
`,"getStyles"),Jue=Que}),lde={};sYe(lde,{diagram:()=>hde});var hde,cde,ude,dde,pde=i(()=>{ju(),ZO(),ide(),ade(),ode(),hde={parser:Xue,get db(){return new PO},renderer:jue,styles:Jue,init:mt(e=>{e.flowchart||(e.flowchart={}),e.layout&&Vc({layout:e.layout}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,Vc({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},"init")}}),gde=i(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],i=[1,10],n=[1,11],a=[1,12],s=[1,13],o=[1,23],l=[1,24],B=[1,25],P=[1,26],$=[1,27],h=[1,19],F=[1,28],z=[1,29],c=[1,20],u=[1,18],d=[1,21],p=[1,22],g=[1,36],f=[1,37],m=[1,38],y=[1,39],v=[1,40],x=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],b=[1,45],T=[1,46],k=[1,55],w=[40,48,50,51,52,70,71],C=[1,66],E=[1,64],S=[1,61],_=[1,65],A=[1,67],L=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],q=[65,66,67,68,69],W=[1,84],U=[1,83],G=[1,81],j=[1,82],V=[6,10,42,47],R=[6,10,13,41,42,47,48,49],I=[1,92],N=[1,91],D=[1,90],M=[19,58],Y=[1,101],H=[1,100],O=[19,58,60,62],i={trace:mt(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,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$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",60:",",61:"ATTRIBUTE_KEY",62:"COMMENT",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"},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],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 1:break;case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:i.addEntity(a[o-4]),i.addEntity(a[o-2]),i.addRelationship(a[o-4],a[o],a[o-2],a[o-3]);break;case 9:i.addEntity(a[o-8]),i.addEntity(a[o-4]),i.addRelationship(a[o-8],a[o],a[o-4],a[o-5]),i.setClass([a[o-8]],a[o-6]),i.setClass([a[o-4]],a[o-2]);break;case 10:i.addEntity(a[o-6]),i.addEntity(a[o-2]),i.addRelationship(a[o-6],a[o],a[o-2],a[o-3]),i.setClass([a[o-6]],a[o-4]);break;case 11:i.addEntity(a[o-6]),i.addEntity(a[o-4]),i.addRelationship(a[o-6],a[o],a[o-4],a[o-5]),i.setClass([a[o-4]],a[o-2]);break;case 12:i.addEntity(a[o-3]),i.addAttributes(a[o-3],a[o-1]);break;case 13:i.addEntity(a[o-5]),i.addAttributes(a[o-5],a[o-1]),i.setClass([a[o-5]],a[o-3]);break;case 14:i.addEntity(a[o-2]);break;case 15:i.addEntity(a[o-4]),i.setClass([a[o-4]],a[o-2]);break;case 16:i.addEntity(a[o]);break;case 17:i.addEntity(a[o-2]),i.setClass([a[o-2]],a[o]);break;case 18:i.addEntity(a[o-6],a[o-4]),i.addAttributes(a[o-6],a[o-1]);break;case 19:i.addEntity(a[o-8],a[o-6]),i.addAttributes(a[o-8],a[o-1]),i.setClass([a[o-8]],a[o-3]);break;case 20:i.addEntity(a[o-5],a[o-3]);break;case 21:i.addEntity(a[o-7],a[o-5]),i.setClass([a[o-7]],a[o-2]);break;case 22:i.addEntity(a[o-3],a[o-1]);break;case 23:i.addEntity(a[o-5],a[o-3]),i.setClass([a[o-5]],a[o]);break;case 24:case 25:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 26:case 27:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 32:i.setDirection("TB");break;case 33:i.setDirection("BT");break;case 34:i.setDirection("RL");break;case 35:i.setDirection("LR");break;case 36:this.$=a[o-3],i.addClass(a[o-2],a[o-1]);break;case 37:case 38:case 59:case 67:this.$=[a[o]];break;case 39:case 40:this.$=a[o-2].concat([a[o]]);break;case 41:this.$=a[o-2],i.setClass(a[o-1],a[o]);break;case 42:this.$=a[o-3],i.addCssStyles(a[o-2],a[o-1]);break;case 43:this.$=[a[o]];break;case 44:a[o-2].push(a[o]),this.$=a[o-2];break;case 46:this.$=a[o-1]+a[o];break;case 54:case 79:case 80:this.$=a[o].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 81:this.$=a[o];break;case 60:a[o].push(a[o-1]),this.$=a[o];break;case 61:this.$={type:a[o-1],name:a[o]};break;case 62:this.$={type:a[o-2],name:a[o-1],keys:a[o]};break;case 63:this.$={type:a[o-2],name:a[o-1],comment:a[o]};break;case 64:this.$={type:a[o-3],name:a[o-2],keys:a[o-1],comment:a[o]};break;case 65:case 66:case 69:this.$=a[o];break;case 68:a[o-2].push(a[o]),this.$=a[o-2];break;case 70:this.$=a[o].replace(/"/g,"");break;case 71:this.$={cardA:a[o],relType:a[o-1],cardB:a[o-2]};break;case 72:this.$=i.Cardinality.ZERO_OR_ONE;break;case 73:this.$=i.Cardinality.ZERO_OR_MORE;break;case 74:this.$=i.Cardinality.ONE_OR_MORE;break;case 75:this.$=i.Cardinality.ONLY_ONE;break;case 76:this.$=i.Cardinality.MD_PARENT;break;case 77:this.$=i.Identification.NON_IDENTIFYING;break;case 78:this.$=i.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:i,24:n,26:a,28:s,29:14,30:15,31:16,32:17,33:o,34:l,35:B,36:P,37:$,40:h,43:F,44:z,48:c,50:u,51:d,52:p},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:30,11:9,22:i,24:n,26:a,28:s,29:14,30:15,31:16,32:17,33:o,34:l,35:B,36:P,37:$,40:h,43:F,44:z,48:c,50:u,51:d,52:p},t(r,[2,5]),t(r,[2,6]),t(r,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:g,66:f,67:m,68:y,69:v}),{23:[1,41]},{25:[1,42]},{27:[1,43]},t(r,[2,27]),t(r,[2,28]),t(r,[2,29]),t(r,[2,30]),t(r,[2,31]),t(x,[2,54]),t(x,[2,55]),t(x,[2,56]),t(x,[2,57]),t(x,[2,58]),t(r,[2,32]),t(r,[2,33]),t(r,[2,34]),t(r,[2,35]),{16:44,40:b,41:T},{16:47,40:b,41:T},{16:48,40:b,41:T},t(r,[2,4]),{11:49,40:h,48:c,50:u,51:d,52:p},{16:50,40:b,41:T},{18:51,19:[1,52],53:53,54:54,58:k},{11:56,40:h,48:c,50:u,51:d,52:p},{64:57,70:[1,58],71:[1,59]},t(w,[2,72]),t(w,[2,73]),t(w,[2,74]),t(w,[2,75]),t(w,[2,76]),t(r,[2,24]),t(r,[2,25]),t(r,[2,26]),{13:C,38:60,41:E,42:S,45:62,46:63,48:_,49:A},t(L,[2,37]),t(L,[2,38]),{16:68,40:b,41:T,42:S},{13:C,38:69,41:E,42:S,45:62,46:63,48:_,49:A},{13:[1,70],15:[1,71]},t(r,[2,17],{63:35,12:72,17:[1,73],42:S,65:g,66:f,67:m,68:y,69:v}),{19:[1,74]},t(r,[2,14]),{18:75,19:[2,59],53:53,54:54,58:k},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:g,66:f,67:m,68:y,69:v},t(q,[2,77]),t(q,[2,78]),{6:W,10:U,39:80,42:G,47:j},{40:[1,85],41:[1,86]},t(V,[2,43],{46:87,13:C,41:E,48:_,49:A}),t(R,[2,45]),t(R,[2,50]),t(R,[2,51]),t(R,[2,52]),t(R,[2,53]),t(r,[2,41],{42:S}),{6:W,10:U,39:88,42:G,47:j},{14:89,40:I,50:N,72:D},{16:93,40:b,41:T},{11:94,40:h,48:c,50:u,51:d,52:p},{18:95,19:[1,96],53:53,54:54,58:k},t(r,[2,12]),{19:[2,60]},t(M,[2,61],{56:97,57:98,59:99,61:Y,62:H}),t([19,58,61,62],[2,66]),t(r,[2,22],{15:[1,103],17:[1,102]}),t([40,48,50,51,52],[2,71]),t(r,[2,36]),{13:C,41:E,45:104,46:63,48:_,49:A},t(r,[2,47]),t(r,[2,48]),t(r,[2,49]),t(L,[2,39]),t(L,[2,40]),t(R,[2,46]),t(r,[2,42]),t(r,[2,8]),t(r,[2,79]),t(r,[2,80]),t(r,[2,81]),{13:[1,105],42:S},{13:[1,107],15:[1,106]},{19:[1,108]},t(r,[2,15]),t(M,[2,62],{57:109,60:[1,110],62:H}),t(M,[2,63]),t(O,[2,67]),t(M,[2,70]),t(O,[2,69]),{18:111,19:[1,112],53:53,54:54,58:k},{16:113,40:b,41:T},t(V,[2,44],{46:87,13:C,41:E,48:_,49:A}),{14:114,40:I,50:N,72:D},{16:115,40:b,41:T},{14:116,40:I,50:N,72:D},t(r,[2,13]),t(M,[2,64]),{59:117,61:Y},{19:[1,118]},t(r,[2,20]),t(r,[2,23],{17:[1,119],42:S}),t(r,[2,11]),{13:[1,120],42:S},t(r,[2,10]),t(O,[2,68]),t(r,[2,18]),{18:121,19:[1,122],53:53,54:54,58:k},{14:123,40:I,50:N,72:D},{19:[1,124]},t(r,[2,21]),t(r,[2,9]),t(r,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",h=0,c=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,T,k,w,C,E,S={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===x||"u"<typeof x)&&(x=v()),o[T]&&o[T][x]))||!k.length||!k[0]){var _,A=[];for(w in o[T])this.terminals_[w]&&2<w&&A.push("'"+this.terminals_[w]+"'");_=g.showPosition?"Parse error on line "+(h+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(c=g.yyleng,l=g.yytext,h=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],S.$=a[a.length-C],S._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(E=this.performAction.apply(S,[l,c,h,f.yy,k[1],a,s].concat(p)))<"u")return E;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),E=o[i[i.length-2]][i[i.length-1]],i.push(E);break;case 3:return!0}}return!0},"parse")},n={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:break;case 13:return 8;case 14:return 50;case 15:return 72;case 16:return 4;case 17:return this.begin("block"),17;case 18:case 19:return 49;case 20:return 42;case 21:return 15;case 22:return 13;case 23:break;case 24:return 61;case 25:case 26:return 58;case 27:return 62;case 28:break;case 29:return this.popState(),19;case 30:return t.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;case 34:return this.popState(),10;case 35:break;case 36:return 13;case 37:return 42;case 38:return 49;case 39:return this.begin("style"),37;case 40:return 43;case 41:return 65;case 42:case 43:case 44:return 67;case 45:case 46:return 65;case 47:case 48:case 49:case 50:case 51:return 66;case 52:return 67;case 53:return 66;case 54:return 67;case 55:case 56:return 68;case 57:return 51;case 58:case 59:case 60:return 68;case 61:return 52;case 62:return 48;case 63:return 68;case 64:return 65;case 65:return 66;case 66:return 67;case 67:return 69;case 68:return 70;case 69:case 70:return 71;case 71:case 72:case 73:return 70;case 74:return 41;case 75:return 47;case 76:return 40;case 77:return t.yytext[0];case 78:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[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:[34,35,36,37,38,74,75],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,76,77,78],inclusive:!0}}};i.lexer=n,mt(e,"Parser"),(cde=new((e.prototype=i).Parser=e)).parser=cde,ude=cde}),fde=i(()=>{e(),ju(),Gu(),S7(),dde=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=$c,this.getAccTitle=Fc,this.setAccDescription=zc,this.getAccDescription=qc,this.setDiagramTitle=Wc,this.getDiagramTitle=Uc,this.getConfig=mt(()=>P().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{mt(this,"ErDB")}addEntity(e,t=""){return this.entities.has(e)?!this.entities.get(e)?.alias&&t&&(this.entities.get(e).alias=t,B.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:P().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),B.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;0<=i;i--)t[i].keys||(t[i].keys=[]),t[i].comment||(t[i].comment=""),r.attributes.push(t[i]),B.debug("Added attribute ",t[i].name)}addRelationship(e,t,r,i){e=this.entities.get(e),r=this.entities.get(r),e&&r&&(e={entityA:e.id,roleA:t,entityB:r.id,relSpec:i},this.relationships.push(e),B.debug("Added new relationship :",e))}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(e){this.direction=e}getCompiledStyles(e){let t=[];for(var r of e)(r=this.classes.get(r))?.styles&&(t=[...t,...r.styles??[]].map(e=>e.trim())),r?.textStyles&&(t=[...t,...r.textStyles??[]].map(e=>e.trim()));return t}addCssStyles(e,t){for(var r of e){var i,n=this.entities.get(r);if(!t||!n)return;for(i of t)n.cssStyles.push(i)}}addClass(e,t){e.forEach(e=>{let r=this.classes.get(e);void 0===r&&(r={id:e,styles:[],textStyles:[]},this.classes.set(e,r)),t&&t.forEach(function(e){var t;/color/.exec(e)&&(t=e.replace("fill","bgFill"),r.textStyles.push(t)),r.styles.push(e)})})}setClass(e,t){for(var r of e){var i=this.entities.get(r);if(i)for(var n of t)i.cssClasses+=" "+n}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],Pc()}getData(){let e=[],t=[],r=P(),i=0;for(var n of this.entities.keys())(n=this.entities.get(n))&&(n.cssCompiledStyles=this.getCompiledStyles(n.cssClasses.split(" ")),n.colorIndex=i++,e.push(n));let a=0;for(var s of this.relationships)s={id:E7(s.entityA,s.entityB,{prefix:"id",counter:a++}),type:"normal",curve:"basis",start:s.entityA,end:s.entityB,label:s.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:s.relSpec.cardB.toLowerCase(),arrowTypeEnd:s.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==s.relSpec.relType?"solid":"dashed",look:r.look,labelType:"markdown"},t.push(s);return{nodes:e,edges:t,other:{},config:r,direction:"TB"}}}}),mde={};sYe(mde,{draw:()=>yde});var yde,vde,xde,bde,Tde,kde,wde=i(()=>{ju(),e(),QO(),tde(),rde(),S7(),Sk(),yde=mt(async function(e,t,r,i){B.info("REF0:"),B.info("Drawing er diagram (unified)",t);let{securityLevel:n,er:a,layout:s}=P(),o=i.db.getData(),l=$O(t,n);o.type=i.type,o.layoutAlgorithm=Fue(s),o.config.flowchart.nodeSpacing=a?.nodeSpacing||140,o.config.flowchart.rankSpacing=a?.rankSpacing||80,o.direction=i.db.getDirection();var h=(h=o.config).look,h=(o.markers="neo"===h?["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:["only_one","zero_or_one","one_or_more","zero_or_more"],o.diagramId=t,await $ue(o,l),"elk"===o.layoutAlgorithm&&l.select(".edges").lower(),l.selectAll('[id*="-background"]'));0<Array.from(h).length&&h.each(function(){var e=Q(this),t=e.attr("id").replace("-background","");(t=l.select("#"+CSS.escape(t))).empty()||(t=t.attr("transform"),e.attr("transform",t))}),k7.insertTitle(l,"erDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),zue(l,8,"erDiagram",a?.useMaxWidth??!0)},"draw")}),Cde=i(()=>{oi(),vde=mt((e,t)=>{var r=(n=ct)(e,"r"),i=n(e,"g"),n=n(e,"b");return lt(r,i,n,t)},"fade"),xde=new Set(["redux-color","redux-dark-color"]),bde=mt(t=>{var{theme:e,look:r,bkgColorArray:i,borderColorArray:n}=t;if(!xde.has(e))return"";let a=0<i?.length,s="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)s+=`
[data-look="${r}"][data-color-id="color-${e}"].node path {
stroke: ${n[e]};
${a?`fill: ${i[e]};`:""}
}
[data-look="${r}"][data-color-id="color-${e}"].node rect {
stroke: ${n[e]};
${a?`fill: ${i[e]};`:""}
}
`;return s},"genColor"),Tde=mt(e=>{var{look:t,theme:r,erEdgeLabelBackground:i,strokeWidth:n}=e;return`
${bde(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: ${xde.has(r)&&i?i:vde(e.tertiaryColor,.5)};
}
.edgeLabel {
background-color: ${xde.has(r)&&i?i:e.edgeLabelBackground};
}
.edgeLabel .label rect {
fill: ${xde.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: ${"neo"===t?n:"1px"};
}
.relationshipLine {
stroke: ${e.lineColor};
stroke-width: ${"neo"===t?n:"1px"};
fill: none;
}
.marker {
fill: none !important;
stroke: ${e.lineColor} !important;
stroke-width: 1;
}
[data-look=neo].labelBkg {
background-color: ${vde(e.tertiaryColor,.5)};
}
`},"getStyles"),kde=Tde}),Ede={};sYe(Ede,{diagram:()=>Sde});var Sde,_de=i(()=>{gde(),fde(),wde(),Cde(),Sde={parser:ude,get db(){return new dde},renderer:mde,styles:kde}});function Ade(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$type}function Lde(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText&&"ref"in e}function Rde(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText&&"items"in e}function Ide(e){return"object"==typeof e&&null!==e&&"string"==typeof e.name&&"string"==typeof e.type&&"string"==typeof e.path}function Nde(e){return"object"==typeof e&&null!==e&&"object"==typeof e.info&&"string"==typeof e.message}function Dde(e){return"object"==typeof e&&null!==e&&Array.isArray(e.content)}function Mde(e){return"object"==typeof e&&null!==e&&"object"==typeof e.tokenType}function Ode(e){return Dde(e)&&"string"==typeof e.fullText}var Bde,Pde=i(()=>{mt(Ade,"isAstNode"),mt(Lde,"isReference"),mt(Rde,"isMultiReference"),mt(Ide,"isAstNodeDescription"),mt(Nde,"isLinkingError"),Bde=class{static{mt(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var t=this.types[e.container.$type];if(!t)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);if(t=t.properties[e.property]?.referenceType)return t;throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`)}getTypeMetaData(e){return this.types[e]||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return Ade(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){var r,i;return e===t||(void 0!==(i=(r=(r=this.subtypes[e])||(this.subtypes[e]={}))[t])?i:(e=!!(i=this.types[e])&&i.superTypes.some(e=>this.isSubtype(e,t)),r[t]=e))}getAllSubTypes(e){var t=this.allSubtypes[e];if(t)return t;var r,i=[];for(r of this.getAllTypes())this.isSubtype(r,e)&&i.push(r);return this.allSubtypes[e]=i}},mt(Dde,"isCompositeCstNode"),mt(Mde,"isLeafCstNode"),mt(Ode,"isRootCstNode")});function $de(e){return"string"==typeof e?e:"u"<typeof e?"undefined":"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e)}function Fde(e){return!!e&&"function"==typeof e[Symbol.iterator]}function zde(...r){if(1===r.length){let t=r[0];if(t instanceof qde)return t;if(Fde(t))return new qde(()=>t[Symbol.iterator](),e=>e.next());if("number"==typeof t.length)return new qde(()=>({index:0}),e=>e.index<t.length?{done:!1,value:t[e.index++]}:Ude)}return 1<r.length?new qde(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){var t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}}while(e.collIndex<r.length&&(Fde(t=r[e.collIndex++])?e.iterator=t[Symbol.iterator]():t&&"number"==typeof t.length&&(e.array=t)),e.iterator||e.array||e.collIndex<r.length);return Ude}):Wde}var qde,Wde,Ude,Gde,jde,Vde=i(()=>{function e(e){return e.reduce((e,t)=>e+t,0)}function t(e){return e.reduce((e,t)=>e*t,0)}function r(e){return e.reduce((e,t)=>Math.min(e,t))}function i(e){return e.reduce((e,t)=>Math.max(e,t))}var n;qde=class a{static{mt(this,"StreamImpl")}constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){let e={state:this.startFn(),next:mt(()=>this.nextFn(e.state),"next"),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),t=0,r=e.next();for(;!r.done;)t++,r=e.next();return t}toArray(){for(var e,t=[],r=this.iterator();void 0!==(e=r.next()).value&&t.push(e.value),!e.done;);return t}toSet(){return new Set(this)}toMap(t,r){var e=this.map(e=>[t?t(e):e,r?r(e):e]);return new Map(e)}toString(){return this.join()}concat(e){return new a(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do{if(!(t=this.nextFn(e.first)).done)return t}while(!t.done);e.firstDone=!0}do{if(!(t=e.iterator.next()).done)return t}while(!t.done);return Ude})}join(e=","){let t=this.iterator(),r="",i,n=!1;for(;(i=t.next()).done||(n&&(r+=e),r+=$de(i.value)),n=!0,!i.done;);return r}indexOf(e,t=0){let r=this.iterator(),i=0,n=r.next();for(;!n.done;){if(i>=t&&n.value===e)return i;n=r.next(),i++}return-1}every(e){let t=this.iterator(),r=t.next();for(;!r.done;){if(!e(r.value))return!1;r=t.next()}return!0}some(e){let t=this.iterator(),r=t.next();for(;!r.done;){if(e(r.value))return!0;r=t.next()}return!1}forEach(e){let t=this.iterator(),r=0,i=t.next();for(;!i.done;)e(i.value,r),i=t.next(),r++}map(r){return new a(this.startFn,e=>{var{done:e,value:t}=this.nextFn(e);return e?Ude:{done:!1,value:r(t)}})}filter(r){return new a(this.startFn,e=>{var t;do{if(!(t=this.nextFn(e)).done&&r(t.value))return t}while(!t.done);return Ude})}nonNullable(){return this.filter(e=>null!=e)}reduce(e,t){let r=this.iterator(),i=t,n=r.next();for(;!n.done;)i=void 0===i?n.value:e(i,n.value),n=r.next();return i}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,r){var i=e.next();return i.done?r:void 0===(e=this.recursiveReduce(e,t,r))?i.value:t(e,i.value)}find(e){let t=this.iterator(),r=t.next();for(;!r.done;){if(e(r.value))return r.value;r=t.next()}}findIndex(e){let t=this.iterator(),r=0,i=t.next();for(;!i.done;){if(e(i.value))return r;i=t.next(),r++}return-1}includes(e){let t=this.iterator(),r=t.next();for(;!r.done;){if(r.value===e)return!0;r=t.next()}return!1}flatMap(i){return new a(()=>({this:this.startFn()}),e=>{do{if(e.iterator){if(!(t=e.iterator.next()).done)return t;e.iterator=void 0}var{done:t,value:r}=this.nextFn(e.this);if(!t){if(!Fde(r=i(r)))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return Ude})}flat(e){if((e=void 0===e?1:e)<=0)return this;let i=1<e?this.flat(e-1):this;return new a(()=>({this:i.startFn()}),e=>{do{if(e.iterator){if(!(t=e.iterator.next()).done)return t;e.iterator=void 0}var{done:t,value:r}=i.nextFn(e.this);if(!t){if(!Fde(r))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return Ude})}head(){var e=this.iterator().next();if(!e.done)return e.value}tail(r=1){return new a(()=>{var t=this.startFn();for(let e=0;e<r;e++)if(this.nextFn(t).done)return t;return t},this.nextFn)}limit(t){return new a(()=>({size:0,state:this.startFn()}),e=>(e.size++,t<e.size?Ude:this.nextFn(e.state)))}distinct(i){return new a(()=>({set:new Set,internalState:this.startFn()}),e=>{var t;do{if(!(t=this.nextFn(e.internalState)).done){var r=i?i(t.value):t.value;if(!e.set.has(r))return e.set.add(r),t}}while(!t.done);return Ude})}exclude(e,t){let r=new Set;for(var i of e)i=t?t(i):i,r.add(i);return this.filter(e=>(e=t?t(e):e,!r.has(e)))}},mt($de,"toString"),mt(Fde,"isIterable"),Wde=new qde(()=>{},()=>Ude),Ude=Object.freeze({done:!0,value:void 0}),mt(zde,"stream"),Gde=class extends qde{static{mt(this,"TreeStreamImpl")}constructor(e,r,t){super(()=>({iterators:t?.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&(e.iterators.pop(),e.pruned=!1);0<e.iterators.length;){var t=e.iterators[e.iterators.length-1].next();if(!t.done)return e.iterators.push(r(t.value)[Symbol.iterator]()),t;e.iterators.pop()}return Ude})}iterator(){let e={state:this.startFn(),next:mt(()=>this.nextFn(e.state),"next"),prune:mt(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}},n=jde=jde||{},mt(e,"sum"),n.sum=e,mt(t,"product"),n.product=t,mt(r,"min"),n.min=r,mt(i,"max"),n.max=i}),Yde={};function Hde(i,n={}){for(let[r,e]of Object.entries(i))r.startsWith("$")||(Array.isArray(e)?e.forEach((e,t)=>{Ade(e)&&(e.$container=i,e.$containerProperty=r,e.$containerIndex=t,n.deep)&&Hde(e,n)}):Ade(e)&&(e.$container=i,e.$containerProperty=r,n.deep)&&Hde(e,n))}function Xde(e,t){let r=e;for(;r;){if(t(r))return r;r=r.$container}}function Kde(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.$container}return!1}function Zde(e){if(e=Qde(e).$document)return e;throw new Error("AST node has no document.")}function Qde(e){for(;e.$container;)e=e.$container;return e}function Jde(e){return Lde(e)?e.ref?[e.ref]:[]:Rde(e)?e.items.map(e=>e.ref):[]}function epe(n,e){if(!n)throw new Error("Node must be an AstNode.");let a=e?.range;return new qde(()=>({keys:Object.keys(n),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){var t=e.keys[e.keyIndex];if(!t.startsWith("$")){var r=n[t];if(Ade(r)){if(e.keyIndex++,ipe(r,a))return{done:!1,value:r}}else if(Array.isArray(r)){for(;e.arrayIndex<r.length;){var i=r[e.arrayIndex++];if(Ade(i)&&ipe(i,a))return{done:!1,value:i}}e.arrayIndex=0}}e.keyIndex++}return Ude})}function tpe(e,t){if(e)return new Gde(e,e=>epe(e,t));throw new Error("Root node must be an AstNode.")}function rpe(e,t){if(e)return t?.range&&!ipe(e,t.range)?new Gde(e,()=>[]):new Gde(e,e=>epe(e,t),{includeRoot:!0});throw new Error("Root node must be an AstNode.")}function ipe(e,t){return!t||!!(e=e.$cstNode?.range)&&mge(e,t)}function npe(a){return new qde(()=>({keys:Object.keys(a),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){var t=e.keys[e.keyIndex];if(!t.startsWith("$")){var r=a[t];if(Lde(r)||Rde(r))return e.keyIndex++,{done:!1,value:{reference:r,container:a,property:t}};if(Array.isArray(r)){for(;e.arrayIndex<r.length;){var i=e.arrayIndex++,n=r[i];if(Lde(n)||Rde(r))return{done:!1,value:{reference:n,container:a,property:t,index:i}}}e.arrayIndex=0}}e.keyIndex++}return Ude})}function ape(e,t){var r,e=e.getTypeMetaData(t.$type),i=t;for(r of Object.values(e.properties))void 0!==r.defaultValue&&void 0===i[r.name]&&(i[r.name]=spe(r.defaultValue))}function spe(e){return Array.isArray(e)?[...e.map(spe)]:e}function ope(e,t,r){var i,n,a={$type:e.$type};r&&(r.set(e,a),r.set(a,e));for([i,n]of Object.entries(e))if(!i.startsWith("$"))if(Ade(n))a[i]=ope(n,t,r);else if(Lde(n))a[i]=t(a,i,n.$refNode,n.$refText,n);else if(Array.isArray(n)){var s,o=[];for(s of n)Ade(s)?o.push(ope(s,t,r)):Lde(s)?o.push(t(a,i,s.$refNode,s.$refText,s)):o.push(s);a[i]=o}else a[i]=n;return Hde(a,{deep:!0}),a}sYe(Yde,{assignMandatoryProperties:()=>ape,copyAstNode:()=>ope,findRootNode:()=>Qde,getContainerOfType:()=>Xde,getDocument:()=>Zde,getReferenceNodes:()=>Jde,hasContainerOfType:()=>Kde,linkContentToContainer:()=>Hde,streamAllContents:()=>tpe,streamAst:()=>rpe,streamContents:()=>epe,streamReferences:()=>npe});var lpe=i(()=>{Pde(),Vde(),Ige(),mt(Hde,"linkContentToContainer"),mt(Xde,"getContainerOfType"),mt(Kde,"hasContainerOfType"),mt(Zde,"getDocument"),mt(Qde,"findRootNode"),mt(Jde,"getReferenceNodes"),mt(epe,"streamContents"),mt(tpe,"streamAllContents"),mt(rpe,"streamAst"),mt(ipe,"isAstNodeInRange"),mt(npe,"streamReferences"),mt(ape,"assignMandatoryProperties"),mt(spe,"copyDefaultValue"),mt(ope,"copyAstNode")}),hpe={};function cpe(e){return sge.isInstance(e,l0e.$type)}function upe(e){return sge.isInstance(e,h0e.$type)}function dpe(e){return sge.isInstance(e,c0e.$type)}function ppe(e){return sge.isInstance(e,u0e.$type)}function gpe(e){return sge.isInstance(e,d0e.$type)}function fpe(e){return sge.isInstance(e,p0e.$type)}function mpe(e){return sge.isInstance(e,g0e.$type)}function ype(e){return sge.isInstance(e,f0e.$type)}function vpe(e){return sge.isInstance(e,m0e.$type)}function xpe(e){return sge.isInstance(e,y0e.$type)}function bpe(e){return sge.isInstance(e,v0e.$type)}function Tpe(e){return sge.isInstance(e,x0e.$type)}function kpe(e){return sge.isInstance(e,b0e.$type)}function wpe(e){return sge.isInstance(e,T0e.$type)}function Cpe(e){return sge.isInstance(e,k0e.$type)}function Epe(e){return sge.isInstance(e,w0e.$type)}function Spe(e){return sge.isInstance(e,C0e.$type)}function _pe(e){return sge.isInstance(e,E0e.$type)}function Ape(e){return sge.isInstance(e,S0e.$type)}function Lpe(e){return sge.isInstance(e,_0e.$type)}function Rpe(e){return sge.isInstance(e,A0e.$type)}function Ipe(e){return sge.isInstance(e,L0e.$type)}function Npe(e){return sge.isInstance(e,R0e.$type)}function Dpe(e){return sge.isInstance(e,I0e.$type)}function Mpe(e){return sge.isInstance(e,N0e.$type)}function Ope(e){return sge.isInstance(e,D0e.$type)}function Bpe(e){return sge.isInstance(e,M0e.$type)}function Ppe(e){return sge.isInstance(e,O0e.$type)}function $pe(e){return sge.isInstance(e,B0e.$type)}function Fpe(e){return sge.isInstance(e,P0e.$type)}function zpe(e){return sge.isInstance(e,$0e.$type)}function qpe(e){return sge.isInstance(e,F0e.$type)}function Wpe(e){return sge.isInstance(e,z0e.$type)}function Upe(e){return sge.isInstance(e,q0e.$type)}function Gpe(e){return sge.isInstance(e,W0e.$type)}function jpe(e){return sge.isInstance(e,U0e.$type)}function Vpe(e){return sge.isInstance(e,G0e.$type)}function Ype(e){return sge.isInstance(e,j0e.$type)}function Hpe(e){return sge.isInstance(e,V0e.$type)}function Xpe(e){return sge.isInstance(e,Y0e.$type)}function Kpe(e){return sge.isInstance(e,H0e.$type)}function Zpe(e){return sge.isInstance(e,X0e.$type)}function Qpe(e){return sge.isInstance(e,K0e.$type)}function Jpe(e){return sge.isInstance(e,Z0e.$type)}function e0e(e){return sge.isInstance(e,Q0e.$type)}function t0e(e){return sge.isInstance(e,J0e.$type)}function r0e(e){return sge.isInstance(e,ege.$type)}function i0e(e){return sge.isInstance(e,tge.$type)}function n0e(e){return sge.isInstance(e,rge.$type)}function a0e(e){return sge.isInstance(e,ige.$type)}function s0e(e){return sge.isInstance(e,nge.$type)}sYe(hpe,{AbstractElement:()=>l0e,AbstractParserRule:()=>h0e,AbstractRule:()=>c0e,AbstractType:()=>u0e,Action:()=>d0e,Alternatives:()=>p0e,ArrayLiteral:()=>g0e,ArrayType:()=>f0e,Assignment:()=>m0e,BooleanLiteral:()=>y0e,CharacterRange:()=>v0e,Condition:()=>x0e,Conjunction:()=>b0e,CrossReference:()=>T0e,Disjunction:()=>k0e,EndOfFile:()=>w0e,Grammar:()=>C0e,GrammarImport:()=>E0e,Group:()=>S0e,InferredType:()=>_0e,InfixRule:()=>A0e,InfixRuleOperatorList:()=>L0e,InfixRuleOperators:()=>R0e,Interface:()=>I0e,Keyword:()=>N0e,LangiumGrammarAstReflection:()=>age,LangiumGrammarTerminals:()=>o0e,NamedArgument:()=>D0e,NegatedToken:()=>M0e,Negation:()=>O0e,NumberLiteral:()=>B0e,Parameter:()=>P0e,ParameterReference:()=>$0e,ParserRule:()=>F0e,ReferenceType:()=>z0e,RegexToken:()=>q0e,ReturnType:()=>W0e,RuleCall:()=>U0e,SimpleType:()=>G0e,StringLiteral:()=>j0e,TerminalAlternatives:()=>V0e,TerminalElement:()=>Y0e,TerminalGroup:()=>H0e,TerminalRule:()=>X0e,TerminalRuleCall:()=>K0e,Type:()=>Z0e,TypeAttribute:()=>Q0e,TypeDefinition:()=>J0e,UnionType:()=>ege,UnorderedGroup:()=>tge,UntilToken:()=>rge,ValueLiteral:()=>ige,Wildcard:()=>nge,isAbstractElement:()=>cpe,isAbstractParserRule:()=>upe,isAbstractRule:()=>dpe,isAbstractType:()=>ppe,isAction:()=>gpe,isAlternatives:()=>fpe,isArrayLiteral:()=>mpe,isArrayType:()=>ype,isAssignment:()=>vpe,isBooleanLiteral:()=>xpe,isCharacterRange:()=>bpe,isCondition:()=>Tpe,isConjunction:()=>kpe,isCrossReference:()=>wpe,isDisjunction:()=>Cpe,isEndOfFile:()=>Epe,isGrammar:()=>Spe,isGrammarImport:()=>_pe,isGroup:()=>Ape,isInferredType:()=>Lpe,isInfixRule:()=>Rpe,isInfixRuleOperatorList:()=>Ipe,isInfixRuleOperators:()=>Npe,isInterface:()=>Dpe,isKeyword:()=>Mpe,isNamedArgument:()=>Ope,isNegatedToken:()=>Bpe,isNegation:()=>Ppe,isNumberLiteral:()=>$pe,isParameter:()=>Fpe,isParameterReference:()=>zpe,isParserRule:()=>qpe,isReferenceType:()=>Wpe,isRegexToken:()=>Upe,isReturnType:()=>Gpe,isRuleCall:()=>jpe,isSimpleType:()=>Vpe,isStringLiteral:()=>Ype,isTerminalAlternatives:()=>Hpe,isTerminalElement:()=>Xpe,isTerminalGroup:()=>Kpe,isTerminalRule:()=>Zpe,isTerminalRuleCall:()=>Qpe,isType:()=>Jpe,isTypeAttribute:()=>e0e,isTypeDefinition:()=>t0e,isUnionType:()=>r0e,isUnorderedGroup:()=>i0e,isUntilToken:()=>n0e,isValueLiteral:()=>a0e,isWildcard:()=>s0e,reflection:()=>sge});var o0e,l0e,h0e,c0e,u0e,d0e,p0e,g0e,f0e,m0e,y0e,v0e,x0e,b0e,T0e,k0e,w0e,C0e,E0e,S0e,_0e,A0e,L0e,R0e,I0e,N0e,D0e,M0e,O0e,B0e,P0e,$0e,F0e,z0e,q0e,W0e,U0e,G0e,j0e,V0e,Y0e,H0e,X0e,K0e,Z0e,Q0e,J0e,ege,tge,rge,ige,nge,age,sge,oge=i(()=>{Pde(),o0e={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]*/},l0e={$type:"AbstractElement",cardinality:"cardinality"},mt(cpe,"isAbstractElement"),h0e={$type:"AbstractParserRule"},mt(upe,"isAbstractParserRule"),c0e={$type:"AbstractRule"},mt(dpe,"isAbstractRule"),u0e={$type:"AbstractType"},mt(ppe,"isAbstractType"),d0e={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"},mt(gpe,"isAction"),p0e={$type:"Alternatives",cardinality:"cardinality",elements:"elements"},mt(fpe,"isAlternatives"),g0e={$type:"ArrayLiteral",elements:"elements"},mt(mpe,"isArrayLiteral"),f0e={$type:"ArrayType",elementType:"elementType"},mt(ype,"isArrayType"),m0e={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"},mt(vpe,"isAssignment"),y0e={$type:"BooleanLiteral",true:"true"},mt(xpe,"isBooleanLiteral"),v0e={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"},mt(bpe,"isCharacterRange"),x0e={$type:"Condition"},mt(Tpe,"isCondition"),b0e={$type:"Conjunction",left:"left",right:"right"},mt(kpe,"isConjunction"),T0e={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"},mt(wpe,"isCrossReference"),k0e={$type:"Disjunction",left:"left",right:"right"},mt(Cpe,"isDisjunction"),w0e={$type:"EndOfFile",cardinality:"cardinality"},mt(Epe,"isEndOfFile"),C0e={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},mt(Spe,"isGrammar"),E0e={$type:"GrammarImport",path:"path"},mt(_pe,"isGrammarImport"),S0e={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"},mt(Ape,"isGroup"),_0e={$type:"InferredType",name:"name"},mt(Lpe,"isInferredType"),A0e={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"},mt(Rpe,"isInfixRule"),L0e={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},mt(Ipe,"isInfixRuleOperatorList"),R0e={$type:"InfixRuleOperators",precedences:"precedences"},mt(Npe,"isInfixRuleOperators"),I0e={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"},mt(Dpe,"isInterface"),N0e={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"},mt(Mpe,"isKeyword"),D0e={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},mt(Ope,"isNamedArgument"),M0e={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"},mt(Bpe,"isNegatedToken"),O0e={$type:"Negation",value:"value"},mt(Ppe,"isNegation"),B0e={$type:"NumberLiteral",value:"value"},mt($pe,"isNumberLiteral"),P0e={$type:"Parameter",name:"name"},mt(Fpe,"isParameter"),$0e={$type:"ParameterReference",parameter:"parameter"},mt(zpe,"isParameterReference"),F0e={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"},mt(qpe,"isParserRule"),z0e={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},mt(Wpe,"isReferenceType"),q0e={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"},mt(Upe,"isRegexToken"),W0e={$type:"ReturnType",name:"name"},mt(Gpe,"isReturnType"),U0e={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"},mt(jpe,"isRuleCall"),G0e={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"},mt(Vpe,"isSimpleType"),j0e={$type:"StringLiteral",value:"value"},mt(Ype,"isStringLiteral"),V0e={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"},mt(Hpe,"isTerminalAlternatives"),Y0e={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},mt(Xpe,"isTerminalElement"),H0e={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"},mt(Kpe,"isTerminalGroup"),X0e={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"},mt(Zpe,"isTerminalRule"),K0e={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"},mt(Qpe,"isTerminalRuleCall"),Z0e={$type:"Type",name:"name",type:"type"},mt(Jpe,"isType"),Q0e={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},mt(e0e,"isTypeAttribute"),J0e={$type:"TypeDefinition"},mt(t0e,"isTypeDefinition"),ege={$type:"UnionType",types:"types"},mt(r0e,"isUnionType"),tge={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"},mt(i0e,"isUnorderedGroup"),rge={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"},mt(n0e,"isUntilToken"),ige={$type:"ValueLiteral"},mt(a0e,"isValueLiteral"),nge={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},mt(s0e,"isWildcard"),age=class extends Bde{static{mt(this,"LangiumGrammarAstReflection")}constructor(){super(...arguments),this.types={AbstractElement:{name:l0e.$type,properties:{cardinality:{name:l0e.cardinality}},superTypes:[]},AbstractParserRule:{name:h0e.$type,properties:{},superTypes:[c0e.$type,u0e.$type]},AbstractRule:{name:c0e.$type,properties:{},superTypes:[]},AbstractType:{name:u0e.$type,properties:{},superTypes:[]},Action:{name:d0e.$type,properties:{cardinality:{name:d0e.cardinality},feature:{name:d0e.feature},inferredType:{name:d0e.inferredType},operator:{name:d0e.operator},type:{name:d0e.type,referenceType:u0e.$type}},superTypes:[l0e.$type]},Alternatives:{name:p0e.$type,properties:{cardinality:{name:p0e.cardinality},elements:{name:p0e.elements,defaultValue:[]}},superTypes:[l0e.$type]},ArrayLiteral:{name:g0e.$type,properties:{elements:{name:g0e.elements,defaultValue:[]}},superTypes:[ige.$type]},ArrayType:{name:f0e.$type,properties:{elementType:{name:f0e.elementType}},superTypes:[J0e.$type]},Assignment:{name:m0e.$type,properties:{cardinality:{name:m0e.cardinality},feature:{name:m0e.feature},operator:{name:m0e.operator},predicate:{name:m0e.predicate},terminal:{name:m0e.terminal}},superTypes:[l0e.$type]},BooleanLiteral:{name:y0e.$type,properties:{true:{name:y0e.true,defaultValue:!1}},superTypes:[x0e.$type,ige.$type]},CharacterRange:{name:v0e.$type,properties:{cardinality:{name:v0e.cardinality},left:{name:v0e.left},lookahead:{name:v0e.lookahead},parenthesized:{name:v0e.parenthesized,defaultValue:!1},right:{name:v0e.right}},superTypes:[Y0e.$type]},Condition:{name:x0e.$type,properties:{},superTypes:[]},Conjunction:{name:b0e.$type,properties:{left:{name:b0e.left},right:{name:b0e.right}},superTypes:[x0e.$type]},CrossReference:{name:T0e.$type,properties:{cardinality:{name:T0e.cardinality},deprecatedSyntax:{name:T0e.deprecatedSyntax,defaultValue:!1},isMulti:{name:T0e.isMulti,defaultValue:!1},terminal:{name:T0e.terminal},type:{name:T0e.type,referenceType:u0e.$type}},superTypes:[l0e.$type]},Disjunction:{name:k0e.$type,properties:{left:{name:k0e.left},right:{name:k0e.right}},superTypes:[x0e.$type]},EndOfFile:{name:w0e.$type,properties:{cardinality:{name:w0e.cardinality}},superTypes:[l0e.$type]},Grammar:{name:C0e.$type,properties:{imports:{name:C0e.imports,defaultValue:[]},interfaces:{name:C0e.interfaces,defaultValue:[]},isDeclared:{name:C0e.isDeclared,defaultValue:!1},name:{name:C0e.name},rules:{name:C0e.rules,defaultValue:[]},types:{name:C0e.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:E0e.$type,properties:{path:{name:E0e.path}},superTypes:[]},Group:{name:S0e.$type,properties:{cardinality:{name:S0e.cardinality},elements:{name:S0e.elements,defaultValue:[]},guardCondition:{name:S0e.guardCondition},predicate:{name:S0e.predicate}},superTypes:[l0e.$type]},InferredType:{name:_0e.$type,properties:{name:{name:_0e.name}},superTypes:[u0e.$type]},InfixRule:{name:A0e.$type,properties:{call:{name:A0e.call},dataType:{name:A0e.dataType},inferredType:{name:A0e.inferredType},name:{name:A0e.name},operators:{name:A0e.operators},parameters:{name:A0e.parameters,defaultValue:[]},returnType:{name:A0e.returnType,referenceType:u0e.$type}},superTypes:[h0e.$type]},InfixRuleOperatorList:{name:L0e.$type,properties:{associativity:{name:L0e.associativity},operators:{name:L0e.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:R0e.$type,properties:{precedences:{name:R0e.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:I0e.$type,properties:{attributes:{name:I0e.attributes,defaultValue:[]},name:{name:I0e.name},superTypes:{name:I0e.superTypes,defaultValue:[],referenceType:u0e.$type}},superTypes:[u0e.$type]},Keyword:{name:N0e.$type,properties:{cardinality:{name:N0e.cardinality},predicate:{name:N0e.predicate},value:{name:N0e.value}},superTypes:[l0e.$type]},NamedArgument:{name:D0e.$type,properties:{calledByName:{name:D0e.calledByName,defaultValue:!1},parameter:{name:D0e.parameter,referenceType:P0e.$type},value:{name:D0e.value}},superTypes:[]},NegatedToken:{name:M0e.$type,properties:{cardinality:{name:M0e.cardinality},lookahead:{name:M0e.lookahead},parenthesized:{name:M0e.parenthesized,defaultValue:!1},terminal:{name:M0e.terminal}},superTypes:[Y0e.$type]},Negation:{name:O0e.$type,properties:{value:{name:O0e.value}},superTypes:[x0e.$type]},NumberLiteral:{name:B0e.$type,properties:{value:{name:B0e.value}},superTypes:[ige.$type]},Parameter:{name:P0e.$type,properties:{name:{name:P0e.name}},superTypes:[]},ParameterReference:{name:$0e.$type,properties:{parameter:{name:$0e.parameter,referenceType:P0e.$type}},superTypes:[x0e.$type]},ParserRule:{name:F0e.$type,properties:{dataType:{name:F0e.dataType},definition:{name:F0e.definition},entry:{name:F0e.entry,defaultValue:!1},fragment:{name:F0e.fragment,defaultValue:!1},inferredType:{name:F0e.inferredType},name:{name:F0e.name},parameters:{name:F0e.parameters,defaultValue:[]},returnType:{name:F0e.returnType,referenceType:u0e.$type}},superTypes:[h0e.$type]},ReferenceType:{name:z0e.$type,properties:{isMulti:{name:z0e.isMulti,defaultValue:!1},referenceType:{name:z0e.referenceType}},superTypes:[J0e.$type]},RegexToken:{name:q0e.$type,properties:{cardinality:{name:q0e.cardinality},lookahead:{name:q0e.lookahead},parenthesized:{name:q0e.parenthesized,defaultValue:!1},regex:{name:q0e.regex}},superTypes:[Y0e.$type]},ReturnType:{name:W0e.$type,properties:{name:{name:W0e.name}},superTypes:[]},RuleCall:{name:U0e.$type,properties:{arguments:{name:U0e.arguments,defaultValue:[]},cardinality:{name:U0e.cardinality},predicate:{name:U0e.predicate},rule:{name:U0e.rule,referenceType:c0e.$type}},superTypes:[l0e.$type]},SimpleType:{name:G0e.$type,properties:{primitiveType:{name:G0e.primitiveType},stringType:{name:G0e.stringType},typeRef:{name:G0e.typeRef,referenceType:u0e.$type}},superTypes:[J0e.$type]},StringLiteral:{name:j0e.$type,properties:{value:{name:j0e.value}},superTypes:[ige.$type]},TerminalAlternatives:{name:V0e.$type,properties:{cardinality:{name:V0e.cardinality},elements:{name:V0e.elements,defaultValue:[]},lookahead:{name:V0e.lookahead},parenthesized:{name:V0e.parenthesized,defaultValue:!1}},superTypes:[Y0e.$type]},TerminalElement:{name:Y0e.$type,properties:{cardinality:{name:Y0e.cardinality},lookahead:{name:Y0e.lookahead},parenthesized:{name:Y0e.parenthesized,defaultValue:!1}},superTypes:[l0e.$type]},TerminalGroup:{name:H0e.$type,properties:{cardinality:{name:H0e.cardinality},elements:{name:H0e.elements,defaultValue:[]},lookahead:{name:H0e.lookahead},parenthesized:{name:H0e.parenthesized,defaultValue:!1}},superTypes:[Y0e.$type]},TerminalRule:{name:X0e.$type,properties:{definition:{name:X0e.definition},fragment:{name:X0e.fragment,defaultValue:!1},hidden:{name:X0e.hidden,defaultValue:!1},name:{name:X0e.name},type:{name:X0e.type}},superTypes:[c0e.$type]},TerminalRuleCall:{name:K0e.$type,properties:{cardinality:{name:K0e.cardinality},lookahead:{name:K0e.lookahead},parenthesized:{name:K0e.parenthesized,defaultValue:!1},rule:{name:K0e.rule,referenceType:X0e.$type}},superTypes:[Y0e.$type]},Type:{name:Z0e.$type,properties:{name:{name:Z0e.name},type:{name:Z0e.type}},superTypes:[u0e.$type]},TypeAttribute:{name:Q0e.$type,properties:{defaultValue:{name:Q0e.defaultValue},isOptional:{name:Q0e.isOptional,defaultValue:!1},name:{name:Q0e.name},type:{name:Q0e.type}},superTypes:[]},TypeDefinition:{name:J0e.$type,properties:{},superTypes:[]},UnionType:{name:ege.$type,properties:{types:{name:ege.types,defaultValue:[]}},superTypes:[J0e.$type]},UnorderedGroup:{name:tge.$type,properties:{cardinality:{name:tge.cardinality},elements:{name:tge.elements,defaultValue:[]}},superTypes:[l0e.$type]},UntilToken:{name:rge.$type,properties:{cardinality:{name:rge.cardinality},lookahead:{name:rge.lookahead},parenthesized:{name:rge.parenthesized,defaultValue:!1},terminal:{name:rge.terminal}},superTypes:[Y0e.$type]},ValueLiteral:{name:ige.$type,properties:{},superTypes:[]},Wildcard:{name:nge.$type,properties:{cardinality:{name:nge.cardinality},lookahead:{name:nge.lookahead},parenthesized:{name:nge.parenthesized,defaultValue:!1}},superTypes:[Y0e.$type]}}}},sge=new age}),lge={};function hge(e){let t=e,r=!1;for(;t;){var i=Xde(t.grammarSource,qpe);if(!i||!i.dataType)return r?t:void 0;t=t.container,r=!0}}function cge(e){return new Gde(e,e=>Dde(e)?e.content:[],{includeRoot:!0})}function uge(e){return cge(e).filter(Mde)}function dge(e,t){for(;e.container;)if((e=e.container)===t)return!0;return!1}function pge(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function gge(e){var t,r;if(e)return{offset:e,end:t,range:r}=e,{range:r,offset:e,end:t,length:t-e}}function fge(e,t){var r;return e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<=t.start.character?Lge.Before:e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character?Lge.After:(r=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,e=e.end.line<t.end.line||e.end.line===t.end.line&&e.end.character<=t.end.character,r&&e?Lge.Inside:r?Lge.OverlapBack:e?Lge.OverlapFront:Lge.Outside)}function mge(e,t){return fge(e,t)>Lge.After}function yge(e,t,r=Rge){var i;if(e)return 0<t&&(i=t-e.offset,i=e.text.charAt(i),r.test(i)||t--),bge(e,t)}function vge(t,r){if(t){var e=wge(t,!0);if(e&&xge(e,r))return e;if(Ode(t))for(let e=t.content.findIndex(e=>!e.hidden)-1;0<=e;e--){var i=t.content[e];if(xge(i,r))return i}}}function xge(e,t){return Mde(e)&&t.includes(e.tokenType.name)}function bge(e,t){return Mde(e)?e:Dde(e)&&(e=kge(e,t,!1))?bge(e,t):void 0}function Tge(e,t){return Mde(e)?e:Dde(e)&&(e=kge(e,t,!0))?Tge(e,t):void 0}function kge(e,t,r){let i=0,n=e.content.length-1,a;for(;i<=n;){var s=Math.floor((i+n)/2),o=e.content[s];if(o.offset<=t&&o.end>t)return o;o.end<=t?(a=r?o:void 0,i=s+1):n=s-1}return a}function wge(r,i=!0){for(;r.container;){let e=r.container,t=e.content.indexOf(r);for(;0<t;){t--;var n=e.content[t];if(i||!n.hidden)return n}r=e}}function Cge(i,n=!0){for(;i.container;){let e=i.container,t=e.content.indexOf(i),r=e.content.length-1;for(;t<r;){t++;var a=e.content[t];if(n||!a.hidden)return a}i=e}}function Ege(e){if(0===e.range.start.character)return e;let t=e.range.start.line,r=e,i;for(;e.container;){var n=e.container,a=i??n.content.indexOf(e);if(0===a?(e=n,i=void 0):(i=a-1,e=n.content[i]),e.range.start.line!==t)break;r=e}return r}function Sge(e,t){return(e=_ge(e,t))?e.parent.content.slice(e.a+1,e.b):[]}function _ge(e,t){let r=Age(e),i=Age(t),n;for(let e=0;e<r.length&&e<i.length;e++){var a=r[e],s=i[e];if(a.parent!==s.parent)break;n={parent:a.parent,a:a.index,b:s.index}}return n}function Age(e){for(var t=[];e.container;){var r=e.container,i=r.content.indexOf(e);t.push({parent:r,index:i}),e=r}return t.reverse()}sYe(lge,{DefaultNameRegexp:()=>Rge,RangeComparison:()=>Lge,compareRange:()=>fge,findCommentNode:()=>vge,findDeclarationNodeAtOffset:()=>yge,findLeafNodeAtOffset:()=>bge,findLeafNodeBeforeOffset:()=>Tge,flattenCst:()=>uge,getDatatypeNode:()=>hge,getInteriorNodes:()=>Sge,getNextNode:()=>Cge,getPreviousNode:()=>wge,getStartlineNode:()=>Ege,inRange:()=>mge,isChildNode:()=>dge,isCommentNode:()=>xge,streamCst:()=>cge,toDocumentSegment:()=>gge,tokenToRange:()=>pge});var Lge,Rge,Ige=i(()=>{var e;Pde(),Vde(),lpe(),oge(),mt(hge,"getDatatypeNode"),mt(cge,"streamCst"),mt(uge,"flattenCst"),mt(dge,"isChildNode"),mt(pge,"tokenToRange"),mt(gge,"toDocumentSegment"),(e=Lge=Lge||{})[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",mt(fge,"compareRange"),mt(mge,"inRange"),Rge=/^[\w\p{L}]$/u,mt(yge,"findDeclarationNodeAtOffset"),mt(vge,"findCommentNode"),mt(xge,"isCommentNode"),mt(bge,"findLeafNodeAtOffset"),mt(Tge,"findLeafNodeBeforeOffset"),mt(kge,"binarySearch"),mt(wge,"getPreviousNode"),mt(Cge,"getNextNode"),mt(Ege,"getStartlineNode"),mt(Sge,"getInteriorNodes"),mt(_ge,"getCommonParent"),mt(Age,"getParentChain")});function Nge(e,t="Error: Got unexpected value."){throw new Error(t)}function Dge(e,t="Error: Condition is violated."){if(!e)throw new Error(t)}var Mge,Oge=i(()=>{Mge=class extends Error{static{mt(this,"ErrorWithLocation")}constructor(e,t){super(e?`${t} at ${e.range.start.line}:`+e.range.start.character:t)}},mt(Nge,"assertUnreachable"),mt(Dge,"assertCondition")});function Bge(e){return e.charCodeAt(0)}function Pge(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function $ge(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t]=!0}function Fge(e){if(void 0===e)throw Error("Internal Error - Should never get here!");return!0}function zge(){throw Error("Internal Error - Should never get here!")}function qge(e){return"Character"===e.type}var Wge,Uge,Gge,jge,Vge,Yge,Hge,Xge,Kge=i(()=>{mt(Bge,"cc"),mt(Pge,"insertToSet"),mt($ge,"addFlag"),mt(Fge,"ASSERT_EXISTS"),mt(zge,"ASSERT_NEVER_REACH_HERE"),mt(qge,"isCharacter")}),Zge=i(()=>{Kge(),Wge=[];for(let e=Bge("0");e<=Bge("9");e++)Wge.push(e);Uge=[Bge("_")].concat(Wge);for(let e=Bge("a");e<=Bge("z");e++)Uge.push(e);for(let e=Bge("A");e<=Bge("Z");e++)Uge.push(e);Gge=[Bge(" "),Bge("\f"),Bge(`
`),Bge("\r"),Bge("\t"),Bge("\v"),Bge("\t"),Bge(" "),Bge(""),Bge(" "),Bge(""),Bge(""),Bge(""),Bge(""),Bge(""),Bge(""),Bge(""),Bge(""),Bge(""),Bge(""),Bge("\u2028"),Bge("\u2029"),Bge(""),Bge(""),Bge(" "),Bge("\ufeff")]}),Qge=i(()=>{Kge(),Zge(),jge=/[0-9a-fA-F]/,Vge=/[0-9]/,Yge=/[1-9]/,Hge=class{static{mt(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("/");for(var t=this.disjunction(),r=(this.consumeChar("/"),{type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1});this.isRegExpFlag();)switch(this.popChar()){case"g":$ge(r,"global");break;case"i":$ge(r,"ignoreCase");break;case"m":$ge(r,"multiLine");break;case"u":$ge(r,"unicode");break;case"y":$ge(r,"sticky")}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(){var 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(){for(var e=[],t=this.idx;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){var t=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(t)};case"$":return{type:"EndAnchor",loc:this.loc(t)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(t)};case"B":return{type:"NonWordBoundary",loc:this.loc(t)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let e;switch(this.popChar()){case"=":e="Lookahead";break;case"!":e="NegativeLookahead";break;case"<":switch(this.popChar()){case"=":e="Lookbehind";break;case"!":e="NegativeLookbehind"}}Fge(e);var r=this.disjunction();return this.consumeChar(")"),{type:e,value:r,loc:this.loc(t)}}return zge()}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"{":var i=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:i,atMost:i};break;case",":t=this.isDigit()?{atLeast:i,atMost:this.integerIncludingZero()}:{atLeast:i,atMost:1/0},this.consumeChar("}")}if(!0===e&&void 0===t)return;Fge(t)}if((!0!==e||void 0!==t)&&Fge(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()}return Fge(e=void 0===e&&this.isPatternCharacter()?this.patternCharacter():e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):zge()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[Bge(`
`),Bge("\r"),Bge("\u2028"),Bge("\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=Wge;break;case"D":e=Wge,t=!0;break;case"s":e=Gge;break;case"S":e=Gge,t=!0;break;case"w":e=Uge;break;case"W":e=Uge,t=!0}return Fge(e)?{type:"Set",value:e,complement:t}:zge()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=Bge("\f");break;case"n":e=Bge(`
`);break;case"r":e=Bge("\r");break;case"t":e=Bge("\t");break;case"v":e=Bge("\v")}return Fge(e)?{type:"Character",value:e}:zge()}controlLetterEscapeAtom(){this.consumeChar("c");var e=this.popChar();if(!1===/[a-zA-Z]/.test(e))throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:Bge("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:Bge(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case`
`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:Bge(this.popChar())}}}characterClass(){let e=[],t=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),t=!0);this.isClassAtom();){var r=this.classAtom();if(r.type,qge(r)&&this.isRangeDash()){this.consumeChar("-");var i=this.classAtom();if(i.type,qge(i)){if(i.value<r.value)throw Error("Range out of order in character class");e.push({from:r.value,to:i.value})}else Pge(r.value,e),e.push(Bge("-")),Pge(i.value,e)}else Pge(r.value,e)}return this.consumeChar("]"),{type:"Set",complement:t,value:e}}classAtom(){switch(this.peekChar()){case"]":case`
`:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:Bge("\b")};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()}}group(){let e=!0;"?"===(this.consumeChar("("),this.peekChar(0))?(this.consumeChar("?"),this.consumeChar(":"),e=!1):this.groupIdx++;var t=this.disjunction(),t=(this.consumeChar(")"),{type:"Group",capturing:e,value:t});return e&&(t.idx=this.groupIdx),t}positiveInteger(){let e=this.popChar();if(!1===Yge.test(e))throw Error("Expecting a positive integer");for(;Vge.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(!1===Vge.test(e))throw Error("Expecting an integer");for(;Vge.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){var e=this.popChar();switch(e){case`
`:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:Bge(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return"-"===this.peekChar()&&this.isClassAtom(1)}isDigit(){return Vge.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case`
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2)||"<"===this.peekChar(2)&&("="===this.peekChar(3)||"!"===this.peekChar(3)));default:return!1}}isQuantifier(){var e=this.saveState();try{return void 0!==this.quantifier(!0)}catch{return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(t){let r="";for(let e=0;e<t;e++){var i=this.popChar();if(!1===jge.test(i))throw Error("Expecting a HexDecimal digits");r+=i}return{type:"Character",value:parseInt(r,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){var e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(void 0!==e&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}}),Jge=i(()=>{Xge=class{static{mt(this,"BaseRegExpVisitor")}visitChildren(e){for(var t in e){var r=e[t];e.hasOwnProperty(t)&&(void 0!==r.type?this.visit(r):Array.isArray(r)&&r.forEach(e=>{this.visit(e)},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)}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){}}}),efe=i(()=>{Qge(),Jge()}),tfe={};function rfe(e){try{e=`/${e="string"!=typeof e?e.source:e}/`;var t,r=hfe.pattern(e),i=[];for(t of r.value.value)ufe.reset(e),ufe.visit(t),i.push({start:ufe.startRegexp,end:ufe.endRegex});return i}catch{return[]}}function ife(e){try{return e=(e="string"==typeof e?new RegExp(e):e).toString(),ufe.reset(e),ufe.visit(hfe.pattern(e)),ufe.multiline}catch{return!1}}function nfe(e){let t="string"==typeof e?new RegExp(e):e;return dfe.some(e=>t.test(e))}function afe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function sfe(e,t){return e=ofe(e),!!(t=t.match(e))&&0<t[0].length}function ofe(e){let n=e="string"==typeof e?new RegExp(e):e,a=e.source,s=0;function o(){let t="",e;function r(e){t+=a.substr(s,e),s+=e}function i(e){t+="(?:"+a.substr(s,e)+"|$)",s+=e}for(mt(r,"appendRaw"),mt(i,"appendOptional");s<a.length;)switch(a[s]){case"\\":switch(a[s+1]){case"c":i(3);break;case"x":i(4);break;case"u":n.unicode?"{"===a[s+2]?i(a.indexOf("}",s)-s+1):i(6):i(2);break;case"p":case"P":n.unicode?i(a.indexOf("}",s)-s+1):i(2);break;case"k":i(a.indexOf(">",s)-s+1);break;default:i(2)}break;case"[":(e=/\[(?:\\.|.)*?\]/g).lastIndex=s,i((e=e.exec(a)||[])[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":r(1);break;case"{":(e=/\{\d+,?\d*\}/g).lastIndex=s,(e=e.exec(a))?r(e[0].length):i(1);break;case"(":if("?"===a[s+1])switch(a[s+2]){case":":t+="(?:",s+=3,t+=o()+"|$)";break;case"=":t+="(?=",s+=3,t+=o()+")";break;case"!":e=s,s+=3,o(),t+=a.substr(e,s-e);break;case"<":switch(a[s+3]){case"=":case"!":e=s,s+=4,o(),t+=a.substr(e,s-e);break;default:r(a.indexOf(">",s)-s+1),t+=o()+"|$)"}}else r(1),t+=o()+"|$)";break;case")":return++s,t;default:i(1)}return t}return mt(o,"process"),new RegExp(o(),e.flags)}sYe(tfe,{NEWLINE_REGEXP:()=>lfe,escapeRegExp:()=>afe,getTerminalParts:()=>rfe,isMultilineComment:()=>ife,isWhitespace:()=>nfe,partialMatches:()=>sfe,partialRegExp:()=>ofe,whitespaceCharacters:()=>dfe});var lfe,hfe,cfe,ufe,dfe,pfe=i(()=>{efe(),lfe=/\r?\n/gm,hfe=new Hge,cfe=class extends Xge{static{mt(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){var t=String.fromCharCode(e.value);this.multiline||t!==`
`||(this.multiline=!0),e.quantifier?(this.isStarting=!1,this.endRegexpStack=[]):(e=afe(t),this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e))}visitSet(e){var t;this.multiline||(t=this.regex.substring(e.loc.begin,e.loc.end),t=new RegExp(t),this.multiline=!!`
`.match(t)),e.quantifier?(this.isStarting=!1,this.endRegexpStack=[]):(t=this.regex.substring(e.loc.begin,e.loc.end),this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t))}visitChildren(e){"Group"===e.type&&e.quantifier||super.visitChildren(e)}},ufe=new cfe,mt(rfe,"getTerminalParts"),mt(ife,"isMultilineComment"),dfe=`
\r    `.split(""),mt(nfe,"isWhitespace"),mt(afe,"escapeRegExp"),mt(sfe,"partialMatches"),mt(ofe,"partialRegExp")}),gfe={};function ffe(e){return e.rules.find(e=>qpe(e)&&e.entry)}function mfe(e){return e.rules.filter(e=>Zpe(e)&&e.hidden)}function yfe(e,t){var r,i=new Set,n=ffe(e);if(!n)return new Set(e.rules);for(r of[n].concat(mfe(e)))vfe(r,i,t);var a,s=new Set;for(a of e.rules)(i.has(a.name)||Zpe(a)&&a.hidden)&&s.add(a);return s}function vfe(e,t,r){t.add(e.name),tpe(e).forEach(e=>{(jpe(e)||r&&Qpe(e))&&(e=e.rule.ref)&&!t.has(e.name)&&vfe(e,t,r)})}function xfe(e){let t=new Set;return tpe(e).forEach(e=>{wpe(e)&&(qpe(e.type.ref)&&t.add(e.type.ref),Lpe(e.type.ref))&&qpe(e.type.ref.$container)&&t.add(e.type.ref.$container)}),t}function bfe(e){return e.terminal||(e.type.ref?Lfe(e.type.ref)?.terminal:void 0)}function Tfe(e){return e.hidden&&!nfe(Gfe(e))}function kfe(e,t){return e&&t?Cfe(e,t,e.astNode,!0):[]}function wfe(e,t,r){return e&&t&&0!==(t=Cfe(e,t,e.astNode,!0)).length?t[r=void 0!==r?Math.max(0,Math.min(r,t.length-1)):0]:void 0}function Cfe(e,t,r,i){return!i&&(i=Xde(e.grammarSource,vpe))&&i.feature===t?[e]:Dde(e)&&e.astNode===r?e.content.flatMap(e=>Cfe(e,t,r,!1)):[]}function Efe(e,t){return e?_fe(e,t,e?.astNode):[]}function Sfe(e,t,r){return e&&0!==(t=_fe(e,t,e?.astNode)).length?t[r=void 0!==r?Math.max(0,Math.min(r,t.length-1)):0]:void 0}function _fe(e,t,r){if(e.astNode!==r)return[];if(Mpe(e.grammarSource)&&e.grammarSource.value===t)return[e];for(var i,n,a=cge(e).iterator(),s=[];(n=a.next()).done||((i=n.value).astNode===r?Mpe(i.grammarSource)&&i.grammarSource.value===t&&s.push(i):a.prune()),!n.done;);return s}function Afe(e){for(var t=e.astNode;t===e.container?.astNode;){var r=Xde(e.grammarSource,vpe);if(r)return r;e=e.container}}function Lfe(e){let t=e;return Lpe(t)&&(gpe(t.$container)?t=t.$container.$container:upe(t.$container)?t=t.$container:Nge(t.$container)),Rfe(e,t,new Map)}function Rfe(i,e,n){function t(e,t){let r;return Xde(e,vpe)||(r=Rfe(t,t,n)),n.set(i,r),r}if(mt(t,"go"),n.has(i))return n.get(i);n.set(i,void 0);for(var r of tpe(e)){if(vpe(r)&&"name"===r.feature.toLowerCase())return n.set(i,r),r;if(jpe(r)&&qpe(r.rule.ref))return t(r,r.rule.ref);if(Vpe(r)&&r.typeRef?.ref)return t(r,r.typeRef.ref)}}function Ife(t){var e=t.$container;if(Ape(e)){var r=e.elements;for(let e=r.indexOf(t)-1;0<=e;e--){var i=r[e];if(gpe(i))return i;if(i=tpe(r[e]).find(gpe))return i}}if(cpe(e))return Ife(e)}function Nfe(e,t){return"?"===e||"*"===e||Ape(t)&&!!t.guardCondition}function Dfe(e){return"*"===e||"+"===e}function Mfe(e){return"+="===e}function Ofe(e){return Bfe(e,new Set)}function Bfe(e,t){if(t.has(e))return!0;t.add(e);for(var r of tpe(e))if(jpe(r)){if(!r.rule.ref||qpe(r.rule.ref)&&!Bfe(r.rule.ref,t)||Rpe(r.rule.ref))return!1}else{if(vpe(r))return!1;if(gpe(r))return!1}return!!e.definition}function Pfe(e){return $fe(e.type,new Set)}function $fe(e,t){return!!t.has(e)||(t.add(e),!ype(e)&&!Wpe(e)&&(r0e(e)?e.types.every(e=>$fe(e,t)):!!Vpe(e)&&(void 0!==e.primitiveType||void 0!==e.stringType||void 0!==e.typeRef&&!!Jpe(e=e.typeRef.ref)&&$fe(e.type,t))))}function Ffe(e){if(!Zpe(e))return e.inferredType?e.inferredType.name:e.dataType||(e.returnType&&(e=e.returnType.ref)?e.name:void 0)}function zfe(e){if(upe(e))return qpe(e)&&Ofe(e)?e.name:Ffe(e)??e.name;if(Dpe(e)||Jpe(e)||Gpe(e))return e.name;if(gpe(e)){var t=qfe(e);if(t)return t}else if(Lpe(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function qfe(e){return e.inferredType?e.inferredType.name:e.type?.ref?zfe(e.type.ref):void 0}function Wfe(e){return Zpe(e)?e.type?.name??"string":qpe(e)&&Ofe(e)?e.name:Ffe(e)??e.name}function Ufe(e){return Zpe(e)?e.type?.name??"string":Ffe(e)??e.name}function Gfe(e){var e=jfe(e.definition,t={s:!1,i:!1,u:!1}),t=Object.entries(t).filter(([,e])=>e).map(([e])=>e).join("");return new RegExp(e,t)}function jfe(e,t){if(Hpe(e))return Vfe(e);if(Kpe(e))return Yfe(e);if(bpe(e))return Kfe(e);if(Qpe(e)){var r=e.rule.ref;if(r)return Qfe(jfe(r.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error("Missing rule reference.")}if(Bpe(e))return Xfe(e);if(n0e(e))return Hfe(e);var i;if(Upe(e))return r=e.regex.lastIndexOf("/"),i=e.regex.substring(1,r),r=e.regex.substring(r+1),t&&(t.i=r.includes("i"),t.s=r.includes("s"),t.u=r.includes("u")),Qfe(i,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1});if(s0e(e))return Qfe(Jfe,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error(`Invalid terminal element: ${e?.$type}, `+e?.$cstNode?.text)}function Vfe(e){return Qfe(e.elements.map(e=>jfe(e)).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Yfe(e){return Qfe(e.elements.map(e=>jfe(e)).join(""),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Hfe(e){return Qfe(Jfe+"*?"+jfe(e.terminal),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function Xfe(e){return Qfe(`(?!${jfe(e.terminal)})${Jfe}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function Kfe(e){return e.right?Qfe(`[${Zfe(e.left)}-${Zfe(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):Qfe(Zfe(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Zfe(e){return afe(e.value)}function Qfe(e,t){return(t.parenthesized||t.lookahead||!1!==t.wrap)&&(e=`(${t.lookahead??(t.parenthesized?"":"?:")}${e})`),t.cardinality?""+e+t.cardinality:e}sYe(gfe,{findAssignment:()=>Afe,findNameAssignment:()=>Lfe,findNodeForKeyword:()=>Sfe,findNodeForProperty:()=>wfe,findNodesForKeyword:()=>Efe,findNodesForKeywordInternal:()=>_fe,findNodesForProperty:()=>kfe,getActionAtElement:()=>Ife,getActionType:()=>qfe,getAllReachableRules:()=>yfe,getAllRulesUsedForCrossReferences:()=>xfe,getCrossReferenceTerminal:()=>bfe,getEntryRule:()=>ffe,getExplicitRuleType:()=>Ffe,getHiddenRules:()=>mfe,getRuleType:()=>Ufe,getRuleTypeName:()=>Wfe,getTypeName:()=>zfe,isArrayCardinality:()=>Dfe,isArrayOperator:()=>Mfe,isCommentTerminal:()=>Tfe,isDataType:()=>Pfe,isDataTypeRule:()=>Ofe,isOptionalCardinality:()=>Nfe,terminalRegex:()=>Gfe});var Jfe,e1e=i(()=>{Oge(),oge(),Pde(),lpe(),Ige(),pfe(),mt(ffe,"getEntryRule"),mt(mfe,"getHiddenRules"),mt(yfe,"getAllReachableRules"),mt(vfe,"ruleDfs"),mt(xfe,"getAllRulesUsedForCrossReferences"),mt(bfe,"getCrossReferenceTerminal"),mt(Tfe,"isCommentTerminal"),mt(kfe,"findNodesForProperty"),mt(wfe,"findNodeForProperty"),mt(Cfe,"findNodesForPropertyInternal"),mt(Efe,"findNodesForKeyword"),mt(Sfe,"findNodeForKeyword"),mt(_fe,"findNodesForKeywordInternal"),mt(Afe,"findAssignment"),mt(Lfe,"findNameAssignment"),mt(Rfe,"findNameAssignmentInternal"),mt(Ife,"getActionAtElement"),mt(Nfe,"isOptionalCardinality"),mt(Dfe,"isArrayCardinality"),mt(Mfe,"isArrayOperator"),mt(Ofe,"isDataTypeRule"),mt(Bfe,"isDataTypeRuleInternal"),mt(Pfe,"isDataType"),mt($fe,"isDataTypeInternal"),mt(Ffe,"getExplicitRuleType"),mt(zfe,"getTypeName"),mt(qfe,"getActionType"),mt(Wfe,"getRuleTypeName"),mt(Ufe,"getRuleType"),mt(Gfe,"terminalRegex"),Jfe=/[\s\S]/.source,mt(jfe,"abstractElementToRegex"),mt(Vfe,"terminalAlternativesToRegex"),mt(Yfe,"terminalGroupToRegex"),mt(Hfe,"untilTokenToRegex"),mt(Xfe,"negateTokenToRegex"),mt(Kfe,"characterRangeToRegex"),mt(Zfe,"keywordToRegex"),mt(Qfe,"withCardinality")});function t1e(e){var t,r=[];for(t of e.Grammar.rules)Zpe(t)&&Tfe(t)&&ife(Gfe(t))&&r.push(t.name);return{multilineCommentRules:r,nameRegexp:Rge}}var r1e=i(()=>{Ige(),e1e(),pfe(),oge(),mt(t1e,"createGrammarConfig")}),i1e=i(()=>{});function n1e(e){console&&console.error&&console.error("Error: "+e)}function a1e(e){console&&console.warn&&console.warn("Warning: "+e)}var s1e=i(()=>{mt(n1e,"PRINT_ERROR"),mt(a1e,"PRINT_WARNING")});function o1e(e){var t=(new Date).getTime(),e=e();return{time:(new Date).getTime()-t,value:e}}var l1e=i(()=>{mt(o1e,"timer")});function h1e(e){function t(){}mt(t,"FakeConstructor"),t.prototype=e;let r=new t;function i(){return typeof r.bar}return mt(i,"fakeAccess"),i(),i(),e}var c1e=i(()=>{mt(h1e,"toFastProperties")}),u1e=i(()=>{s1e(),l1e(),c1e()});function d1e(e){return p1e(e)?e.LABEL:e.name}function p1e(e){return cj(e.LABEL)&&""!==e.LABEL}function g1e(e){return x(e,f1e)}function f1e(e){function t(e){return x(e,f1e)}var r,i;if(mt(t,"convertDefinition"),e instanceof y1e)return r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx},cj(e.label)&&(r.label=e.label),r;if(e instanceof x1e)return{type:"Alternative",definition:t(e.definition)};if(e instanceof b1e)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof T1e)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof k1e)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:f1e(new S1e({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof C1e)return{type:"RepetitionWithSeparator",idx:e.idx,separator:f1e(new S1e({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof w1e)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof E1e)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof S1e)return r={type:"Terminal",name:e.terminalType.name,label:d1e(e.terminalType),idx:e.idx},cj(e.label)&&(r.terminalLabel=e.label),i=e.terminalType.PATTERN,e.terminalType.PATTERN&&(r.pattern=Mj(i)?i.source:i),r;if(e instanceof v1e)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}var m1e,y1e,v1e,x1e,b1e,T1e,k1e,w1e,C1e,E1e,S1e,_1e,A1e=i(()=>{eH(),mt(d1e,"tokenLabel"),mt(p1e,"hasTokenLabel"),m1e=class{static{mt(this,"AbstractProduction")}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(t){t.visit(this),v(this.definition,e=>{e.accept(t)})}},y1e=class extends m1e{static{mt(this,"NonTerminal")}constructor(e){super([]),this.idx=1,L$(this,gV(e,e=>void 0!==e))}set definition(e){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(e){e.visit(this)}},v1e=class extends m1e{static{mt(this,"Rule")}constructor(e){super(e.definition),this.orgText="",L$(this,gV(e,e=>void 0!==e))}},x1e=class extends m1e{static{mt(this,"Alternative")}constructor(e){super(e.definition),this.ignoreAmbiguities=!1,L$(this,gV(e,e=>void 0!==e))}},b1e=class extends m1e{static{mt(this,"Option")}constructor(e){super(e.definition),this.idx=1,L$(this,gV(e,e=>void 0!==e))}},T1e=class extends m1e{static{mt(this,"RepetitionMandatory")}constructor(e){super(e.definition),this.idx=1,L$(this,gV(e,e=>void 0!==e))}},k1e=class extends m1e{static{mt(this,"RepetitionMandatoryWithSeparator")}constructor(e){super(e.definition),this.idx=1,L$(this,gV(e,e=>void 0!==e))}},w1e=class extends m1e{static{mt(this,"Repetition")}constructor(e){super(e.definition),this.idx=1,L$(this,gV(e,e=>void 0!==e))}},C1e=class extends m1e{static{mt(this,"RepetitionWithSeparator")}constructor(e){super(e.definition),this.idx=1,L$(this,gV(e,e=>void 0!==e))}},E1e=class extends m1e{static{mt(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,L$(this,gV(e,e=>void 0!==e))}},S1e=class{static{mt(this,"Terminal")}constructor(e){this.idx=1,L$(this,gV(e,e=>void 0!==e))}accept(e){e.visit(this)}},mt(g1e,"serializeGrammar"),mt(f1e,"serializeProduction")}),L1e=i(()=>{A1e(),_1e=class{static{mt(this,"GAstVisitor")}visit(e){var t=e;switch(t.constructor){case y1e:return this.visitNonTerminal(t);case x1e:return this.visitAlternative(t);case b1e:return this.visitOption(t);case T1e:return this.visitRepetitionMandatory(t);case k1e:return this.visitRepetitionMandatoryWithSeparator(t);case C1e:return this.visitRepetitionWithSeparator(t);case w1e:return this.visitRepetition(t);case E1e:return this.visitAlternation(t);case S1e:return this.visitTerminal(t);case v1e: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){}}});function R1e(e){return e instanceof x1e||e instanceof b1e||e instanceof w1e||e instanceof T1e||e instanceof k1e||e instanceof C1e||e instanceof S1e||e instanceof v1e}function I1e(e,t=[]){return e instanceof b1e||e instanceof w1e||e instanceof C1e||(e instanceof E1e?CY(e.definition,e=>I1e(e,t)):!(e instanceof y1e&&bj(t,e))&&e instanceof m1e&&(e instanceof y1e&&t.push(e),dG(e.definition,e=>I1e(e,t))))}function N1e(e){return e instanceof E1e}function D1e(e){if(e instanceof y1e)return"SUBRULE";if(e instanceof b1e)return"OPTION";if(e instanceof E1e)return"OR";if(e instanceof T1e)return"AT_LEAST_ONE";if(e instanceof k1e)return"AT_LEAST_ONE_SEP";if(e instanceof C1e)return"MANY_SEP";if(e instanceof w1e)return"MANY";if(e instanceof S1e)return"CONSUME";throw Error("non exhaustive match")}var M1e=i(()=>{eH(),A1e(),mt(R1e,"isSequenceProd"),mt(I1e,"isOptionalProd"),mt(N1e,"isBranchingProd"),mt(D1e,"getProductionDslName")}),O1e=i(()=>{A1e(),L1e(),M1e()});function B1e(e,t,r){return[new b1e({definition:[new S1e({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}var P1e,$1e=i(()=>{eH(),O1e(),P1e=class{static{mt(this,"RestWalker")}walk(r,i=[]){v(r.definition,(e,t)=>{if(t=HU(r.definition,t+1),e instanceof y1e)this.walkProdRef(e,t,i);else if(e instanceof S1e)this.walkTerminal(e,t,i);else if(e instanceof x1e)this.walkFlat(e,t,i);else if(e instanceof b1e)this.walkOption(e,t,i);else if(e instanceof T1e)this.walkAtLeastOne(e,t,i);else if(e instanceof k1e)this.walkAtLeastOneSep(e,t,i);else if(e instanceof C1e)this.walkManySep(e,t,i);else if(e instanceof w1e)this.walkMany(e,t,i);else{if(!(e instanceof E1e))throw Error("non exhaustive match");this.walkOr(e,t,i)}})}walkTerminal(e,t,r){}walkProdRef(e,t,r){}walkFlat(e,t,r){t=t.concat(r),this.walk(e,t)}walkOption(e,t,r){t=t.concat(r),this.walk(e,t)}walkAtLeastOne(e,t,r){t=[new b1e({definition:e.definition})].concat(t,r),this.walk(e,t)}walkAtLeastOneSep(e,t,r){t=B1e(e,t,r),this.walk(e,t)}walkMany(e,t,r){t=[new b1e({definition:e.definition})].concat(t,r),this.walk(e,t)}walkManySep(e,t,r){t=B1e(e,t,r),this.walk(e,t)}walkOr(e,t,r){let i=t.concat(r);v(e.definition,e=>{e=new x1e({definition:[e]}),this.walk(e,i)})}},mt(B1e,"restForRepetitionWithSeparator")});function F1e(e){if(e instanceof y1e)return F1e(e.referencedRule);if(e instanceof S1e)return W1e(e);if(R1e(e))return z1e(e);if(N1e(e))return q1e(e);throw Error("non exhaustive match")}function z1e(e){let t=[],r=e.definition,i=0,n=r.length>i,a,s=!0;for(;n&&s;)a=r[i],s=I1e(a),t=t.concat(F1e(a)),i+=1,n=r.length>i;return FY(t)}function q1e(e){return e=x(e.definition,e=>F1e(e)),FY(yF(e))}function W1e(e){return[e.terminalType]}var U1e,G1e=i(()=>{eH(),O1e(),mt(F1e,"first"),mt(z1e,"firstForSequence"),mt(q1e,"firstForBranching"),mt(W1e,"firstForTerminal")}),j1e=i(()=>{U1e="_~IN~_"});function V1e(e){let t={};return v(e,e=>{e=new H1e(e).startWalking(),L$(t,e)}),t}function Y1e(e,t){return e.name+t+U1e}var H1e,X1e=i(()=>{$1e(),G1e(),eH(),j1e(),O1e(),H1e=class extends P1e{static{mt(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){e=Y1e(e.referencedRule,e.idx)+this.topProd.name,t=t.concat(r),r=F1e(new x1e({definition:t})),this.follows[e]=r}},mt(V1e,"computeAllProdsFollows"),mt(Y1e,"buildBetweenProdsFollowPrefix")});function K1e(e){var t,e=e.toString();return Q1e.hasOwnProperty(e)?Q1e[e]:(t=J1e.pattern(e),Q1e[e]=t)}function Z1e(){Q1e={}}var Q1e,J1e,eme=i(()=>{efe(),Q1e={},J1e=new Hge,mt(K1e,"getRegExpAst"),mt(Z1e,"clearRegExpParserCache")});function tme(e,t=!1){try{var r=K1e(e);return rme(r.value,{},r.flags.ignoreCase)}catch(r){r.message===lme?t&&a1e(`${hme} 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.`):(t=t?`
This will disable the lexer's first char optimizations.
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`:"",n1e(`${hme}
Failed parsing: < ${e.toString()} >
Using the @chevrotain/regexp-to-ast library
Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+t))}return[]}function rme(t,n,a){switch(t.type){case"Disjunction":for(let e=0;e<t.value.length;e++)rme(t.value[e],n,a);break;case"Alternative":var r=t.value;for(let e=0;e<r.length;e++){var i=r[e];switch(i.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"Lookbehind":case"NegativeLookbehind":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}var s=i;switch(s.type){case"Character":ime(s.value,n,a);break;case"Set":if(!0===s.complement)throw Error(lme);v(s.value,t=>{if("number"==typeof t)ime(t,n,a);else{var r=t;if(!0===a)for(let e=r.from;e<=r.to;e++)ime(e,n,a);else{for(let e=r.from;e<=r.to&&e<Hme;e++)ime(e,n,a);if(r.to>=Hme){var t=r.from>=Hme?r.from:Hme,e=r.to,t=Fme(t),i=Fme(e);for(let e=t;e<=i;e++)n[e]=e}}}});break;case"Group":rme(s.value,n,a);break;default:throw Error("Non Exhaustive Match")}if(i=void 0!==s.quantifier&&0===s.quantifier.atLeast,"Group"===s.type&&!1===sme(s)||"Group"!==s.type&&0==i)break}break;default:throw Error("non exhaustive match!")}return mj(n)}function ime(e,t,r){var i=Fme(e);t[i]=i,!0===r&&nme(e,t)}function nme(e,t){var r=(e=String.fromCharCode(e)).toUpperCase();r!==e?t[r=Fme(r.charCodeAt(0))]=r:(r=e.toLowerCase())!==e&&(t[e=Fme(r.charCodeAt(0))]=e)}function ame(e,r){return _G(e.value,e=>{if("number"==typeof e)return bj(r,e);{let t=e;return void 0!==_G(r,e=>t.from<=e&&e<=t.to)}})}function sme(e){var t=e.quantifier;return!(!t||0!==t.atLeast)||!!e.value&&(EE(e.value)?dG(e.value,sme):sme(e.value))}function ome(t,e){var r,i;return e instanceof RegExp?(r=K1e(e),(i=new cme(t)).visit(r),i.found):void 0!==_G(e,e=>bj(t,e.charCodeAt(0)))}var lme,hme,cme,ume=i(()=>{efe(),eH(),u1e(),eme(),Kme(),lme="Complement Sets are not supported for first char optimization",hme=`Unable to use "first char" lexer optimizations:
`,mt(tme,"getOptimizedStartCodesIndices"),mt(rme,"firstCharOptimizedIndices"),mt(ime,"addOptimizedIdxToResult"),mt(nme,"handleIgnoreCase"),mt(ame,"findCode"),mt(sme,"isWholeOptional"),cme=class extends Xge{static{mt(this,"CharCodeFinder")}constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(!0!==this.found){switch(e.type){case"Lookahead":return void this.visitLookahead(e);case"NegativeLookahead":return void this.visitNegativeLookahead(e);case"Lookbehind":return void this.visitLookbehind(e);case"NegativeLookbehind":return void this.visitNegativeLookbehind(e)}super.visitChildren(e)}}visitCharacter(e){bj(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?void 0===ame(e,this.targetCharCodes)&&(this.found=!0):void 0!==ame(e,this.targetCharCodes)&&(this.found=!0)}},mt(ome,"canMatchCharCode")});function dme(e,n){var t=(n=IU(n,{useSticky:Gme,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
`],tracer:mt((e,t)=>t(),"tracer")})).tracer;t("initCharCodeToOptimizedIndexMap",()=>{zme()});let r,i=(t("Reject Lexer.NA",()=>{r=fY(e,e=>e[qme]===fye.NA)}),!1),a;t("Transform Patterns",()=>{i=!1,a=x(r,e=>{var t,e=e[qme];if(Mj(e))return 1!==(t=e.source).length||"^"===t||"$"===t||"."===t||e.ignoreCase?2!==t.length||"\\"!==t[0]||bj(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],t[1])?(n.useSticky?Lme:Ame)(e):t[1]:t;if(ew(e))return i=!0,{exec:e};if("object"==typeof e)return i=!0,e;if("string"==typeof e)return 1===e.length?e:(t=e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),e=new RegExp(t),(n.useSticky?Lme:Ame)(e));throw Error("non exhaustive match")})});let s,o,l,h,c;t("misc mapping",()=>{s=x(r,e=>e.tokenTypeIdx),o=x(r,e=>{if((e=e.GROUP)!==fye.SKIPPED){if(cj(e))return e;if($j(e))return!1;throw Error("non exhaustive match")}}),l=x(r,e=>{if(e=e.LONGER_ALT)return EE(e)?x(e,e=>Cj(r,e)):[Cj(r,e)]}),h=x(r,e=>e.PUSH_MODE),c=x(r,e=>oj(e,"POP_MODE"))});let u;t("Line Terminator Handling",()=>{let t=Pme(n.lineTerminatorCharacters);u=x(r,e=>!1),"onlyOffset"!==n.positionTracking&&(u=x(r,e=>oj(e,"LINE_BREAKS")?!!e.LINE_BREAKS:!1===Ome(e,t)&&ome(t,e.PATTERN)))});let d,p,g,f,m=(t("Misc Mapping #2",()=>{d=x(r,Dme),p=x(a,Mme),g=dY(r,(e,t)=>(t=t.GROUP,cj(t)&&t!==fye.SKIPPED&&(e[t]=[]),e),{}),f=x(a,(e,t)=>({pattern:a[t],longerAlt:l[t],canLineTerminator:u[t],isCustom:d[t],short:p[t],group:o[t],push:h[t],pop:c[t],tokenTypeIdx:s[t],tokenType:r[t]}))}),!0),y=[];return n.safeMode||t("First Char Optimization",()=>{y=dY(r,(r,e,i)=>{if("string"==typeof e.PATTERN){var t=Fme(e.PATTERN.charCodeAt(0));$me(r,t,f[i])}else if(EE(e.START_CHARS_HINT)){let t;v(e.START_CHARS_HINT,e=>{e=Fme("string"==typeof e?e.charCodeAt(0):e),t!==e&&(t=e,$me(r,e,f[i]))})}else Mj(e.PATTERN)?e.PATTERN.unicode?(m=!1,n.ensureOptimizations&&n1e(`${hme} Unable to analyze < ${e.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`)):(t=tme(e.PATTERN,n.ensureOptimizations),Lj(t)&&(m=!1),v(t,e=>{$me(r,e,f[i])})):(n.ensureOptimizations&&n1e(`${hme} TokenType: <${e.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
This will disable the lexer's first char optimizations.
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),m=!1);return r},[])}),{emptyGroups:g,patternIdxToConfig:f,charCodeToPatternIdxToConfig:y,hasCustom:i,canBeOptimized:m}}function pme(e,t){let r=[],i=fme(e);r=r.concat(i.errors);var n=(e=mme(i.valid)).valid;return r=(r=(r=(r=(r=r.concat(e.errors)).concat(gme(n))).concat(kme(n))).concat(wme(n,t))).concat(Cme(n))}function gme(e){let t=[],r=vG(e,e=>Mj(e[qme]));return t=(t=(t=(t=(t=t.concat(yme(r))).concat(xme(r))).concat(bme(r))).concat(Tme(r))).concat(vme(r))}function fme(e){var t=vG(e,e=>!oj(e,qme));return{errors:x(t,e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:pye.MISSING_PATTERN,tokenTypes:[e]})),valid:qU(e,t)}}function mme(e){var t=vG(e,e=>(e=e[qme],!(Mj(e)||ew(e)||oj(e,"exec")||cj(e))));return{errors:x(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:pye.INVALID_PATTERN,tokenTypes:[e]})),valid:qU(e,t)}}function yme(e){class i extends Xge{static{mt(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}return e=vG(e,e=>{e=e.PATTERN;try{var t=K1e(e),r=new i;return r.visit(t),r.found}catch{return jme.test(e.source)}}),x(e,e=>({message:`Unexpected RegExp Anchor Error:
Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:pye.EOI_ANCHOR_FOUND,tokenTypes:[e]}))}function vme(e){return e=vG(e,e=>e.PATTERN.test("")),x(e,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:pye.EMPTY_MATCH_PATTERN,tokenTypes:[e]}))}function xme(e){class i extends Xge{static{mt(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}return e=vG(e,e=>{e=e.PATTERN;try{var t=K1e(e),r=new i;return r.visit(t),r.found}catch{return Vme.test(e.source)}}),x(e,e=>({message:`Unexpected RegExp Anchor Error:
Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:pye.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}function bme(e){return e=vG(e,e=>(e=e[qme])instanceof RegExp&&(e.multiline||e.global)),x(e,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:pye.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}))}function Tme(e){let i=[],t=x(e,r=>dY(e,(e,t)=>(r.PATTERN.source!==t.PATTERN.source||bj(i,t)||t.PATTERN===fye.NA||(i.push(t),e.push(t)),e),[]));t=Iq(t);var r=vG(t,e=>1<e.length);return x(r,e=>{var t=x(e,e=>e.name);return{message:`The same RegExp pattern ->${IG(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,type:pye.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})}function kme(e){return e=vG(e,e=>!!oj(e,"GROUP")&&(e=e.GROUP)!==fye.SKIPPED&&e!==fye.NA&&!cj(e)),x(e,e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:pye.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}))}function wme(e,t){return e=vG(e,e=>void 0!==e.PUSH_MODE&&!bj(t,e.PUSH_MODE)),x(e,e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:pye.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}))}function Cme(e){let a=[],t=dY(e,(e,t,r)=>{var i=t.PATTERN;return i!==fye.NA&&(cj(i)?e.push({str:i,idx:r,tokenType:t}):Mj(i)&&Sme(i)&&e.push({str:i.source,idx:r,tokenType:t})),e},[]);return v(e,(i,n)=>{v(t,({str:e,idx:t,tokenType:r})=>{n<t&&Eme(e,i.PATTERN)&&(t=`Token: ->${r.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`,a.push({message:t,type:pye.UNREACHABLE_PATTERN,tokenTypes:[i,r]}))})}),a}function Eme(e,t){var r;if(Mj(t))return!_me(t)&&null!==(r=t.exec(e))&&0===r.index;if(ew(t))return t(e,0,[],{});if(oj(t,"exec"))return t.exec(e,0,[],{});if("string"==typeof t)return t===e;throw Error("non exhaustive match")}function Sme(t){return void 0===_G([".","\\","[","]","|","^","$","(",")","?","*","+","{"],e=>-1!==t.source.indexOf(e))}function _me(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(e.source)}function Ame(e){var t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function Lme(e){var t=e.ignoreCase?"iy":"y";return new RegExp(""+e.source,t)}function Rme(e,t,r){let n=[];return oj(e,Wme)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Wme+`> property in its definition
`,type:pye.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),oj(e,Ume)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Ume+`> property in its definition
`,type:pye.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),oj(e,Ume)&&oj(e,Wme)&&!oj(e.modes,e.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${Wme}: <${e.defaultMode}>which does not exist
`,type:pye.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),oj(e,Ume)&&v(e.modes,(r,i)=>{v(r,(t,e)=>{$j(t)?n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${i}> at index: <${e}>
`,type:pye.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):oj(t,"LONGER_ALT")&&(e=EE(t.LONGER_ALT)?t.LONGER_ALT:[t.LONGER_ALT],v(e,e=>{$j(e)||bj(r,e)||n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${e.name}> on token <${t.name}> outside of mode <${i}>
`,type:pye.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))})}),n}function Ime(e,t,r){let i=[],n=!1,a=Iq(yF(mj(e.modes))),s=fY(a,e=>e[qme]===fye.NA),o=Pme(r);return t&&v(s,e=>{var t=Ome(e,o);!1!==t?(t={message:Bme(e,t),type:t.issue,tokenType:e},i.push(t)):oj(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(n=!0):ome(o,e.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:pye.NO_LINE_BREAKS_FLAGS}),i}function Nme(r){let i={},e=S$(r);return v(e,e=>{var t=r[e];if(!EE(t))throw Error("non exhaustive match");i[e]=[]}),i}function Dme(e){if(e=e.PATTERN,Mj(e))return!1;if(ew(e))return!0;if(oj(e,"exec"))return!0;if(cj(e))return!1;throw Error("non exhaustive match")}function Mme(e){return!(!cj(e)||1!==e.length)&&e.charCodeAt(0)}function Ome(e,t){if(oj(e,"LINE_BREAKS"))return!1;if(Mj(e.PATTERN)){try{ome(t,e.PATTERN)}catch(e){return{issue:pye.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}if(cj(e.PATTERN))return!1;if(Dme(e))return{issue:pye.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function Bme(e,t){if(t.issue===pye.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===pye.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> 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 Pme(e){return x(e,e=>cj(e)?e.charCodeAt(0):e)}function $me(e,t,r){void 0===e[t]?e[t]=[r]:e[t].push(r)}function Fme(e){return e<Hme?e:Xme[e]}function zme(){if(Lj(Xme)){Xme=new Array(65536);for(let e=0;e<65536;e++)Xme[e]=255<e?255+~~(e/255):e}}var qme,Wme,Ume,Gme,jme,Vme,Yme,Hme,Xme,Kme=i(()=>{efe(),vye(),eH(),u1e(),ume(),eme(),qme="PATTERN",Wme="defaultMode",Ume="modes",Gme="boolean"==typeof new RegExp("(?:)").sticky,mt(dme,"analyzeTokenTypes"),mt(pme,"validatePatterns"),mt(gme,"validateRegExpPattern"),mt(fme,"findMissingPatterns"),mt(mme,"findInvalidPatterns"),jme=/[^\\][$]/,mt(yme,"findEndOfInputAnchor"),mt(vme,"findEmptyMatchRegExps"),Vme=/[^\\[][\^]|^\^/,mt(xme,"findStartOfInputAnchor"),mt(bme,"findUnsupportedFlags"),mt(Tme,"findDuplicatePatterns"),mt(kme,"findInvalidGroupType"),mt(wme,"findModesThatDoNotExist"),mt(Cme,"findUnreachablePatterns"),mt(Eme,"tryToMatchStrToPattern"),mt(Sme,"noMetaChar"),mt(_me,"usesLookAheadOrBehind"),mt(Ame,"addStartOfInput"),mt(Lme,"addStickyFlag"),mt(Rme,"performRuntimeChecks"),mt(Ime,"performWarningRuntimeChecks"),mt(Nme,"cloneEmptyGroups"),mt(Dme,"isCustomPattern"),mt(Mme,"isShortPattern"),Yme={test:mt(function(t){var r=t.length;for(let e=this.lastIndex;e<r;e++){var i=t.charCodeAt(e);if(10===i)return this.lastIndex=e+1,!0;if(13===i)return 10===t.charCodeAt(e+1)?this.lastIndex=e+2:this.lastIndex=e+1,!0}return!1},"test"),lastIndex:0},mt(Ome,"checkLineBreaksIssues"),mt(Bme,"buildLineBreakIssueMessage"),mt(Pme,"getCharCodes"),mt($me,"addToMapOfArrays"),Hme=256,Xme=[],mt(Fme,"charCodeToOptimizedIndex"),mt(zme,"initCharCodeToOptimizedIndexMap")});function Zme(e,t){return(e=e.tokenTypeIdx)===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[e]}function Qme(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}function Jme(e){tye(e=eye(e)),iye(e),rye(e),v(e,e=>{e.isParent=0<e.categoryMatches.length})}function eye(e){let t=Eq(e),r=e,i=!0;for(;i;){r=Iq(yF(x(r,e=>e.CATEGORIES)));var n=qU(r,t);t=t.concat(n),Lj(n)?i=!1:r=n}return t}function tye(e){v(e,e=>{aye(e)||((uye[cye]=e).tokenTypeIdx=cye++),sye(e)&&!EE(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),sye(e)||(e.CATEGORIES=[]),oye(e)||(e.categoryMatches=[]),lye(e)||(e.categoryMatchesMap={})})}function rye(e){v(e,r=>{r.categoryMatches=[],v(r.categoryMatchesMap,(e,t)=>{r.categoryMatches.push(uye[t].tokenTypeIdx)})})}function iye(e){v(e,e=>{nye([],e)})}function nye(r,i){v(r,e=>{i.categoryMatchesMap[e.tokenTypeIdx]=!0}),v(i.CATEGORIES,e=>{var t=r.concat(i);bj(t,e)||nye(t,e)})}function aye(e){return oj(e,"tokenTypeIdx")}function sye(e){return oj(e,"CATEGORIES")}function oye(e){return oj(e,"categoryMatches")}function lye(e){return oj(e,"categoryMatchesMap")}function hye(e){return oj(e,"tokenTypeIdx")}var cye,uye,dye,pye,gye,fye,mye=i(()=>{eH(),mt(Zme,"tokenStructuredMatcher"),mt(Qme,"tokenStructuredMatcherNoCategories"),cye=1,uye={},mt(Jme,"augmentTokenTypes"),mt(eye,"expandCategories"),mt(tye,"assignTokenDefaultProps"),mt(rye,"assignCategoriesTokensProp"),mt(iye,"assignCategoriesMapProp"),mt(nye,"singleAssignCategoriesToksMap"),mt(aye,"hasShortKeyProperty"),mt(sye,"hasCategoriesProperty"),mt(oye,"hasExtendingTokensTypesProperty"),mt(lye,"hasExtendingTokensTypesMapProperty"),mt(hye,"isTokenType")}),yye=i(()=>{dye={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${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.`}}}),vye=i(()=>{var e;Kme(),eH(),u1e(),mye(),yye(),eme(),(e=pye=pye||{})[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",gye={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:dye,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0},Object.freeze(gye),(fye=class{static{mt(this,"Lexer")}constructor(n,a=gye){if(this.lexerDefinition=n,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=(e,t)=>{var r,i,n,a;return!0===this.traceInitPerf?(this.traceInitIndent++,r=new Array(this.traceInitIndent+1).join("\t"),{time:i,value:n}=(this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+`--> <${e}>`),o1e(t)),a=10<i?console.warn:console.log,this.traceInitIndent<this.traceInitMaxIdent&&a(r+`<-- <${e}> time: ${i}ms`),this.traceInitIndent--,n):t()},"boolean"==typeof a)throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
a boolean 2nd argument is no longer supported`);this.config=L$({},gye,a);var e=this.config.traceInitPerf;!0===e?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof e&&(this.traceInitMaxIdent=e,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let r,e=!0,i=(this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===gye.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Yme;else if(this.config.lineTerminatorCharacters===gye.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(a.safeMode&&a.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),r=EE(n)?{modes:{defaultMode:Eq(n)},defaultMode:Wme}:(e=!1,Eq(n))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Rme(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(Ime(r,this.trackStartLines,this.config.lineTerminatorCharacters))})),r.modes=r.modes||{},v(r.modes,(e,t)=>{r.modes[t]=fY(e,e=>$j(e))}),S$(r.modes)),t;if(v(r.modes,(t,r)=>{this.TRACE_INIT(`Mode: <${r}> processing`,()=>{if(this.modes.push(r),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(pme(t,i))}),Lj(this.lexerDefinitionErrors)){Jme(t);let e;this.TRACE_INIT("analyzeTokenTypes",()=>{e=dme(t,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:a.positionTracking,ensureOptimizations:a.ensureOptimizations,safeMode:a.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[r]=e.patternIdxToConfig,this.charCodeToPatternIdxToConfig[r]=e.charCodeToPatternIdxToConfig,this.emptyGroups=L$({},this.emptyGroups,e.emptyGroups),this.hasCustom=e.hasCustom||this.hasCustom,this.canModeBeOptimized[r]=e.canBeOptimized}})}),this.defaultMode=r.defaultMode,!Lj(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling)throw t=x(this.lexerDefinitionErrors,e=>e.message).join(`-----------------------
`),new Error(`Errors detected in definition of Lexer:
`+t);v(this.lexerDefinitionWarning,e=>{a1e(e.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(Gme?(this.chopInput=n_,this.match=this.matchWithTest):(this.updateLastIndex=ZP,this.match=this.matchWithExec),e&&(this.handleModes=ZP),!1===this.trackStartLines&&(this.computeNewColumn=n_),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=ZP),/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))throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{var e=dY(this.canModeBeOptimized,(e,t,r)=>(!1===t&&e.push(r),e),[]);if(a.ensureOptimizations&&!Lj(e))throw Error(`Lexer Modes: < ${e.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",()=>{Z1e()}),this.TRACE_INIT("toFastProperties",()=>{h1e(this)})})}tokenize(e,t=this.defaultMode){if(Lj(this.lexerDefinitionErrors))return this.tokenizeInternal(e,t);throw e=x(this.lexerDefinitionErrors,e=>e.message).join(`-----------------------
`),new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
`+e)}tokenizeInternal(n,B){let e,a,t,r,i,s,o,l,h,c,P,u,d,$,p,g=n,F=g.length,f=0,m=0,z=this.hasCustom?0:Math.floor(n.length/10),y=new Array(z),v=[],x=this.trackStartLines?1:void 0,b=this.trackStartLines?1:void 0,T=Nme(this.emptyGroups),q=this.trackStartLines,k=this.config.lineTerminatorsPattern,w=0,C=[],E=[],S=[],W=[];Object.freeze(W);let _;function A(){return C}function L(e){return e=Fme(e),void 0===(e=E[e])?W:e}mt(A,"getPossiblePatternsSlow"),mt(L,"getPossiblePatternsOptimized");var U=mt(e=>{var t;1===S.length&&void 0===e.tokenType.PUSH_MODE?(t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e),v.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})):(S.pop(),e=jU(S),C=this.patternIdxToConfig[e],E=this.charCodeToPatternIdxToConfig[e],w=C.length,t=this.canModeBeOptimized[e]&&!1===this.config.safeMode,_=E&&t?L:A)},"pop_mode");function R(e){S.push(e),E=this.charCodeToPatternIdxToConfig[e],C=this.patternIdxToConfig[e],w=C.length,w=C.length,e=this.canModeBeOptimized[e]&&!1===this.config.safeMode,_=E&&e?L:A}mt(R,"push_mode"),R.call(this,B);let I,G=this.config.recoveryEnabled;for(;f<F;){s=null;var j=g.charCodeAt(f),V=_(j),Y=V.length;for(e=0;e<Y;e++){var N=(I=V[e]).pattern,H=(o=null,I.short);if(!1!==H?j===H&&(s=N):!0===I.isCustom?null!==(p=N.exec(g,f,y,T))?(s=p[0],void 0!==p.payload&&(o=p.payload)):s=null:(this.updateLastIndex(N,f),s=this.match(N,n,f)),null!==s){if(void 0!==(i=I.longerAlt)){var X=i.length;for(t=0;t<X;t++){var D=C[i[t]],M=D.pattern;if(!(l=null)===D.isCustom?null!==(p=M.exec(g,f,y,T))?(r=p[0],void 0!==p.payload&&(l=p.payload)):r=null:(this.updateLastIndex(M,f),r=this.match(M,n,f)),r&&r.length>s.length){s=r,o=l,I=D;break}}}break}}if(null!==s){if(h=s.length,void 0!==(c=I.group)&&(P=I.tokenTypeIdx,u=this.createTokenInstance(s,f,P,I.tokenType,x,b,h),this.handlePayload(u,o),!1===c?m=this.addToken(y,m,u):T[c].push(u)),n=this.chopInput(n,h),f+=h,b=this.computeNewColumn(b,h),!0===q&&!0===I.canLineTerminator){let e=0,t,r;for(k.lastIndex=0;!0===(t=k.test(s))&&(r=k.lastIndex-1,e++),!0===t;);0!==e&&(x+=e,b=h-r,this.updateTokenEndLineColumnLocation(u,c,r,e,x,b,h))}this.handleModes(I,U,R,u)}else{let e=f,t=x,r=b,i=!1===G;for(;!1===i&&f<F;)for(n=this.chopInput(n,1),f++,a=0;a<w;a++){var O=C[a],K=O.pattern,Z=O.short;if(!1!==Z?g.charCodeAt(f)===Z&&(i=!0):i=!0===O.isCustom?null!==K.exec(g,f,y,T):(this.updateLastIndex(K,f),null!==K.exec(n)),!0===i)break}if(d=f-e,b=this.computeNewColumn(b,d),$=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(g,e,d,t,r,jU(S)),v.push({offset:e,line:t,column:r,length:d,message:$}),!1===G)break}}return this.hasCustom||(y.length=m),{tokens:y,groups:T,errors:v}}handleModes(e,t,r,i){var n;!0===e.pop?(n=e.push,t(i),void 0!==n&&r.call(this,n)):void 0!==e.push&&r.call(this,e.push)}chopInput(e,t){return e.substring(t)}updateLastIndex(e,t){e.lastIndex=t}updateTokenEndLineColumnLocation(e,t,r,i,n,a,s){void 0!==t&&(r=(t=r===s-1)?-1:0,1===i&&1==t||(e.endLine=n+r,e.endColumn=a-1-r))}computeNewColumn(e,t){return e+t}createOffsetOnlyToken(e,t,r,i){return{image:e,startOffset:t,tokenTypeIdx:r,tokenType:i}}createStartOnlyToken(e,t,r,i,n,a){return{image:e,startOffset:t,startLine:n,startColumn:a,tokenTypeIdx:r,tokenType:i}}createFullToken(e,t,r,i,n,a,s){return{image:e,startOffset:t,endOffset:t+s-1,startLine:n,endLine:n,startColumn:a,endColumn:a+s-1,tokenTypeIdx:r,tokenType:i}}addTokenUsingPush(e,t,r){return e.push(r),t}addTokenUsingMemberAccess(e,t,r){return e[t]=r,++t}handlePayloadNoCustom(e,t){}handlePayloadWithCustom(e,t){null!==t&&(e.payload=t)}matchWithTest(e,t,r){return!0===e.test(t)?t.substring(r,e.lastIndex):null}matchWithExec(e,t){return null!==(e=e.exec(t))?e[0]:null}}).SKIPPED="This marks a skipped Token pattern, this means each token identified by it will be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",fye.NA=/NOT_APPLICABLE/});function xye(e){return bye(e)?e.LABEL:e.name}function bye(e){return cj(e.LABEL)&&""!==e.LABEL}function Tye(e){return kye(e)}function kye(e){var t=e.pattern,r={};if(r.name=e.name,$j(t)||(r.PATTERN=t),oj(e,Eye))throw`The parent property is no longer supported.
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return oj(e,Sye)&&(r.CATEGORIES=e[Sye]),Jme([r]),oj(e,_ye)&&(r.LABEL=e[_ye]),oj(e,Aye)&&(r.GROUP=e[Aye]),oj(e,Rye)&&(r.POP_MODE=e[Rye]),oj(e,Lye)&&(r.PUSH_MODE=e[Lye]),oj(e,Iye)&&(r.LONGER_ALT=e[Iye]),oj(e,Nye)&&(r.LINE_BREAKS=e[Nye]),oj(e,Dye)&&(r.START_CHARS_HINT=e[Dye]),r}function wye(e,t,r,i,n,a,s,o){return{image:t,startOffset:r,endOffset:i,startLine:n,endLine:a,startColumn:s,endColumn:o,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function Cye(e,t){return Zme(e,t)}var Eye,Sye,_ye,Aye,Lye,Rye,Iye,Nye,Dye,Mye,Oye,Bye,Pye,$ye=i(()=>{eH(),vye(),mye(),mt(xye,"tokenLabel"),mt(bye,"hasTokenLabel"),Eye="parent",Sye="categories",_ye="label",Aye="group",Lye="push_mode",Rye="pop_mode",Iye="longer_alt",Nye="line_breaks",Dye="start_chars_hint",mt(Tye,"createToken"),mt(kye,"createTokenInternal"),Jme([Mye=Tye({name:"EOF",pattern:fye.NA})]),mt(wye,"createTokenInstance"),mt(Cye,"tokenMatcher")}),Fye=i(()=>{$ye(),eH(),O1e(),Oye={buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${bye(e)?`--> ${xye(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e}){return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,customUserDescription:r}){var i="Expecting: ",t=`
but found: '`+IG(t).image+"'";return r?i+r+t:(r=dY(e,(e,t)=>e.concat(t),[]),e=x(r,e=>`[${x(e,e=>xye(e)).join(", ")}]`),i+`one of these possible Token sequences:
`+x(e,(e,t)=>` ${t+1}. `+e).join(`
`)+t)},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r}){var i="Expecting: ",t=`
but found: '`+IG(t).image+"'";return r?i+r+t:i+`expecting at least one iteration which starts with one of these possible Token sequences::
<${x(e,e=>`[${x(e,e=>xye(e)).join(",")}]`).join(" ,")}>`+t}},Object.freeze(Oye),Bye={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<-
inside top level rule: ->`+e.name+"<-"}},Pye={buildDuplicateFoundError(e,t){function r(e){return e instanceof S1e?e.terminalType.name:e instanceof y1e?e.nonTerminalName:""}mt(r,"getExtraProductionArgument");let i=e.name,n=IG(t),a=n.idx,s=D1e(n),o=r(n),l=0<a,h=`->${s}${l?a:""}<- ${o?`with argument: ->${o}<-`:""}
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 h=(h=h.replace(/[ \t]+/g," ")).replace(/\s\s+/g,`
`)},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){var t=x(e.prefixPath,e=>xye(e)).join(", "),r=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix
in <OR${r}> 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){var t=x(e.prefixPath,e=>xye(e)).join(", "),r=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in <OR${r}> 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#AMBIGUOUS_ALTERNATIVES
For Further details.`},buildEmptyRepetitionError(e){let t=D1e(e.repetition);return 0!==e.repetition.idx&&(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 <OR${e.alternation.idx}> 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:
<OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.
has ${e.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(e){var t=e.topLevelRule.name;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:
${t+" --\x3e "+x(e.leftRecursionPath,e=>e.name).concat([t]).join(" --\x3e ")}
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){return`Duplicate definition, rule: ->${e.topLevelRule instanceof v1e?e.topLevelRule.name:e.topLevelRule}<- is already defined in the grammar: ->${e.grammarName}<-`}}});function zye(e,t){return(e=new qye(e,t)).resolveRefs(),e.errors}var qye,Wye=i(()=>{axe(),eH(),O1e(),mt(zye,"resolveGrammar"),qye=class extends _1e{static{mt(this,"GastRefResolverVisitor")}constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){v(mj(this.nameToTopRule),e=>{(this.currTopLevel=e).accept(this)})}visitNonTerminal(e){var t=this.nameToTopRule[e.nonTerminalName];t?e.referencedRule=t:(t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e),this.errors.push({message:t,type:rxe.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName}))}}});function Uye(t,r,i=[]){i=Eq(i);let n=[],a=0;function s(e){return e.concat(HU(t,a+1))}function o(e){return e=Uye(s(e),r,i),n.concat(e)}for(mt(s,"remainingPathWith"),mt(o,"getAlternativesForProd");i.length<r&&a<t.length;){var e=t[a];if(e instanceof x1e)return o(e.definition);if(e instanceof y1e)return o(e.definition);if(e instanceof b1e)n=o(e.definition);else{if(e instanceof T1e)return o(e.definition.concat([new w1e({definition:e.definition})]));if(e instanceof k1e)return o([new x1e({definition:e.definition}),new w1e({definition:[new S1e({terminalType:e.separator})].concat(e.definition)})]);if(e instanceof C1e){var l=e.definition.concat([new w1e({definition:[new S1e({terminalType:e.separator})].concat(e.definition)})]);n=o(l)}else if(e instanceof w1e)l=e.definition.concat([new w1e({definition:e.definition})]),n=o(l);else{if(e instanceof E1e)return v(e.definition,e=>{!1===Lj(e.definition)&&(n=o(e.definition))}),n;if(!(e instanceof S1e))throw Error("non exhaustive match");i.push(e.terminalType)}}a++}return n.push({partialPath:i,suffixDef:HU(t,a)}),n}function Gye(e,t,r,i){let n="EXIT_NONE_TERMINAL",a=[n],s="EXIT_ALTERNATIVE",o=!1,l=t.length,h=l-i-1,c=[],u=[];for(u.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!Lj(u);)if((v=u.pop())===s)o&&jU(u).idx<=h&&u.pop();else{var d=v.def,p=v.idx,g=v.ruleStack,f=v.occurrenceStack;if(!Lj(d)){var m=d[0];if(m===n)v={idx:p,def:HU(d),ruleStack:ZU(g),occurrenceStack:ZU(f)},u.push(v);else if(m instanceof S1e)if(p<l-1)r(t[v=p+1],m.terminalType)&&(v={idx:v,def:HU(d),ruleStack:g,occurrenceStack:f},u.push(v));else{if(p!==l-1)throw Error("non exhaustive match");c.push({nextTokenType:m.terminalType,nextTokenOccurrence:m.idx,ruleStack:g,occurrenceStack:f}),o=!0}else if(m instanceof y1e){(v=Eq(g)).push(m.nonTerminalName);var y=Eq(f),v=(y.push(m.idx),{idx:p,def:m.definition.concat(a,HU(d)),ruleStack:v,occurrenceStack:y});u.push(v)}else if(m instanceof b1e)y={idx:p,def:HU(d),ruleStack:g,occurrenceStack:f},u.push(y),u.push(s),v={idx:p,def:m.definition.concat(HU(d)),ruleStack:g,occurrenceStack:f},u.push(v);else if(m instanceof T1e)v=new w1e({definition:m.definition,idx:m.idx}),v=m.definition.concat([v],HU(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof k1e)v=new S1e({terminalType:m.separator}),v=new w1e({definition:[v].concat(m.definition),idx:m.idx}),v=m.definition.concat([v],HU(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof C1e)v={idx:p,def:HU(d),ruleStack:g,occurrenceStack:f},u.push(v),u.push(s),v=new S1e({terminalType:m.separator}),v=new w1e({definition:[v].concat(m.definition),idx:m.idx}),v=m.definition.concat([v],HU(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof w1e)v={idx:p,def:HU(d),ruleStack:g,occurrenceStack:f},u.push(v),u.push(s),v=new w1e({definition:m.definition,idx:m.idx}),v=m.definition.concat([v],HU(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof E1e)for(let e=m.definition.length-1;0<=e;e--){var x={idx:p,def:m.definition[e].definition.concat(HU(d)),ruleStack:g,occurrenceStack:f};u.push(x),u.push(s)}else if(m instanceof x1e)u.push({idx:p,def:m.definition.concat(HU(d)),ruleStack:g,occurrenceStack:f});else{if(!(m instanceof v1e))throw Error("non exhaustive match");u.push(jye(m,p,g,f))}}}return c}function jye(e,t,r,i){return(r=Eq(r)).push(e.name),(i=Eq(i)).push(1),{idx:t,def:e.definition,ruleStack:r,occurrenceStack:i}}var Vye,Yye,Hye,Xye,Kye,Zye,Qye=i(()=>{eH(),G1e(),$1e(),O1e(),Yye=class extends P1e{static{mt(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=Eq(this.path.ruleStack).reverse(),this.occurrenceStack=Eq(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){e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence&&(t=t.concat(r),this.updateExpectedNext(),this.walk(e.referencedRule,t))}updateExpectedNext(){Lj(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},Vye=class extends Yye{static{mt(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){this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found&&(e=t.concat(r),t=new x1e({definition:e}),this.possibleTokTypes=F1e(t),this.found=!0)}},Yye=class extends P1e{static{mt(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}},Hye=class extends Yye{static{mt(this,"NextTerminalAfterManyWalker")}walkMany(e,t,r){var i;e.idx===this.occurrence?(i=IG(t.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof S1e&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkMany(e,t,r)}},Xye=class extends Yye{static{mt(this,"NextTerminalAfterManySepWalker")}walkManySep(e,t,r){var i;e.idx===this.occurrence?(i=IG(t.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof S1e&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkManySep(e,t,r)}},Kye=class extends Yye{static{mt(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(e,t,r){var i;e.idx===this.occurrence?(i=IG(t.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof S1e&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkAtLeastOne(e,t,r)}},Zye=class extends Yye{static{mt(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(e,t,r){var i;e.idx===this.occurrence?(i=IG(t.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof S1e&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkAtLeastOneSep(e,t,r)}},mt(Uye,"possiblePathsFrom"),mt(Gye,"nextPossibleTokensAfter"),mt(jye,"expandTopLevelRule")});function Jye(e){if(e instanceof b1e||"Option"===e)return g2e.OPTION;if(e instanceof w1e||"Repetition"===e)return g2e.REPETITION;if(e instanceof T1e||"RepetitionMandatory"===e)return g2e.REPETITION_MANDATORY;if(e instanceof k1e||"RepetitionMandatoryWithSeparator"===e)return g2e.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof C1e||"RepetitionWithSeparator"===e)return g2e.REPETITION_WITH_SEPARATOR;if(e instanceof E1e||"Alternation"===e)return g2e.ALTERNATION;throw Error("non exhaustive match")}function e2e(e){var{occurrence:e,rule:t,prodType:r,maxLookahead:i}=e;return(r=Jye(r))===g2e.ALTERNATION?h2e(e,t,i):c2e(e,t,r,i)}function t2e(e,t,r,i,n,a){return a(e=h2e(e,t,r),i,p2e(e)?Qme:Zme,n)}function r2e(e,t,r,i,n,a){return t=p2e(e=c2e(e,t,n,r))?Qme:Zme,a(e[0],t,i)}function i2e(h,e,c,t){let u=h.length,r=dG(h,e=>dG(e,e=>1===e.length));if(e)return function(e){var r=x(e,e=>e.GATE);for(let t=0;t<u;t++){var i=h[t],n=i.length,a=r[t];if(void 0===a||!1!==a.call(this))e:for(let e=0;e<n;e++){var s=i[e],o=s.length;for(let e=0;e<o;e++){var l=this.LA(e+1);if(!1===c(l,s[e]))continue e}return t}}};if(!r||t)return function(){for(let t=0;t<u;t++){var r=h[t],i=r.length;e:for(let e=0;e<i;e++){var n=r[e],a=n.length;for(let e=0;e<a;e++){var s=this.LA(e+1);if(!1===c(s,n[e]))continue e}return t}}};{let e=x(h,e=>yF(e)),t=dY(e,(t,e,r)=>(v(e,e=>{oj(t,e.tokenTypeIdx)||(t[e.tokenTypeIdx]=r),v(e.categoryMatches,e=>{oj(t,e)||(t[e]=r)})}),t),{});return function(){var e=this.LA(1);return t[e.tokenTypeIdx]}}}function n2e(n,a,r){let e=dG(n,e=>1===e.length),s=n.length;if(!e||r)return function(){e:for(let e=0;e<s;e++){var t=n[e],r=t.length;for(let e=0;e<r;e++){var i=this.LA(e+1);if(!1===a(i,t[e]))continue e}return!0}return!1};if(1===(r=yF(n)).length&&Lj(r[0].categoryMatches)){let e=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{let t=dY(r,(t,e,r)=>(t[e.tokenTypeIdx]=!0,v(e.categoryMatches,e=>{t[e]=!0}),t),[]);return function(){var e=this.LA(1);return!0===t[e.tokenTypeIdx]}}}function a2e(t){var r=new Array(t);for(let e=0;e<t;e++)r[e]=[];return r}function s2e(t){let r=[""];for(let e=0;e<t.length;e++){var i=t[e],n=[];for(let e=0;e<r.length;e++){var a=r[e];n.push(a+"_"+i.tokenTypeIdx);for(let e=0;e<i.categoryMatches.length;e++){var s="_"+i.categoryMatches[e];n.push(a+s)}}r=n}return r}function o2e(t,r,i){for(let e=0;e<t.length;e++)if(e!==i){var n=t[e];for(let e=0;e<r.length;e++)if(!0===n[r[e]])return!1}return!0}function l2e(e,i){let t=x(e,e=>Uye([e],1)),n=a2e(t.length),a=x(t,e=>{let t={};return v(e,e=>{e=s2e(e.partialPath),v(e,e=>{t[e]=!0})}),t}),s=t;for(let r=1;r<=i;r++){var o=s;s=a2e(o.length);for(let t=0;t<o.length;t++){var l=o[t];for(let e=0;e<l.length;e++){var h=l[e].partialPath,c=l[e].suffixDef,u=s2e(h);if(o2e(a,u,t)||Lj(c)||h.length===i){var d=n[t];if(!1===u2e(d,h)){d.push(h);for(let e=0;e<u.length;e++){var p=u[e];a[t][p]=!0}}}else d=Uye(c,r+1,h),s[t]=s[t].concat(d),v(d,e=>{e=s2e(e.partialPath),v(e,e=>{a[t][e]=!0})})}}}return n}function h2e(e,t,r,i){return e=new m2e(e,g2e.ALTERNATION,i),t.accept(e),l2e(e.result,r)}function c2e(e,t,r,i){var n=new m2e(e,r),n=(t.accept(n),n.result),t=new f2e(t,e,r).startWalking();return l2e([new x1e({definition:n}),new x1e({definition:t})],i)}function u2e(t,r){e:for(let e=0;e<t.length;e++){var i=t[e];if(i.length===r.length){for(let e=0;e<i.length;e++){var n=r[e],a=i[e];if(0==(n===a||void 0!==a.categoryMatchesMap[n.tokenTypeIdx]))continue e}return!0}}return!1}function d2e(e,r){return e.length<r.length&&dG(e,(e,t)=>e===(t=r[t])||t.categoryMatchesMap[e.tokenTypeIdx])}function p2e(e){return dG(e,e=>dG(e,e=>dG(e,e=>Lj(e.categoryMatches))))}var g2e,f2e,m2e,y2e=i(()=>{var e;eH(),Qye(),$1e(),mye(),O1e(),(e=g2e=g2e||{})[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",mt(Jye,"getProdType"),mt(e2e,"getLookaheadPaths"),mt(t2e,"buildLookaheadFuncForOr"),mt(r2e,"buildLookaheadFuncForOptionalProd"),mt(i2e,"buildAlternativesLookAheadFunc"),mt(n2e,"buildSingleAlternativeLookaheadFunction"),f2e=class extends P1e{static{mt(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)}walkOption(e,t,r){this.checkIsTarget(e,g2e.OPTION,t,r)||super.walkOption(e,t,r)}walkAtLeastOne(e,t,r){this.checkIsTarget(e,g2e.REPETITION_MANDATORY,t,r)||super.walkOption(e,t,r)}walkAtLeastOneSep(e,t,r){this.checkIsTarget(e,g2e.REPETITION_MANDATORY_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}walkMany(e,t,r){this.checkIsTarget(e,g2e.REPETITION,t,r)||super.walkOption(e,t,r)}walkManySep(e,t,r){this.checkIsTarget(e,g2e.REPETITION_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}},m2e=class extends _1e{static{mt(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||void 0!==this.targetRef&&e!==this.targetRef||(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,g2e.OPTION)}visitRepetition(e){this.checkIsTarget(e,g2e.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,g2e.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,g2e.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,g2e.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,g2e.ALTERNATION)}},mt(a2e,"initializeArrayOfArrays"),mt(s2e,"pathToHashKeys"),mt(o2e,"isUniquePrefixHash"),mt(l2e,"lookAheadSequenceFromAlternatives"),mt(h2e,"getLookaheadPathsForOr"),mt(c2e,"getLookaheadPathsForOptionalProd"),mt(u2e,"containsPath"),mt(d2e,"isStrictPrefixOfPath"),mt(p2e,"areTokenCategoriesNotUsed")});function v2e(e){return e=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName}),x(e,e=>Object.assign({type:rxe.CUSTOM_LOOKAHEAD_VALIDATION},e))}function x2e(t,e,r,i){var n=zG(t,e=>b2e(e,r)),e=D2e(t,e,r),a=zG(t,e=>L2e(e,r)),s=zG(t,e=>w2e(e,t,i,r));return n.concat(e,a,s)}function b2e(i,n){var e=new M2e,e=(i.accept(e),e.allProductions),e=XG(e,T2e),e=gV(e,e=>1<e.length);return x(mj(e),e=>{var t=IG(e),e=n.buildDuplicateFoundError(i,e),r=D1e(t),e={message:e,type:rxe.DUPLICATE_PRODUCTIONS,ruleName:i.name,dslName:r,occurrence:t.idx};return(r=k2e(t))&&(e.parameter=r),e})}function T2e(e){return`${D1e(e)}_#_${e.idx}_#_`+k2e(e)}function k2e(e){return e instanceof S1e?e.terminalType.name:e instanceof y1e?e.nonTerminalName:""}function w2e(r,e,t,i){var n=[];return 1<dY(e,(e,t)=>t.name===r.name?e+1:e,0)&&(e=i.buildDuplicateRuleNameError({topLevelRule:r,grammarName:t}),n.push({message:e,type:rxe.DUPLICATE_RULE_NAME,ruleName:r.name})),n}function C2e(e,t,r){var i=[];return bj(t,e)||i.push({message:`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,type:rxe.INVALID_RULE_OVERRIDE,ruleName:e}),i}function E2e(r,e,i,n=[]){var t,a=[],e=S2e(e.definition);return Lj(e)?[]:(t=r.name,bj(e,r)&&a.push({message:i.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:n}),type:rxe.LEFT_RECURSION,ruleName:t}),t=qU(e,n.concat([r])),e=zG(t,e=>{var t=Eq(n);return t.push(e),E2e(r,e,i,t)}),a.concat(e))}function S2e(e){let t=[];if(Lj(e))return t;if((r=IG(e))instanceof y1e)t.push(r.referencedRule);else if(r instanceof x1e||r instanceof b1e||r instanceof T1e||r instanceof k1e||r instanceof C1e||r instanceof w1e)t=t.concat(S2e(r.definition));else if(r instanceof E1e)t=yF(x(r.definition,e=>S2e(e.definition)));else if(!(r instanceof S1e))throw Error("non exhaustive match");var r=I1e(r),i=1<e.length;return r&&i?(r=HU(e),t.concat(S2e(r))):t}function _2e(i,n){var e=new O2e,e=(i.accept(e),e.alternations);return zG(e,r=>{var e=ZU(r.definition);return zG(e,(e,t)=>(e=Gye([e],[],Zme,1),Lj(e)?[{message:n.buildEmptyAlternationError({topLevelRule:i,alternation:r,emptyChoiceIdx:t}),type:rxe.NONE_LAST_EMPTY_ALT,ruleName:i.name,occurrence:r.idx,alternative:t+1}]:[]))})}function A2e(i,n,a){var e=new O2e,e=(i.accept(e),e.alternations),e=fY(e,e=>!0===e.ignoreAmbiguities);return zG(e,e=>{var t=I2e(r=h2e(e.idx,i,e.maxLookahead||n,e),e,i,a),r=N2e(r,e,i,a);return t.concat(r)})}function L2e(t,r){var e=new O2e,e=(t.accept(e),e.alternations);return zG(e,e=>255<e.definition.length?[{message:r.buildTooManyAlternativesError({topLevelRule:t,alternation:e}),type:rxe.TOO_MANY_ALTS,ruleName:t.name,occurrence:e.idx}]:[])}function R2e(e,n,a){let s=[];return v(e,i=>{var e=new B2e,e=(i.accept(e),e.allProductions);v(e,e=>{var t=Jye(e),r=e.maxLookahead||n,t=c2e(e.idx,i,t,r)[0];Lj(yF(t))&&(r=a.buildEmptyRepetitionError({topLevelRule:i,repetition:e}),s.push({message:r,type:rxe.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name}))})}),s}function I2e(a,s,r,i){let o=[],e=dY(a,(e,t,n)=>(!0!==s.definition[n].ignoreAmbiguities&&v(t,r=>{let i=[n];v(a,(e,t)=>{n!==t&&u2e(e,r)&&!0!==s.definition[t].ignoreAmbiguities&&i.push(t)}),1<i.length&&!u2e(o,r)&&(o.push(r),e.push({alts:i,path:r}))}),e),[]);return x(e,e=>{var t=x(e.alts,e=>e+1);return{message:i.buildAlternationAmbiguityError({topLevelRule:r,alternation:s,ambiguityIndices:t,prefixPath:e.path}),type:rxe.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:s.idx,alternatives:e.alts}})}function N2e(e,n,a,s){let o=dY(e,(e,t,r)=>(t=x(t,e=>({idx:r,path:e})),e.concat(t)),[]);return Iq(zG(o,e=>{if(!0===n.definition[e.idx].ignoreAmbiguities)return[];let i=e.idx,t=e.path,r=vG(o,e=>!0!==n.definition[e.idx].ignoreAmbiguities&&e.idx<i&&d2e(e.path,t));return x(r,e=>{var t=[e.idx+1,i+1],r=0===n.idx?"":n.idx;return{message:s.buildAlternationPrefixAmbiguityError({topLevelRule:a,alternation:n,ambiguityIndices:t,prefixPath:e.path}),type:rxe.AMBIGUOUS_PREFIX_ALTS,ruleName:a.name,occurrence:r,alternatives:t}})}))}function D2e(e,t,r){let i=[],n=x(t,e=>e.name);return v(e,e=>{var t=e.name;bj(n,t)&&(e=r.buildNamespaceConflictError(e),i.push({message:e,type:rxe.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t}))}),i}var M2e,O2e,B2e,P2e=i(()=>{eH(),axe(),O1e(),y2e(),Qye(),mye(),mt(v2e,"validateLookahead"),mt(x2e,"validateGrammar"),mt(b2e,"validateDuplicateProductions"),mt(T2e,"identifyProductionForDuplicates"),mt(k2e,"getExtraProductionArgument"),M2e=class extends _1e{static{mt(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)}},mt(w2e,"validateRuleDoesNotAlreadyExist"),mt(C2e,"validateRuleIsOverridden"),mt(E2e,"validateNoLeftRecursion"),mt(S2e,"getFirstNoneTerminal"),O2e=class extends _1e{static{mt(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}},mt(_2e,"validateEmptyOrAlternative"),mt(A2e,"validateAmbiguousAlternationAlternatives"),B2e=class extends _1e{static{mt(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)}},mt(L2e,"validateTooManyAlts"),mt(R2e,"validateSomeNonEmptyLookaheadPath"),mt(I2e,"checkAlternativesAmbiguities"),mt(N2e,"checkPrefixAlternativesAmbiguities"),mt(D2e,"checkTerminalAndNoneTerminalsNameSpace")});function $2e(e){let t=IU(e,{errMsgProvider:Bye}),r={};return v(e.rules,e=>{r[e.name]=e}),zye(r,t.errMsgProvider)}function F2e(e){return x2e((e=IU(e,{errMsgProvider:Pye})).rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}var z2e=i(()=>{eH(),Wye(),P2e(),Fye(),mt($2e,"resolveGrammar"),mt(F2e,"validateGrammar")});function q2e(e){return bj(W2e,e.name)}var W2e,U2e,G2e,j2e,V2e,Y2e,H2e=i(()=>{eH(),W2e=["MismatchedTokenException","NoViableAltException","EarlyExitException","NotAllInputParsedException"],Object.freeze(W2e),mt(q2e,"isRecognitionException"),U2e=class extends Error{static{mt(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)}},G2e=class extends U2e{static{mt(this,"MismatchedTokenException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name="MismatchedTokenException"}},j2e=class extends U2e{static{mt(this,"NoViableAltException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name="NoViableAltException"}},V2e=class extends U2e{static{mt(this,"NotAllInputParsedException")}constructor(e,t){super(e,t),this.name="NotAllInputParsedException"}},Y2e=class extends U2e{static{mt(this,"EarlyExitException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name="EarlyExitException"}}});function X2e(e,t,r,i,n,a,s){let o=this.getKeyForAutomaticLookahead(i,n),l=this.firstAfterRepMap[o],h=(void 0===l&&(i=this.getCurrRuleFullName(),i=this.getGAstProductions()[i],l=new a(i,n).startWalking(),this.firstAfterRepMap[o]=l),l.token),c=l.occurrence,u=l.isEndOfRule;1===this.RULE_STACK.length&&u&&void 0===h&&(h=Mye,c=1),void 0!==h&&void 0!==c&&this.shouldInRepetitionRecoveryBeTried(h,c,s)&&this.tryInRepetitionRecovery(e,t,r,h)}var K2e,Z2e,Q2e,J2e,eve=i(()=>{$ye(),eH(),H2e(),j1e(),axe(),K2e={},Z2e="InRuleRecoveryException",Q2e=class extends Error{static{mt(this,"InRuleRecoveryException")}constructor(e){super(e),this.name=Z2e}},J2e=class{static{mt(this,"Recoverable")}initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(oj(e,"recoveryEnabled")?e:exe).recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=X2e)}getTokenToInsert(e){return(e=wye(e,"",NaN,NaN,NaN,NaN,NaN,NaN)).isInsertedInRecovery=!0,e}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,r,i){let n=this.findReSyncTokenType(),a=this.exportLexerState(),s=[],o=!1,l=this.LA(1),h=this.LA(1),c=mt(()=>{var e=this.LA(0),e=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:l,previous:e,ruleName:this.getCurrRuleFullName()});(e=new G2e(e,l,this.LA(0))).resyncedTokens=ZU(s),this.SAVE_ERROR(e)},"generateErrorMessage");for(;!o;){if(this.tokenMatcher(h,i))return void c();if(r.call(this))return c(),void e.apply(this,t);this.tokenMatcher(h,n)?o=!0:(h=this.SKIP_TOKEN(),this.addToResyncTokens(h,s))}this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(e,t,r){return!(!1===r||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}getFollowsForInRuleRecovery(e,t){return e=this.getCurrentGrammarPath(e,t),this.getNextPossibleTokenTypes(e)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e))return t=this.SKIP_TOKEN(),this.consumeToken(),t;throw new Q2e("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||Lj(t))return!1;let r=this.LA(1);return void 0!==_G(t,e=>this.tokenMatcher(r,e))}canRecoverWithSingleTokenDeletion(e){return!!this.canTokenTypeBeDeletedInRecovery(e)&&this.tokenMatcher(this.LA(2),e)}isInCurrentRuleReSyncSet(e){var t=this.getCurrFollowKey(),t=this.getFollowSetFromFollowKey(t);return bj(t,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA(1),r=2;for(;;){var i=_G(e,e=>Cye(t,e));if(void 0!==i)return i;t=this.LA(r),r++}}getCurrFollowKey(){var e,t,r;return 1===this.RULE_STACK.length?K2e:(e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName(),{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(r)})}buildFullFollowKeyStack(){let r=this.RULE_STACK,i=this.RULE_OCCURRENCE_STACK;return x(r,(e,t)=>0===t?K2e:{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:i[t],inRule:this.shortRuleNameToFullName(r[t-1])})}flattenFollowSet(){var e=x(this.buildFullFollowKeyStack(),e=>this.getFollowSetFromFollowKey(e));return yF(e)}getFollowSetFromFollowKey(e){return e===K2e?[Mye]:(e=e.ruleName+e.idxInCallingRule+U1e+e.inRule,this.resyncFollows[e])}addToResyncTokens(e,t){return this.tokenMatcher(e,Mye)||t.push(e),t}reSyncTo(e){let t=[],r=this.LA(1);for(;!1===this.tokenMatcher(r,e);)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return ZU(t)}attemptInRepetitionRecovery(e,t,r,i,n,a,s){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:Eq(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return x(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}},mt(X2e,"attemptInRepetitionRecovery")});function tve(e,t,r){return r|t|e}var rve,ive=i(()=>{mt(tve,"getKeyForAutomaticLookahead")}),nve=i(()=>{eH(),Fye(),axe(),P2e(),y2e(),rve=class{static{mt(this,"LLkLookaheadStrategy")}constructor(e){this.maxLookahead=null!=(e=e?.maxLookahead)?e:exe.maxLookahead}validate(e){var t,r,i=this.validateNoLeftRecursion(e.rules);return Lj(i)?(t=this.validateEmptyOrAlternatives(e.rules),r=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),e=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead),[...i,...t,...r,...e]):i}validateNoLeftRecursion(e){return zG(e,e=>E2e(e,e,Pye))}validateEmptyOrAlternatives(e){return zG(e,e=>_2e(e,Pye))}validateAmbiguousAlternationAlternatives(e,t){return zG(e,e=>A2e(e,t,Pye))}validateSomeNonEmptyLookaheadPath(e,t){return R2e(e,t,Pye)}buildLookaheadForAlternation(e){return t2e(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,i2e)}buildLookaheadForOptional(e){return r2e(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,Jye(e.prodType),n2e)}}});function ave(e){return lve.reset(),e.accept(lve),e=lve.dslMethods,lve.reset(),e}var sve,ove,lve,hve=i(()=>{eH(),axe(),ive(),O1e(),nve(),sve=class{static{mt(this,"LooksAhead")}initLooksAhead(e){this.dynamicTokensEnabled=(oj(e,"dynamicTokensEnabled")?e:exe).dynamicTokensEnabled,this.maxLookahead=(oj(e,"maxLookahead")?e:exe).maxLookahead,this.lookaheadStrategy=oj(e,"lookaheadStrategy")?e.lookaheadStrategy:new rve({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){v(e,s=>{this.TRACE_INIT(s.name+" Rule Lookahead",()=>{var{alternation:e,repetition:t,option:r,repetitionMandatory:i,repetitionMandatoryWithSeparator:n,repetitionWithSeparator:a}=ave(s);v(e,r=>{var e=0===r.idx?"":r.idx;this.TRACE_INIT(""+D1e(r)+e,()=>{var e=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:r.idx,rule:s,maxLookahead:r.maxLookahead||this.maxLookahead,hasPredicates:r.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),t=tve(this.fullRuleNameToShort[s.name],256,r.idx);this.setLaFuncCache(t,e)})}),v(t,e=>{this.computeLookaheadFunc(s,e.idx,768,"Repetition",e.maxLookahead,D1e(e))}),v(r,e=>{this.computeLookaheadFunc(s,e.idx,512,"Option",e.maxLookahead,D1e(e))}),v(i,e=>{this.computeLookaheadFunc(s,e.idx,1024,"RepetitionMandatory",e.maxLookahead,D1e(e))}),v(n,e=>{this.computeLookaheadFunc(s,e.idx,1536,"RepetitionMandatoryWithSeparator",e.maxLookahead,D1e(e))}),v(a,e=>{this.computeLookaheadFunc(s,e.idx,1280,"RepetitionWithSeparator",e.maxLookahead,D1e(e))})})})}computeLookaheadFunc(r,i,n,a,s,e){this.TRACE_INIT(""+e+(0===i?"":i),()=>{var e=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:i,rule:r,maxLookahead:s||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:a}),t=tve(this.fullRuleNameToShort[r.name],n,i);this.setLaFuncCache(t,e)})}getKeyForAutomaticLookahead(e,t){return t|e|this.getLastExplicitRuleShortName()}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},ove=class extends _1e{static{mt(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)}},lve=new ove,mt(ave,"collectMethods")});function cve(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset)}function uve(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function dve(e,t,r){void 0===e.children[r]?e.children[r]=[t]:e.children[r].push(t)}function pve(e,t,r){void 0===e.children[t]?e.children[t]=[r]:e.children[t].push(r)}var gve=i(()=>{mt(cve,"setNodeLocationOnlyOffset"),mt(uve,"setNodeLocationFull"),mt(dve,"addTerminalToCst"),mt(pve,"addNoneTerminalToCst")});function fve(e,t){Object.defineProperty(e,mve,{enumerable:!1,configurable:!0,writable:!1,value:t})}var mve,yve=i(()=>{mve="name",mt(fve,"defineNameProp")});function vve(t,r){var i=S$(t),n=i.length;for(let e=0;e<n;e++){var a=t[i[e]],s=a.length;for(let e=0;e<s;e++){var o=a[e];void 0===o.tokenTypeIdx&&this[o.name](o.children,r)}}}function xve(e,t){var r=mt(function(){},"derivedConstructor"),e=(fve(r,e+"BaseSemantics"),{visit:mt(function(e,t){if(EE(e)&&(e=e[0]),!$j(e))return this[e.name](e.children,t)},"visit"),validateVisitor:mt(function(){var e=Tve(this,t);if(!Lj(e))throw e=x(e,e=>e.msg),Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
`+e.join(`
`).replace(/\n/g,`
`))},"validateVisitor")});return r.prototype=e,(r.prototype.constructor=r)._RULE_NAMES=t,r}function bve(e,t,r){var i=mt(function(){},"derivedConstructor");fve(i,e+"BaseSemanticsWithDefaults");let n=Object.create(r.prototype);return v(t,e=>{n[e]=vve}),i.prototype=n,i.prototype.constructor=i}function Tve(e,t){return kve(e,t)}function kve(t,e){return e=vG(e,e=>!1===ew(t[e])),e=x(e,e=>({msg:`Missing visitor method: <${e}> on ${t.constructor.name} CST Visitor.`,type:wve.MISSING_METHOD,methodName:e})),Iq(e)}var wve,Cve,Eve,Sve,_ve,Ave,Lve,Rve=i(()=>{var e;eH(),yve(),mt(vve,"defaultVisit"),mt(xve,"createBaseSemanticVisitorConstructor"),mt(bve,"createBaseVisitorConstructorWithDefaults"),(e=wve=wve||{})[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD",mt(Tve,"validateVisitor"),mt(kve,"validateMissingCstMethods")}),Ive=i(()=>{gve(),eH(),Rve(),axe(),Cve=class{static{mt(this,"TreeBuilder")}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(oj(e,"nodeLocationTracking")?e:exe).nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=uve,this.setNodeLocationFromNode=uve,this.cstPostRule=ZP,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=ZP,this.setNodeLocationFromNode=ZP,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=cve,this.setNodeLocationFromNode=cve,this.cstPostRule=ZP,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=ZP,this.setNodeLocationFromNode=ZP,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`);this.setNodeLocationFromToken=ZP,this.setNodeLocationFromNode=ZP,this.cstPostRule=ZP,this.setInitialNodeLocation=ZP}else this.cstInvocationStateUpdate=ZP,this.cstFinallyStateUpdate=ZP,this.cstPostTerminal=ZP,this.cstPostNonTerminal=ZP,this.cstPostRule=ZP}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){var t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){e={name:e,children:Object.create(null)},this.setInitialNodeLocation(e),this.CST_STACK.push(e)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){var t=this.LA(0);(e=e.location).startOffset<=t.startOffset?(e.endOffset=t.endOffset,e.endLine=t.endLine,e.endColumn=t.endColumn):(e.startOffset=NaN,e.startLine=NaN,e.startColumn=NaN)}cstPostRuleOnlyOffset(e){var t=this.LA(0);(e=e.location).startOffset<=t.startOffset?e.endOffset=t.endOffset:e.startOffset=NaN}cstPostTerminal(e,t){var r=this.CST_STACK[this.CST_STACK.length-1];dve(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){var r=this.CST_STACK[this.CST_STACK.length-1];pve(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){var e;return $j(this.baseCstVisitorConstructor)?(e=xve(this.className,S$(this.gastProductionsCache)),this.baseCstVisitorConstructor=e):this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){var e;return $j(this.baseCstVisitorWithDefaultsConstructor)?(e=bve(this.className,S$(this.gastProductionsCache),this.getBaseCstVisitorConstructor()),this.baseCstVisitorWithDefaultsConstructor=e):this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){var e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){var e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){var e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}}}),Nve=i(()=>{axe(),Eve=class{static{mt(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(!0!==this.selfAnalysisDone)throw Error("Missing <performSelfAnalysis> 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)):Jve}LA(e){return(e=this.currIdx+e)<0||this.tokVectorLength<=e?Jve:this.tokVector[e]}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()}}}),Dve=i(()=>{eH(),H2e(),axe(),Fye(),P2e(),O1e(),Sve=class{static{mt(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=txe){bj(this.definedRulesNames,e)&&(i={message:Pye.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:rxe.DUPLICATE_RULE_NAME,ruleName:e},this.definitionErrors.push(i)),this.definedRulesNames.push(e);var i=this.defineRule(e,t,r);return this[e]=i}OVERRIDE_RULE(e,t,r=txe){var i=C2e(e,this.definedRulesNames,this.className),i=(this.definitionErrors=this.definitionErrors.concat(i),this.defineRule(e,t,r));return this[e]=i}BACKTRACK(t,r){return function(){this.isBackTrackingStack.push(1);var e=this.saveRecogState();try{return t.apply(this,r),!0}catch(e){if(q2e(e))return!1;throw e}finally{this.reloadRecogState(e),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return g1e(mj(this.gastProductionsCache))}}}),Mve=i(()=>{eH(),ive(),H2e(),y2e(),Qye(),axe(),eve(),$ye(),mye(),_ve=class{static{mt(this,"RecognizerEngine")}initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Qme,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},oj(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
For Further details.`);if(EE(e)){if(Lj(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("number"==typeof e[0].startOffset)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(EE(e))this.tokensMap=dY(e,(e,t)=>(e[t.name]=t,e),{});else if(oj(e,"modes")&&dG(yF(mj(e.modes)),hye))t=yF(mj(e.modes)),t=FY(t),this.tokensMap=dY(t,(e,t)=>(e[t.name]=t,e),{});else{if(!Zk(e))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=Eq(e)}this.tokensMap.EOF=Mye,t=oj(e,"modes")?yF(mj(e.modes)):mj(e),e=dG(t,e=>Lj(e.categoryMatches)),this.tokenMatcher=e?Qme:Zme,Jme(mj(this.tokensMap))}defineRule(r,i,e){if(this.selfAnalysisDone)throw Error(`Grammar rule <${r}> may not be defined after the 'performSelfAnalysis' method has been called'
Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let n=(oj(e,"resyncEnabled")?e:txe).resyncEnabled,a=(oj(e,"recoveryValueFunc")?e:txe).recoveryValueFunc,s=this.ruleShortNameIdx<<12;return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=r,this.fullRuleNameToShort[r]=s,e=!0===this.outputCst?mt(function(...e){try{this.ruleInvocationStateUpdate(s,r,this.subruleIdx),i.apply(this,e);var t=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(t),t}catch(e){return this.invokeRuleCatch(e,n,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):mt(function(...e){try{return this.ruleInvocationStateUpdate(s,r,this.subruleIdx),i.apply(this,e)}catch(e){return this.invokeRuleCatch(e,n,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),Object.assign(e,{ruleName:r,originalGrammarAction:i})}invokeRuleCatch(e,t,r){var i=1===this.RULE_STACK.length,t=t&&!this.isBackTracking()&&this.recoveryEnabled;if(q2e(e)){var n=e;if(t){if(t=this.findReSyncTokenType(),this.isInCurrentRuleReSyncSet(t))return n.resyncedTokens=this.reSyncTo(t),this.outputCst?((t=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,t):r(e);this.outputCst&&((t=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,n.partialCstResult=t)}else if(i)return this.moveToTerminatedState(),r(e);throw n}throw e}optionInternal(e,t){var r=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,r)}optionInternalLogic(e,t,r){let i=this.getLaFuncFromCache(r),n;if("function"!=typeof e){n=e.DEF;let t=e.GATE;if(void 0!==t){let e=i;i=mt(()=>t.call(this)&&e.call(this),"lookAheadFunc")}}else n=e;if(!0===i.call(this))return n.call(this)}atLeastOneInternal(e,t){var r=this.getKeyForAutomaticLookahead(1024,e);return this.atLeastOneInternalLogic(e,t,r)}atLeastOneInternalLogic(e,r,t){let i=this.getLaFuncFromCache(t),n;if("function"!=typeof r){n=r.DEF;let t=r.GATE;if(void 0!==t){let e=i;i=mt(()=>t.call(this)&&e.call(this),"lookAheadFunc")}}else n=r;if(!0!==i.call(this))throw this.raiseEarlyExitException(e,g2e.REPETITION_MANDATORY,r.ERR_MSG);{let e=this.doSingleRepetition(n);for(;!0===i.call(this)&&!0===e;)e=this.doSingleRepetition(n)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,r],i,1024,e,Kye)}atLeastOneSepFirstInternal(e,t){var r=this.getKeyForAutomaticLookahead(1536,e);this.atLeastOneSepFirstInternalLogic(e,t,r)}atLeastOneSepFirstInternalLogic(e,t,r){let i=t.DEF,n=t.SEP;if(!0!==this.getLaFuncFromCache(r).call(this))throw this.raiseEarlyExitException(e,g2e.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);for(i.call(this),r=mt(()=>this.tokenMatcher(this.LA(1),n),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),n);)this.CONSUME(n),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,n,r,i,Zye],r,1536,e,Zye)}manyInternal(e,t){var r=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,r)}manyInternalLogic(e,r,t){let i=this.getLaFuncFromCache(t),n;if("function"!=typeof r){n=r.DEF;let t=r.GATE;if(void 0!==t){let e=i;i=mt(()=>t.call(this)&&e.call(this),"lookaheadFunction")}}else n=r;let a=!0;for(;!0===i.call(this)&&!0===a;)a=this.doSingleRepetition(n);this.attemptInRepetitionRecovery(this.manyInternal,[e,r],i,768,e,Hye,a)}manySepFirstInternal(e,t){var r=this.getKeyForAutomaticLookahead(1280,e);this.manySepFirstInternalLogic(e,t,r)}manySepFirstInternalLogic(e,t,r){let i=t.DEF,n=t.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){for(i.call(this),t=mt(()=>this.tokenMatcher(this.LA(1),n),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),n);)this.CONSUME(n),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,n,t,i,Xye],t,1280,e,Xye)}}repetitionSepSecondInternal(e,t,r,i,n){for(;r();)this.CONSUME(t),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,i,n],r,1536,e,n)}doSingleRepetition(e){var t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){var r=this.getKeyForAutomaticLookahead(256,t),i=EE(e)?e:e.DEF;if(void 0!==(r=this.getLaFuncFromCache(r).call(this,i)))return i[r].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){var e,t;this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()&&(e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new V2e(t,e)))}subruleInternal(e,t,r){var i;try{var n=void 0!==r?r.ARGS:void 0;return this.subruleIdx=t,i=e.apply(this,n),this.cstPostNonTerminal(i,void 0!==r&&void 0!==r.LABEL?r.LABEL:e.ruleName),i}catch(t){throw this.subruleInternalError(t,r,e.ruleName)}}subruleInternalError(e,t,r){throw q2e(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:r),delete e.partialCstResult),e}consumeInternal(e,t,r){let i;try{var n=this.LA(1);!0===this.tokenMatcher(n,e)?(this.consumeToken(),i=n):this.consumeInternalError(e,n,r)}catch(r){i=this.consumeInternalRecovery(e,t,r)}return this.cstPostTerminal(void 0!==r&&void 0!==r.LABEL?r.LABEL:e.name,i),i}consumeInternalError(e,t,r){var i=this.LA(0),r=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new G2e(r,t,i))}consumeInternalRecovery(e,t,r){if(!this.recoveryEnabled||"MismatchedTokenException"!==r.name||this.isBackTracking())throw r;t=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,t)}catch(e){throw e.name===Z2e?r:e}}saveRecogState(){var e=this.errors,t=Eq(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 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){var e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Mye)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}}),Ove=i(()=>{H2e(),eH(),y2e(),axe(),Ave=class{static{mt(this,"ErrorHandler")}initErrorHandler(e){this._errors=[],this.errorMessageProvider=(oj(e,"errorMessageProvider")?e:exe).errorMessageProvider}SAVE_ERROR(e){if(q2e(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Eq(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return Eq(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,r){var i=this.getCurrRuleFullName(),e=c2e(e,this.getGAstProductions()[i],t,this.maxLookahead)[0],n=[];for(let e=1;e<=this.maxLookahead;e++)n.push(this.LA(e));throw t=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:e,actual:n,previous:this.LA(0),customUserDescription:r,ruleName:i}),this.SAVE_ERROR(new Y2e(t,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){var r=this.getCurrRuleFullName(),e=h2e(e,this.getGAstProductions()[r],this.maxLookahead),i=[];for(let e=1;e<=this.maxLookahead;e++)i.push(this.LA(e));throw r=this.LA(0),e=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:e,actual:i,previous:r,customUserDescription:t,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new j2e(e,this.LA(1),r))}}}),Bve=i(()=>{Qye(),eH(),Lve=class{static{mt(this,"ContentAssist")}initContentAssist(){}computeContentAssist(e,t){var r=this.gastProductionsCache[e];if($j(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return Gye([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){var t=IG(e.ruleStack),t=this.getGAstProductions()[t];return new Vye(t,e).startWalking()}}});function Pve(e,t,r,i=!1){zve(r);var n=jU(this.recordingProdStack),a=ew(t)?t:t.DEF,e=new e({definition:[],idx:r});return i&&(e.separator=t.SEP),oj(t,"MAX_LOOKAHEAD")&&(e.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(e),a.call(this),n.definition.push(e),this.recordingProdStack.pop(),qve}function $ve(e,t){zve(t);let r=jU(this.recordingProdStack),i=!1===EE(e),n=0==i?e:e.DEF,a=new E1e({definition:[],idx:t,ignoreAmbiguities:i&&!0===e.IGNORE_AMBIGUITIES});return oj(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD),t=CY(n,e=>ew(e.GATE)),a.hasPredicates=t,r.definition.push(a),v(n,e=>{var t=new x1e({definition:[]});a.definition.push(t),oj(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:oj(e,"GATE")&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),qve}function Fve(e){return 0===e?"":""+e}function zve(e){if(e<0||Wve<e)throw(e=new Error(`Invalid DSL Method idx value: <${e}>
Idx value must be a none negative value smaller than `+(Wve+1))).KNOWN_RECORDER_ERROR=!0,e}var qve,Wve,Uve,Gve,jve,Vve,Yve,Hve=i(()=>{eH(),O1e(),vye(),mye(),$ye(),axe(),ive(),qve={description:"This Object indicates the Parser is during Recording Phase"},Object.freeze(qve),Wve=Math.pow(2,8)-1,Jme([Uve=Tye({name:"RECORDING_PHASE_TOKEN",pattern:fye.NA})]),Gve=wye(Uve,`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(Gve),jve={name:`This CSTNode indicates the Parser is in Recording Phase
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},Vve=class{static{mt(this,"GastRecorder")}initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let r=0;r<10;r++){var e=0<r?r:"";this["CONSUME"+e]=function(e,t){return this.consumeInternalRecord(e,r,t)},this["SUBRULE"+e]=function(e,t){return this.subruleInternalRecord(e,r,t)},this["OPTION"+e]=function(e){return this.optionInternalRecord(e,r)},this["OR"+e]=function(e){return this.orInternalRecord(e,r)},this["MANY"+e]=function(e){this.manyInternalRecord(r,e)},this["MANY_SEP"+e]=function(e){this.manySepFirstInternalRecord(r,e)},this["AT_LEAST_ONE"+e]=function(e){this.atLeastOneInternalRecord(r,e)},this["AT_LEAST_ONE_SEP"+e]=function(e){this.atLeastOneSepFirstInternalRecord(r,e)}}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",()=>{var t=this;for(let e=0;e<10;e++){var r=0<e?e:"";delete t["CONSUME"+r],delete t["SUBRULE"+r],delete t["OPTION"+r],delete t["OR"+r],delete t["MANY"+r],delete t["MANY_SEP"+r],delete t["AT_LEAST_ONE"+r],delete t["AT_LEAST_ONE_SEP"+r]}delete t.consume,delete t.subrule,delete t.option,delete t.or,delete t.many,delete t.atLeastOne,delete t.ACTION,delete t.BACKTRACK,delete t.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return Jve}topLevelRuleRecord(e,t){try{var r=new v1e({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),t.call(this),this.recordingProdStack.pop(),r}catch(e){if(!0!==e.KNOWN_RECORDER_ERROR)try{e.message=e.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 e}}optionInternalRecord(e,t){return Pve.call(this,b1e,e,t)}atLeastOneInternalRecord(e,t){Pve.call(this,T1e,t,e)}atLeastOneSepFirstInternalRecord(e,t){Pve.call(this,k1e,t,e,!0)}manyInternalRecord(e,t){Pve.call(this,w1e,t,e)}manySepFirstInternalRecord(e,t){Pve.call(this,C1e,t,e,!0)}orInternalRecord(e,t){return $ve.call(this,e,t)}subruleInternalRecord(e,t,r){var i,n;if(zve(t),e&&!1!==oj(e,"ruleName"))return i=jU(this.recordingProdStack),n=e.ruleName,n=new y1e({idx:t,nonTerminalName:n,label:r?.LABEL,referencedRule:void 0}),i.definition.push(n),this.outputCst?jve:qve;throw(r=new Error(`<SUBRULE${Fve(t)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>
inside top level rule: <${this.recordingProdStack[0].name}>`)).KNOWN_RECORDER_ERROR=!0,r}consumeInternalRecord(e,t,r){var i;if(zve(t),aye(e))return i=jU(this.recordingProdStack),r=new S1e({idx:t,terminalType:e,label:r?.LABEL}),i.definition.push(r),Gve;throw(i=new Error(`<CONSUME${Fve(t)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>
inside top level rule: <${this.recordingProdStack[0].name}>`)).KNOWN_RECORDER_ERROR=!0,i}},mt(Pve,"recordProd"),mt($ve,"recordOrProd"),mt(Fve,"getIdxSuffix"),mt(zve,"assertMethodIdxIsValid")}),Xve=i(()=>{eH(),u1e(),axe(),Yve=class{static{mt(this,"PerformanceTracer")}initPerformanceTracer(e){var t;oj(e,"traceInitPerf")?(e=e.traceInitPerf,this.traceInitMaxIdent=(t="number"==typeof e)?e:1/0,this.traceInitPerf=t?0<e:e):(this.traceInitMaxIdent=0,this.traceInitPerf=exe.traceInitPerf),this.traceInitIndent=-1}TRACE_INIT(e,t){var r,i,n,a;return!0===this.traceInitPerf?(this.traceInitIndent++,r=new Array(this.traceInitIndent+1).join("\t"),{time:i,value:n}=(this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+`--> <${e}>`),o1e(t)),a=10<i?console.warn:console.log,this.traceInitIndent<this.traceInitMaxIdent&&a(r+`<-- <${e}> time: ${i}ms`),this.traceInitIndent--,n):t()}}});function Kve(n,e){e.forEach(r=>{let i=r.prototype;Object.getOwnPropertyNames(i).forEach(e=>{var t;"constructor"!==e&&((t=Object.getOwnPropertyDescriptor(i,e))&&(t.get||t.set)?Object.defineProperty(n.prototype,e,t):n.prototype[e]=r.prototype[e])})})}var Zve=i(()=>{mt(Kve,"applyMixins")});function Qve(e=void 0){return function(){return e}}var Jve,exe,txe,rxe,ixe,nxe,axe=i(()=>{var e;eH(),u1e(),X1e(),$ye(),Fye(),z2e(),eve(),hve(),Ive(),Nve(),Dve(),Mve(),Ove(),Bve(),Hve(),Xve(),Zve(),P2e(),Jve=wye(Mye,"",NaN,NaN,NaN,NaN,NaN,NaN),Object.freeze(Jve),exe=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Oye,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),txe=Object.freeze({recoveryValueFunc:mt(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),(e=rxe=rxe||{})[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",mt(Qve,"EMPTY_ALT"),(ixe=class t{static{mt(this,"Parser")}static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{var e;this.selfAnalysisDone=!0;let r=this.className,i=(this.TRACE_INIT("toFastProps",()=>{h1e(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),v(this.definedRulesNames,e=>{let t=this[e].originalGrammarAction,r;this.TRACE_INIT(e+" Rule",()=>{r=this.topLevelRuleRecord(e,t)}),this.gastProductionsCache[e]=r})}finally{this.disableRecording()}}),[]);if(this.TRACE_INIT("Grammar Resolving",()=>{i=$2e({rules:mj(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(i)}),this.TRACE_INIT("Grammar Validations",()=>{var e,t;Lj(i)&&!1===this.skipValidations&&(e=F2e({rules:mj(this.gastProductionsCache),tokenTypes:mj(this.tokensMap),errMsgProvider:Pye,grammarName:r}),t=v2e({lookaheadStrategy:this.lookaheadStrategy,rules:mj(this.gastProductionsCache),tokenTypes:mj(this.tokensMap),grammarName:r}),this.definitionErrors=this.definitionErrors.concat(e,t))}),Lj(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{var e=V1e(mj(this.gastProductionsCache));this.resyncFollows=e}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var e,t;null!=(t=(e=this.lookaheadStrategy).initialize)&&t.call(e,{rules:mj(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(mj(this.gastProductionsCache))})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!Lj(this.definitionErrors))throw e=x(this.definitionErrors,e=>e.message),new Error(`Parser Definition Errors detected:
`+e.join(`
-------------------------------
`))})}constructor(e,t){if(this.definitionErrors=[],this.selfAnalysisDone=!1,this.initErrorHandler(t),this.initLexerAdapter(),this.initLooksAhead(t),this.initRecognizerEngine(e,t),this.initRecoverable(t),this.initTreeBuilder(t),this.initContentAssist(),this.initGastRecorder(t),this.initPerformanceTracer(t),oj(t,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
For further details.`);this.skipValidations=(oj(t,"skipValidations")?t:exe).skipValidations}}).DEFER_DEFINITION_ERRORS_HANDLING=!1,Kve(ixe,[J2e,sve,Cve,Eve,_ve,Sve,Ave,Lve,Vve,Yve]),nxe=class extends ixe{static{mt(this,"EmbeddedActionsParser")}constructor(e,t=exe){(t=Eq(t)).outputCst=!1,super(e,t)}}}),sxe=i(()=>{O1e()}),oxe=i(()=>{}),lxe=i(()=>{sxe(),oxe()}),hxe=i(()=>{i1e()}),cxe=i(()=>{i1e(),axe(),vye(),$ye(),y2e(),nve(),Fye(),H2e(),yye(),O1e(),O1e(),lxe(),hxe()});function uxe(e,t,r){return e.name+`_${t}_`+r}function dxe(t){var r={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]},i=(pxe(r,t),t.length);for(let e=0;e<i;e++){var n=t[e],a=Txe(r,n,n);void 0!==a&&Ixe(r,n,a)}return r}function pxe(t,r){var i=r.length;for(let e=0;e<i;e++){var n=r[e],a=Dxe(t,n,void 0,{type:Pxe}),s=Dxe(t,n,void 0,{type:zxe});a.stop=s,t.ruleToStartState.set(n,a),t.ruleToStopState.set(n,s)}}function gxe(e,t,r){return r instanceof S1e?Lxe(e,t,r.terminalType,r):(r instanceof y1e?Rxe:r instanceof E1e?xxe:r instanceof b1e?bxe:r instanceof w1e?fxe:r instanceof C1e?mxe:r instanceof T1e?yxe:r instanceof k1e?vxe:Txe)(e,t,r)}function fxe(e,t,r){var i=Dxe(e,t,r,{type:Fxe});return Exe(e,i),wxe(e,t,r,Sxe(e,t,i,r,Txe(e,t,r)))}function mxe(e,t,r){var i=Dxe(e,t,r,{type:Fxe});return Exe(e,i),wxe(e,t,r,Sxe(e,t,i,r,Txe(e,t,r)),Lxe(e,t,r.separator,r))}function yxe(e,t,r){var i=Dxe(e,t,r,{type:$xe});return Exe(e,i),kxe(e,t,r,Sxe(e,t,i,r,Txe(e,t,r)))}function vxe(e,t,r){var i=Dxe(e,t,r,{type:$xe});return Exe(e,i),kxe(e,t,r,Sxe(e,t,i,r,Txe(e,t,r)),Lxe(e,t,r.separator,r))}function xxe(t,r,e){var i=Dxe(t,r,e,{type:Bxe}),n=(Exe(t,i),x(e.definition,e=>gxe(t,r,e)));return Sxe(t,r,i,e,...n)}function bxe(e,t,r){var i=Dxe(e,t,r,{type:Bxe});return Exe(e,i),Cxe(e,t,r,Sxe(e,t,i,r,Txe(e,t,r)))}function Txe(t,r,e){return 1===(e=vG(x(e.definition,e=>gxe(t,r,e)),e=>void 0!==e)).length?e[0]:0===e.length?void 0:Axe(t,e)}function kxe(e,t,r,i,n){var a=i.left,i=i.right,s=Dxe(e,t,r,{type:Gxe}),o=(Exe(e,s),Dxe(e,t,r,{type:jxe}));return a.loopback=s,o.loopback=s,Nxe(i,e.decisionMap[uxe(t,n?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=s),void 0===n?(Nxe(s,a),Nxe(s,o)):(Nxe(s,o),Nxe(s,n.left),Nxe(n.right,a)),{left:a,right:o}}function wxe(e,t,r,i,n){var a=i.left,i=i.right,s=Dxe(e,t,r,{type:Uxe}),o=(Exe(e,s),Dxe(e,t,r,{type:jxe})),l=Dxe(e,t,r,{type:Wxe});return s.loopback=l,o.loopback=l,Nxe(s,a),Nxe(s,o),Nxe(i,l),void 0!==n?(Nxe(l,o),Nxe(l,n.left),Nxe(n.right,a)):Nxe(l,s),{left:e.decisionMap[uxe(t,n?"RepetitionWithSeparator":"Repetition",r.idx)]=s,right:o}}function Cxe(e,t,r,i){var n=i.left;return Nxe(n,i.right),e.decisionMap[uxe(t,"Option",r.idx)]=n,i}function Exe(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function Sxe(e,t,r,i,...n){var a,s=Dxe(e,t,i,{type:qxe,start:r});r.end=s;for(a of n)void 0!==a?(Nxe(r,a.left),Nxe(a.right,s)):Nxe(r,s);return n={left:r,right:s},e.decisionMap[uxe(t,_xe(i),i.idx)]=r,n}function _xe(e){if(e instanceof E1e)return"Alternation";if(e instanceof b1e)return"Option";if(e instanceof w1e)return"Repetition";if(e instanceof C1e)return"RepetitionWithSeparator";if(e instanceof T1e)return"RepetitionMandatory";if(e instanceof k1e)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function Axe(t,r){var i=r.length;for(let e=0;e<i-1;e++){var n,a=r[e],s=(n=1===a.left.transitions.length?a.left.transitions[0]:void 0)instanceof Xxe,o=n,l=r[e+1].left;a.left.type===Bxe&&a.right.type===Bxe&&void 0!==n&&(s&&o.followState===a.right||n.target===a.right)?(s?o.followState=l:n.target=l,Oxe(t,a.right)):Nxe(a.right,l)}return{left:r[0].left,right:r[i-1].right}}function Lxe(e,t,r,i){var n=Dxe(e,t,i,{type:Bxe}),e=Dxe(e,t,i,{type:Bxe});return Mxe(n,new Yxe(e,r)),{left:n,right:e}}function Rxe(e,t,r){var i=r.referencedRule,n=e.ruleToStartState.get(i),a=Dxe(e,t,r,{type:Bxe}),e=Dxe(e,t,r,{type:Bxe});return Mxe(a,new Xxe(n,i,e)),{left:a,right:e}}function Ixe(e,t,r){var i=e.ruleToStartState.get(t),e=(Nxe(i,r.left),e.ruleToStopState.get(t));return Nxe(r.right,e),{left:i,right:e}}function Nxe(e,t){Mxe(e,new Hxe(t))}function Dxe(e,t,r,i){return r=Object.assign({atn:e,production:r,epsilonOnlyTransitions:!1,rule:t,transitions:[],nextTokenWithinRule:[],stateNumber:e.states.length},i),e.states.push(r),r}function Mxe(e,t){0===e.transitions.length&&(e.epsilonOnlyTransitions=t.isEpsilon()),e.transitions.push(t)}function Oxe(e,t){e.states.splice(e.states.indexOf(t),1)}var Bxe,Pxe,$xe,Fxe,zxe,qxe,Wxe,Uxe,Gxe,jxe,Vxe,Yxe,Hxe,Xxe,Kxe=i(()=>{$G(),xG(),cxe(),mt(uxe,"buildATNKey"),Bxe=1,Pxe=2,$xe=4,Fxe=5,zxe=7,qxe=8,Wxe=9,Uxe=10,Gxe=11,jxe=12,Vxe=class{static{mt(this,"AbstractTransition")}constructor(e){this.target=e}isEpsilon(){return!1}},Yxe=class extends Vxe{static{mt(this,"AtomTransition")}constructor(e,t){super(e),this.tokenType=t}},Hxe=class extends Vxe{static{mt(this,"EpsilonTransition")}constructor(e){super(e)}isEpsilon(){return!0}},Xxe=class extends Vxe{static{mt(this,"RuleTransition")}constructor(e,t,r){super(e),this.rule=t,this.followState=r}isEpsilon(){return!0}},mt(dxe,"createATN"),mt(pxe,"createRuleStartAndStopATNStates"),mt(gxe,"atom"),mt(fxe,"repetition"),mt(mxe,"repetitionSep"),mt(yxe,"repetitionMandatory"),mt(vxe,"repetitionMandatorySep"),mt(xxe,"alternation"),mt(bxe,"option"),mt(Txe,"block"),mt(kxe,"plus"),mt(wxe,"star"),mt(Cxe,"optional"),mt(Exe,"defineDecisionState"),mt(Sxe,"makeAlts"),mt(_xe,"getProdType"),mt(Axe,"makeBlock"),mt(Lxe,"tokenRef"),mt(Rxe,"ruleRef"),mt(Ixe,"buildRuleHandle"),mt(Nxe,"epsilon"),mt(Dxe,"newState"),mt(Mxe,"addTransition"),mt(Oxe,"removeState")});function Zxe(e,t=!0){return`${t?"a"+e.alt:""}s${e.state.stateNumber}:`+e.stack.map(e=>e.stateNumber.toString()).join("_")}var Qxe,Jxe,ebe=i(()=>{$G(),Qxe={},Jxe=class{static{mt(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){var t=Zxe(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return x(this.configs,e=>e.alt)}get key(){let e="";for(var t in this.map)e+=t+":";return e}},mt(Zxe,"getATNConfigKey")});function tbe(i,n){let a={};return e=>{let t=e.toString(),r=a[t];return void 0===r&&(r={atnStartState:i,decision:n,states:{}},a[t]=r),r}}function rbe(e,t=!0){var r,i=new Set;for(r of e){var n,a,s=new Set;for(n of r){if(void 0===n){if(t)break;return!1}for(a of[n.tokenTypeIdx].concat(n.categoryMatches))if(i.has(a)){if(!s.has(a))return!1}else i.add(a),s.add(a)}}return!0}function ibe(t){var r=t.decisionStates.length,i=Array(r);for(let e=0;e<r;e++)i[e]=tbe(t.decisionStates[e],e);return i}function nbe(e,t,r,i){let n=e[t](r),a=n.start;return void 0===a&&(e=vbe(n.atnStartState),a=ybe(n,fbe(e)),n.start=a),abe.apply(this,[n,a,r,i])}function abe(e,t,r,i){let n=t,a=1,s=[],o=this.LA(a++);for(;;){var l=ube(n,o);if((l=void 0===l?sbe.apply(this,[e,n,o,a,r,i]):l)===Qxe)return cbe(s,n,o);if(!0===l.isAcceptState)return l.prediction;n=l,s.push(o),o=this.LA(a++)}}function sbe(e,t,r,i,n,a){var s=dbe(t.configs,r,n);if(0===s.size)return mbe(e,t,r,Qxe),Qxe;let o=fbe(s),l=gbe(s,n);return void 0!==l?(o.isAcceptState=!0,o.prediction=l,o.configs.uniqueAlt=l):wbe(s)&&(n=Jj(s.alts),o.isAcceptState=!0,o.prediction=n,o.configs.uniqueAlt=n,obe.apply(this,[e,i,s.alts,a])),o=mbe(e,t,r,o)}function obe(e,t,r,i){var n=[];for(let e=1;e<=t;e++)n.push(this.LA(e).tokenType);i(lbe({topLevelRule:(e=e.atnStartState).rule,ambiguityIndices:r,production:e.production,prefixPath:n}))}function lbe(e){var t=x(e.prefixPath,e=>xye(e)).join(", "),r=0===e.production.idx?"":e.production.idx;return`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${hbe(e.production)}${r}> 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#AMBIGUOUS_ALTERNATIVES
For Further details.`}function hbe(e){if(e instanceof y1e)return"SUBRULE";if(e instanceof b1e)return"OPTION";if(e instanceof E1e)return"OR";if(e instanceof T1e)return"AT_LEAST_ONE";if(e instanceof k1e)return"AT_LEAST_ONE_SEP";if(e instanceof C1e)return"MANY_SEP";if(e instanceof w1e)return"MANY";if(e instanceof S1e)return"CONSUME";throw Error("non exhaustive match")}function cbe(e,t,r){return t=zG(t.configs.elements,e=>e.state.transitions),{actualToken:r,possibleTokenTypes:WY(t.filter(e=>e instanceof Yxe).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}function ube(e,t){return e.edges[t.tokenTypeIdx]}function dbe(e,t,r){var i,n=new Jxe,a=[];for(i of e.elements)if(!1!==r.is(i.alt))if(i.state.type===zxe)a.push(i);else{var s=i.state.transitions.length;for(let e=0;e<s;e++){var o=pbe(i.state.transitions[e],t);void 0!==o&&n.add({state:o,alt:i.alt,stack:i.stack})}}let l;if(void 0===(l=0===a.length&&1===n.size?n:l)){l=new Jxe;for(var h of n.elements)xbe(h,l)}if(0<a.length&&!Tbe(l))for(var c of a)l.add(c);return l}function pbe(e,t){if(e instanceof Yxe&&Cye(t,e.tokenType))return e.target}function gbe(e,t){let r;for(var i of e.elements)if(!0===t.is(i.alt))if(void 0===r)r=i.alt;else if(r!==i.alt)return;return r}function fbe(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function mbe(e,t,r,i){return i=ybe(e,i),t.edges[r.tokenTypeIdx]=i}function ybe(e,t){var r,i;return t===Qxe?t:(r=t.configs.key,void 0!==(i=e.states[r])?i:(t.configs.finalize(),e.states[r]=t))}function vbe(t){var r=new Jxe,i=t.transitions.length;for(let e=0;e<i;e++)xbe({state:t.transitions[e].target,alt:e,stack:[]},r);return r}function xbe(t,r){var e,i=t.state;if(i.type===zxe)0<t.stack.length?xbe({state:(e=[...t.stack]).pop(),alt:t.alt,stack:e},r):r.add(t);else{i.epsilonOnlyTransitions||r.add(t);var n=i.transitions.length;for(let e=0;e<n;e++){var a=bbe(t,i.transitions[e]);void 0!==a&&xbe(a,r)}}}function bbe(e,t){var r;return t instanceof Hxe?{state:t.target,alt:e.alt,stack:e.stack}:t instanceof Xxe?(r=[...e.stack,t.followState],{state:t.target,alt:e.alt,stack:r}):void 0}function Tbe(e){for(var t of e.elements)if(t.state.type===zxe)return!0;return!1}function kbe(e){for(var t of e.elements)if(t.state.type!==zxe)return!1;return!0}function wbe(e){return!!kbe(e)||Ebe(e=Cbe(e.elements))&&!Sbe(e)}function Cbe(e){var r,i=new Map;for(r of e){let e=Zxe(r,!1),t=i.get(e);void 0===t&&(t={},i.set(e,t)),t[r.alt]=!0}return i}function Ebe(e){for(var t of Array.from(e.values()))if(1<Object.keys(t).length)return!0;return!1}function Sbe(e){for(var t of Array.from(e.values()))if(1===Object.keys(t).length)return!0;return!1}var _be,Abe,Lbe,Rbe=i(()=>{cxe(),Kxe(),ebe(),eV(),qG(),UY(),$G(),vF(),iG(),Rj(),pY(),mt(tbe,"createDFACache"),_be=class{static{mt(this,"PredicateSet")}constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let t="",r=this.predicates.length;for(let e=0;e<r;e++)t+=!0===this.predicates[e]?"1":"0";return t}},Abe=new _be,Lbe=class extends rve{static{mt(this,"LLStarLookaheadStrategy")}constructor(e){super(),this.logging=null!=(e=e?.logging)?e:e=>console.log(e)}initialize(e){this.atn=dxe(e.rules),this.dfas=ibe(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:t,rule:r,hasPredicates:i,dynamicTokensEnabled:n}=e,a=this.dfas,s=this.logging,o=uxe(r,"Alternation",t),l=this.atn.decisionMap[o].decision,h=x(e2e({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),e=>x(e,e=>e[0]));if(!rbe(h,!1)||n)return i?function(t){var r=new _be,i=void 0===t?0:t.length;for(let e=0;e<i;e++){var n=t?.[e].GATE;r.set(e,void 0===n||n.call(this))}var e=nbe.call(this,a,l,r,s);return"number"==typeof e?e:void 0}:function(){var e=nbe.call(this,a,l,Abe,s);return"number"==typeof e?e:void 0};{let r=dY(h,(t,e,r)=>(v(e,e=>{e&&(t[e.tokenTypeIdx]=r,v(e.categoryMatches,e=>{t[e]=r}))}),t),{});return i?function(e){var t=this.LA(1),t=r[t.tokenTypeIdx];if(void 0===e||void 0===t||void 0===(e=null==(e=e[t])?void 0:e.GATE)||!1!==e.call(this))return t}:function(){var e=this.LA(1);return r[e.tokenTypeIdx]}}}buildLookaheadForOptional(r){let{prodOccurrence:e,rule:t,prodType:i,dynamicTokensEnabled:n}=r,a=this.dfas,s=this.logging,o=uxe(t,i,e),l=this.atn.decisionMap[o].decision,h=x(e2e({maxLookahead:1,occurrence:e,prodType:i,rule:t}),e=>x(e,e=>e[0]));if(rbe(h)&&h[0][0]&&!n){if(r=h[0],1===(r=yF(r)).length&&Lj(r[0].categoryMatches)){let e=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{let t=dY(r,(t,e)=>(void 0!==e&&(t[e.tokenTypeIdx]=!0,v(e.categoryMatches,e=>{t[e]=!0})),t),{});return function(){var e=this.LA(1);return!0===t[e.tokenTypeIdx]}}}return function(){var e=nbe.call(this,a,l,Abe,s);return"object"!=typeof e&&0===e}}},mt(rbe,"isLL1Sequence"),mt(ibe,"initATNSimulator"),mt(nbe,"adaptivePredict"),mt(abe,"performLookahead"),mt(sbe,"computeLookaheadTarget"),mt(obe,"reportLookaheadAmbiguity"),mt(lbe,"buildAmbiguityError"),mt(hbe,"getProductionDslName"),mt(cbe,"buildAdaptivePredictError"),mt(ube,"getExistingTargetState"),mt(dbe,"computeReachSet"),mt(pbe,"getReachableTarget"),mt(gbe,"getUniqueAlt"),mt(fbe,"newDFAState"),mt(mbe,"addDFAEdge"),mt(ybe,"addDFAState"),mt(vbe,"computeStartState"),mt(xbe,"closure"),mt(bbe,"getEpsilonTarget"),mt(Tbe,"hasConfigInRuleStopState"),mt(kbe,"allConfigsInRuleStopStates"),mt(wbe,"hasConflictTerminatingPrediction"),mt(Cbe,"getConflictingAltSets"),mt(Ebe,"hasConflictingAltSet"),mt(Sbe,"hasStateAssociatedWithOneAlt")}),Ibe=i(()=>{Rbe()}),Nbe={};sYe(Nbe,{AnnotatedTextEdit:()=>t4e,ChangeAnnotation:()=>Jbe,ChangeAnnotationIdentifier:()=>e4e,CodeAction:()=>$4e,CodeActionContext:()=>P4e,CodeActionKind:()=>O4e,CodeActionTriggerKind:()=>B4e,CodeDescription:()=>Xbe,CodeLens:()=>F4e,Color:()=>qbe,ColorInformation:()=>Wbe,ColorPresentation:()=>Ube,Command:()=>Zbe,CompletionItem:()=>k4e,CompletionItemKind:()=>m4e,CompletionItemLabelDetails:()=>T4e,CompletionItemTag:()=>v4e,CompletionList:()=>w4e,CreateFile:()=>i4e,DeleteFile:()=>a4e,Diagnostic:()=>Kbe,DiagnosticRelatedInformation:()=>Vbe,DiagnosticSeverity:()=>Ybe,DiagnosticTag:()=>Hbe,DocumentHighlight:()=>L4e,DocumentHighlightKind:()=>A4e,DocumentLink:()=>q4e,DocumentSymbol:()=>M4e,DocumentUri:()=>Dbe,EOL:()=>s5e,FoldingRange:()=>jbe,FoldingRangeKind:()=>Gbe,FormattingOptions:()=>z4e,Hover:()=>E4e,InlayHint:()=>Q4e,InlayHintKind:()=>K4e,InlayHintLabelPart:()=>Z4e,InlineCompletionContext:()=>n5e,InlineCompletionItem:()=>e5e,InlineCompletionList:()=>t5e,InlineCompletionTriggerKind:()=>r5e,InlineValueContext:()=>X4e,InlineValueEvaluatableExpression:()=>H4e,InlineValueText:()=>V4e,InlineValueVariableLookup:()=>Y4e,InsertReplaceEdit:()=>x4e,InsertTextFormat:()=>y4e,InsertTextMode:()=>b4e,Location:()=>Fbe,LocationLink:()=>zbe,MarkedString:()=>C4e,MarkupContent:()=>f4e,MarkupKind:()=>g4e,OptionalVersionedTextDocumentIdentifier:()=>d4e,ParameterInformation:()=>S4e,Position:()=>Pbe,Range:()=>$be,RenameFile:()=>n4e,SelectedCompletionInfo:()=>i5e,SelectionRange:()=>W4e,SemanticTokenModifiers:()=>G4e,SemanticTokenTypes:()=>U4e,SemanticTokens:()=>j4e,SignatureInformation:()=>_4e,StringValue:()=>J4e,SymbolInformation:()=>N4e,SymbolKind:()=>R4e,SymbolTag:()=>I4e,TextDocument:()=>o5e,TextDocumentEdit:()=>r4e,TextDocumentIdentifier:()=>c4e,TextDocumentItem:()=>p4e,TextEdit:()=>Qbe,URI:()=>Mbe,VersionedTextDocumentIdentifier:()=>u4e,WorkspaceChange:()=>h4e,WorkspaceEdit:()=>s4e,WorkspaceFolder:()=>a5e,WorkspaceSymbol:()=>D4e,integer:()=>Obe,uinteger:()=>Bbe});var Dbe,Mbe,Obe,Bbe,Pbe,$be,Fbe,zbe,qbe,Wbe,Ube,Gbe,jbe,Vbe,Ybe,Hbe,Xbe,Kbe,Zbe,Qbe,Jbe,e4e,t4e,r4e,i4e,n4e,a4e,s4e,o4e,l4e,h4e,c4e,u4e,d4e,p4e,g4e,f4e,m4e,y4e,v4e,x4e,b4e,T4e,k4e,w4e,C4e,E4e,S4e,_4e,A4e,L4e,R4e,I4e,N4e,D4e,M4e,O4e,B4e,P4e,$4e,F4e,z4e,q4e,W4e,U4e,G4e,j4e,V4e,Y4e,H4e,X4e,K4e,Z4e,Q4e,J4e,e5e,t5e,r5e,i5e,n5e,a5e,s5e,o5e,l5e,yt,h5e,c5e,u5e,d5e,p5e,g5e,f5e=i(()=>{function e(e){return"string"==typeof e}var t,r,i,n;function a(e){return"string"==typeof e}function s(e){return"number"==typeof e&&t.MIN_VALUE<=e&&e<=t.MAX_VALUE}function o(e){return"number"==typeof e&&r.MIN_VALUE<=e&&e<=r.MAX_VALUE}function l(e,t){return{line:e=e===Number.MAX_VALUE?Bbe.MAX_VALUE:e,character:t=t===Number.MAX_VALUE?Bbe.MAX_VALUE:t}}function h(e){return yt.objectLiteral(e)&&yt.uinteger(e.line)&&yt.uinteger(e.character)}function c(e,t,r,i){if(yt.uinteger(e)&&yt.uinteger(t)&&yt.uinteger(r)&&yt.uinteger(i))return{start:Pbe.create(e,t),end:Pbe.create(r,i)};if(Pbe.is(e)&&Pbe.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${r}, ${i}]`)}function u(e){return yt.objectLiteral(e)&&Pbe.is(e.start)&&Pbe.is(e.end)}function d(e,t){return{uri:e,range:t}}function p(e){return yt.objectLiteral(e)&&$be.is(e.range)&&(yt.string(e.uri)||yt.undefined(e.uri))}function g(e,t,r,i){return{targetUri:e,targetRange:t,targetSelectionRange:r,originSelectionRange:i}}function f(e){return yt.objectLiteral(e)&&$be.is(e.targetRange)&&yt.string(e.targetUri)&&$be.is(e.targetSelectionRange)&&($be.is(e.originSelectionRange)||yt.undefined(e.originSelectionRange))}function m(e,t,r,i){return{red:e,green:t,blue:r,alpha:i}}function y(e){return yt.objectLiteral(e)&&yt.numberRange(e.red,0,1)&&yt.numberRange(e.green,0,1)&&yt.numberRange(e.blue,0,1)&&yt.numberRange(e.alpha,0,1)}function v(e,t){return{range:e,color:t}}function x(e){return yt.objectLiteral(e)&&$be.is(e.range)&&qbe.is(e.color)}function b(e,t,r){return{label:e,textEdit:t,additionalTextEdits:r}}function T(e){return yt.objectLiteral(e)&&yt.string(e.label)&&(yt.undefined(e.textEdit)||Qbe.is(e))&&(yt.undefined(e.additionalTextEdits)||yt.typedArray(e.additionalTextEdits,Qbe.is))}function k(e,t,r,i,n,a){return e={startLine:e,endLine:t},yt.defined(r)&&(e.startCharacter=r),yt.defined(i)&&(e.endCharacter=i),yt.defined(n)&&(e.kind=n),yt.defined(a)&&(e.collapsedText=a),e}function w(e){return yt.objectLiteral(e)&&yt.uinteger(e.startLine)&&yt.uinteger(e.startLine)&&(yt.undefined(e.startCharacter)||yt.uinteger(e.startCharacter))&&(yt.undefined(e.endCharacter)||yt.uinteger(e.endCharacter))&&(yt.undefined(e.kind)||yt.string(e.kind))}function C(e,t){return{location:e,message:t}}function E(e){return yt.defined(e)&&Fbe.is(e.location)&&yt.string(e.message)}function S(e){return yt.objectLiteral(e)&&yt.string(e.href)}function _(e,t,r,i,n,a){return e={range:e,message:t},yt.defined(r)&&(e.severity=r),yt.defined(i)&&(e.code=i),yt.defined(n)&&(e.source=n),yt.defined(a)&&(e.relatedInformation=a),e}function A(e){var t;return yt.defined(e)&&$be.is(e.range)&&yt.string(e.message)&&(yt.number(e.severity)||yt.undefined(e.severity))&&(yt.integer(e.code)||yt.string(e.code)||yt.undefined(e.code))&&(yt.undefined(e.codeDescription)||yt.string(null==(t=e.codeDescription)?void 0:t.href))&&(yt.string(e.source)||yt.undefined(e.source))&&(yt.undefined(e.relatedInformation)||yt.typedArray(e.relatedInformation,Vbe.is))}function L(e,t,...r){return e={title:e,command:t},yt.defined(r)&&0<r.length&&(e.arguments=r),e}function R(e){return yt.defined(e)&&yt.string(e.title)&&yt.string(e.command)}function I(e,t){return{range:e,newText:t}}function N(e,t){return{range:{start:e,end:e},newText:t}}function D(e){return{range:e,newText:""}}function B(e){return yt.objectLiteral(e)&&yt.string(e.newText)&&$be.is(e.range)}function P(e,t,r){return e={label:e},void 0!==t&&(e.needsConfirmation=t),void 0!==r&&(e.description=r),e}function $(e){return yt.objectLiteral(e)&&yt.string(e.label)&&(yt.boolean(e.needsConfirmation)||void 0===e.needsConfirmation)&&(yt.string(e.description)||void 0===e.description)}function F(e){return yt.string(e)}function z(e,t,r){return{range:e,newText:t,annotationId:r}}function q(e,t,r){return{range:{start:e,end:e},newText:t,annotationId:r}}function W(e,t){return{range:e,newText:"",annotationId:t}}function U(e){return Qbe.is(e)&&(Jbe.is(e.annotationId)||e4e.is(e.annotationId))}function G(e,t){return{textDocument:e,edits:t}}function j(e){return yt.defined(e)&&d4e.is(e.textDocument)&&Array.isArray(e.edits)}function V(e,t,r){return e={kind:"create",uri:e},void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(e.options=t),void 0!==r&&(e.annotationId=r),e}function Y(e){return e&&"create"===e.kind&&yt.string(e.uri)&&(void 0===e.options||(void 0===e.options.overwrite||yt.boolean(e.options.overwrite))&&(void 0===e.options.ignoreIfExists||yt.boolean(e.options.ignoreIfExists)))&&(void 0===e.annotationId||e4e.is(e.annotationId))}function H(e,t,r,i){return e={kind:"rename",oldUri:e,newUri:t},void 0===r||void 0===r.overwrite&&void 0===r.ignoreIfExists||(e.options=r),void 0!==i&&(e.annotationId=i),e}function X(e){return e&&"rename"===e.kind&&yt.string(e.oldUri)&&yt.string(e.newUri)&&(void 0===e.options||(void 0===e.options.overwrite||yt.boolean(e.options.overwrite))&&(void 0===e.options.ignoreIfExists||yt.boolean(e.options.ignoreIfExists)))&&(void 0===e.annotationId||e4e.is(e.annotationId))}function K(e,t,r){return e={kind:"delete",uri:e},void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(e.options=t),void 0!==r&&(e.annotationId=r),e}function Z(e){return e&&"delete"===e.kind&&yt.string(e.uri)&&(void 0===e.options||(void 0===e.options.recursive||yt.boolean(e.options.recursive))&&(void 0===e.options.ignoreIfNotExists||yt.boolean(e.options.ignoreIfNotExists)))&&(void 0===e.annotationId||e4e.is(e.annotationId))}function Q(e){return e&&(void 0!==e.changes||void 0!==e.documentChanges)&&(void 0===e.documentChanges||e.documentChanges.every(e=>yt.string(e.kind)?i4e.is(e)||n4e.is(e)||a4e.is(e):r4e.is(e)))}function J(e){return{uri:e}}function ee(e){return yt.defined(e)&&yt.string(e.uri)}function te(e,t){return{uri:e,version:t}}function re(e){return yt.defined(e)&&yt.string(e.uri)&&yt.integer(e.version)}function ie(e,t){return{uri:e,version:t}}function ne(e){return yt.defined(e)&&yt.string(e.uri)&&(null===e.version||yt.integer(e.version))}function ae(e,t,r,i){return{uri:e,languageId:t,version:r,text:i}}function se(e){return yt.defined(e)&&yt.string(e.uri)&&yt.string(e.languageId)&&yt.integer(e.version)&&yt.string(e.text)}function oe(e){return e===i.PlainText||e===i.Markdown}function le(e){var t=e;return yt.objectLiteral(e)&&g4e.is(t.kind)&&yt.string(t.value)}function he(e,t,r){return{newText:e,insert:t,replace:r}}function ce(e){return e&&yt.string(e.newText)&&$be.is(e.insert)&&$be.is(e.replace)}function ue(e){return e&&(yt.string(e.detail)||void 0===e.detail)&&(yt.string(e.description)||void 0===e.description)}function de(e){return{label:e}}function pe(e,t){return{items:e||[],isIncomplete:!!t}}function ge(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function fe(e){return yt.string(e)||yt.objectLiteral(e)&&yt.string(e.language)&&yt.string(e.value)}function me(e){var t=e;return!!t&&yt.objectLiteral(t)&&(f4e.is(t.contents)||C4e.is(t.contents)||yt.typedArray(t.contents,C4e.is))&&(void 0===e.range||$be.is(e.range))}function ye(e,t){return t?{label:e,documentation:t}:{label:e}}function ve(e,t,...r){return e={label:e},yt.defined(t)&&(e.documentation=t),yt.defined(r)?e.parameters=r:e.parameters=[],e}function xe(e,t){return e={range:e},yt.number(t)&&(e.kind=t),e}function be(e,t,r,i,n){return e={name:e,kind:t,location:{uri:i,range:r}},n&&(e.containerName=n),e}function Te(e,t,r,i){return void 0!==i?{name:e,kind:t,location:{uri:r,range:i}}:{name:e,kind:t,location:{uri:r}}}function ke(e,t,r,i,n,a){return e={name:e,detail:t,kind:r,range:i,selectionRange:n},void 0!==a&&(e.children=a),e}function we(e){return e&&yt.string(e.name)&&yt.number(e.kind)&&$be.is(e.range)&&$be.is(e.selectionRange)&&(void 0===e.detail||yt.string(e.detail))&&(void 0===e.deprecated||yt.boolean(e.deprecated))&&(void 0===e.children||Array.isArray(e.children))&&(void 0===e.tags||Array.isArray(e.tags))}function Ce(e,t,r){return e={diagnostics:e},null!=t&&(e.only=t),null!=r&&(e.triggerKind=r),e}function Ee(e){return yt.defined(e)&&yt.typedArray(e.diagnostics,Kbe.is)&&(void 0===e.only||yt.typedArray(e.only,yt.string))&&(void 0===e.triggerKind||e.triggerKind===B4e.Invoked||e.triggerKind===B4e.Automatic)}function Se(e,t,r){let i={title:e},n=!0;return"string"==typeof t?(n=!1,i.kind=t):Zbe.is(t)?i.command=t:i.edit=t,n&&void 0!==r&&(i.kind=r),i}function _e(e){return e&&yt.string(e.title)&&(void 0===e.diagnostics||yt.typedArray(e.diagnostics,Kbe.is))&&(void 0===e.kind||yt.string(e.kind))&&(void 0!==e.edit||void 0!==e.command)&&(void 0===e.command||Zbe.is(e.command))&&(void 0===e.isPreferred||yt.boolean(e.isPreferred))&&(void 0===e.edit||s4e.is(e.edit))}function Ae(e,t){return e={range:e},yt.defined(t)&&(e.data=t),e}function Le(e){return yt.defined(e)&&$be.is(e.range)&&(yt.undefined(e.command)||Zbe.is(e.command))}function Re(e,t){return{tabSize:e,insertSpaces:t}}function Ie(e){return yt.defined(e)&&yt.uinteger(e.tabSize)&&yt.boolean(e.insertSpaces)}function Ne(e,t,r){return{range:e,target:t,data:r}}function De(e){return yt.defined(e)&&$be.is(e.range)&&(yt.undefined(e.target)||yt.string(e.target))}function Me(e,t){return{range:e,parent:t}}function Oe(e){return yt.objectLiteral(e)&&$be.is(e.range)&&(void 0===e.parent||n.is(e.parent))}function Be(e){return yt.objectLiteral(e)&&(void 0===e.resultId||"string"==typeof e.resultId)&&Array.isArray(e.data)&&(0===e.data.length||"number"==typeof e.data[0])}function Pe(e,t){return{range:e,text:t}}function $e(e){return null!=e&&$be.is(e.range)&&yt.string(e.text)}function Fe(e,t,r){return{range:e,variableName:t,caseSensitiveLookup:r}}function ze(e){return null!=e&&$be.is(e.range)&&yt.boolean(e.caseSensitiveLookup)&&(yt.string(e.variableName)||void 0===e.variableName)}function qe(e,t){return{range:e,expression:t}}function We(e){return null!=e&&$be.is(e.range)&&(yt.string(e.expression)||void 0===e.expression)}function Ue(e,t){return{frameId:e,stoppedLocation:t}}function Ge(e){return yt.defined(e)&&$be.is(e.stoppedLocation)}function je(e){return 1===e||2===e}function Ve(e){return{value:e}}function Ye(e){return yt.objectLiteral(e)&&(void 0===e.tooltip||yt.string(e.tooltip)||f4e.is(e.tooltip))&&(void 0===e.location||Fbe.is(e.location))&&(void 0===e.command||Zbe.is(e.command))}function He(e,t,r){return e={position:e,label:t},void 0!==r&&(e.kind=r),e}function Xe(e){return yt.objectLiteral(e)&&Pbe.is(e.position)&&(yt.string(e.label)||yt.typedArray(e.label,Z4e.is))&&(void 0===e.kind||K4e.is(e.kind))&&void 0===e.textEdits||yt.typedArray(e.textEdits,Qbe.is)&&(void 0===e.tooltip||yt.string(e.tooltip)||f4e.is(e.tooltip))&&(void 0===e.paddingLeft||yt.boolean(e.paddingLeft))&&(void 0===e.paddingRight||yt.boolean(e.paddingRight))}function Ke(e){return{kind:"snippet",value:e}}function Ze(e,t,r,i){return{insertText:e,filterText:t,range:r,command:i}}function Qe(e){return{items:e}}function Je(e,t){return{range:e,text:t}}function et(e,t){return{triggerKind:e,selectedCompletionInfo:t}}function tt(e){return yt.objectLiteral(e)&&Mbe.is(e.uri)&&yt.string(e.name)}function rt(e,t,r,i){return new l5e(e,t,r,i)}function it(e){return!!(yt.defined(e)&&yt.string(e.uri)&&(yt.undefined(e.languageId)||yt.string(e.languageId))&&yt.uinteger(e.lineCount)&&yt.func(e.getText)&&yt.func(e.positionAt)&&yt.func(e.offsetAt))}function nt(t,e){let r=t.getText(),i=M(e,(e,t)=>{var r=e.range.start.line-t.range.start.line;return 0==r?e.range.start.character-t.range.start.character:r}),n=r.length;for(let e=i.length-1;0<=e;e--){var a=i[e],s=t.offsetAt(a.range.start),o=t.offsetAt(a.range.end);if(!(o<=n))throw new Error("Overlapping edit");r=r.substring(0,s)+a.newText+r.substring(o,r.length),n=s}return r}function M(i,n){if(!(i.length<=1)){var a=i.length/2|0,s=i.slice(0,a),o=i.slice(a);M(s,n),M(o,n);let e=0,t=0,r=0;for(;e<s.length&&t<o.length;)n(s[e],o[t])<=0?i[r++]=s[e++]:i[r++]=o[t++];for(;e<s.length;)i[r++]=s[e++];for(;t<o.length;)i[r++]=o[t++]}return i}O=Dbe=Dbe||{},mt(e,"is"),O.is=e,O=Mbe=Mbe||{},mt(a,"is"),O.is=a,(t=Obe=Obe||{}).MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647,mt(s,"is"),t.is=s,(r=Bbe=Bbe||{}).MIN_VALUE=0,r.MAX_VALUE=2147483647,mt(o,"is"),r.is=o,O=Pbe=Pbe||{},mt(l,"create"),O.create=l,mt(h,"is"),O.is=h,O=$be=$be||{},mt(c,"create"),O.create=c,mt(u,"is"),O.is=u,O=Fbe=Fbe||{},mt(d,"create"),O.create=d,mt(p,"is"),O.is=p,O=zbe=zbe||{},mt(g,"create"),O.create=g,mt(f,"is"),O.is=f,O=qbe=qbe||{},mt(m,"create"),O.create=m,mt(y,"is"),O.is=y,O=Wbe=Wbe||{},mt(v,"create"),O.create=v,mt(x,"is"),O.is=x,O=Ube=Ube||{},mt(b,"create"),O.create=b,mt(T,"is"),O.is=T,(O=Gbe=Gbe||{}).Comment="comment",O.Imports="imports",O.Region="region",O=jbe=jbe||{},mt(k,"create"),O.create=k,mt(w,"is"),O.is=w,O=Vbe=Vbe||{},mt(C,"create"),O.create=C,mt(E,"is"),O.is=E,(O=Ybe=Ybe||{}).Error=1,O.Warning=2,O.Information=3,O.Hint=4,(O=Hbe=Hbe||{}).Unnecessary=1,O.Deprecated=2,O=Xbe=Xbe||{},mt(S,"is"),O.is=S,O=Kbe=Kbe||{},mt(_,"create"),O.create=_,mt(A,"is"),O.is=A,O=Zbe=Zbe||{},mt(L,"create"),O.create=L,mt(R,"is"),O.is=R,O=Qbe=Qbe||{},mt(I,"replace"),O.replace=I,mt(N,"insert"),O.insert=N,mt(D,"del"),O.del=D,mt(B,"is"),O.is=B,O=Jbe=Jbe||{},mt(P,"create"),O.create=P,mt($,"is"),O.is=$,O=e4e=e4e||{},mt(F,"is"),O.is=F,O=t4e=t4e||{},mt(z,"replace"),O.replace=z,mt(q,"insert"),O.insert=q,mt(W,"del"),O.del=W,mt(U,"is"),O.is=U,O=r4e=r4e||{},mt(G,"create"),O.create=G,mt(j,"is"),O.is=j,O=i4e=i4e||{},mt(V,"create"),O.create=V,mt(Y,"is"),O.is=Y,O=n4e=n4e||{},mt(H,"create"),O.create=H,mt(X,"is"),O.is=X,O=a4e=a4e||{},mt(K,"create"),O.create=K,mt(Z,"is"),O.is=Z,O=s4e=s4e||{},mt(Q,"is"),O.is=Q,o4e=class{static{mt(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let i,n;if(i=void 0===r?Qbe.insert(e,t):e4e.is(r)?(n=r,t4e.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(r),t4e.insert(e,t,n)),this.edits.push(i),void 0!==n)return n}replace(e,t,r){let i,n;if(i=void 0===r?Qbe.replace(e,t):e4e.is(r)?(n=r,t4e.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(r),t4e.replace(e,t,n)),this.edits.push(i),void 0!==n)return n}delete(e,t){let r,i;if(r=void 0===t?Qbe.del(e):e4e.is(t)?(i=t,t4e.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),t4e.del(e,i)),this.edits.push(r),void 0!==i)return i}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")}},l4e=class{static{mt(this,"ChangeAnnotations")}constructor(e){this._annotations=void 0===e?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(e4e.is(e)?r=e:(r=this.nextId(),t=e),void 0!==this._annotations[r])throw new Error(`Id ${r} is already in use.`);if(void 0===t)throw new Error("No annotation provided for id "+r);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},h4e=class{static{mt(this,"WorkspaceChange")}constructor(r){this._textEditChanges=Object.create(null),void 0!==r?(this._workspaceEdit=r).documentChanges?(this._changeAnnotations=new l4e(r.changeAnnotations),r.changeAnnotations=this._changeAnnotations.all(),r.documentChanges.forEach(e=>{var t;r4e.is(e)&&(t=new o4e(e.edits,this._changeAnnotations),this._textEditChanges[e.textDocument.uri]=t)})):r.changes&&Object.keys(r.changes).forEach(e=>{var t=new o4e(r.changes[e]);this._textEditChanges[e]=t}):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(r){if(d4e.is(r)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let e={uri:r.uri,version:r.version},t=this._textEditChanges[e.uri];return t||(this._workspaceEdit.documentChanges.push({textDocument:e,edits:i=[]}),t=new o4e(i,this._changeAnnotations),this._textEditChanges[e.uri]=t),t}{if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");let e=this._textEditChanges[r];var i;return e||(this._workspaceEdit.changes[r]=i=[],e=new o4e(i),this._textEditChanges[r]=e),e}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new l4e,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let i;Jbe.is(t)||e4e.is(t)?i=t:r=t;let n,a;if(n=void 0===i?i4e.create(e,r):(a=e4e.is(i)?i:this._changeAnnotations.manage(i),i4e.create(e,r,a)),this._workspaceEdit.documentChanges.push(n),void 0!==a)return a}renameFile(e,t,r,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let n;Jbe.is(r)||e4e.is(r)?n=r:i=r;let a,s;if(a=void 0===n?n4e.create(e,t,i):(s=e4e.is(n)?n:this._changeAnnotations.manage(n),n4e.create(e,t,i,s)),this._workspaceEdit.documentChanges.push(a),void 0!==s)return s}deleteFile(e,t,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let i;Jbe.is(t)||e4e.is(t)?i=t:r=t;let n,a;if(n=void 0===i?a4e.create(e,r):(a=e4e.is(i)?i:this._changeAnnotations.manage(i),a4e.create(e,r,a)),this._workspaceEdit.documentChanges.push(n),void 0!==a)return a}},O=c4e=c4e||{},mt(J,"create"),O.create=J,mt(ee,"is"),O.is=ee,O=u4e=u4e||{},mt(te,"create"),O.create=te,mt(re,"is"),O.is=re,O=d4e=d4e||{},mt(ie,"create"),O.create=ie,mt(ne,"is"),O.is=ne,O=p4e=p4e||{},mt(ae,"create"),O.create=ae,mt(se,"is"),O.is=se,(i=g4e=g4e||{}).PlainText="plaintext",i.Markdown="markdown",mt(oe,"is"),i.is=oe,O=f4e=f4e||{},mt(le,"is"),O.is=le,(O=m4e=m4e||{}).Text=1,O.Method=2,O.Function=3,O.Constructor=4,O.Field=5,O.Variable=6,O.Class=7,O.Interface=8,O.Module=9,O.Property=10,O.Unit=11,O.Value=12,O.Enum=13,O.Keyword=14,O.Snippet=15,O.Color=16,O.File=17,O.Reference=18,O.Folder=19,O.EnumMember=20,O.Constant=21,O.Struct=22,O.Event=23,O.Operator=24,O.TypeParameter=25,(O=y4e=y4e||{}).PlainText=1,O.Snippet=2,(v4e=v4e||{}).Deprecated=1,O=x4e=x4e||{},mt(he,"create"),O.create=he,mt(ce,"is"),O.is=ce,(O=b4e=b4e||{}).asIs=1,O.adjustIndentation=2,O=T4e=T4e||{},mt(ue,"is"),O.is=ue,O=k4e=k4e||{},mt(de,"create"),O.create=de,O=w4e=w4e||{},mt(pe,"create"),O.create=pe,O=C4e=C4e||{},mt(ge,"fromPlainText"),O.fromPlainText=ge,mt(fe,"is"),O.is=fe,O=E4e=E4e||{},mt(me,"is"),O.is=me,O=S4e=S4e||{},mt(ye,"create"),O.create=ye,O=_4e=_4e||{},mt(ve,"create"),O.create=ve,(O=A4e=A4e||{}).Text=1,O.Read=2,O.Write=3,O=L4e=L4e||{},mt(xe,"create"),O.create=xe,(O=R4e=R4e||{}).File=1,O.Module=2,O.Namespace=3,O.Package=4,O.Class=5,O.Method=6,O.Property=7,O.Field=8,O.Constructor=9,O.Enum=10,O.Interface=11,O.Function=12,O.Variable=13,O.Constant=14,O.String=15,O.Number=16,O.Boolean=17,O.Array=18,O.Object=19,O.Key=20,O.Null=21,O.EnumMember=22,O.Struct=23,O.Event=24,O.Operator=25,O.TypeParameter=26,(I4e=I4e||{}).Deprecated=1,O=N4e=N4e||{},mt(be,"create"),O.create=be,O=D4e=D4e||{},mt(Te,"create"),O.create=Te,O=M4e=M4e||{},mt(ke,"create"),O.create=ke,mt(we,"is"),O.is=we,(O=O4e=O4e||{}).Empty="",O.QuickFix="quickfix",O.Refactor="refactor",O.RefactorExtract="refactor.extract",O.RefactorInline="refactor.inline",O.RefactorRewrite="refactor.rewrite",O.Source="source",O.SourceOrganizeImports="source.organizeImports",O.SourceFixAll="source.fixAll",(O=B4e=B4e||{}).Invoked=1,O.Automatic=2,O=P4e=P4e||{},mt(Ce,"create"),O.create=Ce,mt(Ee,"is"),O.is=Ee,O=$4e=$4e||{},mt(Se,"create"),O.create=Se,mt(_e,"is"),O.is=_e,O=F4e=F4e||{},mt(Ae,"create"),O.create=Ae,mt(Le,"is"),O.is=Le,O=z4e=z4e||{},mt(Re,"create"),O.create=Re,mt(Ie,"is"),O.is=Ie,O=q4e=q4e||{},mt(Ne,"create"),O.create=Ne,mt(De,"is"),O.is=De,n=W4e=W4e||{},mt(Me,"create"),n.create=Me,mt(Oe,"is"),n.is=Oe,(O=U4e=U4e||{}).namespace="namespace",O.type="type",O.class="class",O.enum="enum",O.interface="interface",O.struct="struct",O.typeParameter="typeParameter",O.parameter="parameter",O.variable="variable",O.property="property",O.enumMember="enumMember",O.event="event",O.function="function",O.method="method",O.macro="macro",O.keyword="keyword",O.modifier="modifier",O.comment="comment",O.string="string",O.number="number",O.regexp="regexp",O.operator="operator",O.decorator="decorator",(O=G4e=G4e||{}).declaration="declaration",O.definition="definition",O.readonly="readonly",O.static="static",O.deprecated="deprecated",O.abstract="abstract",O.async="async",O.modification="modification",O.documentation="documentation",O.defaultLibrary="defaultLibrary",O=j4e=j4e||{},mt(Be,"is"),O.is=Be,O=V4e=V4e||{},mt(Pe,"create"),O.create=Pe,mt($e,"is"),O.is=$e,O=Y4e=Y4e||{},mt(Fe,"create"),O.create=Fe,mt(ze,"is"),O.is=ze,O=H4e=H4e||{},mt(qe,"create"),O.create=qe,mt(We,"is"),O.is=We,O=X4e=X4e||{},mt(Ue,"create"),O.create=Ue,mt(Ge,"is"),O.is=Ge,(O=K4e=K4e||{}).Type=1,O.Parameter=2,mt(je,"is"),O.is=je,O=Z4e=Z4e||{},mt(Ve,"create"),O.create=Ve,mt(Ye,"is"),O.is=Ye,O=Q4e=Q4e||{},mt(He,"create"),O.create=He,mt(Xe,"is"),O.is=Xe,O=J4e=J4e||{},mt(Ke,"createSnippet"),O.createSnippet=Ke,O=e5e=e5e||{},mt(Ze,"create"),O.create=Ze,O=t5e=t5e||{},mt(Qe,"create"),O.create=Qe,(O=r5e=r5e||{}).Invoked=0,O.Automatic=1,O=i5e=i5e||{},mt(Je,"create"),O.create=Je,O=n5e=n5e||{},mt(et,"create"),O.create=et,O=a5e=a5e||{},mt(tt,"is"),O.is=tt,s5e=[`
`,`\r
`,"\r"],O=o5e=o5e||{},mt(rt,"create"),O.create=rt,mt(it,"is"),O.is=it,mt(nt,"applyEdits"),O.applyEdits=nt,mt(M,"mergeSort"),l5e=class{static{mt(this,"FullTextDocument")}constructor(e,t,r,i){this._uri=e,this._languageId=t,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){var t;return e?(t=this.offsetAt(e.start),e=this.offsetAt(e.end),this._content.substring(t,e)):this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let t=[],r=this._content,i=!0;for(let e=0;e<r.length;e++){i&&(t.push(e),i=!1);var n=r.charAt(e);i="\r"===n||n===`
`,"\r"===n&&e+1<r.length&&r.charAt(e+1)===`
`&&e++}i&&0<r.length&&t.push(r.length),this._lineOffsets=t}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(0===i)return Pbe.create(0,e);for(;r<i;){var n=Math.floor((r+i)/2);t[n]>e?i=n:r=n+1}var a=r-1;return Pbe.create(a,e-t[a])}offsetAt(e){var t,r=this.getLineOffsets();return e.line>=r.length?this._content.length:e.line<0?0:(t=r[e.line],r=e.line+1<r.length?r[e.line+1]:this._content.length,Math.max(Math.min(t+e.character,r),t))}get lineCount(){return this.getLineOffsets().length}};{var O=yt=yt||{};let i=Object.prototype.toString;function at(e){return typeof e<"u"}function st(e){return"u"<typeof e}function ot(e){return!0===e||!1===e}function lt(e){return"[object String]"===i.call(e)}function ht(e){return"[object Number]"===i.call(e)}function ct(e,t,r){return"[object Number]"===i.call(e)&&t<=e&&e<=r}function ut(e){return"[object Number]"===i.call(e)&&-2147483648<=e&&e<=2147483647}function dt(e){return"[object Number]"===i.call(e)&&0<=e&&e<=2147483647}function pt(e){return"[object Function]"===i.call(e)}function gt(e){return null!==e&&"object"==typeof e}function ft(e,t){return Array.isArray(e)&&e.every(t)}mt(at,"defined"),O.defined=at,mt(st,"undefined"),O.undefined=st,mt(ot,"boolean"),O.boolean=ot,mt(lt,"string"),O.string=lt,mt(ht,"number"),O.number=ht,mt(ct,"numberRange"),O.numberRange=ct,mt(ut,"integer"),O.integer=ut,mt(dt,"uinteger"),O.uinteger=dt,mt(pt,"func"),O.func=pt,mt(gt,"objectLiteral"),O.objectLiteral=gt,mt(ft,"typedArray"),O.typedArray=ft}}),m5e=i(()=>{f5e(),Ige(),h5e=class{static{mt(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new g5e(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){var t=new d5e;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){return(e=new u5e(e.startOffset,e.image.length,pge(e),e.tokenType,!t)).grammarSource=t,e.root=this.rootNode,this.current.content.push(e),e}removeNode(e){var t=e.container;t&&0<=(e=t.content.indexOf(e))&&t.content.splice(e,1)}addHiddenNodes(e){var t,r=[];for(t of e){var i=new u5e(t.startOffset,t.image.length,pge(t),t.tokenType,!0);i.root=this.rootNode,r.push(i)}let n=this.current,a=!1;if(0<n.content.length)n.content.push(...r);else{for(;n.container;){var s=n.container.content.indexOf(n);if(0<s){n.container.content.splice(s,0,...r),a=!0;break}n=n.container}a||this.rootNode.content.unshift(...r)}}construct(e){var t=this.current;"string"!=typeof e.$type||e.$infix||(this.current.astNode=e),e.$cstNode=t,0===(e=this.nodeStack.pop())?.content.length&&this.removeNode(e)}},c5e=class{static{mt(this,"AbstractCstNode")}get hidden(){return!1}get astNode(){var e="string"==typeof this._astNode?.$type?this._astNode:this.container?.astNode;if(e)return e;throw new Error("This node has no associated AST element")}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}},u5e=class extends c5e{static{mt(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}},d5e=class extends c5e{static{mt(this,"CompositeCstNodeImpl")}constructor(){super(...arguments),this.content=new p5e(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){var e=this.firstNonHiddenNode,t=this.lastNonHiddenNode;return e&&t?(void 0===this._rangeCache&&(e=e.range,t=t.range,this._rangeCache={start:e.start,end:t.end.line<e.start.line?e.start:t.end}),this._rangeCache):{start:Pbe.create(0,0),end:Pbe.create(0,0)}}get firstNonHiddenNode(){for(var e of this.content)if(!e.hidden)return e;return this.content[0]}get lastNonHiddenNode(){for(let e=this.content.length-1;0<=e;e--){var t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}},p5e=class t extends Array{static{mt(this,"CstNodeContainer")}constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,t.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...r){return this.addParents(r),super.splice(e,t,...r)}addParents(e){for(var t of e)t.container=this.parent}},g5e=class extends d5e{static{mt(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??""}}});function y5e(e){return e.$type===v5e}var v5e,x5e,b5e,T5e,k5e,w5e,C5e,E5e,S5e,_5e,A5e=i(()=>{oge(),cxe(),Ibe(),oge(),e1e(),lpe(),m5e(),v5e=Symbol("Datatype"),mt(y5e,"isDataTypeNode"),x5e=mt(e=>e.endsWith("")?e:e+"","withRuleSuffix"),b5e=class{static{mt(this,"AbstractLangiumParser")}constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;var t=this.lexer.definition,r="production"===e.LanguageMetaData.mode;e.shared.profilers.LangiumProfiler?.isActive("parsing")?this.wrapper=new _5e(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new S5e(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()}},T5e=class extends b5e{static{mt(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new h5e,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;return Rpe(e)&&(i=e.name,this.registerPrecedenceMap(e)),t=this.wrapper.DEFINE_RULE(x5e(e.name),this.startImplementation(r,i,t).bind(this)),this.allRules.set(e.name,t),qpe(e)&&e.entry&&(this.mainRule=t),t}registerPrecedenceMap(t){var e=t.name,r=new Map;for(let e=0;e<t.operators.precedences.length;e++){var i,n=t.operators.precedences[e];for(i of n.operators)r.set(i.value,{precedence:e,rightAssoc:"right"===n.associativity})}this.operatorPrecedence.set(e,r)}computeRuleType(e){return Rpe(e)?zfe(e):e.fragment?void 0:Ofe(e)?v5e:zfe(e)}parse(e,t={}){this.nodeBuilder.buildRootNode(e);var e=this.lexerResult=this.lexer.tokenize(e),r=(this.wrapper.input=e.tokens,t.rule?this.allRules.get(t.rule):this.mainRule);if(r)return r=this.doParse(r),this.nodeBuilder.addHiddenNodes(e.hidden),this.unorderedGroups.clear(),Hde(r,{deep:!(this.lexerResult=void 0)}),{value:r,lexerErrors:e.errors,lexerReport:e.report,parserErrors:this.wrapper.errors};throw new Error(t.rule?`No rule found with name '${t.rule}'`:"No main rule available.")}doParse(e){if(e=this.wrapper.rule(e),void 0===(e=0<this.stack.length?this.construct():e))throw new Error("No result from parser");if(0<this.stack.length)throw new Error("Parser stack is not empty after parsing");return e}startImplementation(i,n,a){return e=>{var t,r=!this.isRecording()&&void 0!==i;return r&&(this.stack.push(t={$type:i}),i===v5e?t.value="":void 0!==n&&(t.$infixName=n)),a(e),r?this.construct():void 0}}extractHiddenTokens(e){var t=this.lexerResult.hidden;if(!t.length)return[];var r=e.startOffset;for(let e=0;e<t.length;e++)if(t[e].startOffset>r)return t.splice(0,e);return t.splice(0,t.length)}consume(t,r,i){if(t=this.wrapper.wrapConsume(t,r),!this.isRecording()&&this.isValidToken(t)){var r=this.extractHiddenTokens(t),r=(this.nodeBuilder.addHiddenNodes(r),this.nodeBuilder.buildLeafNode(t,i)),{assignment:e,crossRef:n}=this.getAssignment(i),a=this.current;if(e){var s=Mpe(i)?t.image:this.converter.convert(t.image,r);this.assign(e.operator,e.feature,s,r,n)}else if(y5e(a)){let e=t.image;Mpe(i)||(e=this.converter.convert(e,r).toString()),a.value+=e}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&"number"==typeof e.endOffset&&!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()||void 0!==(s=void 0!==s||r?s:this.construct())&&a&&0<a.length&&this.performSubruleAssignment(s,i,a)}}performSubruleAssignment(e,t,r){var{assignment:t,crossRef:i}=this.getAssignment(t);t?this.assign(t.operator,t.feature,e,r,i):y5e(t=this.current)?t.value+=e.toString():"object"==typeof e&&e&&(r=this.assignWithoutOverride(e,t),this.stack.pop(),this.stack.push(r))}action(t,r){if(!this.isRecording()){let e=this.current;r.feature&&r.operator?(e=this.construct(),this.nodeBuilder.removeNode(e.$cstNode),this.nodeBuilder.buildCompositeNode(r).content.push(e.$cstNode),this.stack.push({$type:t}),this.assign(r.operator,r.feature,e,e.$cstNode)):e.$type=t}}construct(){var e;if(!this.isRecording())return e=this.stack.pop(),this.nodeBuilder.construct(e),"$infixName"in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):y5e(e)?this.converter.convert(e.value,e.$cstNode):(ape(this.astReflection,e),e)}constructInfix(e,i){var n=e.parts;if(Array.isArray(n)&&0!==n.length){var a=e.operators;if(!Array.isArray(a)||n.length<2)return n[0];let t=0,r=-1;for(let e=0;e<a.length;e++){var s=a[e];(s=i.get(s)??{precedence:1/0,rightAssoc:!1}).precedence>r?(r=s.precedence,t=e):s.precedence!==r||s.rightAssoc||(t=e)}var o=a.slice(0,t),l=a.slice(t+1),h=n.slice(0,t+1),n=n.slice(t+1),h={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:h,operators:o},o={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:n,operators:l},n=this.constructInfix(h,i),l=this.constructInfix(o,i);return{$type:e.$type,$cstNode:e.$cstNode,left:n,operator:a[t],right:l}}}getAssignment(e){var t;return this.assignmentMap.has(e)||(t=Xde(e,vpe),this.assignmentMap.set(e,{assignment:t,crossRef:t&&wpe(t.terminal)?t.terminal.isMulti?"multi":"single":void 0})),this.assignmentMap.get(e)}assign(e,t,r,i,n){var a=this.current,s="single"===n&&"string"==typeof r?this.linker.buildReference(a,t,i,r):"multi"===n&&"string"==typeof r?this.linker.buildMultiReference(a,t,i,r):r;switch(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(var[r,i]of Object.entries(t)){var n=e[r];void 0===n?e[r]=i:Array.isArray(n)&&Array.isArray(i)&&(i.push(...n),e[r]=i)}return(t=e.$cstNode)&&(t.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},k5e=class{static{mt(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(e){return Oye.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return Oye.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return Oye.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return Oye.buildEarlyExitMessage(e)}},w5e=class extends k5e{static{mt(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}\`.`}},C5e=class extends b5e{static{mt(this,"LangiumCompletionParser")}constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){return this.resetState(),e=this.lexer.tokenize(e,{mode:"partial"}),this.tokens=e.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){return t=this.wrapper.DEFINE_RULE(x5e(e.name),this.startImplementation(t).bind(this)),this.allRules.set(e.name,t),e.entry&&(this.mainRule=t),t}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(r){return e=>{var t=this.keepStackSize();try{r(e)}finally{this.resetStackSize(t)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){var e=this.elementStack.length;return this.stackSize=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){this.isRecording()||0<=(e=this.elementStack.lastIndexOf(e))&&this.elementStack.splice(e)}get currIdx(){return this.wrapper.currIdx}},E5e={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new w5e},S5e=class extends nxe{static{mt(this,"ChevrotainWrapper")}constructor(e,t){var r=t&&"maxLookahead"in t;super(e,{...E5e,lookaheadStrategy:r?new rve({maxLookahead:t.maxLookahead}):new Lbe({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,{})}},_5e=class extends S5e{static{mt(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))}}}});function L5e(e,t,r){return R5e({parser:t,tokens:r,ruleNames:new Map},e),t}function R5e(e,t){let r=yfe(t,!1),i=zde(t.rules).filter(qpe).filter(e=>r.has(e));for(var n of i){var a={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(n,N5e(a,n.definition))}var s;for(s of zde(t.rules).filter(Rpe).filter(e=>r.has(e)))e.parser.rule(s,I5e(e,s))}function I5e(r,e){let t=e.call.rule.ref;if(!t)throw new Error("Could not resolve reference to infix operator rule: "+e.call.rule.$refText);if(Zpe(t))throw new Error("Cannot use terminal rule in infix expression");let i=e.operators.precedences.flatMap(e=>e.operators),n={$type:"Group",elements:[]},a={$container:n,$type:"Assignment",feature:"parts",operator:"+=",terminal:e.call},s={$container:n,$type:"Group",elements:[],cardinality:"*"},o=(n.elements.push(a,s),{$container:s,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:i}}),l={...a,$container:s},h=(s.elements.push(o,l),i.map(e=>r.tokens[e.value]).map((e,t)=>({ALT:mt(()=>r.parser.consume(t,e,o),"ALT")}))),c;return e=>{c=c??G5e(r,t),r.parser.subrule(0,c,!1,a,e),r.parser.many(0,{DEF:mt(()=>{r.parser.alternatives(0,h),r.parser.subrule(1,c,!1,l,e)},"DEF")})}}function N5e(t,r,e=!1){let i;if(Mpe(r))i=W5e(t,r);else if(gpe(r))i=D5e(t,r);else if(vpe(r))i=N5e(t,r.terminal);else if(wpe(r))i=q5e(t,r);else if(jpe(r))i=M5e(t,r);else if(fpe(r))i=P5e(t,r);else if(i0e(r))i=$5e(t,r);else if(Ape(r))i=F5e(t,r);else{if(!Epe(r))throw new Mge(r.$cstNode,"Unexpected element type: "+r.$type);{let e=t.consume++;i=mt(()=>t.parser.consume(e,Mye,r),"method")}}return U5e(t,e?void 0:z5e(r),i,r.cardinality)}function D5e(e,t){let r=zfe(t);return()=>e.parser.action(r,t)}function M5e(a,s){let o=s.rule.ref;if(upe(o)){let t=a.subrule++,r=qpe(o)&&o.fragment,i=0<s.arguments.length?O5e(o,s.arguments):()=>({}),n;return e=>{n=n??G5e(a,o),a.parser.subrule(t,n,r,s,i(e))}}if(Zpe(o)){let e=a.consume++,t=V5e(a,o.name);return()=>a.parser.consume(e,t,s)}if(!o)throw new Mge(s.$cstNode,"Undefined rule: "+s.rule.$refText);Nge(o)}function O5e(s,e){if(e.some(e=>e.calledByName)){let n=e.map(e=>({parameterName:e.parameter?.ref?.name,predicate:B5e(e.value)}));return e=>{var t,r,i={};for({parameterName:t,predicate:r}of n)t&&(i[t]=r(e));return i}}{let a=e.map(e=>B5e(e.value));return t=>{var r,i,n={};for(let e=0;e<a.length;e++)e<s.parameters.length&&(r=s.parameters[e].name,i=a[e],n[r]=i(t));return n}}}function B5e(i){if(Cpe(i)){let t=B5e(i.left),r=B5e(i.right);return e=>t(e)||r(e)}if(kpe(i)){let t=B5e(i.left),r=B5e(i.right);return e=>t(e)&&r(e)}if(Ppe(i)){let t=B5e(i.value);return e=>!t(e)}if(zpe(i)){let t=i.parameter.ref.name;return e=>void 0!==e&&!0===e[t]}if(xpe(i)){let e=!!i.true;return()=>e}Nge()}function P5e(r,i){if(1===i.elements.length)return N5e(r,i.elements[0]);{let e=[];for(var n of i.elements){var a={ALT:N5e(r,n,!0)};(n=z5e(n))&&(a.GATE=B5e(n)),e.push(a)}let t=r.or++;return i=>r.parser.alternatives(t,e.map(e=>{let t={ALT:mt(()=>e.ALT(i),"ALT")},r=e.GATE;return r&&(t.GATE=()=>r(i)),t}))}}function $5e(s,e){if(1===e.elements.length)return N5e(s,e.elements[0]);let t=[];for(var r of e.elements){var i={ALT:N5e(s,r,!0)};(r=z5e(r))&&(i.GATE=B5e(r)),t.push(i)}let o=s.or++,l=mt((e,t)=>`uGroup_${e}_`+t.getRuleStack().join("-"),"idFunc"),n=mt(a=>s.parser.alternatives(o,t.map((t,r)=>{let e={ALT:mt(()=>!0,"ALT")},i=s.parser,n=(e.ALT=()=>{var e;t.ALT(a),i.isRecording()||(e=l(o,i),i.unorderedGroups.get(e)||i.unorderedGroups.set(e,[]),"u"<typeof(e=i.unorderedGroups.get(e))?.[r]&&(e[r]=!0))},t.GATE);return n?e.GATE=()=>n(a):e.GATE=()=>!i.unorderedGroups.get(l(o,i))?.[r],e})),"alternatives"),a=U5e(s,z5e(e),n,"*");return e=>{a(e),s.parser.isRecording()||s.parser.unorderedGroups.delete(l(o,s.parser))}}function F5e(t,e){let r=e.elements.map(e=>N5e(t,e));return t=>r.forEach(e=>e(t))}function z5e(e){if(Ape(e))return e.guardCondition}function q5e(n,a,s=a.terminal){if(s){if(jpe(s)&&qpe(s.rule.ref)){let t=s.rule.ref,r=n.subrule++,i;return e=>{i=i??G5e(n,t),n.parser.subrule(r,i,!1,a,e)}}if(jpe(s)&&Zpe(s.rule.ref)){let e=n.consume++,t=V5e(n,s.rule.ref.name);return()=>n.parser.consume(e,t,a)}if(Mpe(s)){let e=n.consume++,t=V5e(n,s.value);return()=>n.parser.consume(e,t,a)}throw new Error("Could not build cross reference parser")}if(!a.type.ref)throw new Error("Could not resolve reference to type: "+a.type.$refText);if(s=Lfe(a.type.ref)?.terminal)return q5e(n,a,s);throw new Error("Could not find name assignment for type: "+zfe(a.type.ref))}function W5e(e,t){let r=e.consume++,i=e.tokens[t.value];if(i)return()=>e.parser.consume(r,i,t);throw new Error("Could not find token for keyword: "+t.value)}function U5e(i,e,n,t){let a=e&&B5e(e);if(!t){if(a){let t=i.or++;return e=>i.parser.alternatives(t,[{ALT:mt(()=>n(e),"ALT"),GATE:mt(()=>a(e),"GATE")},{ALT:Qve(),GATE:mt(()=>!a(e),"GATE")}])}return n}if("*"===t){let t=i.many++;return e=>i.parser.many(t,{DEF:mt(()=>n(e),"DEF"),GATE:a?()=>a(e):void 0})}if("+"===t){let r=i.many++;if(a){let t=i.or++;return e=>i.parser.alternatives(t,[{ALT:mt(()=>i.parser.atLeastOne(r,{DEF:mt(()=>n(e),"DEF")}),"ALT"),GATE:mt(()=>a(e),"GATE")},{ALT:Qve(),GATE:mt(()=>!a(e),"GATE")}])}return e=>i.parser.atLeastOne(r,{DEF:mt(()=>n(e),"DEF")})}if("?"===t){let t=i.optional++;return e=>i.parser.optional(t,{DEF:mt(()=>n(e),"DEF"),GATE:a?()=>a(e):void 0})}Nge()}function G5e(e,t){if(t=j5e(e,t),e=e.parser.getRule(t))return e;throw new Error(`Rule "${t}" not found."`)}function j5e(i,n){if(upe(n))return n.name;if(i.ruleNames.has(n))return i.ruleNames.get(n);{let e=n,t=e.$container,r=n.$type;for(;!qpe(t);)(Ape(t)||fpe(t)||i0e(t))&&(r=t.elements.indexOf(e).toString()+":"+r),t=(e=t).$container;return r=t.name+":"+r,i.ruleNames.set(n,r),r}}function V5e(e,t){if(e=e.tokens[t])return e;throw new Error(`Token "${t}" not found."`)}var Y5e=i(()=>{cxe(),oge(),Oge(),Vde(),e1e(),mt(L5e,"createParser"),mt(R5e,"buildRules"),mt(I5e,"buildInfixRule"),mt(N5e,"buildElement"),mt(D5e,"buildAction"),mt(M5e,"buildRuleCall"),mt(O5e,"buildRuleCallPredicate"),mt(B5e,"buildPredicate"),mt(P5e,"buildAlternatives"),mt($5e,"buildUnorderedGroup"),mt(F5e,"buildGroup"),mt(z5e,"getGuardCondition"),mt(q5e,"buildCrossReference"),mt(W5e,"buildKeyword"),mt(U5e,"wrap"),mt(G5e,"getRule"),mt(j5e,"getRuleName"),mt(V5e,"getToken")});function H5e(e){var t=e.Grammar,r=e.parser.Lexer;return L5e(t,e=new C5e(e),r.definition),e.finalize(),e}var X5e=i(()=>{A5e(),Y5e(),mt(H5e,"createCompletionParser")});function K5e(e){return(e=Z5e(e)).finalize(),e}function Z5e(e){var t=e.Grammar,r=e.parser.Lexer;return L5e(t,new T5e(e),r.definition)}var Q5e,J5e,e3e,t3e=i(()=>{A5e(),Y5e(),mt(K5e,"createLangiumParser"),mt(Z5e,"prepareLangiumParser")}),r3e=i(()=>{cxe(),oge(),lpe(),e1e(),pfe(),Vde(),Q5e=class{static{mt(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(e,t){var e=zde(yfe(e,!1)),r=this.buildTerminalTokens(e);return(e=this.buildKeywordTokens(e,r,t)).push(...r),e}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){var e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(Zpe).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){var t=Gfe(e),r=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,i={name:e.name,PATTERN:r};return"function"==typeof r&&(i.LINE_BREAKS=!0),e.hidden&&(i.GROUP=nfe(t)?fye.SKIPPED:"hidden"),i}requiresCustomPattern(e){return!(!e.flags.includes("u")&&!e.flags.includes("s"))}regexPatternFunction(e){let r=new RegExp(e,e.flags+"y");return(e,t)=>(r.lastIndex=t,r.exec(e))}buildKeywordTokens(e,t,r){return e.filter(upe).flatMap(e=>tpe(e).filter(Mpe)).distinct(e=>e.value).toArray().sort((e,t)=>t.value.length-e.value.length).map(e=>this.buildKeywordToken(e,t,!!r?.caseInsensitive))}buildKeywordToken(e,t,r){return r=this.buildKeywordPattern(e,r),e={name:e.value,PATTERN:r,LONGER_ALT:this.findLongerAlt(e,t)},"function"==typeof r&&(e.LINE_BREAKS=!0),e}buildKeywordPattern(e,t){return t?new RegExp(afe(e.value),"i"):e.value}findLongerAlt(i,e){return e.reduce((e,t)=>{var r=t?.PATTERN;return r?.source&&sfe("^"+r.source+"$",i.value)&&e.push(t),e},[])}}}),i3e=i(()=>{function e(t){let r="";for(let e=1;e<t.length-1;e++){var i,n=t.charAt(e);"\\"===n?(i=t.charAt(++e),r+=a(i)):r+=n}return r}function a(e){switch(e){case"b":return"\b";case"f":return"\f";case"n":return`
`;case"r":return"\r";case"t":return"\t";case"v":return"\v";case"0":return"\0";default:return e}}function t(e){return"^"===e.charAt(0)?e.substring(1):e}function r(e){return parseInt(e)}function i(e){return BigInt(e)}function n(e){return new Date(e)}function s(e){return Number(e)}function o(e){return"true"===e.toLowerCase()}var l;oge(),e1e(),J5e=class{static{mt(this,"DefaultValueConverter")}convert(e,t){var r=t.grammarSource;if(jpe(r=wpe(r)?bfe(r):r)){if(r=r.rule.ref)return this.runConverter(r,e,t);throw new Error("This cst node was not parsed by a rule.")}return e}runConverter(e,t,r){switch(e.name.toUpperCase()){case"INT":return e3e.convertInt(t);case"STRING":return e3e.convertString(t);case"ID":return e3e.convertID(t)}switch(Ufe(e)?.toLowerCase()){case"number":return e3e.convertNumber(t);case"boolean":return e3e.convertBoolean(t);case"bigint":return e3e.convertBigint(t);case"date":return e3e.convertDate(t);default:return t}}},l=e3e=e3e||{},mt(e,"convertString"),l.convertString=e,mt(a,"convertEscapeCharacter"),mt(t,"convertID"),l.convertID=t,mt(r,"convertInt"),l.convertInt=r,mt(i,"convertBigint"),l.convertBigint=i,mt(n,"convertDate"),l.convertDate=n,mt(s,"convertNumber"),l.convertNumber=s,mt(o,"convertBoolean"),l.convertBoolean=o}),n3e=tYe(e=>{var t,r;function i(){if(void 0===t)throw new Error("No runtime abstraction layer installed");return t}function n(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");t=e}Object.defineProperty(e,"__esModule",{value:!0}),mt(i,"RAL"),r=i,mt(n,"install"),r.install=n,e.default=i}),a3e=tYe(e=>{function t(e){return!0===e||!1===e}function r(e){return"string"==typeof e||e instanceof String}function i(e){return"number"==typeof e||e instanceof Number}function n(e){return e instanceof Error}function a(e){return"function"==typeof e}function s(e){return Array.isArray(e)}function o(e){return s(e)&&e.every(e=>r(e))}Object.defineProperty(e,"__esModule",{value:!0}),e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0,mt(t,"boolean"),e.boolean=t,mt(r,"string"),e.string=r,mt(i,"number"),e.number=i,mt(n,"error"),e.error=n,mt(a,"func"),e.func=a,mt(s,"array"),e.array=s,mt(o,"stringArray"),e.stringArray=o}),s3e=tYe(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;var s=n3e();{var r=t.Event={};let e={dispose(){}};r.None=function(){return e}}var n=class{static{mt(this,"CallbackList")}add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:mt(()=>this.remove(e,t),"dispose")})}remove(i,n=null){if(this._callbacks){let r=!1;for(let e=0,t=this._callbacks.length;e<t;e++)if(this._callbacks[e]===i){if(this._contexts[e]===n)return this._callbacks.splice(e,1),void this._contexts.splice(e,1);r=!0}if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}}invoke(...r){if(!this._callbacks)return[];var i=[],n=this._callbacks.slice(0),a=this._contexts.slice(0);for(let e=0,t=n.length;e<t;e++)try{i.push(n[e].apply(a[e],r))}catch(e){(0,s.default)().console.error(e)}return i}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}},r=class a{static{mt(this,"Emitter")}constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let i={dispose:mt(()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=a._noop,this._options)&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this)},"dispose")};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};(t.Emitter=r)._noop=function(){}}),o3e=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var t,r,i=n3e(),n=a3e(),a=s3e();function s(e){return e&&(e===r.None||e===r.Cancelled||n.boolean(e.isCancellationRequested)&&!!e.onCancellationRequested)}(r=t||(e.CancellationToken=t={})).None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:a.Event.None}),r.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:a.Event.None}),mt(s,"is"),r.is=s;var o=Object.freeze(function(e,t){let r=(0,i.default)().timer.setTimeout(e.bind(t),0);return{dispose(){r.dispose()}}}),l=class{static{mt(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?o:(this._emitter||(this._emitter=new a.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},h=class{static{mt(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new l),this._token}cancel(){this._token?this._token.cancel():this._token=t.Cancelled}dispose(){this._token?this._token instanceof l&&this._token.dispose():this._token=t.None}};e.CancellationTokenSource=h}),l3e={},h3e=i(()=>{W(l3e,U(o3e(),1))});function c3e(){return new Promise(e=>{"u"<typeof setImmediate?setTimeout(e,0):setImmediate(e)})}function u3e(){return f3e=performance.now(),new l3e.CancellationTokenSource}function d3e(e){m3e=e}function p3e(e){return e===y3e}async function g3e(e){if(e!==l3e.CancellationToken.None){var t=performance.now();if(m3e<=t-f3e&&(f3e=t,await c3e(),f3e=performance.now()),e.isCancellationRequested)throw y3e}}var f3e,m3e,y3e,v3e,x3e=i(()=>{h3e(),mt(c3e,"delayNextTick"),f3e=0,m3e=10,mt(u3e,"startCancelableOperation"),mt(d3e,"setInterruptionPeriod"),y3e=Symbol("OperationCancelled"),mt(p3e,"isOperationCancelled"),mt(g3e,"interruptAndCheck"),v3e=class{static{mt(this,"Deferred")}constructor(){this.promise=new Promise((t,r)=>{this.resolve=e=>(t(e),this),this.reject=e=>(r(e),this)})}}});function b3e(i,n){if(!(i.length<=1)){var a=i.length/2|0,s=i.slice(0,a),o=i.slice(a);b3e(s,n),b3e(o,n);let e=0,t=0,r=0;for(;e<s.length&&t<o.length;)n(s[e],o[t])<=0?i[r++]=s[e++]:i[r++]=o[t++];for(;e<s.length;)i[r++]=s[e++];for(;t<o.length;)i[r++]=o[t++]}return i}function T3e(t,e,r=0){var i=e?[r]:[];for(let e=0;e<t.length;e++){var n=t.charCodeAt(e);k3e(n)&&(13===n&&e+1<t.length&&10===t.charCodeAt(e+1)&&e++,i.push(r+e+1))}return i}function k3e(e){return 13===e||10===e}function w3e(e){var t=e.start,r=e.end;return t.line>r.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function C3e(e){var t=w3e(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var E3e,S3e,_3e,A3e,L3e,R3e,I3e,N3e,D3e,M3e,O3e,B3e,P3e=i(()=>{function e(e,t,r,i){return new E3e(e,t,r,i)}function t(e,t,r){if(e instanceof E3e)return e.update(t,r),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")}function r(e,t){let r=e.getText(),i=b3e(t.map(C3e),(e,t)=>{var r=e.range.start.line-t.range.start.line;return 0==r?e.range.start.character-t.range.start.character:r}),n=0,a=[];for(var s of i){var o=e.offsetAt(s.range.start);if(o<n)throw new Error("Overlapping edit");o>n&&a.push(r.substring(n,o)),s.newText.length&&a.push(s.newText),n=e.offsetAt(s.range.end)}return a.push(r.substr(n)),a.join("")}var i;E3e=class n{static{mt(this,"FullTextDocument")}constructor(e,t,r,i){this._uri=e,this._languageId=t,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){var t;return e?(t=this.offsetAt(e.start),e=this.offsetAt(e.end),this._content.substring(t,e)):this._content}update(e,t){for(var a of e)if(n.isIncremental(a)){var s=w3e(a.range),o=this.offsetAt(s.start),l=this.offsetAt(s.end);this._content=this._content.substring(0,o)+a.text+this._content.substring(l,this._content.length);let r=Math.max(s.start.line,0),e=Math.max(s.end.line,0),i=this._lineOffsets,n=T3e(a.text,!1,o);if(e-r===n.length)for(let e=0,t=n.length;e<t;e++)i[e+r+1]=n[e];else n.length<1e4?i.splice(r+1,e-r,...n):this._lineOffsets=i=i.slice(0,r+1).concat(n,i.slice(e+1));var h=a.text.length-(l-o);if(0!=h)for(let e=r+1+n.length,t=i.length;e<t;e++)i[e]=i[e]+h}else{if(!n.isFull(a))throw new Error("Unknown change event received");this._content=a.text,this._lineOffsets=void 0}this._version=t}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=T3e(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,i=t.length;if(0===i)return{line:0,character:e};for(;r<i;){var n=Math.floor((r+i)/2);t[n]>e?i=n:r=n+1}var a=r-1;return{line:a,character:(e=this.ensureBeforeEOL(e,t[a]))-t[a]}}offsetAt(e){var t,r=this.getLineOffsets();return e.line>=r.length?this._content.length:e.line<0?0:(t=r[e.line],e.character<=0?t:(r=e.line+1<r.length?r[e.line+1]:this._content.length,e=Math.min(t+e.character,r),this.ensureBeforeEOL(e,t)))}ensureBeforeEOL(e,t){for(;t<e&&k3e(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){return null!=e&&"string"==typeof e.text&&void 0!==e.range&&(void 0===e.rangeLength||"number"==typeof e.rangeLength)}static isFull(e){return null!=e&&"string"==typeof e.text&&void 0===e.range&&void 0===e.rangeLength}},i=S3e=S3e||{},mt(e,"create"),i.create=e,mt(t,"update"),i.update=t,mt(r,"applyEdits"),i.applyEdits=r,mt(b3e,"mergeSort"),mt(T3e,"computeLineOffsets"),mt(k3e,"isEOL"),mt(w3e,"getWellformedRange"),mt(C3e,"getWellformedEdit")}),$3e=i(()=>{{var u,d,p={975:e=>{function d(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function a(e,t){for(var r,i="",n=0,a=-1,s=0,o=0;o<=e.length;++o){if(o<e.length)r=e.charCodeAt(o);else{if(47===r)break;r=47}if(47===r){if(a!==o-1&&1!==s)if(a!==o-1&&2===s){if(i.length<2||2!==n||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(2<i.length){var l=i.lastIndexOf("/");if(l!==i.length-1){n=-1===l?(i="",0):(i=i.slice(0,l)).length-1-i.lastIndexOf("/"),a=o,s=0;continue}}else if(2===i.length||1===i.length){i="",a=o,s=n=0;continue}t&&(0<i.length?i+="/..":i="..",n=2)}else 0<i.length?i+="/"+e.slice(a+1,o):i=e.slice(a+1,o),n=o-a-1;a=o,s=0}else 46===r&&-1!==s?++s:s=-1}return i}mt(d,"e"),mt(a,"r");var p={resolve:mt(function(){for(var e,t="",r=!1,i=arguments.length-1;-1<=i&&!r;i--){var n=0<=i?arguments[i]:e=void 0===e?process.cwd():e;d(n),0!==n.length&&(t=n+"/"+t,r=47===n.charCodeAt(0))}return t=a(t,!r),r?0<t.length?"/"+t:"/":0<t.length?t:"."},"resolve"),normalize:mt(function(e){var t,r;return d(e),0===e.length?".":(t=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1),0<(e=0!==(e=a(e,!t)).length||t?e:".").length&&r&&(e+="/"),t?"/"+e:e)},"normalize"),isAbsolute:mt(function(e){return d(e),0<e.length&&47===e.charCodeAt(0)},"isAbsolute"),join:mt(function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var r=arguments[t];d(r),0<r.length&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":p.normalize(e)},"join"),relative:mt(function(e,t){if(d(e),d(t),e===t||(e=p.resolve(e))===(t=p.resolve(t)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var i=e.length,n=i-r,a=1;a<t.length&&47===t.charCodeAt(a);++a);for(var s=t.length-a,o=n<s?n:s,l=-1,h=0;h<=o;++h){if(h===o){if(o<s){if(47===t.charCodeAt(a+h))return t.slice(a+h+1);if(0===h)return t.slice(a+h)}else o<n&&(47===e.charCodeAt(r+h)?l=h:0===h&&(l=0));break}var c=e.charCodeAt(r+h);if(c!==t.charCodeAt(a+h))break;47===c&&(l=h)}for(var u="",h=r+l+1;h<=i;++h)h!==i&&47!==e.charCodeAt(h)||(0===u.length?u+="..":u+="/..");return 0<u.length?u+t.slice(a+l):(47===t.charCodeAt(a+=l)&&++a,t.slice(a))},"relative"),_makeLong:mt(function(e){return e},"_makeLong"),dirname:mt(function(e){if(d(e),0===e.length)return".";for(var t=47===e.charCodeAt(0),r=-1,i=!0,n=e.length-1;1<=n;--n)if(47===e.charCodeAt(n)){if(!i){r=n;break}}else i=!1;return-1===r?t?"/":".":t&&1===r?"//":e.slice(0,r)},"dirname"),basename:mt(function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');d(e);var r=0,i=-1,n=!0;if(void 0!==t&&0<t.length&&t.length<=e.length){if(t.length===e.length&&t===e)return"";for(var a=t.length-1,s=-1,o=e.length-1;0<=o;--o){var l=e.charCodeAt(o);if(47===l){if(!n){r=o+1;break}}else-1===s&&(n=!1,s=o+1),0<=a&&(l===t.charCodeAt(a)?-1==--a&&(i=o):(a=-1,i=s))}return r===i?i=s:-1===i&&(i=e.length),e.slice(r,i)}for(o=e.length-1;0<=o;--o)if(47===e.charCodeAt(o)){if(!n){r=o+1;break}}else-1===i&&(n=!1,i=o+1);return-1===i?"":e.slice(r,i)},"basename"),extname:mt(function(e){d(e);for(var t=-1,r=0,i=-1,n=!0,a=0,s=e.length-1;0<=s;--s){var o=e.charCodeAt(s);if(47!==o)-1===i&&(n=!1,i=s+1),46===o?-1===t?t=s:1!==a&&(a=1):-1!==t&&(a=-1);else if(!n){r=s+1;break}}return-1===t||-1===i||0===a||1===a&&t===i-1&&t===r+1?"":e.slice(t,i)},"extname"),format:mt(function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return t=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||""),t?t===e.root?t+r:t+"/"+r:r;var t,r},"format"),parse:mt(function(e){d(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0!==e.length){for(var r,i=47===e.charCodeAt(0),n=i?(t.root="/",1):0,a=-1,s=0,o=-1,l=!0,h=e.length-1,c=0;n<=h;--h)if(47!==(r=e.charCodeAt(h)))-1===o&&(l=!1,o=h+1),46===r?-1===a?a=h:1!==c&&(c=1):-1!==a&&(c=-1);else if(!l){s=h+1;break}-1===a||-1===o||0===c||1===c&&a===o-1&&a===s+1?-1!==o&&(t.base=t.name=0===s&&i?e.slice(1,o):e.slice(s,o)):(0===s&&i?(t.name=e.slice(1,a),t.base=e.slice(1,o)):(t.name=e.slice(s,a),t.base=e.slice(s,o)),t.ext=e.slice(a,o)),0<s?t.dir=e.slice(0,s-1):i&&(t.dir="/")}return t},"parse"),sep:"/",delimiter:":",win32:null,posix:null};p.posix=p,e.exports=p}},g={};function f(e){var t=g[e];return void 0===t&&(t=g[e]={exports:{}},p[e](t,t.exports,f)),t.exports}mt(f,"r"),f.d=(e,t)=>{for(var r in t)f.o(t,r)&&!f.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);let e={},i,r=((f.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e),f.d(e,{URI:mt(()=>w,"URI"),Utils:mt(()=>u,"Utils")}),"object"==typeof process?i="win32"===process.platform:"object"==typeof navigator&&(i=0<=navigator.userAgent.indexOf("Windows")),/^\w[\w\d+.-]*$/),n=/^\//,a=/^\/\//;function m(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!r.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!n.test(e.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(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}mt(m,"a");let s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class w{static{mt(this,"l")}static isUri(e){return e instanceof w||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,r,i,n,a=!1){"object"==typeof e?(this.scheme=e.scheme||"",this.authority=e.authority||"",this.path=e.path||"",this.query=e.query||"",this.fragment=e.fragment||""):(this.scheme=e||a?e:"file",this.authority=t||"",this.path=((e,t)=>{switch(e){case"https":case"http":case"file":t?"/"!==t[0]&&(t="/"+t):t="/"}return t})(this.scheme,r||""),this.query=i||"",this.fragment=n||"",m(this,a))}get fsPath(){return x(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:r,path:i,query:n,fragment:a}=e;return void 0===t?t=this.scheme:null===t&&(t=""),void 0===r?r=this.authority:null===r&&(r=""),void 0===i?i=this.path:null===i&&(i=""),void 0===n?n=this.query:null===n&&(n=""),void 0===a?a=this.fragment:null===a&&(a=""),t===this.scheme&&r===this.authority&&i===this.path&&n===this.query&&a===this.fragment?this:new C(t,r,i,n,a)}static parse(e,t=!1){return(e=s.exec(e))?new C(e[2]||"",k(e[4]||""),k(e[5]||""),k(e[7]||""),k(e[9]||""),t):new C("","","","","")}static file(e){let t="",r;return"/"===(e=i?e.replace(/\\/g,"/"):e)[0]&&"/"===e[1]&&(e=-1===(r=e.indexOf("/",2))?(t=e.substring(2),"/"):(t=e.substring(2,r),e.substring(r)||"/")),new C("file",t,e,"","")}static from(e){return m(e=new C(e.scheme,e.authority,e.path,e.query,e.fragment),!0),e}toString(e=!1){return b(this,e)}toJSON(){return this}static revive(e){var t;return e&&(e instanceof w?e:((t=new C(e))._formatted=e.external,t._fsPath=e._sep===o?e.fsPath:null,t))}}let o=i?1:void 0;class C extends w{static{mt(this,"d")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=x(this,!1)),this._fsPath}toString(e=!1){return e?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=o),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}let l={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 y(t,r,i){let n,a=-1;for(let e=0;e<t.length;e++){var s=t.charCodeAt(e);97<=s&&s<=122||65<=s&&s<=90||48<=s&&s<=57||45===s||46===s||95===s||126===s||r&&47===s||i&&91===s||i&&93===s||i&&58===s?(-1!==a&&(n+=encodeURIComponent(t.substring(a,e)),a=-1),void 0!==n&&(n+=t.charAt(e))):(void 0===n&&(n=t.substr(0,e)),void 0!==(s=l[s])?(-1!==a&&(n+=encodeURIComponent(t.substring(a,e)),a=-1),n+=s):-1===a&&(a=e))}return-1!==a&&(n+=encodeURIComponent(t.substring(a))),void 0!==n?n:t}function v(t){let r;for(let e=0;e<t.length;e++){var i=t.charCodeAt(e);35===i||63===i?(void 0===r&&(r=t.substr(0,e)),r+=l[i]):void 0!==r&&(r+=t[e])}return void 0!==r?r:t}function x(e,t){let r;return r=e.authority&&1<e.path.length&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(65<=e.path.charCodeAt(1)&&e.path.charCodeAt(1)<=90||97<=e.path.charCodeAt(1)&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,r=i?r.replace(/\//g,"\\"):r}function b(t,e){let r=e?v:y,i="",{scheme:n,authority:a,path:s,query:o,fragment:l}=t;if(n&&(i=i+n+":"),!a&&"file"!==n||(i+="//"),a){let e=a.indexOf("@");-1!==e&&(t=a.substr(0,e),a=a.substr(e+1),-1===(e=t.lastIndexOf(":"))?i+=r(t,!1,!1):i=(i=i+r(t.substr(0,e),!1,!1)+":")+r(t.substr(e+1),!1,!0),i+="@"),a=a.toLowerCase(),-1===(e=a.lastIndexOf(":"))?i+=r(a,!1,!0):i=(i+=r(a.substr(0,e),!1,!0))+a.substr(e)}return s&&(3<=s.length&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)?65<=(t=s.charCodeAt(1))&&t<=90&&(s=`/${String.fromCharCode(t+32)}:`+s.substr(3)):2<=s.length&&58===s.charCodeAt(1)&&65<=(t=s.charCodeAt(0))&&t<=90&&(s=String.fromCharCode(t+32)+":"+s.substr(2)),i+=r(s,!0,!1)),o&&(i=(i+="?")+r(o,!1,!1)),i=l?(i+="#")+(e?l:y(l,!1,!1)):i}function T(e){try{return decodeURIComponent(e)}catch{return 3<e.length?e.substr(0,3)+T(e.substr(3)):e}}mt(y,"m"),mt(v,"y"),mt(x,"v"),mt(b,"b"),mt(T,"C");let t=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function k(e){return e.match(t)?e.replace(t,e=>T(e)):e}mt(k,"w");let h=f(975),c=h.posix||h;(d=u=u||{}).joinPath=function(e,...t){return e.with({path:c.join(e.path,...t)})},d.resolvePath=function(e,...t){let r=e.path,i=!1,n=("/"!==r[0]&&(r="/"+r,i=!0),c.resolve(r,...t));return i&&"/"===n[0]&&!e.authority&&(n=n.substring(1)),e.with({path:n})},d.dirname=function(e){if(0===e.path.length||"/"===e.path)return e;let t=c.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},d.basename=function(e){return c.basename(e.path)},d.extname=function(e){return c.extname(e.path)},_3e=e}({URI:A3e,Utils:L3e}=_3e)}),F3e=i(()=>{$3e();{var e=R3e=R3e||{};e.basename=L3e.basename,e.dirname=L3e.dirname,e.extname=L3e.extname,e.joinPath=L3e.joinPath,e.resolvePath=L3e.resolvePath;let a="object"==typeof process&&"win32"===process?.platform;function t(e,t){return e?.toString()===t?.toString()}function r(e,t){var e=("string"==typeof e?A3e.parse(e):e).path,t=("string"==typeof t?A3e.parse(t):t).path,r=e.split("/").filter(e=>0<e.length),i=t.split("/").filter(e=>0<e.length);if(a&&(e=/^[A-Z]:$/,r[0]&&e.test(r[0])&&(r[0]=r[0].toLowerCase()),i[0]&&e.test(i[0])&&(i[0]=i[0].toLowerCase()),r[0]!==i[0]))return t.substring(1);let n=0;for(;n<r.length&&r[n]===i[n];n++);return"../".repeat(r.length-n)+i.slice(n).join("/")}function i(e){return A3e.parse(e.toString()).toString()}function n(e,t){let r="string"==typeof e?e:e.path,i="string"==typeof t?t:t.path;return"/"===i.charAt(i.length-1)&&(i=i.slice(0,-1)),"/"===r.charAt(r.length-1)&&(r=r.slice(0,-1)),i===r||!(i.length<r.length||"/"!==i.charAt(r.length))&&i.startsWith(r)}mt(t,"equals"),e.equals=t,mt(r,"relative"),e.relative=r,mt(i,"normalize"),e.normalize=i,mt(n,"contains"),e.contains=n}I3e=class{static{mt(this,"UriTrie")}constructor(){this.root={name:"",children:new Map}}normalizeUri(e){return R3e.normalize(e)}clear(){this.root.children.clear()}insert(e,t){this.getNode(this.normalizeUri(e),!0).element=t}delete(e){(e=this.getNode(this.normalizeUri(e),!1))?.parent&&e.parent.children.delete(e.name)}has(e){return void 0!==this.getNode(this.normalizeUri(e),!1)?.element}hasNode(e){return void 0!==this.getNode(this.normalizeUri(e),!1)}find(e){return this.getNode(this.normalizeUri(e),!1)?.element}findNode(e){var e=this.normalizeUri(e),t=this.getNode(e,!1);if(t)return{name:t.name,uri:R3e.joinPath(A3e.parse(e),t.name).toString(),element:t.element}}findChildren(e){let t=this.normalizeUri(e),r=this.getNode(t,!1);return r?Array.from(r.children.values()).map(e=>({name:e.name,uri:R3e.joinPath(A3e.parse(t),e.name).toString(),element:e.element})):[]}all(){return this.collectValues(this.root)}findAll(e){return(e=this.getNode(R3e.normalize(e),!1))?this.collectValues(e):[]}getNode(e,t){var r,i=e.split("/");"/"===e.charAt(e.length-1)&&i.pop();let n=this.root;for(r of i){let e=n.children.get(r);if(!e){if(!t)return;e={name:r,children:new Map,parent:n},n.children.set(r,e)}n=e}return n}collectValues(e){var t,r=[];e.element&&r.push(e.element);for(t of e.children.values())r.push(...this.collectValues(t));return r}}}),z3e=i(()=>{var e;P3e(),z3e(),h3e(),Vde(),F3e(),(e=N3e=N3e||{})[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",D3e=class{static{mt(this,"DefaultLangiumDocumentFactory")}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=l3e.CancellationToken.None){var r=await this.fileSystemProvider.readFile(e);return this.createAsync(e,r,t)}fromTextDocument(e,t,r){return t=t??A3e.parse(e.uri),l3e.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromString(e,t,r){return l3e.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){var i;return"string"==typeof t?(i=this.parse(e,t,r),this.createLangiumDocument(i,e,void 0,t)):"$model"in t?(i={value:t.$model,parserErrors:[],lexerErrors:[]},this.createLangiumDocument(i,e)):(i=this.parse(e,t.getText(),r),this.createLangiumDocument(i,e,t))}async createAsync(e,t,r){var i;return"string"==typeof t?(i=await this.parseAsync(e,t,r),this.createLangiumDocument(i,e,void 0,t)):(i=await this.parseAsync(e,t.getText(),r),this.createLangiumDocument(i,e,t))}createLangiumDocument(t,r,e,i){let n;if(e)n={parseResult:t,uri:r,state:N3e.Parsed,references:[],textDocument:e};else{let e=this.createTextDocumentGetter(r,i);n={parseResult:t,uri:r,state:N3e.Parsed,references:[],get textDocument(){return e()}}}return t.value.$document=n}async update(e,t){var r=e.parseResult.value.$cstNode?.root.fullText,i=this.textDocuments?.get(e.uri.toString()),n=i?i.getText():await this.fileSystemProvider.readFile(e.uri);return i?Object.defineProperty(e,"textDocument",{value:i}):(i=this.createTextDocumentGetter(e.uri,n),Object.defineProperty(e,"textDocument",{get:i})),r!==n&&(e.parseResult=await this.parseAsync(e.uri,n,t),e.parseResult.value.$document=e),e.state=N3e.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??S3e.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??"")}},M3e=class{static{mt(this,"DefaultLangiumDocuments")}constructor(e){this.documentTrie=new I3e,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return zde(this.documentTrie.all())}addDocument(e){var 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){return e=e.toString(),this.documentTrie.find(e)}getDocuments(e){return e=e.toString(),this.documentTrie.findAll(e)}async getOrCreateDocument(e,t){return this.getDocument(e)||(e=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(e),e)}createDocument(e,t,r){return r?this.langiumDocumentFactory.fromString(t,e,r).then(e=>(this.addDocument(e),e)):(r=this.langiumDocumentFactory.fromString(t,e),this.addDocument(r),r)}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){return e=e.toString(),(e=this.documentTrie.find(e))&&this.documentBuilder().resetToState(e,N3e.Changed),e}deleteDocument(e){var e=e.toString(),t=this.documentTrie.find(e);return t&&(t.state=N3e.Changed,this.documentTrie.delete(e)),t}deleteDocuments(e){var t,e=e.toString(),r=this.documentTrie.findAll(e);for(t of r)t.state=N3e.Changed;return this.documentTrie.delete(e),r}}}),q3e=i(()=>{h3e(),Pde(),lpe(),x3e(),z3e(),O3e=Symbol("RefResolving"),B3e=class{static{mt(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(n,e=l3e.CancellationToken.None){if(this.profiler?.isActive("linking")){let i=this.profiler.createTask("linking",this.languageId);i.start();try{for(let r of rpe(n.parseResult.value))await g3e(e),npe(r).forEach(e=>{var t=r.$type+":"+e.property;i.startSubTask(t);try{this.doLink(e,n)}finally{i.stopSubTask(t)}})}finally{i.stop()}}else for(var t of rpe(n.parseResult.value))await g3e(e),npe(t).forEach(e=>this.doLink(e,n))}doLink(e,t){var r=e.reference;if("_ref"in r&&void 0===r._ref){r._ref=O3e;try{var i=this.getCandidate(e);Nde(i)?r._ref=i:(r._nodeDescription=i,n=this.loadAstNode(i),r._ref=n??this.createLinkingError(e,i))}catch(t){console.error(`An error occurred while resolving reference to '${r.$refText}':`,t);var n=t.message??String(t);r._ref={info:e,message:`An error occurred while resolving reference to '${r.$refText}': `+n}}t.references.push(r)}else if("_items"in r&&void 0===r._items){r._items=O3e;try{var a=this.getCandidates(e),s=[];if(Nde(a))r._linkingError=a;else for(var o of a){var l=this.loadAstNode(o);l&&s.push({ref:l,$nodeDescription:o})}r._items=s}catch(t){r._linkingError={info:e,message:`An error occurred while resolving reference to '${r.$refText}': `+t},r._items=[]}t.references.push(r)}}unlink(e){for(var 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){var t=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(e=>e.documentUri+"#"+e.path).toArray();return 0<t.length?t:this.createLinkingError(e)}buildReference(r,i,e,n){let a=this,s={$refNode:e,$refText:n,_ref:void 0,get ref(){if(Ade(this._ref))return this._ref;if(Ide(this._nodeDescription)){var e=a.loadAstNode(this._nodeDescription);this._ref=e??a.createLinkingError({reference:s,container:r,property:i},this._nodeDescription)}else if(void 0===this._ref){this._ref=O3e;var e=Qde(r).$document,t=a.getLinkedNode({reference:s,container:r,property:i});if(t.error&&e&&e.state<N3e.ComputedScopes)return this._ref=void 0;this._ref=t.node??t.error,this._nodeDescription=t.descr,e?.references.push(this)}else this._ref===O3e&&a.throwCyclicReferenceError(r,i,n);return Ade(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return Nde(this._ref)?this._ref:void 0}};return s}buildMultiReference(a,s,e,o){let l=this,h={$refNode:e,$refText:o,_items:void 0,get items(){if(Array.isArray(this._items))return this._items;if(void 0===this._items){this._items=O3e;var e=Qde(a).$document,t=l.getCandidates({reference:h,container:a,property:s}),r=[];if(Nde(t))this._linkingError=t;else for(var i of t){var n=l.loadAstNode(i);n&&r.push({ref:n,$nodeDescription:i})}this._items=r,e?.references.push(this)}else this._items===O3e&&l.throwCyclicReferenceError(a,s,o);return Array.isArray(this._items)?this._items:[]},get error(){return this._linkingError||(0<this.items.length?void 0:this._linkingError=l.createLinkingError({reference:h,container:a,property:s}))}};return h}throwCyclicReferenceError(e,t,r){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${r}')`)}getLinkedNode(e){try{var t=this.getCandidate(e);return Nde(t)?{error:t}:(r=this.loadAstNode(t))?{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);var r=t.message??String(t);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': `+r}}}}loadAstNode(e){var t;return e.node||((t=this.langiumDocuments().getDocument(e.documentUri))?this.astNodeLocator.getAstNode(t.parseResult.value,e.path):void 0)}createLinkingError(e,t){var r=Qde(e.container).$document;return r&&r.state<N3e.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${r.uri}).`),{info:e,message:`Could not resolve reference to ${this.reflection.getReferenceType(e)} named '${e.reference.$refText}'.`,targetDescription:t}}}});function W3e(e){return"string"==typeof e.name}var U3e,G3e,j3e,V3e,Y3e,H3e,X3e,K3e,Z3e,Q3e,J3e,eTe,tTe,rTe,iTe,nTe=i(()=>{e1e(),mt(W3e,"isNamed"),U3e=class{static{mt(this,"DefaultNameProvider")}getName(e){if(W3e(e))return e.name}getNameNode(e){return wfe(e.$cstNode,"name")}}}),aTe=i(()=>{e1e(),Pde(),lpe(),Ige(),Vde(),F3e(),oge(),G3e=class{static{mt(this,"DefaultReferences")}constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator,this.documents=e.shared.workspace.LangiumDocuments,this.hasMultiReference=rpe(e.Grammar).some(e=>wpe(e)&&e.isMulti)}findDeclarations(e){if(e){var t=Afe(e),r=e.astNode;if(t&&r){if(Lde(t=r[t.feature])||Rde(t))return Jde(t);if(Array.isArray(t))for(var i of t)if((Lde(i)||Rde(i))&&i.$refNode&&i.$refNode.offset<=e.offset&&i.$refNode.end>=e.end)return Jde(i)}if(r&&(t=this.nameProvider.getNameNode(r))&&(t===e||dge(e,t)))return this.getSelfNodes(r)}return[]}getSelfNodes(t){if(this.hasMultiReference){var e=this.index.findAllReferences(t,this.nodeLocator.getAstNodePath(t));if(e=this.getNodeFromReferenceDescription(e.head()))for(var r of npe(e))if(Rde(r.reference)&&r.reference.items.some(e=>e.ref===t))return r.reference.items.map(e=>e.ref)}return[t]}getNodeFromReferenceDescription(e){var t;return e&&(t=this.documents.getDocument(e.sourceUri))?this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath):void 0}findDeclarationNodes(e){var t,r=[];for(t of this.findDeclarations(e)){var i=this.nameProvider.getNameNode(t)??t.$cstNode;i&&r.push(i)}return r}findReferences(e,t){var r=[];t.includeDeclaration&&r.push(...this.getSelfReferences(e));let i=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(i=i.filter(e=>R3e.equals(e.sourceUri,t.documentUri))),r.push(...i),zde(r)}getSelfReferences(e){var t,r=[];for(t of this.getSelfNodes(e)){var i,n,a=this.nameProvider.getNameNode(t);a&&(i=Zde(t),n=this.nodeLocator.getAstNodePath(t),r.push({sourceUri:i.uri,sourcePath:n,targetUri:i.uri,targetPath:n,segment:gge(a),local:!0}))}return r}}}),sTe=i(()=>{Vde(),j3e=class{static{mt(this,"MultiMap")}constructor(e){if(this.map=new Map,e)for(var[t,r]of e)this.add(t,r)}get size(){return jde.sum(zde(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){var r;return void 0===t?this.map.delete(e):!!((r=this.map.get(e))&&0<=(t=r.indexOf(t)))&&(1===r.length?this.map.delete(e):r.splice(t,1),!0)}get(e){return this.map.get(e)??[]}getStream(e){return(e=this.map.get(e))?zde(e):Wde}has(e,t){return void 0===t?this.map.has(e):!!(e=this.map.get(e))&&0<=e.indexOf(t)}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(r){this.map.forEach((e,t)=>e.forEach(e=>r(e,t,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return zde(this.map.entries()).flatMap(([t,e])=>e.map(e=>[t,e]))}keys(){return zde(this.map.keys())}values(){return zde(this.map.values()).flat()}entriesGroupedByKey(){return zde(this.map.entries())}},V3e=class{static{mt(this,"BiMap")}get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(var[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){var t=this.map.get(e);return void 0!==t&&(this.map.delete(e),this.inverse.delete(t),!0)}}}),oTe=i(()=>{lpe(),h3e(),sTe(),x3e(),Y3e=class{static{mt(this,"DefaultScopeComputation")}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=l3e.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,r=epe,i=l3e.CancellationToken.None){var n,a=[];this.addExportedSymbol(e,a,t);for(n of r(e))await g3e(i),this.addExportedSymbol(n,a,t);return a}addExportedSymbol(e,t,r){var i=this.nameProvider.getName(e);i&&t.push(this.descriptions.createDescription(e,i,r))}async collectLocalSymbols(e,t=l3e.CancellationToken.None){var r,i=e.parseResult.value,n=new j3e;for(r of tpe(i))await g3e(t),this.addLocalSymbol(r,e,n);return n}addLocalSymbol(e,t,r){var i,n=e.$container;n&&(i=this.nameProvider.getName(e))&&r.add(n,this.descriptions.createDescription(e,i,t))}}}),lTe=i(()=>{sTe(),Vde(),H3e=class{static{mt(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(t){let r=this.caseInsensitive?t.toLowerCase():t,e=this.caseInsensitive?this.elements.find(e=>e.name.toLowerCase()===r):this.elements.find(e=>e.name===t);return e||(this.outerScope?this.outerScope.getElement(t):void 0)}getElements(t){let r=this.caseInsensitive?t.toLowerCase():t,e=this.caseInsensitive?this.elements.filter(e=>e.name.toLowerCase()===r):this.elements.filter(e=>e.name===t);return(this.concatOuterScope||e.isEmpty())&&this.outerScope?e.concat(this.outerScope.getElements(t)):e}},X3e=class{static{mt(this,"MapScope")}constructor(e,t,r){this.elements=new Map,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(var i of e){var n=this.caseInsensitive?i.name.toLowerCase():i.name;this.elements.set(n,i)}this.outerScope=t}getElement(e){var t=this.caseInsensitive?e.toLowerCase():e;return this.elements.get(t)||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){var t=this.caseInsensitive?e.toLowerCase():e,t=(t=this.elements.get(t))?[t]:[];return(this.concatOuterScope||0<t.length)&&this.outerScope?zde(t).concat(this.outerScope.getElements(e)):zde(t)}getAllElements(){let e=zde(this.elements.values());return e=this.outerScope?e.concat(this.outerScope.getAllElements()):e}},K3e=class{static{mt(this,"MultiMapScope")}constructor(e,t,r){this.elements=new j3e,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(var i of e){var n=this.caseInsensitive?i.name.toLowerCase():i.name;this.elements.add(n,i)}this.outerScope=t}getElement(e){var t=this.caseInsensitive?e.toLowerCase():e;return this.elements.get(t)[0]||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){var t=this.caseInsensitive?e.toLowerCase():e,t=this.elements.get(t);return(this.concatOuterScope||0===t.length)&&this.outerScope?zde(t).concat(this.outerScope.getElements(e)):zde(t)}getAllElements(){let e=zde(this.elements.values());return e=this.outerScope?e.concat(this.outerScope.getAllElements()):e}},Z3e={getElement(){},getElements(){return Wde},getAllElements(){return Wde}}}),hTe=i(()=>{Q3e=class{static{mt(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")}},J3e=class extends Q3e{static{mt(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){return this.throwIfDisposed(),this.cache.has(e)?this.cache.get(e):t?(t=t(),this.cache.set(e,t),t):void 0}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},eTe=class extends Q3e{static{mt(this,"ContextCache")}constructor(e){super(),this.cache=new Map,this.converter=e??(e=>e)}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){return this.throwIfDisposed(),(e=this.cacheForContext(e)).has(t)?e.get(t):r?(r=r(),e.set(t,r),r):void 0}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){this.throwIfDisposed(),e?(e=this.converter(e),this.cache.delete(e)):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}},tTe=class extends eTe{static{mt(this,"DocumentCache")}constructor(e,t){super(e=>e.toString()),t?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(t,e=>{this.clear(e.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{for(var r of t)this.clear(r)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{var r;for(r of e.concat(t))this.clear(r)}))}},rTe=class extends J3e{static{mt(this,"WorkspaceCache")}constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{0<t.length&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}}),cTe=i(()=>{lTe(),lpe(),Vde(),hTe(),iTe=class{static{mt(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 rTe(e.shared)}getScope(t){let r=[],i=this.reflection.getReferenceType(t),n=Zde(t.container).localSymbols;if(n){let e=t.container;for(;n.has(e)&&r.push(n.getStream(e).filter(e=>this.reflection.isSubtype(e.type,i))),e=e.$container;);}let a=this.getGlobalScope(i,t);for(let e=r.length-1;0<=e;e--)a=this.createScope(r[e],a);return a}createScope(e,t,r){return new H3e(zde(e),t,r)}createScopeForNodes(e,t,r){return e=zde(e).map(e=>{var t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)}).nonNullable(),new H3e(e,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new K3e(this.indexManager.allElements(e)))}}});function uTe(e){return"string"==typeof e.$comment}function dTe(e){return"object"==typeof e&&!!e&&("$ref"in e||"$error"in e)}var pTe,gTe,fTe=i(()=>{$3e(),Pde(),lpe(),e1e(),mt(uTe,"isAstNodeWithComment"),mt(dTe,"isIntermediateReference"),pTe=class{static{mt(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=mt((e,t)=>this.replacer(e,t,r),"defaultReplacer"),a=i?(e,t)=>i(e,t,n):n;try{return this.currentDocument=Zde(e),JSON.stringify(e,a,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){return t=t??{},e=JSON.parse(e),this.linkNode(e,e,t),e}replacer(t,r,{refText:e,sourceText:i,textRegions:n,comments:a,uriConverter:s}){if(!this.ignoreProperties.has(t)){if(Lde(r)){var o=r.ref,l=e?r.$refText:void 0;if(o){let e=Zde(o),t="";return this.currentDocument&&this.currentDocument!==e&&(t=s?s(e.uri,o):e.uri.toString()),o=this.astNodeLocator.getAstNodePath(o),{$ref:t+"#"+o,$refText:l}}return{$error:r.error?.message??"Could not resolve reference",$refText:l}}if(Rde(r)){var h,o=e?r.$refText:void 0,c=[];for(h of r.items){let e=h.ref,t=Zde(h.ref),r="";this.currentDocument&&this.currentDocument!==t&&(r=s?s(t.uri,e):t.uri.toString());var u=this.astNodeLocator.getAstNodePath(e);c.push(r+"#"+u)}return{$refs:c,$refText:o}}if(Ade(r)){let e;return n&&(e=this.addAstNodeRegionWithAssignmentsTo({...r}),!t||r.$document)&&e?.$textRegion&&(e.$textRegion.documentURI=this.currentDocument?.uri.toString()),i&&!t&&((e=e??{...r}).$sourceText=r.$cstNode?.text),a&&(e=e??{...r},l=this.commentProvider.getComment(r))&&(e.$comment=l.replace(/\r/g,"")),e??r}return r}}addAstNodeRegionWithAssignmentsTo(i){let n=mt(e=>({offset:e.offset,end:e.end,length:e.length,range:e.range}),"createDocumentSegment");if(i.$cstNode){let e=i.$textRegion=n(i.$cstNode),r=e.assignments={};return Object.keys(i).filter(e=>!e.startsWith("$")).forEach(e=>{var t=kfe(i.$cstNode,e).map(n);0!==t.length&&(r[e]=t)}),i}}linkNode(t,r,i,e,n,a){for(var[s,o]of Object.entries(t))if(Array.isArray(o))for(let e=0;e<o.length;e++){var l=o[e];dTe(l)?o[e]=this.reviveReference(t,s,r,l,i):Ade(l)&&this.linkNode(l,r,i,t,s,e)}else dTe(o)?t[s]=this.reviveReference(t,s,r,o,i):Ade(o)&&this.linkNode(o,r,i,t,s);var h=t;h.$container=e,h.$containerProperty=n,h.$containerIndex=a}reviveReference(e,t,r,i,n){let a=i.$refText,s=i.$error,o;if(i.$ref){var l=this.getRefNode(r,i.$ref,n.uriConverter);if(Ade(l))return{$refText:(a=a||this.nameProvider.getName(l))??"",ref:l};s=l}else if(i.$refs){var h,c=[];for(h of i.$refs){var u=this.getRefNode(r,h,n.uriConverter);Ade(u)&&c.push({ref:u})}if(0!==c.length)return{$refText:a??"",items:c};o={$refText:a??"",items:c},s=s??"Could not resolve multi-reference"}if(s)return(o=o??{$refText:a??"",ref:void 0}).error={info:{container:e,property:t,reference:o},message:s},o}getRefNode(e,t,r){try{var i,n,a,s,o=t.indexOf("#");return 0===o?this.astNodeLocator.getAstNode(e,t.substring(1))||"Could not resolve path: "+t:o<0?(i=r?r(t):A3e.parse(t),(n=this.langiumDocuments.getDocument(i))?n.parseResult.value:"Could not find document for URI: "+t):(a=r?r(t.substring(0,o)):A3e.parse(t.substring(0,o)),(s=this.langiumDocuments.getDocument(a))?o===t.length-1?s.parseResult.value:this.astNodeLocator.getAstNode(s.parseResult.value,t.substring(o+1))||"Could not resolve URI: "+t:"Could not find document for URI: "+t)}catch(e){return String(e)}}}}),mTe=i(()=>{F3e(),gTe=class{static{mt(this,"DefaultServiceRegistry")}get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.fileNameMap=new Map,this.textDocuments=e?.workspace.TextDocuments}register(e){var t,r=e.LanguageMetaData;for(t of r.fileExtensions)this.fileExtensionMap.has(t)&&console.warn(`The file extension ${t} is used by multiple languages. It is now assigned to '${r.languageId}'.`),this.fileExtensionMap.set(t,e);if(r.fileNames)for(var i of r.fileNames)this.fileNameMap.has(i)&&console.warn(`The file name ${i} is used by multiple languages. It is now assigned to '${r.languageId}'.`),this.fileNameMap.set(i,e);this.languageIdMap.set(r.languageId,e)}getServices(e){if(0===this.languageIdMap.size)throw new Error("The service registry is empty. Use `register` to register the services of a language.");var t=this.textDocuments?.get(e)?.languageId;if(void 0!==t){var r=this.languageIdMap.get(t);if(r)return r}if(r=R3e.extname(e),e=R3e.basename(e),e=this.fileNameMap.get(e)??this.fileExtensionMap.get(r))return e;throw t?new Error(`The service registry contains no services for the extension '${r}' for language '${t}'.`):new Error(`The service registry contains no services for the extension '${r}'.`)}hasServices(e){try{return this.getServices(e),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}}});function yTe(e){return{code:e}}var vTe,xTe,bTe=i(()=>{var e;dCe(),sTe(),x3e(),Vde(),mt(yTe,"diagnosticData"),(e=vTe=vTe||{}).defaults=["fast","slow","built-in"],e.all=e.defaults,xTe=class{static{mt(this,"ValidationRegistry")}constructor(e){this.entries=new j3e,this.knownCategories=new Set(vTe.defaults),this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,t=this,r="fast"){if("built-in"===r)throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");this.knownCategories.add(r);for(var[i,n]of Object.entries(e))if(Array.isArray(n))for(var a of n)a={check:this.wrapValidationException(a,t),category:r},this.addEntry(i,a);else"function"==typeof n?(n={check:this.wrapValidationException(n,t),category:r},this.addEntry(i,n)):Nge()}wrapValidationException(i,n){return async(e,t,r)=>{await this.handleException(()=>i.call(n,e,t,r),"An error occurred during validation",t,e)}}async handleException(e,t,r,i){try{await e()}catch(e){if(p3e(e))throw e;console.error(t+":",e),e instanceof Error&&e.stack&&console.error(e.stack),r("error",t+": "+(e instanceof Error?e.message:String(e)),{node:i})}}addEntry(e,t){if("AstNode"===e)this.entries.add("AstNode",t);else for(var r of this.reflection.getAllSubTypes(e))this.entries.add(r,t)}getChecks(e,t){let r=zde(this.entries.get(e)).concat(this.entries.get("AstNode"));return(r=t?r.filter(e=>t.includes(e.category)):r).map(e=>e.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(n,a,s){return async(e,t,r,i)=>{await this.handleException(()=>n.call(s,e,t,r,i),a,t,e)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}}});function TTe(e){if(e.range)return e.range;let t;return"string"==typeof e.property?t=wfe(e.node.$cstNode,e.property,e.index):"string"==typeof e.keyword&&(t=Sfe(e.node.$cstNode,e.keyword,e.index)),(t=t??e.node.$cstNode)?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}function kTe(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 wTe(e){switch(e){case"error":return yTe(STe.LexingError);case"warning":return yTe(STe.LexingWarning);case"info":return yTe(STe.LexingInfo);case"hint":return yTe(STe.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}var CTe,ETe,STe,_Te,ATe,LTe,RTe,ITe,NTe,DTe,MTe,OTe,BTe=i(()=>{var e;h3e(),e1e(),lpe(),Ige(),x3e(),bTe(),CTe=Object.freeze({validateNode:!0,validateChildren:!0}),ETe=class{static{mt(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=l3e.CancellationToken.None){var i=e.parseResult,n=[];if(await g3e(r),t.categories&&!t.categories.includes("built-in")||(this.processLexingErrors(i,n,t),!(t.stopAfterLexingErrors&&n.some(e=>e.data?.code===STe.LexingError)||(this.processParsingErrors(i,n,t),t.stopAfterParsingErrors&&n.some(e=>e.data?.code===STe.ParsingError))||(this.processLinkingErrors(e,n,t),t.stopAfterLinkingErrors&&n.some(e=>e.data?.code===STe.LinkingError))))){try{n.push(...await this.validateAst(i.value,t,r))}catch(e){if(p3e(e))throw e;console.error("An error occurred during validation:",e)}await g3e(r)}return n}processLexingErrors(e,t,r){var i;for(i of[...e.lexerErrors,...e.lexerReport?.diagnostics??[]]){var n={severity:kTe(n=i.severity??"error"),range:{start:{line:i.line-1,character:i.column-1},end:{line:i.line-1,character:i.column+i.length-1}},message:i.message,data:wTe(n),source:this.getSource()};t.push(n)}}processParsingErrors(e,t,r){for(var i of e.parserErrors){let e;var n,a;isNaN(i.token.startOffset)?"previousToken"in i&&(a=i.previousToken,e=isNaN(a.startOffset)?{start:n={line:0,character:0},end:n}:{start:n={line:a.endLine-1,character:a.endColumn},end:n}):e=pge(i.token),e&&(a={severity:kTe("error"),range:e,message:i.message,data:yTe(STe.ParsingError),source:this.getSource()},t.push(a))}}processLinkingErrors(e,t,r){for(var i of e.references){var n=i.error;n&&(i={node:n.info.container,range:i.$refNode?.range,property:n.info.property,index:n.info.index,data:{code:STe.LinkingError,containerType:n.info.container.$type,property:n.info.property,refText:n.info.reference.$refText}},t.push(this.toDiagnostic("error",n.message,i)))}}async validateAst(e,t,r=l3e.CancellationToken.None){let i=[],n=mt((e,t,r)=>{i.push(this.toDiagnostic(e,t,r))},"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=l3e.CancellationToken.None){var n;for(n of this.validationRegistry.checksBefore)await g3e(i),await n(e,r,t.categories??[],i)}async validateAstNodes(e,t,r,i=l3e.CancellationToken.None){if(this.profiler?.isActive("validating")){var n=this.profiler.createTask("validating",this.languageId);n.start();try{var a,s=rpe(e).iterator();for(a of s){n.startSubTask(a.$type);var o,l=this.validateSingleNodeOptions(a,t);if(l.validateNode)try{for(o of this.validationRegistry.getChecks(a.$type,t.categories))await o(a,r,i)}finally{n.stopSubTask(a.$type)}l.validateChildren||s.prune()}}finally{n.stop()}}else{var h,c=rpe(e).iterator();for(h of c){await g3e(i);var u,d=this.validateSingleNodeOptions(h,t);if(d.validateNode)for(u of this.validationRegistry.getChecks(h.$type,t.categories))await u(h,r,i);d.validateChildren||c.prune()}}}validateSingleNodeOptions(e,t){return CTe}async validateAstAfter(e,t,r,i=l3e.CancellationToken.None){var n;for(n of this.validationRegistry.checksAfter)await g3e(i),await n(e,r,t.categories??[],i)}toDiagnostic(e,t,r){return{message:t,range:TTe(r),severity:kTe(e),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}},mt(TTe,"getDiagnosticRange"),mt(kTe,"toDiagnosticSeverity"),mt(wTe,"toDiagnosticData"),(e=STe=STe||{}).LexingError="lexing-error",e.LexingWarning="lexing-warning",e.LexingInfo="lexing-info",e.LexingHint="lexing-hint",e.ParsingError="parsing-error",e.LinkingError="linking-error"}),PTe=i(()=>{h3e(),Pde(),lpe(),Ige(),x3e(),F3e(),_Te=class{static{mt(this,"DefaultAstNodeDescriptionProvider")}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,r){var r=r??Zde(e),i=(t=t??this.nameProvider.getName(e),this.astNodeLocator.getAstNodePath(e));if(!t)throw new Error(`Node at path ${i} has no name.`);let n,a=mt(()=>n=n??gge(this.nameProvider.getNameNode(e)??e.$cstNode),"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return a()},selectionSegment:gge(e.$cstNode),type:e.$type,documentUri:r.uri,path:i}}},ATe=class{static{mt(this,"DefaultReferenceDescriptionProvider")}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=l3e.CancellationToken.None){let r=[],i=e.parseResult.value;for(var n of rpe(i))await g3e(t),npe(n).forEach(e=>{e.reference.error||r.push(...this.createInfoDescriptions(e))});return r}createInfoDescriptions(e){var t=e.reference;if(t.error||!t.$refNode)return[];let r=[];Lde(t)&&t.$nodeDescription?r=[t.$nodeDescription]:Rde(t)&&(r=t.items.map(e=>e.$nodeDescription).filter(e=>void 0!==e));var i,n=Zde(e.container).uri,a=this.nodeLocator.getAstNodePath(e.container),s=[],o=gge(t.$refNode);for(i of r)s.push({sourceUri:n,sourcePath:a,targetUri:i.documentUri,targetPath:i.path,segment:o,local:R3e.equals(i.documentUri,n)});return s}}}),$Te=i(()=>{LTe=class{static{mt(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){var t;return e.$container?(t=this.getAstNodePath(e.$container),e=this.getPathSegment(e),t+this.segmentSeparator+e):""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(e)return void 0!==t?e+this.indexSeparator+t:e;throw new Error("Missing '$containerProperty' in AST node.")}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((e,t)=>{var r,i;return e&&0!==t.length?0<(i=t.indexOf(this.indexSeparator))?(r=t.substring(0,i),i=parseInt(t.substring(i+1)),e[r]?.[i]):e[t]:e},e)}}}),FTe={},zTe=i(()=>{W(FTe,U(s3e(),1))}),qTe=i(()=>{zTe(),x3e(),RTe=class{static{mt(this,"DefaultConfigurationProvider")}constructor(e){this._ready=new v3e,this.onConfigurationSectionUpdateEmitter=new FTe.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(t){var e;if(this.workspaceConfig&&(t.register&&(e=this.serviceRegistry.all,t.register({section:e.map(e=>this.toSectionName(e.LanguageMetaData.languageId))})),t.fetchConfiguration)){let e=this.serviceRegistry.all.map(e=>({section:this.toSectionName(e.LanguageMetaData.languageId)})),r=await t.fetchConfiguration(e);e.forEach((e,t)=>{this.updateSectionConfiguration(e.section,r[t])})}this._ready.resolve()}updateConfiguration(e){"object"==typeof e.settings&&null!==e.settings&&Object.entries(e.settings).forEach(([e,t])=>{this.updateSectionConfiguration(e,t),this.onConfigurationSectionUpdateEmitter.fire({section:e,configuration:t})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){if(await this.ready,e=this.toSectionName(e),this.settings[e])return this.settings[e][t]}toSectionName(e){return""+e}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}}}),WTe=tYe(e=>{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 i,n=a3e(),t=((t=i||(e.ErrorCodes=i={})).ParseError=-32700,t.InvalidRequest=-32600,t.MethodNotFound=-32601,t.InvalidParams=-32602,t.InternalError=-32603,t.jsonrpcReservedErrorRangeStart=-32099,t.serverErrorStart=-32099,t.MessageWriteError=-32099,t.MessageReadError=-32098,t.PendingResponseRejected=-32097,t.ConnectionInactive=-32096,t.ServerNotInitialized=-32002,t.UnknownErrorCode=-32001,t.jsonrpcReservedErrorRangeEnd=-32e3,t.serverErrorEnd=-32e3,class h extends Error{static{mt(this,"ResponseError")}constructor(e,t,r){super(t),this.code=n.number(e)?e:i.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,h.prototype)}toJson(){var e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}),r=(e.ResponseError=t,class c{static{mt(this,"ParameterStructures")}constructor(e){this.kind=e}static is(e){return e===c.auto||e===c.byName||e===c.byPosition}toString(){return this.kind}}),t=((e.ParameterStructures=r).auto=new r("auto"),r.byPosition=new r("byPosition"),r.byName=new r("byName"),class{static{mt(this,"AbstractMessageSignature")}constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return r.auto}}),a=(e.AbstractMessageSignature=t,class extends t{static{mt(this,"RequestType0")}constructor(e){super(e,0)}}),a=(e.RequestType0=a,class extends t{static{mt(this,"RequestType")}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}}),a=(e.RequestType=a,class extends t{static{mt(this,"RequestType1")}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}}),a=(e.RequestType1=a,class extends t{static{mt(this,"RequestType2")}constructor(e){super(e,2)}}),a=(e.RequestType2=a,class extends t{static{mt(this,"RequestType3")}constructor(e){super(e,3)}}),a=(e.RequestType3=a,class extends t{static{mt(this,"RequestType4")}constructor(e){super(e,4)}}),a=(e.RequestType4=a,class extends t{static{mt(this,"RequestType5")}constructor(e){super(e,5)}}),a=(e.RequestType5=a,class extends t{static{mt(this,"RequestType6")}constructor(e){super(e,6)}}),a=(e.RequestType6=a,class extends t{static{mt(this,"RequestType7")}constructor(e){super(e,7)}}),a=(e.RequestType7=a,class extends t{static{mt(this,"RequestType8")}constructor(e){super(e,8)}}),a=(e.RequestType8=a,class extends t{static{mt(this,"RequestType9")}constructor(e){super(e,9)}}),a=(e.RequestType9=a,class extends t{static{mt(this,"NotificationType")}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}}),a=(e.NotificationType=a,class extends t{static{mt(this,"NotificationType0")}constructor(e){super(e,0)}}),a=(e.NotificationType0=a,class extends t{static{mt(this,"NotificationType1")}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}}),a=(e.NotificationType1=a,class extends t{static{mt(this,"NotificationType2")}constructor(e){super(e,2)}}),a=(e.NotificationType2=a,class extends t{static{mt(this,"NotificationType3")}constructor(e){super(e,3)}}),a=(e.NotificationType3=a,class extends t{static{mt(this,"NotificationType4")}constructor(e){super(e,4)}}),a=(e.NotificationType4=a,class extends t{static{mt(this,"NotificationType5")}constructor(e){super(e,5)}}),a=(e.NotificationType5=a,class extends t{static{mt(this,"NotificationType6")}constructor(e){super(e,6)}}),a=(e.NotificationType6=a,class extends t{static{mt(this,"NotificationType7")}constructor(e){super(e,7)}}),a=(e.NotificationType7=a,class extends t{static{mt(this,"NotificationType8")}constructor(e){super(e,8)}}),a=(e.NotificationType8=a,class extends t{static{mt(this,"NotificationType9")}constructor(e){super(e,9)}});function s(e){return e&&n.string(e.method)&&(n.string(e.id)||n.number(e.id))}function o(e){return e&&n.string(e.method)&&void 0===e.id}function l(e){return e&&(void 0!==e.result||!!e.error)&&(n.string(e.id)||n.number(e.id)||null===e.id)}e.NotificationType9=a,t=e.Message={},mt(s,"isRequest"),t.isRequest=s,mt(o,"isNotification"),t.isNotification=o,mt(l,"isResponse"),t.isResponse=l}),UTe=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0,(r=n||(e.Touch=n={})).None=0,r.First=1,r.AsOld=r.First,r.Last=2,r.AsNew=r.Last;var t,n,r=class{static{mt(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(e){return this._map.has(e)}get(e,t=n.None){if(e=this._map.get(e))return t!==n.None&&this.touch(e,t),e.value}set(e,t,r=n.None){let i=this._map.get(e);if(i)i.value=t,r!==n.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case n.None:this.addItemLast(i);break;case n.First:this.addItemFirst(i);break;default:n.Last,this.addItemLast(i)}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){var t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(this._head||this._tail){var e;if(this._head&&this._tail)return e=this._head,this._map.delete(e.key),this.removeItem(e),this._size--,e.value;throw new Error("Invalid list")}}forEach(e,t){let r=this._state,i=this._head;for(;i;){if((t?e.bind(t):e)(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let t=this._state,r=this._head,e={[Symbol.iterator]:()=>e,next:mt(()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");var e;return r?(e={value:r.key,done:!1},r=r.next,e):{value:void 0,done:!0}},"next")};return e}values(){let t=this._state,r=this._head,e={[Symbol.iterator]:()=>e,next:mt(()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");var e;return r?(e={value:r.value,done:!1},r=r.next,e):{value:void 0,done:!0}},"next")};return e}entries(){let t=this._state,r=this._head,e={[Symbol.iterator]:()=>e,next:mt(()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");var e;return r?(e={value:[r.key,r.value],done:!1},r=r.next,e):{value:void 0,done:!0}},"next")};return e}[(t=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(r){if(!(r>=this.size))if(0===r)this.clear();else{let e=this._head,t=this.size;for(;e&&t>r;)this._map.delete(e.key),e=e.next,t--;this._head=e,this._size=t,e&&(e.previous=void 0),this._state++}}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{var t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");(t.previous=r).next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");var r,i;t!==n.First&&t!==n.Last||(t===n.First?e!==this._head&&(i=e.next,r=e.previous,e===this._tail?(r.next=void 0,this._tail=r):(i.previous=r).next=i,e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++):t===n.Last&&e!==this._tail&&(r=e.next,i=e.previous,e===this._head?(r.previous=void 0,this._head=r):(r.previous=i).next=r,e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++))}toJSON(){let r=[];return this.forEach((e,t)=>{r.push([t,e])}),r}fromJSON(e){this.clear();for(var[t,r]of e)this.set(t,r)}},r=(e.LinkedMap=r,class extends r{static{mt(this,"LRUCache")}constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=n.AsNew){return super.get(e,t)}peek(e){return super.get(e,n.None)}set(e,t){return super.set(e,t,n.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}});e.LRUCache=r}),GTe=tYe(e=>{function t(e){return{dispose:e}}Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0,e=e.Disposable={},mt(t,"create"),e.create=t}),jTe=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var r,t=o3e(),i=((i=r={}).Continue=0,i.Cancelled=1,class{static{mt(this,"SharedArraySenderStrategy")}constructor(){this.buffers=new Map}enableCancellation(e){var t;null!==e.id&&(t=new SharedArrayBuffer(4),new Int32Array(t,0,1)[0]=r.Continue,this.buffers.set(e.id,t),e.$cancellationData=t)}async sendCancellation(e,t){void 0!==(t=this.buffers.get(t))&&(t=new Int32Array(t,0,1),Atomics.store(t,0,r.Cancelled))}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}}),n=(e.SharedArraySenderStrategy=i,class{static{mt(this,"SharedArrayBufferCancellationToken")}constructor(e){this.data=new Int32Array(e,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{mt(this,"SharedArrayBufferCancellationTokenSource")}constructor(e){this.token=new n(e)}cancel(){}dispose(){}},i=class{static{mt(this,"SharedArrayReceiverStrategy")}constructor(){this.kind="request"}createCancellationTokenSource(e){return void 0===(e=e.$cancellationData)?new t.CancellationTokenSource:new a(e)}};e.SharedArrayReceiverStrategy=i}),VTe=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;var t=n3e(),r=class{static{mt(this,"Semaphore")}constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(r){return new Promise((e,t)=>{this._waiting.push({thunk:r,resolve:e,reject:t}),this.runNext()})}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,t.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(0!==this._waiting.length&&this._active!==this._capacity){let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{var e=t.thunk();e instanceof Promise?e.then(e=>{this._active--,t.resolve(e),this.runNext()},e=>{this._active--,t.reject(e),this.runNext()}):(this._active--,t.resolve(e),this.runNext())}catch(e){this._active--,t.reject(e),this.runNext()}}}};e.Semaphore=r}),YTe=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var l=n3e(),t=a3e(),r=s3e(),i=VTe();function n(e){return e&&t.func(e.listen)&&t.func(e.dispose)&&t.func(e.onError)&&t.func(e.onClose)&&t.func(e.onPartialMessage)}s=e.MessageReader={},mt(n,"is"),s.is=n;var a,s=class{static{mt(this,"AbstractMessageReader")}constructor(){this.errorEmitter=new r.Emitter,this.closeEmitter=new r.Emitter,this.partialMessageEmitter=new r.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error("Reader received error. Reason: "+(t.string(e.message)?e.message:"unknown"))}};function o(e){let t,r,i=new Map,n,a=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(r=e.contentDecoder,i.set(r.name,r)),void 0!==e.contentDecoders)for(var s of e.contentDecoders)i.set(s.name,s);if(void 0!==e.contentTypeDecoder&&(n=e.contentTypeDecoder,a.set(n.name,n)),void 0!==e.contentTypeDecoders)for(var o of e.contentTypeDecoders)a.set(o.name,o)}return void 0===n&&(n=(0,l.default)().applicationJson.decoder,a.set(n.name,n)),{charset:t,contentDecoder:r,contentDecoders:i,contentTypeDecoder:n,contentTypeDecoders:a}}e.AbstractMessageReader=s,h=a={},mt(o,"fromOptions"),h.fromOptions=o;var h=class extends s{static{mt(this,"ReadableStreamMessageReader")}constructor(e,t){super(),this.readable=e,this.options=a.fromOptions(t),this.buffer=(0,l.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new i.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){return this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e,e=this.readable.onData(e=>{this.onData(e)}),this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),e}onData(e){try{for(this.buffer.append(e);;){if(-1===this.nextMessageLength){var r=this.buffer.tryReadHeaders(!0);if(!r)return;var i=r.get("content-length");if(!i)return void this.fireError(new Error(`Header must provide a Content-Length property.
`+JSON.stringify(Object.fromEntries(r))));var n=parseInt(i);if(isNaN(n))return void this.fireError(new Error("Content-Length value must be a number. Got "+i));this.nextMessageLength=n}let t=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===t)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{var e=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(t):t,e=await this.options.contentTypeDecoder.decode(e,this.options);this.callback(e)}).catch(e=>{this.fireError(e)})}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,l.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};e.ReadableStreamMessageReader=h}),HTe=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;var t=n3e(),r=a3e(),i=VTe(),n=s3e();function a(e){return e&&r.func(e.dispose)&&r.func(e.onClose)&&r.func(e.onError)&&r.func(e.write)}o=e.MessageWriter={},mt(a,"is"),o.is=a;var s,o=class{static{mt(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(e,t,r){this.errorEmitter.fire([this.asError(e),t,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error("Writer received error. Reason: "+(r.string(e.message)?e.message:"unknown"))}};function l(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,t.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,t.default)().applicationJson.encoder}}e.AbstractMessageWriter=o,h=s={},mt(l,"fromOptions"),h.fromOptions=l;var h=class extends o{static{mt(this,"WriteableStreamMessageWriter")}constructor(e,t){super(),this.writable=e,this.options=s.fromOptions(t),this.errorCount=0,this.writeSemaphore=new i.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(r){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(r,this.options).then(e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e).then(e=>{var t=[];return t.push("Content-Length: ",e.byteLength.toString(),`\r
`),t.push(`\r
`),this.doWrite(r,t,e)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}};e.WriteableStreamMessageWriter=h}),XTe=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0;var t=class{static{mt(this,"AbstractMessageBuffer")}constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){e="string"==typeof e?this.fromString(e,this._encoding):e,this._chunks.push(e),this._totalLength+=e.byteLength}tryReadHeaders(n=!1){if(0!==this._chunks.length){let e=0,t=0,r=0,i=0;e:for(;t<this._chunks.length;){var a=this._chunks[t];for(r=0;r<a.length;){switch(a[r]){case 13:switch(e){case 0:e=1;break;case 2:e=3;break;default:e=0}break;case 10:switch(e){case 1:e=2;break;case 3:e=4,r++;break e;default:e=0}break;default:e=0}r++}i+=a.byteLength,t++}if(4===e){var s=this._read(i+r),o=new Map,l=this.toString(s,"ascii").split(`\r
`);if(!(l.length<2))for(let e=0;e<l.length-2;e++){var h=(u=l[e]).indexOf(":");if(-1===h)throw new Error(`Message header must separate key and value using ':'
`+u);var c=u.substr(0,h),u=u.substr(h+1).trim();o.set(n?c.toLowerCase():c,u)}return o}}}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(0===e)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");var t,r;if(this._chunks[0].byteLength===e)return t=this._chunks[0],this._chunks.shift(),this._totalLength-=e,this.asNative(t);if(this._chunks[0].byteLength>e)return t=this._chunks[0],r=this.asNative(t,e),this._chunks[0]=t.slice(e),this._totalLength-=e,r;let i=this.allocNative(e),n=0;for(;0<e;){var a,s=this._chunks[0];s.byteLength>e?(a=s.slice(0,e),i.set(a,n),n+=e,this._chunks[0]=s.slice(e),this._totalLength-=e,e-=e):(i.set(s,n),n+=s.byteLength,this._chunks.shift(),this._totalLength-=s.byteLength,e-=s.byteLength)}return i}};e.AbstractMessageBuffer=t}),KTe=tYe(ue=>{Object.defineProperty(ue,"__esModule",{value:!0}),ue.createMessageConnection=ue.ConnectionOptions=ue.MessageStrategy=ue.CancellationStrategy=ue.CancellationSenderStrategy=ue.CancellationReceiverStrategy=ue.RequestCancellationReceiverStrategy=ue.IdCancellationReceiverStrategy=ue.ConnectionStrategy=ue.ConnectionError=ue.ConnectionErrors=ue.LogTraceNotification=ue.SetTraceNotification=ue.TraceFormat=ue.TraceValues=ue.Trace=ue.NullLogger=ue.ProgressType=ue.ProgressToken=void 0;var de,pe,ge,fe=n3e(),me=a3e(),ye=WTe(),ve=UTe(),xe=s3e(),be=o3e();function e(e){return"string"==typeof e||"number"==typeof e}(de={}).type=new ye.NotificationType("$/cancelRequest"),i=pe||(ue.ProgressToken=pe={}),mt(e,"is"),i.is=e,(ge={}).type=new ye.NotificationType("$/progress");var Te,ke,t,we,r,Ce,Ee,Se,i=class{static{mt(this,"ProgressType")}constructor(){}};function n(e){return me.func(e)}function a(e){if(!me.string(e))return t.Off;switch(e=e.toLowerCase()){case"off":return t.Off;case"messages":return t.Messages;case"compact":return t.Compact;case"verbose":return t.Verbose;default:return t.Off}}function s(e){switch(e){case t.Off:return"off";case t.Messages:return"messages";case t.Compact:return"compact";case t.Verbose:return"verbose";default:return"off"}}function o(e){return me.string(e)&&"json"===(e=e.toLowerCase())?r.JSON:r.Text}ue.ProgressType=i,i=Te={},mt(n,"is"),i.is=n,ue.NullLogger=Object.freeze({error:mt(()=>{},"error"),warn:mt(()=>{},"warn"),info:mt(()=>{},"info"),log:mt(()=>{},"log")}),(i=ke||(ue.Trace=ke={}))[i.Off=0]="Off",i[i.Messages=1]="Messages",i[i.Compact=2]="Compact",i[i.Verbose=3]="Verbose",ue.TraceValues={Off:"off",Messages:"messages",Compact:"compact",Verbose:"verbose"},t=ke||(ue.Trace=ke={}),mt(a,"fromString"),t.fromString=a,mt(s,"toString"),t.toString=s,(i=we||(ue.TraceFormat=we={})).Text="text",i.JSON="json",r=we||(ue.TraceFormat=we={}),mt(o,"fromString"),r.fromString=o,(Ce||(ue.SetTraceNotification=Ce={})).type=new ye.NotificationType("$/setTrace"),(Ee||(ue.LogTraceNotification=Ee={})).type=new ye.NotificationType("$/logTrace"),(i=Se||(ue.ConnectionErrors=Se={}))[i.Closed=1]="Closed",i[i.Disposed=2]="Disposed",i[i.AlreadyListening=3]="AlreadyListening";var l,_e,h,c,u,Ae,Le,Re,Ie=class T extends Error{static{mt(this,"ConnectionError")}constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,T.prototype)}};function d(e){return e&&me.func(e.cancelUndispatched)}function p(e){return e&&(void 0===e.kind||"id"===e.kind)&&me.func(e.createCancellationTokenSource)&&(void 0===e.dispose||me.func(e.dispose))}function g(e){return e&&"request"===e.kind&&me.func(e.createCancellationTokenSource)&&(void 0===e.dispose||me.func(e.dispose))}function f(e){return _e.is(e)||h.is(e)}function m(e){return e&&me.func(e.sendCancellation)&&me.func(e.cleanup)}function y(e){return e&&c.is(e.receiver)&&u.is(e.sender)}function v(e){return e&&me.func(e.handleMessage)}function x(e){return e&&(Ae.is(e.cancellationStrategy)||l.is(e.connectionStrategy)||Le.is(e.messageStrategy))}function b(r,p,B,o){let g=void 0!==B?B:ue.NullLogger,P=0,$=0,F=0,f="2.0",u,d=new Map,a,s=new Map,i=new Map,e,l=new ve.LinkedMap,m=new Map,y=new Set,v=new Map,h=ke.Off,c=we.Text,x,n=Re.New,t=new xe.Emitter,z=new xe.Emitter,q=new xe.Emitter,W=new xe.Emitter,U=new xe.Emitter,b=o&&o.cancellationStrategy?o.cancellationStrategy:Ae.Message;function T(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function G(e){return null===e?"res-unknown-"+(++F).toString():"res-"+e.toString()}function j(){return"not-"+(++$).toString()}function V(e,t){ye.Message.isRequest(t)?e.set(T(t.id),t):ye.Message.isResponse(t)?e.set(G(t.id),t):e.set(j(),t)}function Y(e){}function k(){return n===Re.Listening}function w(){return n===Re.Closed}function C(){return n===Re.Disposed}function E(){n!==Re.New&&n!==Re.Listening||(n=Re.Closed,z.fire(void 0))}function H(e){t.fire([e,void 0,void 0])}function X(e){t.fire(e)}function S(){e||0===l.size||(e=(0,fe.default)().timer.setImmediate(()=>{e=void 0,K()}))}function _(e){(ye.Message.isRequest(e)?Q:ye.Message.isNotification(e)?ee:ye.Message.isResponse(e)?J:te)(e)}function K(){if(0!==l.size){var e=l.shift();try{var t=o?.messageStrategy;Le.is(t)?t.handleMessage(e,_):_(e)}finally{S()}}}mt(T,"createRequestQueueKey"),mt(G,"createResponseQueueKey"),mt(j,"createNotificationQueueKey"),mt(V,"addMessageToQueue"),mt(Y,"cancelUndispatched"),mt(k,"isListening"),mt(w,"isClosed"),mt(C,"isDisposed"),mt(E,"closeHandler"),mt(H,"readErrorHandler"),mt(X,"writeErrorHandler"),r.onClose(E),r.onError(H),p.onClose(E),p.onError(X),mt(S,"triggerMessageQueue"),mt(_,"handleMessage"),mt(K,"processMessageQueue");let Z=mt(e=>{try{if(ye.Message.isNotification(e)&&e.method===de.type.method){var t=e.params.id,r=T(t),i=l.get(r);if(ye.Message.isRequest(i)){var n=o?.connectionStrategy,a=n&&n.cancelUndispatched?n.cancelUndispatched(i,Y):void 0;if(a&&(void 0!==a.error||void 0!==a.result))return l.delete(r),v.delete(t),a.id=i.id,L(a,e.method,Date.now()),void p.write(a).catch(()=>g.error("Sending response for canceled message failed."))}var s=v.get(t);if(void 0!==s)return s.cancel(),void R(e);y.add(t)}V(l,e)}finally{S()}},"callback");function Q(s){if(!C()){mt(l,"reply"),mt(h,"replyError"),mt(c,"replySuccess"),ne(s);let e=d.get(s.method),i,n,a=(e&&(i=e.type,n=e.handler),Date.now());if(n||u){let t=s.id??String(Date.now()),r=_e.is(b.receiver)?b.receiver.createCancellationTokenSource(t):b.receiver.createCancellationTokenSource(s);null!==s.id&&y.has(s.id)&&r.cancel(),null!==s.id&&v.set(t,r);try{let e;if(n)if(void 0===s.params){if(void 0!==i&&0!==i.numberOfParams)return void h(new ye.ResponseError(ye.ErrorCodes.InvalidParams,`Request ${s.method} defines ${i.numberOfParams} params but received none.`),s.method,a);e=n(r.token)}else if(Array.isArray(s.params)){if(void 0!==i&&i.parameterStructures===ye.ParameterStructures.byName)return void h(new ye.ResponseError(ye.ErrorCodes.InvalidParams,`Request ${s.method} defines parameters by name but received parameters by position`),s.method,a);e=n(...s.params,r.token)}else{if(void 0!==i&&i.parameterStructures===ye.ParameterStructures.byPosition)return void h(new ye.ResponseError(ye.ErrorCodes.InvalidParams,`Request ${s.method} defines parameters by position but received parameters by name`),s.method,a);e=n(s.params,r.token)}else u&&(e=u(s.method,s.params,r.token));var o=e;e?o.then?o.then(e=>{v.delete(t),l(e,s.method,a)},e=>{v.delete(t),e instanceof ye.ResponseError?h(e,s.method,a):e&&me.string(e.message)?h(new ye.ResponseError(ye.ErrorCodes.InternalError,`Request ${s.method} failed with message: `+e.message),s.method,a):h(new ye.ResponseError(ye.ErrorCodes.InternalError,`Request ${s.method} failed unexpectedly without providing any details.`),s.method,a)}):(v.delete(t),l(e,s.method,a)):(v.delete(t),c(e,s.method,a))}catch(e){v.delete(t),e instanceof ye.ResponseError?l(e,s.method,a):e&&me.string(e.message)?h(new ye.ResponseError(ye.ErrorCodes.InternalError,`Request ${s.method} failed with message: `+e.message),s.method,a):h(new ye.ResponseError(ye.ErrorCodes.InternalError,`Request ${s.method} failed unexpectedly without providing any details.`),s.method,a)}}else h(new ye.ResponseError(ye.ErrorCodes.MethodNotFound,"Unhandled method "+s.method),s.method,a);function l(e,t,r){var i={jsonrpc:f,id:s.id};e instanceof ye.ResponseError?i.error=e.toJson():i.result=void 0===e?null:e,L(i,t,r),p.write(i).catch(()=>g.error("Sending response failed."))}function h(e,t,r){L(e={jsonrpc:f,id:s.id,error:e.toJson()},t,r),p.write(e).catch(()=>g.error("Sending response failed."))}function c(e,t,r){void 0===e&&(e=null),L(e={jsonrpc:f,id:s.id,result:e},t,r),p.write(e).catch(()=>g.error("Sending response failed."))}}}function J(e){if(!C())if(null===e.id)e.error?g.error(`Received response message without id: Error is:
`+JSON.stringify(e.error,void 0,4)):g.error("Received response message without id. No further error information provided.");else{var t=e.id,r=m.get(t);if(ae(e,r),void 0!==r){m.delete(t);try{if(e.error){var i=e.error;r.reject(new ye.ResponseError(i.code,i.message,i.data))}else{if(void 0===e.result)throw new Error("Should never happen.");r.resolve(e.result)}}catch(e){e.message?g.error(`Response handler '${r.method}' failed with message: `+e.message):g.error(`Response handler '${r.method}' failed unexpectedly.`)}}}}function ee(r){if(!C()){let e,t;var i,n;if(r.method===de.type.method)i=r.params.id,y.delete(i),R(r);else if((i=s.get(r.method))&&(t=i.handler,e=i.type),t||a)try{R(r),t?void 0===r.params?(void 0!==e&&0!==e.numberOfParams&&e.parameterStructures!==ye.ParameterStructures.byName&&g.error(`Notification ${r.method} defines ${e.numberOfParams} params but received none.`),t()):Array.isArray(r.params)?(n=r.params,r.method===ge.type.method&&2===n.length&&pe.is(n[0])?t({token:n[0],value:n[1]}):(void 0!==e&&(e.parameterStructures===ye.ParameterStructures.byName&&g.error(`Notification ${r.method} defines parameters by name but received parameters by position`),e.numberOfParams!==r.params.length)&&g.error(`Notification ${r.method} defines ${e.numberOfParams} params but received ${n.length} arguments`),t(...n))):(void 0!==e&&e.parameterStructures===ye.ParameterStructures.byPosition&&g.error(`Notification ${r.method} defines parameters by position but received parameters by name`),t(r.params)):a&&a(r.method,r.params)}catch(e){e.message?g.error(`Notification handler '${r.method}' failed with message: `+e.message):g.error(`Notification handler '${r.method}' failed unexpectedly.`)}else q.fire(r)}}function te(e){e?(g.error(`Received message which is neither a response nor a notification message:
`+JSON.stringify(e,null,4)),(me.string(e.id)||me.number(e.id))&&(e=e.id,e=m.get(e))&&e.reject(new Error("The received response has neither a result nor an error property."))):g.error("Received empty message.")}function A(e){if(null!=e)switch(h){case ke.Verbose:return JSON.stringify(e,null,4);case ke.Compact:return JSON.stringify(e);default:return}}function re(t){if(h!==ke.Off&&x)if(c===we.Text){let e;h!==ke.Verbose&&h!==ke.Compact||!t.params||(e=`Params: ${A(t.params)}
`),x.log(`Sending request '${t.method} - (${t.id})'.`,e)}else I("send-request",t)}function ie(t){if(h!==ke.Off&&x)if(c===we.Text){let e;h!==ke.Verbose&&h!==ke.Compact||(e=t.params?`Params: ${A(t.params)}
`:`No parameters provided.
`),x.log(`Sending notification '${t.method}'.`,e)}else I("send-notification",t)}function L(t,r,i){if(h!==ke.Off&&x)if(c===we.Text){let e;h!==ke.Verbose&&h!==ke.Compact||(t.error&&t.error.data?e=`Error data: ${A(t.error.data)}
`:t.result?e=`Result: ${A(t.result)}
`:void 0===t.error&&(e=`No result returned.
`)),x.log(`Sending response '${r} - (${t.id})'. Processing request took ${Date.now()-i}ms`,e)}else I("send-response",t)}function ne(t){if(h!==ke.Off&&x)if(c===we.Text){let e;h!==ke.Verbose&&h!==ke.Compact||!t.params||(e=`Params: ${A(t.params)}
`),x.log(`Received request '${t.method} - (${t.id})'.`,e)}else I("receive-request",t)}function R(t){if(h!==ke.Off&&x&&t.method!==Ee.type.method)if(c===we.Text){let e;h!==ke.Verbose&&h!==ke.Compact||(e=t.params?`Params: ${A(t.params)}
`:`No parameters provided.
`),x.log(`Received notification '${t.method}'.`,e)}else I("receive-notification",t)}function ae(r,i){if(h!==ke.Off&&x)if(c===we.Text){let e,t;h!==ke.Verbose&&h!==ke.Compact||(r.error&&r.error.data?e=`Error data: ${A(r.error.data)}
`:r.result?e=`Result: ${A(r.result)}
`:void 0===r.error&&(e=`No result returned.
`)),i?(t=r.error?` Request failed: ${r.error.message} (${r.error.code}).`:"",x.log(`Received response '${i.method} - (${r.id})' in ${Date.now()-i.timerStart}ms.`+t,e)):x.log(`Received response ${r.id} without active response promise.`,e)}else I("receive-response",r)}function I(e,t){x&&h!==ke.Off&&(e={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()},x.log(e))}function N(){if(w())throw new Ie(Se.Closed,"Connection is closed.");if(C())throw new Ie(Se.Disposed,"Connection is disposed.")}function se(){if(k())throw new Ie(Se.AlreadyListening,"Connection is already listening")}function oe(){if(!k())throw new Error("Call listen() first.")}function D(e){return void 0===e?null:e}function le(e){if(null!==e)return e}function he(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function M(e,t){switch(e){case ye.ParameterStructures.auto:return he(t)?le(t):[D(t)];case ye.ParameterStructures.byName:if(he(t))return le(t);throw new Error("Received parameters by name but param is not an object literal.");case ye.ParameterStructures.byPosition:return[D(t)];default:throw new Error("Unknown parameter structure "+e.toString())}}function ce(e,t){let r,i=e.numberOfParams;switch(i){case 0:r=void 0;break;case 1:r=M(e.parameterStructures,t[0]);break;default:r=[];for(let e=0;e<t.length&&e<i;e++)r.push(D(t[e]));if(t.length<i)for(let e=t.length;e<i;e++)r.push(null)}return r}mt(Q,"handleRequest"),mt(J,"handleResponse"),mt(ee,"handleNotification"),mt(te,"handleInvalidMessage"),mt(A,"stringifyTrace"),mt(re,"traceSendingRequest"),mt(ie,"traceSendingNotification"),mt(L,"traceSendingResponse"),mt(ne,"traceReceivedRequest"),mt(R,"traceReceivedNotification"),mt(ae,"traceReceivedResponse"),mt(I,"logLSPMessage"),mt(N,"throwIfClosedOrDisposed"),mt(se,"throwIfListening"),mt(oe,"throwIfNotListening"),mt(D,"undefinedToNull"),mt(le,"nullToUndefined"),mt(he,"isNamedParam"),mt(M,"computeSingleParam"),mt(ce,"computeMessageParams");let O={sendNotification:mt((i,...n)=>{N();let a,s;if(me.string(i)){a=i;let e=n[0],t=0,r=ye.ParameterStructures.auto;ye.ParameterStructures.is(e)&&(t=1,r=e);var o=n.length,l=o-t;switch(l){case 0:s=void 0;break;case 1:s=M(r,n[t]);break;default:if(r===ye.ParameterStructures.byName)throw new Error(`Received ${l} parameters for 'by Name' notification parameter structure.`);s=n.slice(t,o).map(e=>D(e))}}else a=i.method,s=ce(i,n);return ie(i={jsonrpc:f,method:a,params:s}),p.write(i).catch(e=>{throw g.error("Sending notification failed."),e})},"sendNotification"),onNotification:mt((e,t)=>{N();let r;return me.func(e)?a=e:t&&(me.string(e)?(r=e,s.set(e,{type:void 0,handler:t})):(r=e.method,s.set(e.method,{type:e,handler:t}))),{dispose:mt(()=>{void 0!==r?s.delete(r):a=void 0},"dispose")}},"onNotification"),onProgress:mt((e,t,r)=>{if(i.has(t))throw new Error(`Progress handler for token ${t} already registered`);return i.set(t,r),{dispose:mt(()=>{i.delete(t)},"dispose")}},"onProgress"),sendProgress:mt((e,t,r)=>O.sendNotification(ge.type,{token:t,value:r}),"sendProgress"),onUnhandledProgress:W.event,sendRequest:mt((a,...s)=>{N(),oe();let o,l,h;if(me.string(a)){o=a;let e=s[0],t=s[s.length-1],r=0,i=ye.ParameterStructures.auto,n=(ye.ParameterStructures.is(e)&&(r=1,i=e),s.length);be.CancellationToken.is(t)&&(--n,h=t);var c=n-r;switch(c){case 0:l=void 0;break;case 1:l=M(i,s[r]);break;default:if(i===ye.ParameterStructures.byName)throw new Error(`Received ${c} parameters for 'by Name' request parameter structure.`);l=s.slice(r,n).map(e=>D(e))}}else{var e=s,a=(o=a.method,l=ce(a,e),a.numberOfParams);h=be.CancellationToken.is(e[a])?e[a]:void 0}let n=P++,u,d=(h&&(u=h.onCancellationRequested(()=>{var e=b.sender.sendCancellation(O,n);return void 0===e?(g.log("Received no promise from cancellation strategy when cancelling id "+n),Promise.resolve()):e.catch(()=>{g.log(`Sending cancellation messages for id ${n} failed`)})})),{jsonrpc:f,id:n,method:o,params:l});return re(d),"function"==typeof b.sender.enableCancellation&&b.sender.enableCancellation(d),new Promise(async(t,r)=>{var e=mt(e=>{t(e),b.sender.cleanup(n),u?.dispose()},"resolveWithCleanup"),i=mt(e=>{r(e),b.sender.cleanup(n),u?.dispose()},"rejectWithCleanup"),e={method:o,timerStart:Date.now(),resolve:e,reject:i};try{await p.write(d),m.set(n,e)}catch(i){throw g.error("Sending request failed."),e.reject(new ye.ResponseError(ye.ErrorCodes.MessageWriteError,i.message||"Unknown reason")),i}})},"sendRequest"),onRequest:mt((e,t)=>{N();let r=null;return Te.is(e)?(r=void 0,u=e):me.string(e)?(r=null,void 0!==t&&(r=e,d.set(e,{handler:t,type:void 0}))):void 0!==t&&(r=e.method,d.set(e.method,{type:e,handler:t})),{dispose:mt(()=>{null!==r&&(void 0!==r?d.delete(r):u=void 0)},"dispose")}},"onRequest"),hasPendingResponse:mt(()=>0<m.size,"hasPendingResponse"),trace:mt(async(e,t,r)=>{let i=!1,n=we.Text;void 0!==r&&(me.boolean(r)?i=r:(i=r.sendNotification||!1,n=r.traceFormat||we.Text)),h=e,c=n,x=h===ke.Off?void 0:t,!i||w()||C()||await O.sendNotification(Ce.type,{value:ke.toString(e)})},"trace"),onError:t.event,onClose:z.event,onUnhandledNotification:q.event,onDispose:U.event,end:mt(()=>{p.end()},"end"),dispose:mt(()=>{if(!C()){n=Re.Disposed,U.fire(void 0);var e,t=new ye.ResponseError(ye.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(e of m.values())e.reject(t);m=new Map,v=new Map,y=new Set,l=new ve.LinkedMap,me.func(p.dispose)&&p.dispose(),me.func(r.dispose)&&r.dispose()}},"dispose"),listen:mt(()=>{N(),se(),n=Re.Listening,r.listen(Z)},"listen"),inspect:mt(()=>{(0,fe.default)().console.log("inspect")},"inspect")};return O.onNotification(Ee.type,e=>{var t;h!==ke.Off&&x&&(t=h===ke.Verbose||h===ke.Compact,x.log(e.message,t?e.verbose:void 0))}),O.onNotification(ge.type,e=>{var t=i.get(e.token);t?t(e.value):W.fire(e)}),O}ue.ConnectionError=Ie,i=l||(ue.ConnectionStrategy=l={}),mt(d,"is"),i.is=d,i=_e||(ue.IdCancellationReceiverStrategy=_e={}),mt(p,"is"),i.is=p,i=h||(ue.RequestCancellationReceiverStrategy=h={}),mt(g,"is"),i.is=g,(i=c||(ue.CancellationReceiverStrategy=c={})).Message=Object.freeze({createCancellationTokenSource(e){return new be.CancellationTokenSource}}),mt(f,"is"),i.is=f,(i=u||(ue.CancellationSenderStrategy=u={})).Message=Object.freeze({sendCancellation(e,t){return e.sendNotification(de.type,{id:t})},cleanup(e){}}),mt(m,"is"),i.is=m,(i=Ae||(ue.CancellationStrategy=Ae={})).Message=Object.freeze({receiver:c.Message,sender:u.Message}),mt(y,"is"),i.is=y,i=Le||(ue.MessageStrategy=Le={}),mt(v,"is"),i.is=v,i=ue.ConnectionOptions={},mt(x,"is"),i.is=x,i=Re={New:1,1:"New",Listening:2,2:"Listening",Closed:3,3:"Closed",Disposed:4,4:"Disposed"},mt(b,"createMessageConnection"),ue.createMessageConnection=b}),ZTe=tYe(e=>{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=WTe(),r=(Object.defineProperty(e,"Message",{enumerable:!0,get:mt(function(){return t.Message},"get")}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:mt(function(){return t.RequestType},"get")}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:mt(function(){return t.RequestType0},"get")}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:mt(function(){return t.RequestType1},"get")}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:mt(function(){return t.RequestType2},"get")}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:mt(function(){return t.RequestType3},"get")}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:mt(function(){return t.RequestType4},"get")}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:mt(function(){return t.RequestType5},"get")}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:mt(function(){return t.RequestType6},"get")}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:mt(function(){return t.RequestType7},"get")}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:mt(function(){return t.RequestType8},"get")}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:mt(function(){return t.RequestType9},"get")}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:mt(function(){return t.ResponseError},"get")}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:mt(function(){return t.ErrorCodes},"get")}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:mt(function(){return t.NotificationType},"get")}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:mt(function(){return t.NotificationType0},"get")}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:mt(function(){return t.NotificationType1},"get")}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:mt(function(){return t.NotificationType2},"get")}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:mt(function(){return t.NotificationType3},"get")}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:mt(function(){return t.NotificationType4},"get")}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:mt(function(){return t.NotificationType5},"get")}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:mt(function(){return t.NotificationType6},"get")}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:mt(function(){return t.NotificationType7},"get")}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:mt(function(){return t.NotificationType8},"get")}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:mt(function(){return t.NotificationType9},"get")}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:mt(function(){return t.ParameterStructures},"get")}),UTe()),i=(Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:mt(function(){return r.LinkedMap},"get")}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:mt(function(){return r.LRUCache},"get")}),Object.defineProperty(e,"Touch",{enumerable:!0,get:mt(function(){return r.Touch},"get")}),GTe()),n=(Object.defineProperty(e,"Disposable",{enumerable:!0,get:mt(function(){return i.Disposable},"get")}),s3e()),a=(Object.defineProperty(e,"Event",{enumerable:!0,get:mt(function(){return n.Event},"get")}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:mt(function(){return n.Emitter},"get")}),o3e()),s=(Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:mt(function(){return a.CancellationTokenSource},"get")}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:mt(function(){return a.CancellationToken},"get")}),jTe()),o=(Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:mt(function(){return s.SharedArraySenderStrategy},"get")}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:mt(function(){return s.SharedArrayReceiverStrategy},"get")}),YTe()),l=(Object.defineProperty(e,"MessageReader",{enumerable:!0,get:mt(function(){return o.MessageReader},"get")}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:mt(function(){return o.AbstractMessageReader},"get")}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:mt(function(){return o.ReadableStreamMessageReader},"get")}),HTe()),h=(Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:mt(function(){return l.MessageWriter},"get")}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:mt(function(){return l.AbstractMessageWriter},"get")}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:mt(function(){return l.WriteableStreamMessageWriter},"get")}),XTe()),c=(Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:mt(function(){return h.AbstractMessageBuffer},"get")}),KTe()),u=(Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:mt(function(){return c.ConnectionStrategy},"get")}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:mt(function(){return c.ConnectionOptions},"get")}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:mt(function(){return c.NullLogger},"get")}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:mt(function(){return c.createMessageConnection},"get")}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:mt(function(){return c.ProgressToken},"get")}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:mt(function(){return c.ProgressType},"get")}),Object.defineProperty(e,"Trace",{enumerable:!0,get:mt(function(){return c.Trace},"get")}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:mt(function(){return c.TraceValues},"get")}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:mt(function(){return c.TraceFormat},"get")}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:mt(function(){return c.SetTraceNotification},"get")}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:mt(function(){return c.LogTraceNotification},"get")}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:mt(function(){return c.ConnectionErrors},"get")}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:mt(function(){return c.ConnectionError},"get")}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:mt(function(){return c.CancellationReceiverStrategy},"get")}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:mt(function(){return c.CancellationSenderStrategy},"get")}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:mt(function(){return c.CancellationStrategy},"get")}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:mt(function(){return c.MessageStrategy},"get")}),n3e());e.RAL=u.default}),QTe=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t,r=ZTe(),i=class c extends r.AbstractMessageBuffer{static{mt(this,"MessageBuffer")}constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return c.emptyBuffer}fromString(e,t){return(new TextEncoder).encode(e)}toString(e,t){return("ascii"===t?this.asciiDecoder:new TextDecoder(t)).decode(e)}asNative(e,t){return void 0===t?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}},n=(i.emptyBuffer=new Uint8Array(0),class{static{mt(this,"ReadableStreamWrapper")}constructor(e){this.socket=e,this._onData=new r.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then(e=>{this._onData.fire(new Uint8Array(e))},()=>{(0,r.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),r.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),r.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),r.Disposable.create(()=>this.socket.removeEventListener("end",e))}onData(e){return this._onData.event(e)}}),a=class{static{mt(this,"WritableStreamWrapper")}constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),r.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),r.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),r.Disposable.create(()=>this.socket.removeEventListener("end",e))}write(e,t){if("string"==typeof e&&void 0!==t&&"utf-8"!==t)throw new Error("In a Browser environments only utf-8 text encoding is supported. But got encoding: "+t);return this.socket.send(e),Promise.resolve()}end(){this.socket.close()}},s=new TextEncoder,o=Object.freeze({messageBuffer:Object.freeze({create:mt(e=>new i(e),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:mt((e,t)=>{if("utf-8"!==t.charset)throw new Error("In a Browser environments only utf-8 text encoding is supported. But got encoding: "+t.charset);return Promise.resolve(s.encode(JSON.stringify(e,void 0,0)))},"encode")}),decoder:Object.freeze({name:"application/json",decode:mt((e,t)=>{if(e instanceof Uint8Array)return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)));throw new Error("In a Browser environments only Uint8Arrays are supported.")},"decode")})}),stream:Object.freeze({asReadableStream:mt(e=>new n(e),"asReadableStream"),asWritableStream:mt(e=>new a(e),"asWritableStream")}),console:console,timer:Object.freeze({setTimeout(e,t,...r){let i=setTimeout(e,t,...r);return{dispose:mt(()=>clearTimeout(i),"dispose")}},setImmediate(e,...t){let r=setTimeout(e,0,...t);return{dispose:mt(()=>clearTimeout(r),"dispose")}},setInterval(e,t,...r){let i=setInterval(e,t,...r);return{dispose:mt(()=>clearInterval(i),"dispose")}}})});function l(){return o}function h(){r.RAL.install(o)}mt(l,"RIL"),t=l,mt(h,"install"),t.install=h,e.default=l}),JTe=tYe(e=>{var i=e&&e.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&("get"in n?t.__esModule:!n.writable&&!n.configurable)||(n={enumerable:!0,get:mt(function(){return t[r]},"get")}),Object.defineProperty(e,i,n)}:function(e,t,r,i){e[i=void 0===i?r:i]=t[r]}),t=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)},n=(Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0,QTe().default.install(),ZTe()),t=(t(ZTe(),e),class extends n.AbstractMessageReader{static{mt(this,"BrowserMessageReader")}constructor(e){super(),this._onData=new n.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener("error",e=>this.fireError(e)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}}),t=(e.BrowserMessageReader=t,class extends n.AbstractMessageWriter{static{mt(this,"BrowserMessageWriter")}constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener("error",e=>this.fireError(e))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(e){return this.handleError(e,t),Promise.reject(e)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}});function r(e,t,r,i){return void 0===r&&(r=n.NullLogger),n.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,n.createMessageConnection)(e,t,r,i)}e.BrowserMessageWriter=t,mt(r,"createMessageConnection"),e.createMessageConnection=r}),eke=tYe((e,t)=>{t.exports=JTe()}),tke=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;var t=JTe(),r=(e.MessageDirection={clientToServer:"clientToServer",serverToClient:"serverToClient",both:"both"},class{static{mt(this,"RegistrationType")}constructor(e){this.method=e}}),r=(e.RegistrationType=r,class extends t.RequestType0{static{mt(this,"ProtocolRequestType0")}constructor(e){super(e)}}),r=(e.ProtocolRequestType0=r,class extends t.RequestType{static{mt(this,"ProtocolRequestType")}constructor(e){super(e,t.ParameterStructures.byName)}}),r=(e.ProtocolRequestType=r,class extends t.NotificationType0{static{mt(this,"ProtocolNotificationType0")}constructor(e){super(e)}}),r=(e.ProtocolNotificationType0=r,class extends t.NotificationType{static{mt(this,"ProtocolNotificationType")}constructor(e){super(e,t.ParameterStructures.byName)}});e.ProtocolNotificationType=r}),rke=tYe(e=>{function t(e){return!0===e||!1===e}function r(e){return"string"==typeof e||e instanceof String}function i(e){return"number"==typeof e||e instanceof Number}function n(e){return e instanceof Error}function a(e){return"function"==typeof e}function s(e){return Array.isArray(e)}function o(e){return s(e)&&e.every(e=>r(e))}function l(e,t){return Array.isArray(e)&&e.every(t)}function h(e){return null!==e&&"object"==typeof e}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,mt(t,"boolean"),e.boolean=t,mt(r,"string"),e.string=r,mt(i,"number"),e.number=i,mt(n,"error"),e.error=n,mt(a,"func"),e.func=a,mt(s,"array"),e.array=s,mt(o,"stringArray"),e.stringArray=o,mt(l,"typedArray"),e.typedArray=l,mt(h,"objectLiteral"),e.objectLiteral=h}),ike=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;var t=tke();(e=e.ImplementationRequest={method:"textDocument/implementation"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}),nke=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TypeDefinitionRequest=void 0;var t=tke();(e=e.TypeDefinitionRequest={method:"textDocument/typeDefinition"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}),ake=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;var t,r=tke();(t=e.WorkspaceFoldersRequest={method:"workspace/workspaceFolders"}).messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolRequestType0(t.method),(t=e.DidChangeWorkspaceFoldersNotification={method:"workspace/didChangeWorkspaceFolders"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType(t.method)}),ske=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;var t=tke();(e=e.ConfigurationRequest={method:"workspace/configuration"}).messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)}),oke=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;var t,r=tke();(t=e.DocumentColorRequest={method:"textDocument/documentColor"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.ColorPresentationRequest={method:"textDocument/colorPresentation"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}),lke=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;var t,r=tke();(t=e.FoldingRangeRequest={method:"textDocument/foldingRange"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.FoldingRangeRefreshRequest={method:"workspace/foldingRange/refresh"}).messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolRequestType0(t.method)}),hke=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;var t=tke();(e=e.DeclarationRequest={method:"textDocument/declaration"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}),cke=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRangeRequest=void 0;var t=tke();(e=e.SelectionRangeRequest={method:"textDocument/selectionRange"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}),uke=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;var t,r=JTe(),i=tke();function n(e){return e===t.type}(t=e.WorkDoneProgress={}).type=new r.ProgressType,mt(n,"is"),t.is=n,(r=e.WorkDoneProgressCreateRequest={method:"window/workDoneProgress/create"}).messageDirection=i.MessageDirection.serverToClient,r.type=new i.ProtocolRequestType(r.method),(r=e.WorkDoneProgressCancelNotification={method:"window/workDoneProgress/cancel"}).messageDirection=i.MessageDirection.clientToServer,r.type=new i.ProtocolNotificationType(r.method)}),dke=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;var t,r=tke();(t=e.CallHierarchyPrepareRequest={method:"textDocument/prepareCallHierarchy"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.CallHierarchyIncomingCallsRequest={method:"callHierarchy/incomingCalls"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.CallHierarchyOutgoingCallsRequest={method:"callHierarchy/outgoingCalls"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}),pke=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.SemanticTokensRegistrationType=e.TokenFormat=void 0;var t,r,i=tke();(e.TokenFormat={}).Relative="relative",(r=t||(e.SemanticTokensRegistrationType=t={})).method="textDocument/semanticTokens",r.type=new i.RegistrationType(r.method),(r=e.SemanticTokensRequest={method:"textDocument/semanticTokens/full"}).messageDirection=i.MessageDirection.clientToServer,r.type=new i.ProtocolRequestType(r.method),r.registrationMethod=t.method,(r=e.SemanticTokensDeltaRequest={method:"textDocument/semanticTokens/full/delta"}).messageDirection=i.MessageDirection.clientToServer,r.type=new i.ProtocolRequestType(r.method),r.registrationMethod=t.method,(r=e.SemanticTokensRangeRequest={method:"textDocument/semanticTokens/range"}).messageDirection=i.MessageDirection.clientToServer,r.type=new i.ProtocolRequestType(r.method),r.registrationMethod=t.method,(r=e.SemanticTokensRefreshRequest={method:"workspace/semanticTokens/refresh"}).messageDirection=i.MessageDirection.serverToClient,r.type=new i.ProtocolRequestType0(r.method)}),gke=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentRequest=void 0;var t=tke();(e=e.ShowDocumentRequest={method:"window/showDocument"}).messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)}),fke=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;var t=tke();(e=e.LinkedEditingRangeRequest={method:"textDocument/linkedEditingRange"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}),mke=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;var t,r=tke();e.FileOperationPatternKind={file:"file",folder:"folder"},(t=e.WillCreateFilesRequest={method:"workspace/willCreateFiles"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.DidCreateFilesNotification={method:"workspace/didCreateFiles"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType(t.method),(t=e.WillRenameFilesRequest={method:"workspace/willRenameFiles"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.DidRenameFilesNotification={method:"workspace/didRenameFiles"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType(t.method),(t=e.DidDeleteFilesNotification={method:"workspace/didDeleteFiles"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType(t.method),(t=e.WillDeleteFilesRequest={method:"workspace/willDeleteFiles"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}),yke=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;var t=tke();e.UniquenessLevel={document:"document",project:"project",group:"group",scheme:"scheme",global:"global"},e.MonikerKind={$import:"import",$export:"export",local:"local"},(e=e.MonikerRequest={method:"textDocument/moniker"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}),vke=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t,r=tke();(t=e.TypeHierarchyPrepareRequest={method:"textDocument/prepareTypeHierarchy"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.TypeHierarchySupertypesRequest={method:"typeHierarchy/supertypes"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.TypeHierarchySubtypesRequest={method:"typeHierarchy/subtypes"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}),xke=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;var t,r=tke();(t=e.InlineValueRequest={method:"textDocument/inlineValue"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.InlineValueRefreshRequest={method:"workspace/inlineValue/refresh"}).messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolRequestType0(t.method)}),bke=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;var t,r=tke();(t=e.InlayHintRequest={method:"textDocument/inlayHint"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.InlayHintResolveRequest={method:"inlayHint/resolve"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.InlayHintRefreshRequest={method:"workspace/inlayHint/refresh"}).messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolRequestType0(t.method)}),Tke=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;var t,r=JTe(),i=rke(),n=tke();function a(e){return e&&i.boolean(e.retriggerRequest)}t=e.DiagnosticServerCancellationData={},mt(a,"is"),t.is=a,e.DocumentDiagnosticReportKind={Full:"full",Unchanged:"unchanged"},(t=e.DocumentDiagnosticRequest={method:"textDocument/diagnostic"}).messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method),t.partialResult=new r.ProgressType,(t=e.WorkspaceDiagnosticRequest={method:"workspace/diagnostic"}).messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method),t.partialResult=new r.ProgressType,(t=e.DiagnosticRefreshRequest={method:"workspace/diagnostic/refresh"}).messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType0(t.method)}),kke=tYe(e=>{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,f5e();var t,i,r,n,a,s=G(Nbe),o=rke(),l=tke();function h(e){return 1===e||2===e}function c(e,t){return e={executionOrder:e},!0!==t&&!1!==t||(e.success=t),e}function u(e){return o.objectLiteral(e)&&s.uinteger.is(e.executionOrder)&&(void 0===e.success||o.boolean(e.success))}function d(e,t){return e===t||null!=e&&null!=t&&e.executionOrder===t.executionOrder&&e.success===t.success}function p(e,t){return{kind:e,document:t}}function g(e){return o.objectLiteral(e)&&t.is(e.kind)&&s.DocumentUri.is(e.document)&&(void 0===e.metadata||o.objectLiteral(e.metadata))}function f(e,t){var r=new Set;return e.document!==t.document&&r.add("document"),e.kind!==t.kind&&r.add("kind"),e.executionSummary!==t.executionSummary&&r.add("executionSummary"),void 0===e.metadata&&void 0===t.metadata||m(e.metadata,t.metadata)||r.add("metadata"),void 0===e.executionSummary&&void 0===t.executionSummary||i.equals(e.executionSummary,t.executionSummary)||r.add("executionSummary"),r}function m(t,r){if(t!==r){if(null==t||null==r||typeof t!=typeof r||"object"!=typeof t)return!1;var e=Array.isArray(t),i=Array.isArray(r);if(e!==i)return!1;if(e&&i){if(t.length!==r.length)return!1;for(let e=0;e<t.length;e++)if(!m(t[e],r[e]))return!1}if(o.objectLiteral(t)&&o.objectLiteral(r)){var n=Object.keys(t),e=Object.keys(r);if(n.length!==e.length||(n.sort(),e.sort(),!m(n,e)))return!1;for(let e=0;e<n.length;e++){var a=n[e];if(!m(t[a],r[a]))return!1}}}return!0}function y(e,t,r,i){return{uri:e,notebookType:t,version:r,cells:i}}function v(e){return o.objectLiteral(e)&&o.string(e.uri)&&s.integer.is(e.version)&&o.typedArray(e.cells,r.is)}function x(e){return o.objectLiteral(e)&&s.uinteger.is(e.start)&&s.uinteger.is(e.deleteCount)&&(void 0===e.cells||o.typedArray(e.cells,r.is))}function b(e,t,r){return e={start:e,deleteCount:t},void 0!==r&&(e.cells=r),e}(a=t||(e.NotebookCellKind=t={})).Markup=1,a.Code=2,mt(h,"is"),a.is=h,a=i||(e.ExecutionSummary=i={}),mt(c,"create"),a.create=c,mt(u,"is"),a.is=u,mt(d,"equals"),a.equals=d,a=r||(e.NotebookCell=r={}),mt(p,"create"),a.create=p,mt(g,"is"),a.is=g,mt(f,"diff"),a.diff=f,mt(m,"equalsMetadata"),a=e.NotebookDocument={},mt(y,"create"),a.create=y,mt(v,"is"),a.is=v,(a=n||(e.NotebookDocumentSyncRegistrationType=n={})).method="notebookDocument/sync",a.messageDirection=l.MessageDirection.clientToServer,a.type=new l.RegistrationType(a.method),(a=e.DidOpenNotebookDocumentNotification={method:"notebookDocument/didOpen"}).messageDirection=l.MessageDirection.clientToServer,a.type=new l.ProtocolNotificationType(a.method),a.registrationMethod=n.method,a=e.NotebookCellArrayChange={},mt(x,"is"),a.is=x,mt(b,"create"),a.create=b,(a=e.DidChangeNotebookDocumentNotification={method:"notebookDocument/didChange"}).messageDirection=l.MessageDirection.clientToServer,a.type=new l.ProtocolNotificationType(a.method),a.registrationMethod=n.method,(a=e.DidSaveNotebookDocumentNotification={method:"notebookDocument/didSave"}).messageDirection=l.MessageDirection.clientToServer,a.type=new l.ProtocolNotificationType(a.method),a.registrationMethod=n.method,(a=e.DidCloseNotebookDocumentNotification={method:"notebookDocument/didClose"}).messageDirection=l.MessageDirection.clientToServer,a.type=new l.ProtocolNotificationType(a.method),a.registrationMethod=n.method}),wke=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionRequest=void 0;var t=tke();(e=e.InlineCompletionRequest={method:"textDocument/inlineCompletion"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}),Cke=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceSymbolRequest=e.CodeActionResolveRequest=e.CodeActionRequest=e.DocumentSymbolRequest=e.DocumentHighlightRequest=e.ReferencesRequest=e.DefinitionRequest=e.SignatureHelpRequest=e.SignatureHelpTriggerKind=e.HoverRequest=e.CompletionResolveRequest=e.CompletionRequest=e.CompletionTriggerKind=e.PublishDiagnosticsNotification=e.WatchKind=e.RelativePattern=e.FileChangeType=e.DidChangeWatchedFilesNotification=e.WillSaveTextDocumentWaitUntilRequest=e.WillSaveTextDocumentNotification=e.TextDocumentSaveReason=e.DidSaveTextDocumentNotification=e.DidCloseTextDocumentNotification=e.DidChangeTextDocumentNotification=e.TextDocumentContentChangeEvent=e.DidOpenTextDocumentNotification=e.TextDocumentSyncKind=e.TelemetryEventNotification=e.LogMessageNotification=e.ShowMessageRequest=e.ShowMessageNotification=e.MessageType=e.DidChangeConfigurationNotification=e.ExitNotification=e.ShutdownRequest=e.InitializedNotification=e.InitializeErrorCodes=e.InitializeRequest=e.WorkDoneProgressOptions=e.TextDocumentRegistrationOptions=e.StaticRegistrationOptions=e.PositionEncodingKind=e.FailureHandlingKind=e.ResourceOperationKind=e.UnregistrationRequest=e.RegistrationRequest=e.DocumentSelector=e.NotebookCellTextDocumentFilter=e.NotebookDocumentFilter=e.TextDocumentFilter=void 0,e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.WillRenameFilesRequest=e.DidRenameFilesNotification=e.WillCreateFilesRequest=e.DidCreateFilesNotification=e.FileOperationPatternKind=e.LinkedEditingRangeRequest=e.ShowDocumentRequest=e.SemanticTokensRegistrationType=e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.TokenFormat=e.CallHierarchyPrepareRequest=e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=e.SelectionRangeRequest=e.DeclarationRequest=e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=e.ColorPresentationRequest=e.DocumentColorRequest=e.ConfigurationRequest=e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=e.TypeDefinitionRequest=e.ImplementationRequest=e.ApplyWorkspaceEditRequest=e.ExecuteCommandRequest=e.PrepareRenameRequest=e.RenameRequest=e.PrepareSupportDefaultBehavior=e.DocumentOnTypeFormattingRequest=e.DocumentRangesFormattingRequest=e.DocumentRangeFormattingRequest=e.DocumentFormattingRequest=e.DocumentLinkResolveRequest=e.DocumentLinkRequest=e.CodeLensRefreshRequest=e.CodeLensResolveRequest=e.CodeLensRequest=e.WorkspaceSymbolResolveRequest=void 0,e.InlineCompletionRequest=e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=e.InlineValueRefreshRequest=e.InlineValueRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchySubtypesRequest=e.TypeHierarchyPrepareRequest=void 0;var r,t,i,n,a,s=tke(),o=(f5e(),G(Nbe)),l=rke(),h=ike(),c=(Object.defineProperty(e,"ImplementationRequest",{enumerable:!0,get:mt(function(){return h.ImplementationRequest},"get")}),nke()),u=(Object.defineProperty(e,"TypeDefinitionRequest",{enumerable:!0,get:mt(function(){return c.TypeDefinitionRequest},"get")}),ake()),d=(Object.defineProperty(e,"WorkspaceFoldersRequest",{enumerable:!0,get:mt(function(){return u.WorkspaceFoldersRequest},"get")}),Object.defineProperty(e,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:mt(function(){return u.DidChangeWorkspaceFoldersNotification},"get")}),ske()),p=(Object.defineProperty(e,"ConfigurationRequest",{enumerable:!0,get:mt(function(){return d.ConfigurationRequest},"get")}),oke()),g=(Object.defineProperty(e,"DocumentColorRequest",{enumerable:!0,get:mt(function(){return p.DocumentColorRequest},"get")}),Object.defineProperty(e,"ColorPresentationRequest",{enumerable:!0,get:mt(function(){return p.ColorPresentationRequest},"get")}),lke()),B=(Object.defineProperty(e,"FoldingRangeRequest",{enumerable:!0,get:mt(function(){return g.FoldingRangeRequest},"get")}),Object.defineProperty(e,"FoldingRangeRefreshRequest",{enumerable:!0,get:mt(function(){return g.FoldingRangeRefreshRequest},"get")}),hke()),P=(Object.defineProperty(e,"DeclarationRequest",{enumerable:!0,get:mt(function(){return B.DeclarationRequest},"get")}),cke()),f=(Object.defineProperty(e,"SelectionRangeRequest",{enumerable:!0,get:mt(function(){return P.SelectionRangeRequest},"get")}),uke()),m=(Object.defineProperty(e,"WorkDoneProgress",{enumerable:!0,get:mt(function(){return f.WorkDoneProgress},"get")}),Object.defineProperty(e,"WorkDoneProgressCreateRequest",{enumerable:!0,get:mt(function(){return f.WorkDoneProgressCreateRequest},"get")}),Object.defineProperty(e,"WorkDoneProgressCancelNotification",{enumerable:!0,get:mt(function(){return f.WorkDoneProgressCancelNotification},"get")}),dke()),y=(Object.defineProperty(e,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:mt(function(){return m.CallHierarchyIncomingCallsRequest},"get")}),Object.defineProperty(e,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:mt(function(){return m.CallHierarchyOutgoingCallsRequest},"get")}),Object.defineProperty(e,"CallHierarchyPrepareRequest",{enumerable:!0,get:mt(function(){return m.CallHierarchyPrepareRequest},"get")}),pke()),$=(Object.defineProperty(e,"TokenFormat",{enumerable:!0,get:mt(function(){return y.TokenFormat},"get")}),Object.defineProperty(e,"SemanticTokensRequest",{enumerable:!0,get:mt(function(){return y.SemanticTokensRequest},"get")}),Object.defineProperty(e,"SemanticTokensDeltaRequest",{enumerable:!0,get:mt(function(){return y.SemanticTokensDeltaRequest},"get")}),Object.defineProperty(e,"SemanticTokensRangeRequest",{enumerable:!0,get:mt(function(){return y.SemanticTokensRangeRequest},"get")}),Object.defineProperty(e,"SemanticTokensRefreshRequest",{enumerable:!0,get:mt(function(){return y.SemanticTokensRefreshRequest},"get")}),Object.defineProperty(e,"SemanticTokensRegistrationType",{enumerable:!0,get:mt(function(){return y.SemanticTokensRegistrationType},"get")}),gke()),F=(Object.defineProperty(e,"ShowDocumentRequest",{enumerable:!0,get:mt(function(){return $.ShowDocumentRequest},"get")}),fke()),v=(Object.defineProperty(e,"LinkedEditingRangeRequest",{enumerable:!0,get:mt(function(){return F.LinkedEditingRangeRequest},"get")}),mke()),x=(Object.defineProperty(e,"FileOperationPatternKind",{enumerable:!0,get:mt(function(){return v.FileOperationPatternKind},"get")}),Object.defineProperty(e,"DidCreateFilesNotification",{enumerable:!0,get:mt(function(){return v.DidCreateFilesNotification},"get")}),Object.defineProperty(e,"WillCreateFilesRequest",{enumerable:!0,get:mt(function(){return v.WillCreateFilesRequest},"get")}),Object.defineProperty(e,"DidRenameFilesNotification",{enumerable:!0,get:mt(function(){return v.DidRenameFilesNotification},"get")}),Object.defineProperty(e,"WillRenameFilesRequest",{enumerable:!0,get:mt(function(){return v.WillRenameFilesRequest},"get")}),Object.defineProperty(e,"DidDeleteFilesNotification",{enumerable:!0,get:mt(function(){return v.DidDeleteFilesNotification},"get")}),Object.defineProperty(e,"WillDeleteFilesRequest",{enumerable:!0,get:mt(function(){return v.WillDeleteFilesRequest},"get")}),yke()),b=(Object.defineProperty(e,"UniquenessLevel",{enumerable:!0,get:mt(function(){return x.UniquenessLevel},"get")}),Object.defineProperty(e,"MonikerKind",{enumerable:!0,get:mt(function(){return x.MonikerKind},"get")}),Object.defineProperty(e,"MonikerRequest",{enumerable:!0,get:mt(function(){return x.MonikerRequest},"get")}),vke()),T=(Object.defineProperty(e,"TypeHierarchyPrepareRequest",{enumerable:!0,get:mt(function(){return b.TypeHierarchyPrepareRequest},"get")}),Object.defineProperty(e,"TypeHierarchySubtypesRequest",{enumerable:!0,get:mt(function(){return b.TypeHierarchySubtypesRequest},"get")}),Object.defineProperty(e,"TypeHierarchySupertypesRequest",{enumerable:!0,get:mt(function(){return b.TypeHierarchySupertypesRequest},"get")}),xke()),k=(Object.defineProperty(e,"InlineValueRequest",{enumerable:!0,get:mt(function(){return T.InlineValueRequest},"get")}),Object.defineProperty(e,"InlineValueRefreshRequest",{enumerable:!0,get:mt(function(){return T.InlineValueRefreshRequest},"get")}),bke()),w=(Object.defineProperty(e,"InlayHintRequest",{enumerable:!0,get:mt(function(){return k.InlayHintRequest},"get")}),Object.defineProperty(e,"InlayHintResolveRequest",{enumerable:!0,get:mt(function(){return k.InlayHintResolveRequest},"get")}),Object.defineProperty(e,"InlayHintRefreshRequest",{enumerable:!0,get:mt(function(){return k.InlayHintRefreshRequest},"get")}),Tke()),C=(Object.defineProperty(e,"DiagnosticServerCancellationData",{enumerable:!0,get:mt(function(){return w.DiagnosticServerCancellationData},"get")}),Object.defineProperty(e,"DocumentDiagnosticReportKind",{enumerable:!0,get:mt(function(){return w.DocumentDiagnosticReportKind},"get")}),Object.defineProperty(e,"DocumentDiagnosticRequest",{enumerable:!0,get:mt(function(){return w.DocumentDiagnosticRequest},"get")}),Object.defineProperty(e,"WorkspaceDiagnosticRequest",{enumerable:!0,get:mt(function(){return w.WorkspaceDiagnosticRequest},"get")}),Object.defineProperty(e,"DiagnosticRefreshRequest",{enumerable:!0,get:mt(function(){return w.DiagnosticRefreshRequest},"get")}),kke()),z=(Object.defineProperty(e,"NotebookCellKind",{enumerable:!0,get:mt(function(){return C.NotebookCellKind},"get")}),Object.defineProperty(e,"ExecutionSummary",{enumerable:!0,get:mt(function(){return C.ExecutionSummary},"get")}),Object.defineProperty(e,"NotebookCell",{enumerable:!0,get:mt(function(){return C.NotebookCell},"get")}),Object.defineProperty(e,"NotebookDocument",{enumerable:!0,get:mt(function(){return C.NotebookDocument},"get")}),Object.defineProperty(e,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:mt(function(){return C.NotebookDocumentSyncRegistrationType},"get")}),Object.defineProperty(e,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:mt(function(){return C.DidOpenNotebookDocumentNotification},"get")}),Object.defineProperty(e,"NotebookCellArrayChange",{enumerable:!0,get:mt(function(){return C.NotebookCellArrayChange},"get")}),Object.defineProperty(e,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:mt(function(){return C.DidChangeNotebookDocumentNotification},"get")}),Object.defineProperty(e,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:mt(function(){return C.DidSaveNotebookDocumentNotification},"get")}),Object.defineProperty(e,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:mt(function(){return C.DidCloseNotebookDocumentNotification},"get")}),wke());function E(e){return l.string(e)||l.string(e.language)||l.string(e.scheme)||l.string(e.pattern)}function S(e){return l.objectLiteral(e)&&(l.string(e.notebookType)||l.string(e.scheme)||l.string(e.pattern))}function _(e){return l.objectLiteral(e)&&(l.string(e.notebook)||t.is(e.notebook))&&(void 0===e.language||l.string(e.language))}function A(e){if(!Array.isArray(e))return!1;for(var t of e)if(!l.string(t)&&!r.is(t)&&!i.is(t))return!1;return!0}function L(e){return e&&l.string(e.id)&&0<e.id.length}function R(e){return e&&(null===e.documentSelector||n.is(e.documentSelector))}function I(e){return l.objectLiteral(e)&&(void 0===e.workDoneProgress||l.boolean(e.workDoneProgress))}function N(e){return e&&l.boolean(e.workDoneProgress)}function D(e){return null!=e&&"string"==typeof e.text&&void 0!==e.range&&(void 0===e.rangeLength||"number"==typeof e.rangeLength)}function M(e){return null!=e&&"string"==typeof e.text&&void 0===e.range&&void 0===e.rangeLength}function O(e){return l.objectLiteral(e)&&(o.URI.is(e.baseUri)||o.WorkspaceFolder.is(e.baseUri))&&l.string(e.pattern)}Object.defineProperty(e,"InlineCompletionRequest",{enumerable:!0,get:mt(function(){return z.InlineCompletionRequest},"get")}),a=r||(e.TextDocumentFilter=r={}),mt(E,"is"),a.is=E,a=t||(e.NotebookDocumentFilter=t={}),mt(S,"is"),a.is=S,a=i||(e.NotebookCellTextDocumentFilter=i={}),mt(_,"is"),a.is=_,a=n||(e.DocumentSelector=n={}),mt(A,"is"),a.is=A,(a=e.RegistrationRequest={method:"client/registerCapability"}).messageDirection=s.MessageDirection.serverToClient,a.type=new s.ProtocolRequestType(a.method),(a=e.UnregistrationRequest={method:"client/unregisterCapability"}).messageDirection=s.MessageDirection.serverToClient,a.type=new s.ProtocolRequestType(a.method),e.ResourceOperationKind={Create:"create",Rename:"rename",Delete:"delete"},e.FailureHandlingKind={Abort:"abort",Transactional:"transactional",TextOnlyTransactional:"textOnlyTransactional",Undo:"undo"},e.PositionEncodingKind={UTF8:"utf-8",UTF16:"utf-16",UTF32:"utf-32"},a=e.StaticRegistrationOptions={},mt(L,"hasId"),a.hasId=L,a=e.TextDocumentRegistrationOptions={},mt(R,"is"),a.is=R,a=e.WorkDoneProgressOptions={},mt(I,"is"),a.is=I,mt(N,"hasWorkDoneProgress"),a.hasWorkDoneProgress=N,(a=e.InitializeRequest={method:"initialize"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(e.InitializeErrorCodes={}).unknownProtocolVersion=1,(a=e.InitializedNotification={method:"initialized"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolNotificationType(a.method),(a=e.ShutdownRequest={method:"shutdown"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType0(a.method),(a=e.ExitNotification={method:"exit"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolNotificationType0(a.method),(a=e.DidChangeConfigurationNotification={method:"workspace/didChangeConfiguration"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolNotificationType(a.method),e.MessageType={Error:1,Warning:2,Info:3,Log:4,Debug:5},(a=e.ShowMessageNotification={method:"window/showMessage"}).messageDirection=s.MessageDirection.serverToClient,a.type=new s.ProtocolNotificationType(a.method),(a=e.ShowMessageRequest={method:"window/showMessageRequest"}).messageDirection=s.MessageDirection.serverToClient,a.type=new s.ProtocolRequestType(a.method),(a=e.LogMessageNotification={method:"window/logMessage"}).messageDirection=s.MessageDirection.serverToClient,a.type=new s.ProtocolNotificationType(a.method),(a=e.TelemetryEventNotification={method:"telemetry/event"}).messageDirection=s.MessageDirection.serverToClient,a.type=new s.ProtocolNotificationType(a.method),e.TextDocumentSyncKind={None:0,Full:1,Incremental:2},(a=e.DidOpenTextDocumentNotification={method:"textDocument/didOpen"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolNotificationType(a.method),a=e.TextDocumentContentChangeEvent={},mt(D,"isIncremental"),a.isIncremental=D,mt(M,"isFull"),a.isFull=M,(a=e.DidChangeTextDocumentNotification={method:"textDocument/didChange"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolNotificationType(a.method),(a=e.DidCloseTextDocumentNotification={method:"textDocument/didClose"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolNotificationType(a.method),(a=e.DidSaveTextDocumentNotification={method:"textDocument/didSave"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolNotificationType(a.method),e.TextDocumentSaveReason={Manual:1,AfterDelay:2,FocusOut:3},(a=e.WillSaveTextDocumentNotification={method:"textDocument/willSave"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolNotificationType(a.method),(a=e.WillSaveTextDocumentWaitUntilRequest={method:"textDocument/willSaveWaitUntil"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.DidChangeWatchedFilesNotification={method:"workspace/didChangeWatchedFiles"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolNotificationType(a.method),e.FileChangeType={Created:1,Changed:2,Deleted:3},a=e.RelativePattern={},mt(O,"is"),a.is=O,e.WatchKind={Create:1,Change:2,Delete:4},(a=e.PublishDiagnosticsNotification={method:"textDocument/publishDiagnostics"}).messageDirection=s.MessageDirection.serverToClient,a.type=new s.ProtocolNotificationType(a.method),e.CompletionTriggerKind={Invoked:1,TriggerCharacter:2,TriggerForIncompleteCompletions:3},(a=e.CompletionRequest={method:"textDocument/completion"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.CompletionResolveRequest={method:"completionItem/resolve"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.HoverRequest={method:"textDocument/hover"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),e.SignatureHelpTriggerKind={Invoked:1,TriggerCharacter:2,ContentChange:3},(a=e.SignatureHelpRequest={method:"textDocument/signatureHelp"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.DefinitionRequest={method:"textDocument/definition"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.ReferencesRequest={method:"textDocument/references"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.DocumentHighlightRequest={method:"textDocument/documentHighlight"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.DocumentSymbolRequest={method:"textDocument/documentSymbol"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.CodeActionRequest={method:"textDocument/codeAction"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.CodeActionResolveRequest={method:"codeAction/resolve"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.WorkspaceSymbolRequest={method:"workspace/symbol"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.WorkspaceSymbolResolveRequest={method:"workspaceSymbol/resolve"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.CodeLensRequest={method:"textDocument/codeLens"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.CodeLensResolveRequest={method:"codeLens/resolve"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.CodeLensRefreshRequest={method:"workspace/codeLens/refresh"}).messageDirection=s.MessageDirection.serverToClient,a.type=new s.ProtocolRequestType0(a.method),(a=e.DocumentLinkRequest={method:"textDocument/documentLink"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.DocumentLinkResolveRequest={method:"documentLink/resolve"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.DocumentFormattingRequest={method:"textDocument/formatting"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.DocumentRangeFormattingRequest={method:"textDocument/rangeFormatting"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.DocumentRangesFormattingRequest={method:"textDocument/rangesFormatting"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.DocumentOnTypeFormattingRequest={method:"textDocument/onTypeFormatting"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(e.PrepareSupportDefaultBehavior={}).Identifier=1,(a=e.RenameRequest={method:"textDocument/rename"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.PrepareRenameRequest={method:"textDocument/prepareRename"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.ExecuteCommandRequest={method:"workspace/executeCommand"}).messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType(a.method),(a=e.ApplyWorkspaceEditRequest={method:"workspace/applyEdit"}).messageDirection=s.MessageDirection.serverToClient,a.type=new s.ProtocolRequestType("workspace/applyEdit")}),Eke=tYe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var n=JTe();function t(e,t,r,i){return n.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,n.createMessageConnection)(e,t,r,i)}mt(t,"createProtocolConnection"),e.createProtocolConnection=t}),Ske=tYe(e=>{var i=e&&e.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&("get"in n?t.__esModule:!n.writable&&!n.configurable)||(n={enumerable:!0,get:mt(function(){return t[r]},"get")}),Object.defineProperty(e,i,n)}:function(e,t,r,i){e[i=void 0===i?r:i]=t[r]}),t=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)},r=(Object.defineProperty(e,"__esModule",{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,t(JTe(),e),t((f5e(),G(Nbe)),e),t(tke(),e),t(Cke(),e),Eke());Object.defineProperty(e,"createProtocolConnection",{enumerable:!0,get:mt(function(){return r.createProtocolConnection},"get")}),e.LSPErrorCodes={lspReservedErrorRangeStart:-32899,RequestFailed:-32803,ServerCancelled:-32802,ContentModified:-32801,RequestCancelled:-32800,lspReservedErrorRangeEnd:-32800}}),_ke=tYe(e=>{var i=e&&e.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&("get"in n?t.__esModule:!n.writable&&!n.configurable)||(n={enumerable:!0,get:mt(function(){return t[r]},"get")}),Object.defineProperty(e,i,n)}:function(e,t,r,i){e[i=void 0===i?r:i]=t[r]}),t=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)},n=(Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0,eke());function r(e,t,r,i){return(0,n.createMessageConnection)(e,t,r,i)}t(eke(),e),t(Ske(),e),mt(r,"createProtocolConnection"),e.createProtocolConnection=r}),Ake=i(()=>{function e(e){return{dispose:mt(async()=>e(),"dispose")}}var t=ITe=ITe||{};mt(e,"create"),t.create=e}),Lke=i(()=>{NTe=U(_ke(),1),h3e(),Ake(),sTe(),x3e(),Vde(),F3e(),z3e(),DTe=class{static{mt(this,"DefaultDocumentBuilder")}constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new j3e,this.documentPhaseListeners=new j3e,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=N3e.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=l3e.CancellationToken.None){for(var i of e){var n,a=i.uri.toString();i.state===N3e.Validated?"boolean"==typeof t.validation&&t.validation?this.resetToState(i,N3e.IndexedReferences):"object"==typeof t.validation&&0<(n=this.findMissingValidationCategories(i,t)).length&&(this.buildState.set(a,{completed:!1,options:{validation:{categories:n}},result:this.buildState.get(a)?.result}),i.state=N3e.IndexedReferences):this.buildState.delete(a)}this.currentState=N3e.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,t,r)}async update(e,t,r=l3e.CancellationToken.None){this.currentState=N3e.Changed;var i,n,a,s=[];for(i of t)for(n of this.langiumDocuments.deleteDocuments(i))s.push(n.uri),this.cleanUpDeleted(n);for(a of t=(await Promise.all(e.map(e=>this.findChangedUris(e)))).flat()){let e=this.langiumDocuments.getDocument(a);void 0===e&&((e=this.langiumDocumentFactory.fromModel({$type:"INVALID"},a)).state=N3e.Changed,this.langiumDocuments.addDocument(e)),this.resetToState(e,N3e.Changed)}let o=zde(t).concat(s).map(e=>e.toString()).toSet();this.langiumDocuments.all.filter(e=>!o.has(e.uri.toString())&&this.shouldRelink(e,o)).forEach(e=>this.resetToState(e,N3e.ComputedScopes)),await this.emitUpdate(t,s),await g3e(r),e=this.sortDocuments(this.langiumDocuments.all.filter(e=>e.state<N3e.Validated||!this.buildState.get(e.uri.toString())?.completed||this.resultsAreIncomplete(e,this.updateBuildOptions)).toArray()),await this.buildDocuments(e,this.updateBuildOptions,r)}resultsAreIncomplete(e,t){return 1<=this.findMissingValidationCategories(e,t).length}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=void 0===t||!0===t.validation?i:"object"==typeof t.validation?t.validation.categories??i:[];return zde(a).filter(e=>!n.has(e)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{var 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(t,r){await Promise.all(this.updateListeners.map(e=>e(t,r)))}sortDocuments(e){let t=0,r=e.length-1;for(;t<r;){for(;t<e.length&&this.hasTextDocument(e[t]);)t++;for(;0<=r&&!this.hasTextDocument(e[r]);)r--;t<r&&([e[t],e[r]]=[e[r],e[t]])}return e}hasTextDocument(e){return!!this.textDocuments?.get(e.uri)}shouldRelink(e,t){return!!e.references.some(e=>void 0!==e.error)||this.indexManager.isAffected(e,t)}onUpdate(t){return this.updateListeners.push(t),ITe.create(()=>{var e=this.updateListeners.indexOf(t);0<=e&&this.updateListeners.splice(e,1)})}resetToState(e,t){switch(t){case N3e.Changed:case N3e.Parsed:this.indexManager.removeContent(e.uri);case N3e.IndexedContent:e.localSymbols=void 0;case N3e.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case N3e.Linked:this.indexManager.removeReferences(e.uri);case N3e.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case N3e.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=N3e.Changed}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,N3e.Parsed,r,e=>this.langiumDocumentFactory.update(e,r)),await this.runCancelable(e,N3e.IndexedContent,r,e=>this.indexManager.updateContent(e,r)),await this.runCancelable(e,N3e.ComputedScopes,r,async e=>{var t=this.serviceRegistry.getServices(e.uri).references.ScopeComputation;e.localSymbols=await t.collectLocalSymbols(e,r)}),t=e.filter(e=>this.shouldLink(e)),await this.runCancelable(t,N3e.Linked,r,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,r)),await this.runCancelable(t,N3e.IndexedReferences,r,e=>this.indexManager.updateReferences(e,r)),t=e.filter(e=>!!this.shouldValidate(e)||(this.markAsCompleted(e),!1)),await this.runCancelable(t,N3e.Validated,r,async e=>{await this.validate(e,r),this.markAsCompleted(e)})}markAsCompleted(e){(e=this.buildState.get(e.uri.toString()))&&(e.completed=!0)}prepareBuild(e,t){for(var r of e){var r=r.uri.toString(),i=this.buildState.get(r);i&&!i.completed||this.buildState.set(r,{completed:!1,options:t,result:i?.result})}}async runCancelable(e,t,r,i){for(var n of e)n.state<t&&(await g3e(r),await i(n),n.state=t,await this.notifyDocumentPhase(n,t,r));e=e.filter(e=>e.state===t),await this.notifyBuildPhase(e,t,r),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),ITe.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),ITe.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,r){let i;return t&&"path"in t?i=t:r=t,r=r??l3e.CancellationToken.None,i?this.awaitDocumentState(e,i,r):this.awaitBuilderState(e,r)}awaitDocumentState(n,a,s){var e=this.langiumDocuments.getDocument(a);return e?e.state>=n?Promise.resolve(a):s.isCancellationRequested?Promise.reject(y3e):this.currentState>=n&&n>e.state?Promise.reject(new NTe.ResponseError(NTe.LSPErrorCodes.RequestFailed,`Document state of ${a.toString()} is ${N3e[e.state]}, requiring ${N3e[n]}, but workspace state is already ${N3e[this.currentState]}. Returning undefined.`)):new Promise((t,e)=>{let r=this.onDocumentPhase(n,e=>{R3e.equals(e.uri,a)&&(r.dispose(),i.dispose(),t(e.uri))}),i=s.onCancellationRequested(()=>{r.dispose(),i.dispose(),e(y3e)})}):Promise.reject(new NTe.ResponseError(NTe.LSPErrorCodes.ServerCancelled,"No document found for URI: "+a.toString()))}awaitBuilderState(n,a){return this.currentState>=n?Promise.resolve():a.isCancellationRequested?Promise.reject(y3e):new Promise((e,t)=>{let r=this.onBuildPhase(n,()=>{r.dispose(),i.dispose(),e()}),i=a.onCancellationRequested(()=>{r.dispose(),i.dispose(),t(y3e)})})}async notifyDocumentPhase(e,t,r){var i;for(i of this.documentPhaseListeners.get(t).slice())try{await g3e(r),await i(e,r)}catch(e){if(!p3e(e))throw e}}async notifyBuildPhase(e,t,r){var i;if(0!==e.length)for(i of this.buildPhaseListeners.get(t).slice())await g3e(r),await i(e,r)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,t){var r=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,i="object"==typeof(n=this.getBuildOptions(e)).validation?{...n.validation}:{},n=(i.categories=this.findMissingValidationCategories(e,n),await r.validateDocument(e,i,t));e.diagnostics?e.diagnostics.push(...n):e.diagnostics=n,(r=this.buildState.get(e.uri.toString()))&&(r.result??(r.result={}),r.result.validationChecks?r.result.validationChecks=zde(r.result.validationChecks).concat(i.categories).distinct().toArray():r.result.validationChecks=[...i.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}}}),Rke=i(()=>{lpe(),hTe(),h3e(),Vde(),F3e(),MTe=class{static{mt(this,"DefaultIndexManager")}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new eTe,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let r=Zde(e).uri,i=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{R3e.equals(e.targetUri,r)&&e.targetPath===t&&i.push(e)})}),zde(i)}allElements(t,r){let e=zde(this.symbolIndex.keys());return(e=r?e.filter(e=>!r||r.has(e)):e).map(e=>this.getFileDescriptions(e,t)).flat()}getFileDescriptions(e,t){return t?this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(e=>this.astReflection.isSubtype(e.type,t))):this.symbolIndex.get(e)??[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){e=e.toString(),this.symbolIndex.delete(e),this.symbolByTypeIndex.clear(e)}removeReferences(e){e=e.toString(),this.referenceIndex.delete(e)}async updateContent(e,t=l3e.CancellationToken.None){t=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,t),e=e.uri.toString(),this.symbolIndex.set(e,t),this.symbolByTypeIndex.clear(e)}async updateReferences(e,t=l3e.CancellationToken.None){t=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,t),this.referenceIndex.set(e.uri.toString(),t)}isAffected(e,t){return!!(e=this.referenceIndex.get(e.uri.toString()))&&e.some(e=>!e.local&&t.has(e.targetUri.toString()))}}}),Ike=i(()=>{h3e(),x3e(),F3e(),Vde(),OTe=class{static{mt(this,"DefaultWorkspaceManager")}constructor(e){this.initialBuildOptions={},this._ready=new v3e,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(e=>this.initializeWorkspace(this.folders??[],e))}async initializeWorkspace(e,t=l3e.CancellationToken.None){e=await this.performStartup(e),await g3e(t),await this.documentBuilder.build(e,this.initialBuildOptions,t)}async performStartup(e){let t=[],r=mt(e=>{t.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)},"collector"),i=(await this.loadAdditionalDocuments(e,r),[]);return await Promise.all(e.map(e=>this.getRootFolder(e)).map(async e=>this.traverseFolder(e,i))),e=zde(i).distinct(e=>e.toString()).filter(e=>!this.langiumDocuments.hasDocument(e)),await this.loadWorkspaceDocuments(e,r),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async e=>{e=await this.langiumDocuments.getOrCreateDocument(e),t(e)}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return A3e.parse(e.uri)}async traverseFolder(e,t){try{var r=await this.fileSystemProvider.readDirectory(e);await Promise.all(r.map(async e=>{this.shouldIncludeEntry(e)&&(e.isDirectory?await this.traverseFolder(e.uri,t):e.isFile&&t.push(e.uri))}))}catch(r){console.error("Failure to read directory content of "+e.toString(!0),r)}}async searchFolder(e){var t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){var t=R3e.basename(e.uri);return!t.startsWith(".")&&(e.isDirectory?"node_modules"!==t&&"out"!==t:!!e.isFile&&this.serviceRegistry.hasServices(e.uri))}}});function Nke(e){return Array.isArray(e)&&(0===e.length||"name"in e[0])}function Dke(e){return e&&"modes"in e&&"defaultMode"in e}function Mke(e){return!Nke(e)&&!Dke(e)}var Oke,Bke,Pke,$ke=i(()=>{cxe(),Oke=class{static{mt(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(e,t,r,i,n){return dye.buildUnexpectedCharactersMessage(e,t,r,i,n)}buildUnableToPopLexerModeMessage(e){return dye.buildUnableToPopLexerModeMessage(e)}},Bke={mode:"full"},Pke=class{static{mt(this,"DefaultLexer")}constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;var t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive}),t=(this.tokenTypes=this.toTokenTypeDictionary(t),Mke(t)?Object.values(t):t),e="production"===e.LanguageMetaData.mode;this.chevrotainLexer=new fye(t,{positionTracking:"full",skipValidations:e,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=0){var r=this.chevrotainLexer.tokenize(e);return{tokens:r.tokens,errors:r.errors,hidden:r.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if(Mke(e))return e;let t=Dke(e)?Object.values(e.modes).flat():e,r={};return t.forEach(e=>r[e.name]=e),r}},mt(Nke,"isTokenTypeArray"),mt(Dke,"isIMultiModeLexerDefinition"),mt(Mke,"isTokenTypeDictionary")});function Fke(e,t,r){let i,n;return i="string"==typeof e?(n=t,r):(n=e.range.start,t),n=n||Pbe.create(0,0),r=qke(e),t=Jke(i),Vke({index:0,tokens:Wke({lines:r,position:n,options:t}),position:n})}function zke(e,t){var r,i,t=Jke(t);return 0!==(e=qke(e)).length&&(r=e[e.length-1],i=t.start,t=t.end,!!i?.exec(e[0]))&&!!t?.exec(r)}function qke(e){return("string"==typeof e?e:e.text).split(lfe)}function Wke(a){let s=[],o=a.position.line,l=a.position.character;for(let n=0;n<a.lines.length;n++){let e=0===n,t=n===a.lines.length-1,r=a.lines[n],i=0;var h,c,u,d,p,g;e&&a.options.start?(h=a.options.start?.exec(r))&&(i=h.index+h[0].length):(h=a.options.line?.exec(r))&&(i=h.index+h[0].length),Gke(r=(r=t&&(c=a.options.end?.exec(r))?r.substring(0,c.index):r).substring(0,jke(r)),i)>=r.length?0<s.length&&(c=Pbe.create(o,l),s.push({type:"break",content:"",range:$be.create(c,c)})):(nwe.lastIndex=i,(p=nwe.exec(r))&&(u=p[0],p=p[1],g=Pbe.create(o,l+i),d=Pbe.create(o,l+i+u.length),s.push({type:"tag",content:p,range:$be.create(g,d)}),i+=u.length,i=Gke(r,i)),i<r.length&&(p=r.substring(i),g=Array.from(p.matchAll(awe)),s.push(...Uke(g,p,o,l+i)))),o++,l=0}return 0<s.length&&"break"===s[s.length-1].type?s.slice(0,-1):s}function Uke(e,i,n,a){var s=[];if(0===e.length){var t=Pbe.create(n,a),r=Pbe.create(n,a+i.length);s.push({type:"text",content:i,range:$be.create(t,r)})}else{let r=0;for(var o of e){var l=o.index,h=i.substring(r,l);0<h.length&&s.push({type:"text",content:i.substring(r,l),range:$be.create(Pbe.create(n,r+a),Pbe.create(n,l+a))});let e=h.length+1,t=o[1];s.push({type:"inline-tag",content:t,range:$be.create(Pbe.create(n,r+e+a),Pbe.create(n,r+e+t.length+a))}),e+=t.length,4===o.length?(e+=o[2].length,s.push({type:"text",content:h=o[3],range:$be.create(Pbe.create(n,r+e+a),Pbe.create(n,r+e+h.length+a))})):s.push({type:"text",content:"",range:$be.create(Pbe.create(n,r+e+a),Pbe.create(n,r+e+a))}),r=l+o[0].length}0<(t=i.substring(r)).length&&s.push({type:"text",content:t,range:$be.create(Pbe.create(n,r+a),Pbe.create(n,r+a+t.length))})}return s}function Gke(e,t){var r=e.substring(t).match(swe);return r?t+r.index:e.length}function jke(e){if((e=e.match(owe))&&"number"==typeof e.index)return e.index}function Vke(e){var t=Pbe.create(e.position.line,e.position.character);if(0===e.tokens.length)return new lwe([],$be.create(t,t));for(var r=[];e.index<e.tokens.length;){var i=Yke(e,r[r.length-1]);i&&r.push(i)}var n=r[0]?.range.start??t,t=r[r.length-1]?.range.end??t;return new lwe(r,$be.create(n,t))}function Yke(e,t){var r=e.tokens[e.index];return"tag"===r.type?Zke(e,!1):"text"===r.type||"inline-tag"===r.type?Xke(e):(Hke(r,t),void e.index++)}function Hke(e,t){t&&(e=new uwe("",e.range),("inlines"in t?t:t.content).inlines.push(e))}function Xke(e){let t=e.tokens[e.index],r=t,i=t,n=[];for(;t&&"break"!==t.type&&"tag"!==t.type;)n.push(Kke(e)),i=t,t=e.tokens[e.index];return new cwe(n,$be.create(r.range.start,i.range.end))}function Kke(e){return"inline-tag"===e.tokens[e.index].type?Zke(e,!0):Qke(e)}function Zke(e,t){var r,i=e.tokens[e.index++],n=i.content.substring(1);return"text"===e.tokens[e.index]?.type?t?(r=Qke(e),new hwe(n,new cwe([r],r.range),t,$be.create(i.range.start,r.range.end))):(r=Xke(e),new hwe(n,r,t,$be.create(i.range.start,r.range.end))):(e=i.range,new hwe(n,new cwe([],e),t,e))}function Qke(e){return e=e.tokens[e.index++],new uwe(e.content,e.range)}function Jke(e){var t,r;return e?({start:e,end:t,line:r}=e,{start:ewe(e,!0),end:ewe(t,!1),line:ewe(r,!0)}):Jke({start:"/**",end:"*/",line:"*"})}function ewe(e,t){var r;return"string"==typeof e||"object"==typeof e?(r="string"==typeof e?afe(e):e.source,t?new RegExp("^\\s*"+r):new RegExp(`\\s*${r}\\s*$`)):e}function twe(i,n,a){if("linkplain"===i||"linkcode"===i||"link"===i){let e=n.indexOf(" "),t=n,r;return 0<e&&(r=Gke(n,e),t=n.substring(r),n=n.substring(0,e)),("linkcode"===i||"link"===i&&"code"===a.link)&&(t=`\`${t}\``),a.renderLink?.(n,t)??rwe(n,t)}}function rwe(e,t){try{return A3e.parse(e,!0),`[${t}](${e})`}catch{return e}}function iwe(e){return e.endsWith(`
`)?`
`:`
`}var nwe,awe,swe,owe,lwe,hwe,cwe,uwe,dwe,pwe,gwe,fwe,mwe,ywe,vwe,xwe=i(()=>{f5e(),pfe(),F3e(),mt(Fke,"parseJSDoc"),mt(zke,"isJSDoc"),mt(qke,"getLines"),nwe=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,awe=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu,mt(Wke,"tokenize"),mt(Uke,"buildInlineTokens"),swe=/\S/,owe=/\s*$/,mt(Gke,"skipWhitespace"),mt(jke,"lastCharacter"),mt(Vke,"parseJSDocComment"),mt(Yke,"parseJSDocElement"),mt(Hke,"appendEmptyLine"),mt(Xke,"parseJSDocText"),mt(Kke,"parseJSDocInline"),mt(Zke,"parseJSDocTag"),mt(Qke,"parseJSDocLine"),mt(Jke,"normalizeOptions"),mt(ewe,"normalizeOption"),lwe=class{static{mt(this,"JSDocCommentImpl")}constructor(e,t){this.elements=e,this.range=t}getTag(t){return this.getAllTags().find(e=>e.name===t)}getTags(t){return this.getAllTags().filter(e=>e.name===t)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(var t of this.elements)0===e.length?e=t.toString():(t=t.toString(),e+=iwe(e)+t);return e.trim()}toMarkdown(e){let t="";for(var r of this.elements)0===t.length?t=r.toMarkdown(e):(r=r.toMarkdown(e),t+=iwe(t)+r);return t.trim()}},hwe=class{static{mt(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 1===this.content.inlines.length?e=e+" "+t:1<this.content.inlines.length&&(e=e+`
`+t),this.inline?`{${e}}`:e}toMarkdown(e){return e?.renderTag?.(this)??this.toMarkdownDefault(e)}toMarkdownDefault(e){var t=this.content.toMarkdown(e);if(this.inline){var r=twe(this.name,t,e??{});if("string"==typeof r)return r}let i="",n=("italic"===e?.tag||void 0===e?.tag?i="*":"bold"===e?.tag?i="**":"bold-italic"===e?.tag&&(i="***"),i+"@"+this.name+i);return 1===this.content.inlines.length?n=n+" — "+t:1<this.content.inlines.length&&(n=n+`
`+t),this.inline?`{${n}}`:n}},mt(twe,"renderInlineTag"),mt(rwe,"renderLinkDefault"),cwe=class{static{mt(this,"JSDocTextImpl")}constructor(e,t){this.inlines=e,this.range=t}toString(){let t="";for(let e=0;e<this.inlines.length;e++){var r=this.inlines[e],i=this.inlines[e+1];t+=r.toString(),i&&i.range.start.line>r.range.start.line&&(t+=`
`)}return t}toMarkdown(t){let r="";for(let e=0;e<this.inlines.length;e++){var i=this.inlines[e],n=this.inlines[e+1];r+=i.toMarkdown(t),n&&n.range.start.line>i.range.start.line&&(r+=`
`)}return r}},uwe=class{static{mt(this,"JSDocLineImpl")}constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}},mt(iwe,"fillNewlines")}),bwe=i(()=>{lpe(),xwe(),dwe=class{static{mt(this,"JSDocDocumentationProvider")}constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(r){var e=this.commentProvider.getComment(r);if(e&&zke(e))return Fke(e).toMarkdown({renderLink:mt((e,t)=>this.documentationLinkRenderer(r,e,t),"renderLink"),renderTag:mt(e=>this.documentationTagRenderer(r,e),"renderTag")})}documentationLinkRenderer(e,t,r){var i;return(e=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t))&&e.nameSegment?(t=e.nameSegment.range.start.line+1,i=e.nameSegment.range.start.character+1,`[${r}](${e.documentUri.with({fragment:`L${t},`+i}).toString()})`):void 0}documentationTagRenderer(e,t){}findNameInLocalSymbols(t,r){var i=Zde(t).localSymbols;if(i){let e=t;do{var n=i.getStream(e).find(e=>e.name===r);if(n)return n}while(e=e.$container)}}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(e=>e.name===t)}}}),Twe=i(()=>{fTe(),Ige(),pwe=class{static{mt(this,"DefaultCommentProvider")}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return uTe(e)?e.$comment:vge(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}}}),kwe=i(()=>{x3e(),zTe(),gwe=class{static{mt(this,"DefaultAsyncParser")}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},fwe=class{static{mt(this,"AbstractThreadedAsyncParser")}constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length<this.threadCount;){let t=this.createWorker();t.onReady(()=>{var e;0<this.queue.length&&(e=this.queue.shift())&&(t.lock(),e.resolve(t))}),this.workerPool.push(t)}}async parse(e,t){let r=await this.acquireParserWorker(t),i=new v3e,n,a=t.onCancellationRequested(()=>{n=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(e).then(e=>{e=this.hydrator.hydrate(e),i.resolve(e)}).catch(e=>{i.reject(e)}).finally(()=>{a.dispose(),clearTimeout(n)}),i.promise}terminateWorker(e){e.terminate(),0<=(e=this.workerPool.indexOf(e))&&this.workerPool.splice(e,1)}async acquireParserWorker(e){this.initializeWorkers();for(var t of this.workerPool)if(t.ready)return t.lock(),t;let r=new v3e;return e.onCancellationRequested(()=>{var e=this.queue.indexOf(r);0<=e&&this.queue.splice(e,1),r.reject(y3e)}),this.queue.push(r),r.promise}},mwe=class{static{mt(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,r,i){this.onReadyEmitter=new FTe.Emitter,this.deferred=new v3e,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=i,t(e=>{this.deferred.resolve(e),this.unlock()}),r(e=>{this.deferred.reject(e),this.unlock()})}terminate(){this.deferred.reject(y3e),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 v3e,this.sendMessage(e),this.deferred.promise}}}),wwe=i(()=>{h3e(),x3e(),ywe=class{static{mt(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new l3e.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();var t=u3e();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,r=l3e.CancellationToken.None){var i=new v3e;return e.push({action:t,deferred:i,cancellationToken:r}),this.performNextOperation(),i.promise}async performNextOperation(){if(this.done){var e=[];if(0<this.writeQueue.length)e.push(this.writeQueue.shift());else{if(!(0<this.readQueue.length))return;e.push(...this.readQueue.splice(0,this.readQueue.length))}this.done=!1,await Promise.all(e.map(async({action:e,deferred:t,cancellationToken:r})=>{try{var i=await Promise.resolve().then(()=>e(r));t.resolve(i)}catch(e){p3e(e)?t.resolve(void 0):t.reject(e)}})),this.done=!0,this.performNextOperation()}}cancelWrite(){this.previousTokenSource.cancel()}}}),Cwe=i(()=>{m5e(),oge(),Pde(),lpe(),sTe(),Ige(),vwe=class{static{mt(this,"DefaultHydrator")}constructor(e){this.grammarElementIdMap=new V3e,this.tokenTypeIdMap=new V3e,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(e=>({...e,message:e.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){var t,r=new Map,i=new Map;for(t of rpe(e))r.set(t,{});if(e.$cstNode)for(var n of cge(e.$cstNode))i.set(n,{});return{astNodes:r,cstNodes:i}}dehydrateAstNode(e,t){var r,i,n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,void 0!==e.$cstNode&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for([r,i]of Object.entries(e))if(!r.startsWith("$"))if(Array.isArray(i)){var a,s=[];n[r]=s;for(a of i)Ade(a)?s.push(this.dehydrateAstNode(a,t)):Lde(a)?s.push(this.dehydrateReference(a,t)):s.push(a)}else Ade(i)?n[r]=this.dehydrateAstNode(i,t):Lde(i)?n[r]=this.dehydrateReference(i,t):void 0!==i&&(n[r]=i);return n}dehydrateReference(e,t){var r={};return r.$refText=e.$refText,e.$refNode&&(r.$refNode=t.cstNodes.get(e.$refNode)),r}dehydrateCstNode(e,t){var r=t.cstNodes.get(e);return Ode(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),Dde(e)?r.content=e.content.map(e=>this.dehydrateCstNode(e,t)):Mde(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){var 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){var t,r=new Map,i=new Map;for(t of rpe(e))r.set(t,{});let n;if(e.$cstNode)for(var a of cge(e.$cstNode)){let e;"fullText"in a?(e=new g5e(a.fullText),n=e):"content"in a?e=new d5e:"tokenType"in a&&(e=this.hydrateCstLeafNode(a)),e&&(i.set(a,e),e.root=n)}return{astNodes:r,cstNodes:i}}hydrateAstNode(e,t){var r,i,n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=t.cstNodes.get(e.$cstNode));for([r,i]of Object.entries(e))if(!r.startsWith("$"))if(Array.isArray(i)){var a,s=[];n[r]=s;for(a of i)Ade(a)?s.push(this.setParent(this.hydrateAstNode(a,t),n)):Lde(a)?s.push(this.hydrateReference(a,n,r,t)):s.push(a)}else Ade(i)?n[r]=this.setParent(this.hydrateAstNode(i,t),n):Lde(i)?n[r]=this.hydrateReference(i,n,r,t):void 0!==i&&(n[r]=i);return n}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){var i=t.cstNodes.get(e);if("number"==typeof e.grammarSource&&(i.grammarSource=this.getGrammarElement(e.grammarSource)),i.astNode=t.astNodes.get(e.astNode),Dde(i))for(var n of e.content)n=this.hydrateCstNode(n,t,r++),i.content.push(n);return i}hydrateCstLeafNode(e){var t=this.getTokenType(e.tokenType),r=e.offset;return new u5e(r,e.length,{start:{line:e.startLine,character:e.startColumn},end:{line:e.endLine,character:e.endColumn}},t,e.hidden)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(var t of rpe(this.grammar))cpe(t)&&this.grammarElementIdMap.set(t,e++)}}});function Ewe(e){return{documentation:{CommentProvider:mt(e=>new pwe(e),"CommentProvider"),DocumentationProvider:mt(e=>new dwe(e),"DocumentationProvider")},parser:{AsyncParser:mt(e=>new gwe(e),"AsyncParser"),GrammarConfig:mt(e=>t1e(e),"GrammarConfig"),LangiumParser:mt(e=>K5e(e),"LangiumParser"),CompletionParser:mt(e=>H5e(e),"CompletionParser"),ValueConverter:mt(()=>new J5e,"ValueConverter"),TokenBuilder:mt(()=>new Q5e,"TokenBuilder"),Lexer:mt(e=>new Pke(e),"Lexer"),ParserErrorMessageProvider:mt(()=>new w5e,"ParserErrorMessageProvider"),LexerErrorMessageProvider:mt(()=>new Oke,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:mt(()=>new LTe,"AstNodeLocator"),AstNodeDescriptionProvider:mt(e=>new _Te(e),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:mt(e=>new ATe(e),"ReferenceDescriptionProvider")},references:{Linker:mt(e=>new B3e(e),"Linker"),NameProvider:mt(()=>new U3e,"NameProvider"),ScopeProvider:mt(e=>new iTe(e),"ScopeProvider"),ScopeComputation:mt(e=>new Y3e(e),"ScopeComputation"),References:mt(e=>new G3e(e),"References")},serializer:{Hydrator:mt(e=>new vwe(e),"Hydrator"),JsonSerializer:mt(e=>new pTe(e),"JsonSerializer")},validation:{DocumentValidator:mt(e=>new ETe(e),"DocumentValidator"),ValidationRegistry:mt(e=>new xTe(e),"ValidationRegistry")},shared:mt(()=>e.shared,"shared")}}function Swe(t){return{ServiceRegistry:mt(e=>new gTe(e),"ServiceRegistry"),workspace:{LangiumDocuments:mt(e=>new M3e(e),"LangiumDocuments"),LangiumDocumentFactory:mt(e=>new D3e(e),"LangiumDocumentFactory"),DocumentBuilder:mt(e=>new DTe(e),"DocumentBuilder"),IndexManager:mt(e=>new MTe(e),"IndexManager"),WorkspaceManager:mt(e=>new OTe(e),"WorkspaceManager"),FileSystemProvider:mt(e=>t.fileSystemProvider(e),"FileSystemProvider"),WorkspaceLock:mt(()=>new ywe,"WorkspaceLock"),ConfigurationProvider:mt(e=>new RTe(e),"ConfigurationProvider")},profilers:{}}}var _we=i(()=>{r1e(),X5e(),t3e(),r3e(),i3e(),q3e(),nTe(),aTe(),oTe(),cTe(),fTe(),mTe(),BTe(),bTe(),PTe(),$Te(),qTe(),Lke(),z3e(),Rke(),Ike(),$ke(),bwe(),Twe(),A5e(),kwe(),wwe(),Cwe(),mt(Ewe,"createDefaultCoreModule"),mt(Swe,"createDefaultSharedCoreModule")});function Awe(e,t,r,i,n,a,s,o,l){return Rwe([e,t,r,i,n,a,s,o,l].reduce(Nwe,{}))}function Lwe(e){if(e&&e[Mwe])for(var t of Object.values(e))Lwe(t);return e}function Rwe(r,i){let n=new Proxy({},{deleteProperty:mt(()=>!1,"deleteProperty"),set:mt(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:mt((e,t)=>t===Mwe||Iwe(e,t,r,i||n),"get"),getOwnPropertyDescriptor:mt((e,t)=>(Iwe(e,t,r,i||n),Object.getOwnPropertyDescriptor(e,t)),"getOwnPropertyDescriptor"),has:mt((e,t)=>t in r,"has"),ownKeys:mt(()=>[...Object.getOwnPropertyNames(r)],"ownKeys")});return n}function Iwe(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]===Owe)throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return e[t]}if(t in r){r=r[t],e[t]=Owe;try{e[t]="function"==typeof r?r(i):Rwe(r,i)}catch(r){throw e[t]=r instanceof Error?r:void 0,r}return e[t]}}function Nwe(e,t){if(t)for(var[r,i]of Object.entries(t)){var n;null!=i&&("object"==typeof i?(n=e[r],e[r]=Nwe("object"==typeof n&&null!==n?n:{},i)):e[r]=i)}return e}var Dwe,Mwe,Owe,Bwe,Pwe,$we,Fwe,zwe,qwe,Wwe=i(()=>{(Dwe=Dwe||{}).merge=(e,t)=>Nwe(Nwe({},e),t),mt(Awe,"inject"),Mwe=Symbol("isProxy"),mt(Lwe,"eagerLoad"),mt(Rwe,"_inject"),Owe=Symbol(),mt(Iwe,"_resolve"),mt(Nwe,"_merge")}),Uwe=i(()=>{}),Gwe=i(()=>{Twe(),bwe(),xwe()}),jwe=i(()=>{}),Vwe=i(()=>{r1e(),jwe()}),Ywe=i(()=>{cxe(),r3e(),$ke(),Bwe={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]},(Pwe=Pwe||{}).REGULAR="indentation-sensitive",Pwe.IGNORE_INDENTATION="ignore-indentation",$we=class extends Q5e{static{mt(this,"IndentationAwareTokenBuilder")}constructor(e=Bwe){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...Bwe,...e},this.indentTokenType=Tye({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=Tye({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){var r;if(!Nke(e=super.buildTokens(e,t)))throw new Error("Invalid tokens built by default builder");let{indentTokenName:i,dedentTokenName:n,whitespaceTokenName:a,ignoreIndentationDelimiters:s}=this.options,o,l,h,c=[];for(r of e){for(var[u,d]of s)r.name===u?r.PUSH_MODE=Pwe.IGNORE_INDENTATION:r.name===d&&(r.POP_MODE=!0);r.name===n?o=r:r.name===i?l=r:r.name===a?h=r:c.push(r)}if(o&&l&&h)return 0<s.length?{modes:{[Pwe.REGULAR]:[o,l,...c,h],[Pwe.IGNORE_INDENTATION]:[...c,h]},defaultMode:Pwe.REGULAR}:[o,l,h,...c];throw new Error("Some indentation/whitespace tokens not found!")}flushLexingReport(e){return{...super.flushLexingReport(e),remainingDedents:this.flushRemainingDedents(e)}}isStartOfLine(e,t){return 0===t||`\r
`.includes(e[t-1])}matchWhitespace(e,t,r,i){return this.whitespaceRegExp.lastIndex=t,{currIndentLevel:(t=this.whitespaceRegExp.exec(e))?.[0].length??0,prevIndentLevel:this.indentationStack.at(-1),match:t}}createIndentationTokenInstance(e,t,r,i){return t=this.getLineNumber(t,i),wye(e,r,i,i+r.length,t,t,1,r.length)}getLineNumber(e,t){return e.substring(0,t).split(/\r\n|\r|\n/).length}indentMatcher(e,t,r,i){return!this.isStartOfLine(e,t)||({currIndentLevel:e,prevIndentLevel:t,match:r}=this.matchWhitespace(e,t,r,i),e<=t)?null:(this.indentationStack.push(e),r)}dedentMatcher(t,r,i,e){if(this.isStartOfLine(t,r)){var{currIndentLevel:e,prevIndentLevel:n,match:a}=this.matchWhitespace(t,r,i,e);if(!(n<=e))if(-1===(n=this.indentationStack.lastIndexOf(e)))this.diagnostics.push({severity:"error",message:`Invalid dedent level ${e} at offset: ${r}. Current indentation stack: `+this.indentationStack,offset:r,length:a?.[0]?.length??0,line:this.getLineNumber(t,r),column:1});else{var s=this.indentationStack.length-n-1,o=t.substring(0,r).match(/[\r\n]+$/)?.[0].length??1;for(let e=0;e<s;e++){var l=this.createIndentationTokenInstance(this.dedentTokenType,t,"",r-(o-1));i.push(l),this.indentationStack.pop()}}}return null}buildTerminalToken(e){var e=super.buildTerminalToken(e),{indentTokenName:t,dedentTokenName:r,whitespaceTokenName:i}=this.options;return e.name===t?this.indentTokenType:e.name===r?this.dedentTokenType:e.name===i?Tye({name:i,pattern:this.whitespaceRegExp,group:fye.SKIPPED}):e}flushRemainingDedents(e){for(var t=[];1<this.indentationStack.length;)t.push(this.createIndentationTokenInstance(this.dedentTokenType,e,"",e.length)),this.indentationStack.pop();return this.indentationStack=[0],t}},Fwe=class extends Pke{static{mt(this,"IndentationAwareLexer")}constructor(e){if(super(e),!(e.parser.TokenBuilder instanceof $we))throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder");this.indentationTokenBuilder=e.parser.TokenBuilder}tokenize(e,t=Bke){var r=super.tokenize(e),e=r.report,{indentTokenType:t,dedentTokenType:e}=("full"===t?.mode&&r.tokens.push(...e.remainingDedents),e.remainingDedents=[],this.indentationTokenBuilder),i=t.tokenTypeIdx,n=e.tokenTypeIdx,a=[],s=r.tokens.length-1;for(let e=0;e<s;e++){var o=r.tokens[e],l=r.tokens[e+1];o.tokenTypeIdx===i&&l.tokenTypeIdx===n?e++:a.push(o)}return 0<=s&&a.push(r.tokens[s]),r.tokens=a,r}}}),Hwe=i(()=>{}),Xwe=i(()=>{kwe(),X5e(),m5e(),Ywe(),t3e(),A5e(),$ke(),Y5e(),Hwe(),r3e(),i3e()}),Kwe=i(()=>{q3e(),nTe(),aTe(),lTe(),oTe(),cTe()}),Zwe=i(()=>{Cwe(),fTe()}),Qwe=i(()=>{zwe=class{static{mt(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[]}},qwe={fileSystemProvider:mt(()=>new zwe,"fileSystemProvider")}});function Jwe(){var e=Awe(Swe(qwe),rCe),t=Awe(Ewe({shared:e}),tCe);return e.ServiceRegistry.register(t),t}function eCe(e){var t=Jwe(),e=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(e,A3e.parse(`memory:/${e.name??"grammar"}.langium`)),e}var tCe,rCe,iCe,nCe,aCe=i(()=>{_we(),Wwe(),oge(),Qwe(),F3e(),tCe={Grammar:mt(()=>{},"Grammar"),LanguageMetaData:mt(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},rCe={AstReflection:mt(()=>new age,"AstReflection")},mt(Jwe,"createMinimalGrammarServices"),mt(eCe,"loadGrammarFromJson")}),sCe={},oCe=(sYe(sCe,{AstUtils:()=>Yde,BiMap:()=>V3e,Cancellation:()=>l3e,ContextCache:()=>eTe,CstUtils:()=>lge,DONE_RESULT:()=>Ude,Deferred:()=>v3e,Disposable:()=>ITe,DisposableCache:()=>Q3e,DocumentCache:()=>tTe,EMPTY_STREAM:()=>Wde,ErrorWithLocation:()=>Mge,GrammarUtils:()=>gfe,MultiMap:()=>j3e,OperationCancelled:()=>y3e,Reduction:()=>jde,RegExpUtils:()=>tfe,SimpleCache:()=>J3e,StreamImpl:()=>qde,TreeStreamImpl:()=>Gde,URI:()=>A3e,UriTrie:()=>I3e,UriUtils:()=>R3e,WorkspaceCache:()=>rTe,assertCondition:()=>Dge,assertUnreachable:()=>Nge,delayNextTick:()=>c3e,interruptAndCheck:()=>g3e,isOperationCancelled:()=>p3e,loadGrammarFromJson:()=>eCe,setInterruptionPeriod:()=>d3e,startCancelableOperation:()=>u3e,stream:()=>zde}),i(()=>{hTe(),zTe(),W(sCe,FTe),sTe(),Ake(),Oge(),aCe(),x3e(),Vde(),F3e(),lpe(),h3e(),Ige(),e1e(),pfe()})),lCe=i(()=>{BTe(),bTe()}),hCe=i(()=>{sTe(),iCe=class{static{mt(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 j3e}isActive(e){return this.activeCategories.has(e)}start(...e){e?e.forEach(e=>this.activeCategories.add(e)):this.activeCategories=new Set(this.allCategories)}stop(...e){e?e.forEach(e=>this.activeCategories.delete(e)):this.activeCategories.clear()}createTask(t,e){if(this.isActive(t))return console.log(`Creating profiling task for '${t}.${e}'.`),new nCe(e=>this.records.add(t,this.dumpRecord(t,e)),e);throw new Error(`Category "${t}" is not active.`)}dumpRecord(e,t){console.info(`Task ${e}.${t.identifier} executed in ${t.duration.toFixed(2)}ms and ended at `+t.date.toISOString());var r,i=[];for(r of t.entries.keys()){var n=t.entries.get(r),a=n.reduce((e,t)=>e+t);i.push({name:t.identifier+"."+r,count:n.length,duration:a})}function s(e){return Math.round(100*e)/100}return e=t.duration-i.map(e=>e.duration).reduce((e,t)=>e+t,0),i.push({name:t.identifier,count:1,duration:e}),i.sort((e,t)=>t.duration-e.duration),mt(s,"Round"),console.table(i.map(e=>({Element:e.name,Count:e.count,"Self %":s(100*e.duration/t.duration),"Time (ms)":s(e.duration)}))),t}getRecords(...e){return 0===e.length?this.records.values():this.records.entries().filter(t=>e.some(e=>e===t[0])).flatMap(e=>e[1])}},nCe=class{static{mt(this,"ProfilingTask")}constructor(e,t){this.stack=[],this.entries=new j3e,this.addRecord=e,this.identifier=t}start(){if(void 0!==this.startTime)throw new Error(`Task "${this.identifier}" is already started.`);this.startTime=performance.now()}stop(){if(void 0===this.startTime)throw new Error(`Task "${this.identifier}" was not started.`);if(0!==this.stack.length)throw new Error(`Task "${this.identifier}" cannot be stopped before sub-task(s): ${this.stack.map(e=>e.id).join(", ")}.`);var 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){var 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.`);var r=performance.now()-t.start,r=(void 0!==this.stack.at(-1)&&(this.stack[this.stack.length-1].content+=r),r-t.content);this.entries.add(e,r)}}}),cCe=i(()=>{PTe(),$Te(),qTe(),Lke(),z3e(),Qwe(),Rke(),wwe(),Ike(),hCe()}),uCe={},dCe=(sYe(uCe,{AbstractAstReflection:()=>Bde,AbstractCstNode:()=>c5e,AbstractLangiumParser:()=>b5e,AbstractParserErrorMessageProvider:()=>k5e,AbstractThreadedAsyncParser:()=>fwe,AstUtils:()=>Yde,BiMap:()=>V3e,Cancellation:()=>l3e,CompositeCstNodeImpl:()=>d5e,ContextCache:()=>eTe,CstNodeBuilder:()=>h5e,CstUtils:()=>lge,DEFAULT_TOKENIZE_OPTIONS:()=>Bke,DONE_RESULT:()=>Ude,DatatypeSymbol:()=>v5e,DefaultAstNodeDescriptionProvider:()=>_Te,DefaultAstNodeLocator:()=>LTe,DefaultAsyncParser:()=>gwe,DefaultCommentProvider:()=>pwe,DefaultConfigurationProvider:()=>RTe,DefaultDocumentBuilder:()=>DTe,DefaultDocumentValidator:()=>ETe,DefaultHydrator:()=>vwe,DefaultIndexManager:()=>MTe,DefaultJsonSerializer:()=>pTe,DefaultLangiumDocumentFactory:()=>D3e,DefaultLangiumDocuments:()=>M3e,DefaultLangiumProfiler:()=>iCe,DefaultLexer:()=>Pke,DefaultLexerErrorMessageProvider:()=>Oke,DefaultLinker:()=>B3e,DefaultNameProvider:()=>U3e,DefaultReferenceDescriptionProvider:()=>ATe,DefaultReferences:()=>G3e,DefaultScopeComputation:()=>Y3e,DefaultScopeProvider:()=>iTe,DefaultServiceRegistry:()=>gTe,DefaultTokenBuilder:()=>Q5e,DefaultValueConverter:()=>J5e,DefaultWorkspaceLock:()=>ywe,DefaultWorkspaceManager:()=>OTe,Deferred:()=>v3e,Disposable:()=>ITe,DisposableCache:()=>Q3e,DocumentCache:()=>tTe,DocumentState:()=>N3e,DocumentValidator:()=>STe,EMPTY_SCOPE:()=>Z3e,EMPTY_STREAM:()=>Wde,EmptyFileSystem:()=>qwe,EmptyFileSystemProvider:()=>zwe,ErrorWithLocation:()=>Mge,GrammarAST:()=>hpe,GrammarUtils:()=>gfe,IndentationAwareLexer:()=>Fwe,IndentationAwareTokenBuilder:()=>$we,JSDocDocumentationProvider:()=>dwe,LangiumCompletionParser:()=>C5e,LangiumParser:()=>T5e,LangiumParserErrorMessageProvider:()=>w5e,LeafCstNodeImpl:()=>u5e,LexingMode:()=>Pwe,MapScope:()=>X3e,Module:()=>Dwe,MultiMap:()=>j3e,MultiMapScope:()=>K3e,OperationCancelled:()=>y3e,ParserWorker:()=>mwe,ProfilingTask:()=>nCe,Reduction:()=>jde,RefResolving:()=>O3e,RegExpUtils:()=>tfe,RootCstNodeImpl:()=>g5e,SimpleCache:()=>J3e,StreamImpl:()=>qde,StreamScope:()=>H3e,TextDocument:()=>S3e,TreeStreamImpl:()=>Gde,URI:()=>A3e,UriTrie:()=>I3e,UriUtils:()=>R3e,VALIDATE_EACH_NODE:()=>CTe,ValidationCategory:()=>vTe,ValidationRegistry:()=>xTe,ValueConverter:()=>e3e,WorkspaceCache:()=>rTe,assertCondition:()=>Dge,assertUnreachable:()=>Nge,createCompletionParser:()=>H5e,createDefaultCoreModule:()=>Ewe,createDefaultSharedCoreModule:()=>Swe,createGrammarConfig:()=>t1e,createLangiumParser:()=>K5e,createParser:()=>L5e,delayNextTick:()=>c3e,diagnosticData:()=>yTe,eagerLoad:()=>Lwe,getDiagnosticRange:()=>TTe,indentationBuilderDefaultOptions:()=>Bwe,inject:()=>Awe,interruptAndCheck:()=>g3e,isAstNode:()=>Ade,isAstNodeDescription:()=>Ide,isAstNodeWithComment:()=>uTe,isCompositeCstNode:()=>Dde,isIMultiModeLexerDefinition:()=>Dke,isJSDoc:()=>zke,isLeafCstNode:()=>Mde,isLinkingError:()=>Nde,isMultiReference:()=>Rde,isNamed:()=>W3e,isOperationCancelled:()=>p3e,isReference:()=>Lde,isRootCstNode:()=>Ode,isTokenTypeArray:()=>Nke,isTokenTypeDictionary:()=>Mke,loadGrammarFromJson:()=>eCe,parseJSDoc:()=>Fke,prepareLangiumParser:()=>Z5e,setInterruptionPeriod:()=>d3e,startCancelableOperation:()=>u3e,stream:()=>zde,toDiagnosticData:()=>wTe,toDiagnosticSeverity:()=>kTe}),i(()=>{_we(),Wwe(),mTe(),Uwe(),Pde(),Gwe(),Vwe(),Xwe(),Kwe(),Zwe(),oCe(),W(uCe,sCe),lCe(),cCe(),oge()}));function pCe(e){return R6e.isInstance(e,FCe.$type)}function gCe(e){return R6e.isInstance(e,qCe.$type)}function fCe(e){return R6e.isInstance(e,jCe.$type)}function mCe(e){return R6e.isInstance(e,r6e.$type)}function yCe(e){return R6e.isInstance(e,n6e.$type)}function vCe(e){return R6e.isInstance(e,c6e.$type)}function xCe(e){return R6e.isInstance(e,p6e.$type)}function bCe(e){return R6e.isInstance(e,g6e.$type)}function TCe(e){return R6e.isInstance(e,f6e.$type)}function kCe(e){return R6e.isInstance(e,m6e.$type)}function wCe(e){return R6e.isInstance(e,C6e.$type)}function CCe(e){return R6e.isInstance(e,A6e.$type)}var ECe,r,SCe,_Ce,ACe,LCe,RCe,ICe,NCe,DCe,MCe,OCe,BCe,PCe,$Ce,FCe,zCe,qCe,WCe,UCe,GCe,jCe,VCe,YCe,HCe,XCe,KCe,ZCe,QCe,JCe,e6e,t6e,r6e,i6e,n6e,a6e,s6e,o6e,l6e,h6e,c6e,u6e,d6e,p6e,g6e,f6e,m6e,y6e,v6e,x6e,b6e,T6e,k6e,w6e,C6e,E6e,S6e,_6e,A6e,L6e,R6e,I6e,N6e,D6e,M6e,O6e,B6e,P6e,$6e,F6e,z6e,q6e,W6e,U6e,G6e,j6e,V6e,Y6e,H6e,X6e,K6e,Z6e,Q6e,J6e,eEe,tEe,rEe,iEe,nEe,aEe,sEe,oEe,lEe,hEe,cEe,uEe,dEe,pEe,gEe,fEe,mEe,yEe,vEe=i(()=>{dCe(),dCe(),dCe(),dCe(),ECe=Object.defineProperty,r=mt((e,t)=>ECe(e,"name",{value:t,configurable:!0}),"__name"),(SCe=SCe||{}).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 ]+)\]/},(_Ce=_Ce||{}).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])?/},(ACe=ACe||{}).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]*/},(LCe=LCe||{}).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]*/},(RCe=RCe||{}).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]*/},(ICe=ICe||{}).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]*/},(NCe=NCe||{}).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:/"[^"]*"|'[^']*'/},(DCe=DCe||{}).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]*|)/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,STRING2:/"[^"]*"|'[^']*'/},(MCe=MCe||{}).Terminals={WARDLEY_NUMBER:/[0-9]+\.[0-9]+/,ARROW:/->/,LINK_PORT:/\+<>|\+>|\+</,LINK_ARROW:/-->|-\.->|>|\+'[^']*'<>|\+'[^']*'<|\+'[^']*'>/,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]*/},{...SCe.Terminals,..._Ce.Terminals,...ACe.Terminals,...LCe.Terminals,...RCe.Terminals,...ICe.Terminals,...DCe.Terminals,...NCe.Terminals,...MCe.Terminals},OCe={$type:"Accelerator",name:"name",x:"x",y:"y"},BCe={$type:"Anchor",evolution:"evolution",name:"name",visibility:"visibility"},PCe={$type:"Annotation",number:"number",text:"text",x:"x",y:"y"},$Ce={$type:"Annotations",x:"x",y:"y"},FCe={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"},mt(pCe,"isArchitecture"),r(pCe,"isArchitecture"),zCe={$type:"Axis",label:"label",name:"name"},qCe={$type:"Branch",name:"name",order:"order"},mt(gCe,"isBranch"),r(gCe,"isBranch"),WCe={$type:"Checkout",branch:"branch"},UCe={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"},GCe={$type:"ClassDefStatement",className:"className",styleText:"styleText"},jCe={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"},mt(fCe,"isCommit"),r(fCe,"isCommit"),VCe={$type:"Component",decorator:"decorator",evolution:"evolution",inertia:"inertia",label:"label",name:"name",visibility:"visibility"},YCe={$type:"Curve",entries:"entries",label:"label",name:"name"},HCe={$type:"Deaccelerator",name:"name",x:"x",y:"y"},XCe={$type:"Decorator",strategy:"strategy"},KCe={$type:"Direction",accDescr:"accDescr",accTitle:"accTitle",dir:"dir",statements:"statements",title:"title"},ZCe={$type:"Edge",lhsDir:"lhsDir",lhsGroup:"lhsGroup",lhsId:"lhsId",lhsInto:"lhsInto",rhsDir:"rhsDir",rhsGroup:"rhsGroup",rhsId:"rhsId",rhsInto:"rhsInto",title:"title"},QCe={$type:"Entry",axis:"axis",value:"value"},JCe={$type:"Evolution",stages:"stages"},e6e={$type:"EvolutionStage",boundary:"boundary",name:"name",secondName:"secondName"},t6e={$type:"Evolve",component:"component",target:"target"},r6e={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"},mt(mCe,"isGitGraph"),r(mCe,"isGitGraph"),i6e={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"},n6e={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"},mt(yCe,"isInfo"),r(yCe,"isInfo"),a6e={$type:"Item",classSelector:"classSelector",name:"name"},s6e={$type:"Junction",id:"id",in:"in"},o6e={$type:"Label",negX:"negX",negY:"negY",offsetX:"offsetX",offsetY:"offsetY"},l6e={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"},h6e={$type:"Link",arrow:"arrow",from:"from",fromPort:"fromPort",linkLabel:"linkLabel",to:"to",toPort:"toPort"},c6e={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"},mt(vCe,"isMerge"),r(vCe,"isMerge"),u6e={$type:"Note",evolution:"evolution",text:"text",visibility:"visibility"},d6e={$type:"Option",name:"name",value:"value"},p6e={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"},mt(xCe,"isPacket"),r(xCe,"isPacket"),g6e={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"},mt(bCe,"isPacketBlock"),r(bCe,"isPacketBlock"),f6e={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"},mt(TCe,"isPie"),r(TCe,"isPie"),m6e={$type:"PieSection",label:"label",value:"value"},mt(kCe,"isPieSection"),r(kCe,"isPieSection"),y6e={$type:"Pipeline",components:"components",parent:"parent"},v6e={$type:"PipelineComponent",evolution:"evolution",label:"label",name:"name"},x6e={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"},b6e={$type:"Section",classSelector:"classSelector",name:"name"},T6e={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"},k6e={$type:"Size",height:"height",width:"width"},w6e={$type:"Statement"},C6e={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"},mt(wCe,"isTreemap"),r(wCe,"isTreemap"),E6e={$type:"TreemapRow",indent:"indent",item:"item"},S6e={$type:"TreeNode",indent:"indent",name:"name"},_6e={$type:"TreeView",accDescr:"accDescr",accTitle:"accTitle",nodes:"nodes",title:"title"},A6e={$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"},mt(CCe,"isWardley"),r(CCe,"isWardley"),L6e=class extends Bde{static{mt(this,"MermaidAstReflection")}constructor(){super(...arguments),this.types={Accelerator:{name:OCe.$type,properties:{name:{name:OCe.name},x:{name:OCe.x},y:{name:OCe.y}},superTypes:[]},Anchor:{name:BCe.$type,properties:{evolution:{name:BCe.evolution},name:{name:BCe.name},visibility:{name:BCe.visibility}},superTypes:[]},Annotation:{name:PCe.$type,properties:{number:{name:PCe.number},text:{name:PCe.text},x:{name:PCe.x},y:{name:PCe.y}},superTypes:[]},Annotations:{name:$Ce.$type,properties:{x:{name:$Ce.x},y:{name:$Ce.y}},superTypes:[]},Architecture:{name:FCe.$type,properties:{accDescr:{name:FCe.accDescr},accTitle:{name:FCe.accTitle},edges:{name:FCe.edges,defaultValue:[]},groups:{name:FCe.groups,defaultValue:[]},junctions:{name:FCe.junctions,defaultValue:[]},services:{name:FCe.services,defaultValue:[]},title:{name:FCe.title}},superTypes:[]},Axis:{name:zCe.$type,properties:{label:{name:zCe.label},name:{name:zCe.name}},superTypes:[]},Branch:{name:qCe.$type,properties:{name:{name:qCe.name},order:{name:qCe.order}},superTypes:[w6e.$type]},Checkout:{name:WCe.$type,properties:{branch:{name:WCe.branch}},superTypes:[w6e.$type]},CherryPicking:{name:UCe.$type,properties:{id:{name:UCe.id},parent:{name:UCe.parent},tags:{name:UCe.tags,defaultValue:[]}},superTypes:[w6e.$type]},ClassDefStatement:{name:GCe.$type,properties:{className:{name:GCe.className},styleText:{name:GCe.styleText}},superTypes:[]},Commit:{name:jCe.$type,properties:{id:{name:jCe.id},message:{name:jCe.message},tags:{name:jCe.tags,defaultValue:[]},type:{name:jCe.type}},superTypes:[w6e.$type]},Component:{name:VCe.$type,properties:{decorator:{name:VCe.decorator},evolution:{name:VCe.evolution},inertia:{name:VCe.inertia,defaultValue:!1},label:{name:VCe.label},name:{name:VCe.name},visibility:{name:VCe.visibility}},superTypes:[]},Curve:{name:YCe.$type,properties:{entries:{name:YCe.entries,defaultValue:[]},label:{name:YCe.label},name:{name:YCe.name}},superTypes:[]},Deaccelerator:{name:HCe.$type,properties:{name:{name:HCe.name},x:{name:HCe.x},y:{name:HCe.y}},superTypes:[]},Decorator:{name:XCe.$type,properties:{strategy:{name:XCe.strategy}},superTypes:[]},Direction:{name:KCe.$type,properties:{accDescr:{name:KCe.accDescr},accTitle:{name:KCe.accTitle},dir:{name:KCe.dir},statements:{name:KCe.statements,defaultValue:[]},title:{name:KCe.title}},superTypes:[r6e.$type]},Edge:{name:ZCe.$type,properties:{lhsDir:{name:ZCe.lhsDir},lhsGroup:{name:ZCe.lhsGroup,defaultValue:!1},lhsId:{name:ZCe.lhsId},lhsInto:{name:ZCe.lhsInto,defaultValue:!1},rhsDir:{name:ZCe.rhsDir},rhsGroup:{name:ZCe.rhsGroup,defaultValue:!1},rhsId:{name:ZCe.rhsId},rhsInto:{name:ZCe.rhsInto,defaultValue:!1},title:{name:ZCe.title}},superTypes:[]},Entry:{name:QCe.$type,properties:{axis:{name:QCe.axis,referenceType:zCe.$type},value:{name:QCe.value}},superTypes:[]},Evolution:{name:JCe.$type,properties:{stages:{name:JCe.stages,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:e6e.$type,properties:{boundary:{name:e6e.boundary},name:{name:e6e.name},secondName:{name:e6e.secondName}},superTypes:[]},Evolve:{name:t6e.$type,properties:{component:{name:t6e.component},target:{name:t6e.target}},superTypes:[]},GitGraph:{name:r6e.$type,properties:{accDescr:{name:r6e.accDescr},accTitle:{name:r6e.accTitle},statements:{name:r6e.statements,defaultValue:[]},title:{name:r6e.title}},superTypes:[]},Group:{name:i6e.$type,properties:{icon:{name:i6e.icon},id:{name:i6e.id},in:{name:i6e.in},title:{name:i6e.title}},superTypes:[]},Info:{name:n6e.$type,properties:{accDescr:{name:n6e.accDescr},accTitle:{name:n6e.accTitle},title:{name:n6e.title}},superTypes:[]},Item:{name:a6e.$type,properties:{classSelector:{name:a6e.classSelector},name:{name:a6e.name}},superTypes:[]},Junction:{name:s6e.$type,properties:{id:{name:s6e.id},in:{name:s6e.in}},superTypes:[]},Label:{name:o6e.$type,properties:{negX:{name:o6e.negX,defaultValue:!1},negY:{name:o6e.negY,defaultValue:!1},offsetX:{name:o6e.offsetX},offsetY:{name:o6e.offsetY}},superTypes:[]},Leaf:{name:l6e.$type,properties:{classSelector:{name:l6e.classSelector},name:{name:l6e.name},value:{name:l6e.value}},superTypes:[a6e.$type]},Link:{name:h6e.$type,properties:{arrow:{name:h6e.arrow},from:{name:h6e.from},fromPort:{name:h6e.fromPort},linkLabel:{name:h6e.linkLabel},to:{name:h6e.to},toPort:{name:h6e.toPort}},superTypes:[]},Merge:{name:c6e.$type,properties:{branch:{name:c6e.branch},id:{name:c6e.id},tags:{name:c6e.tags,defaultValue:[]},type:{name:c6e.type}},superTypes:[w6e.$type]},Note:{name:u6e.$type,properties:{evolution:{name:u6e.evolution},text:{name:u6e.text},visibility:{name:u6e.visibility}},superTypes:[]},Option:{name:d6e.$type,properties:{name:{name:d6e.name},value:{name:d6e.value,defaultValue:!1}},superTypes:[]},Packet:{name:p6e.$type,properties:{accDescr:{name:p6e.accDescr},accTitle:{name:p6e.accTitle},blocks:{name:p6e.blocks,defaultValue:[]},title:{name:p6e.title}},superTypes:[]},PacketBlock:{name:g6e.$type,properties:{bits:{name:g6e.bits},end:{name:g6e.end},label:{name:g6e.label},start:{name:g6e.start}},superTypes:[]},Pie:{name:f6e.$type,properties:{accDescr:{name:f6e.accDescr},accTitle:{name:f6e.accTitle},sections:{name:f6e.sections,defaultValue:[]},showData:{name:f6e.showData,defaultValue:!1},title:{name:f6e.title}},superTypes:[]},PieSection:{name:m6e.$type,properties:{label:{name:m6e.label},value:{name:m6e.value}},superTypes:[]},Pipeline:{name:y6e.$type,properties:{components:{name:y6e.components,defaultValue:[]},parent:{name:y6e.parent}},superTypes:[]},PipelineComponent:{name:v6e.$type,properties:{evolution:{name:v6e.evolution},label:{name:v6e.label},name:{name:v6e.name}},superTypes:[]},Radar:{name:x6e.$type,properties:{accDescr:{name:x6e.accDescr},accTitle:{name:x6e.accTitle},axes:{name:x6e.axes,defaultValue:[]},curves:{name:x6e.curves,defaultValue:[]},options:{name:x6e.options,defaultValue:[]},title:{name:x6e.title}},superTypes:[]},Section:{name:b6e.$type,properties:{classSelector:{name:b6e.classSelector},name:{name:b6e.name}},superTypes:[a6e.$type]},Service:{name:T6e.$type,properties:{icon:{name:T6e.icon},iconText:{name:T6e.iconText},id:{name:T6e.id},in:{name:T6e.in},title:{name:T6e.title}},superTypes:[]},Size:{name:k6e.$type,properties:{height:{name:k6e.height},width:{name:k6e.width}},superTypes:[]},Statement:{name:w6e.$type,properties:{},superTypes:[]},TreeNode:{name:S6e.$type,properties:{indent:{name:S6e.indent},name:{name:S6e.name}},superTypes:[]},TreeView:{name:_6e.$type,properties:{accDescr:{name:_6e.accDescr},accTitle:{name:_6e.accTitle},nodes:{name:_6e.nodes,defaultValue:[]},title:{name:_6e.title}},superTypes:[]},Treemap:{name:C6e.$type,properties:{accDescr:{name:C6e.accDescr},accTitle:{name:C6e.accTitle},title:{name:C6e.title},TreemapRows:{name:C6e.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:E6e.$type,properties:{indent:{name:E6e.indent},item:{name:E6e.item}},superTypes:[]},Wardley:{name:A6e.$type,properties:{accDescr:{name:A6e.accDescr},accelerators:{name:A6e.accelerators,defaultValue:[]},accTitle:{name:A6e.accTitle},anchors:{name:A6e.anchors,defaultValue:[]},annotation:{name:A6e.annotation,defaultValue:[]},annotations:{name:A6e.annotations,defaultValue:[]},components:{name:A6e.components,defaultValue:[]},deaccelerators:{name:A6e.deaccelerators,defaultValue:[]},evolution:{name:A6e.evolution},evolves:{name:A6e.evolves,defaultValue:[]},links:{name:A6e.links,defaultValue:[]},notes:{name:A6e.notes,defaultValue:[]},pipelines:{name:A6e.pipelines,defaultValue:[]},size:{name:A6e.size},title:{name:A6e.title}},superTypes:[]}}}static{r(this,"MermaidAstReflection")}},R6e=new L6e,N6e=r(()=>I6e=I6e??eCe(`{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"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":[]}}]},"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@9"},"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@9"},"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@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"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@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"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@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"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@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"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@23"},"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@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"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@18"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"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"),M6e=r(()=>D6e=D6e??eCe(`{"$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"),B6e=r(()=>O6e=O6e??eCe(`{"$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"),$6e=r(()=>P6e=P6e??eCe(`{"$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"),z6e=r(()=>F6e=F6e??eCe(`{"$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"),W6e=r(()=>q6e=q6e??eCe(`{"$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"),G6e=r(()=>U6e=U6e??eCe(`{"$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"),V6e=r(()=>j6e=j6e??eCe(`{"$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@9"},"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":"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":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@9"}}},"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 * Converted from treemap 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 * treeView declaration.\\n */"}`),"TreeViewGrammarGrammar"),H6e=r(()=>Y6e=Y6e??eCe(`{"$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},{"$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"),iEe={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(rEe={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(tEe={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(eEe={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(J6e={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(Q6e={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(Z6e={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(K6e={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(X6e={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"},nEe={AstReflection:r(()=>new L6e,"AstReflection")},aEe={Grammar:r(()=>N6e(),"Grammar"),LanguageMetaData:r(()=>X6e,"LanguageMetaData"),parser:{}},sEe={Grammar:r(()=>M6e(),"Grammar"),LanguageMetaData:r(()=>K6e,"LanguageMetaData"),parser:{}},oEe={Grammar:r(()=>B6e(),"Grammar"),LanguageMetaData:r(()=>Z6e,"LanguageMetaData"),parser:{}},lEe={Grammar:r(()=>$6e(),"Grammar"),LanguageMetaData:r(()=>Q6e,"LanguageMetaData"),parser:{}},hEe={Grammar:r(()=>z6e(),"Grammar"),LanguageMetaData:r(()=>J6e,"LanguageMetaData"),parser:{}},cEe={Grammar:r(()=>W6e(),"Grammar"),LanguageMetaData:r(()=>eEe,"LanguageMetaData"),parser:{}},uEe={Grammar:r(()=>G6e(),"Grammar"),LanguageMetaData:r(()=>tEe,"LanguageMetaData"),parser:{}},dEe={Grammar:r(()=>V6e(),"Grammar"),LanguageMetaData:r(()=>rEe,"LanguageMetaData"),parser:{}},pEe={Grammar:r(()=>H6e(),"Grammar"),LanguageMetaData:r(()=>iEe,"LanguageMetaData"),parser:{}},gEe={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},fEe=class extends J5e{static{mt(this,"AbstractMermaidValueConverter")}static{r(this,"AbstractMermaidValueConverter")}runConverter(e,t,r){var i=this.runCommonConverter(e,t,r);return void 0===(i=void 0===i?this.runCustomConverter(e,t,r):i)?super.runConverter(e,t,r):i}runCommonConverter(e,t,r){return void 0!==(e=gEe[e.name])&&null!==(e=e.exec(t))?void 0!==e[1]?e[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==e[2]?e[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,`
`):void 0:void 0}},mEe=class extends fEe{static{mt(this,"CommonValueConverter")}static{r(this,"CommonValueConverter")}runCustomConverter(e,t,r){}},yEe=class extends Q5e{static{mt(this,"AbstractMermaidTokenBuilder")}static{r(this,"AbstractMermaidTokenBuilder")}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,r){return(e=super.buildKeywordTokens(e,t,r)).forEach(e=>{this.keywords.has(e.name)&&void 0!==e.PATTERN&&(e.PATTERN=new RegExp(e.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),e}},class extends yEe{static{mt(this,"CommonTokenBuilder")}static{r(this,"CommonTokenBuilder")}}});function xEe(e){var t,r=e.validation.TreemapValidator;(e=e.validation.ValidationRegistry)&&(t={Treemap:r.checkSingleRoot.bind(r)},e.register(t,r))}function bEe(e=qwe){var e=Awe(Swe(e),nEe),t=Awe(Ewe({shared:e}),uEe,EEe);return e.ServiceRegistry.register(t),xEe(t),{shared:e,Treemap:t}}var TEe,kEe,wEe,CEe,EEe,SEe=i(()=>{vEe(),dCe(),TEe=class extends yEe{static{mt(this,"TreemapTokenBuilder")}static{r(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},kEe=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,wEe=class extends fEe{static{mt(this,"TreemapValueConverter")}static{r(this,"TreemapValueConverter")}runCustomConverter(e,t,r){return"NUMBER2"===e.name?parseFloat(t.replace(/,/g,"")):"SEPARATOR"===e.name||"STRING2"===e.name?t.substring(1,t.length-1):"INDENTATION"===e.name?t.length:"ClassDef"===e.name?"string"!=typeof t?t:(e=kEe.exec(t))?{$type:"ClassDefStatement",className:e[1],styleText:e[2]||void 0}:void 0:void 0}},mt(xEe,"registerValidationChecks"),r(xEe,"registerValidationChecks"),CEe=class{static{mt(this,"TreemapValidator")}static{r(this,"TreemapValidator")}checkSingleRoot(e,t){let r;for(var i of e.TreemapRows)i.item&&(void 0===r&&void 0===i.indent?r=0:(void 0===i.indent||void 0!==r&&r>=parseInt(i.indent,10))&&t("error","Multiple root nodes are not allowed in a treemap.",{node:i,property:"item"}))}},EEe={parser:{TokenBuilder:r(()=>new TEe,"TokenBuilder"),ValueConverter:r(()=>new wEe,"ValueConverter")},validation:{TreemapValidator:r(()=>new CEe,"TreemapValidator")}},mt(bEe,"createTreemapServices"),r(bEe,"createTreemapServices")});function _Ee(e=qwe){var e=Awe(Swe(e),nEe),t=Awe(Ewe({shared:e}),pEe,LEe);return e.ServiceRegistry.register(t),{shared:e,Wardley:t}}var AEe,LEe,REe=i(()=>{vEe(),dCe(),AEe=class extends fEe{static{mt(this,"WardleyValueConverter")}static{r(this,"WardleyValueConverter")}runCustomConverter(e,t,r){if("LINK_LABEL"===e.name.toUpperCase())return t.substring(1).trim()}},LEe={parser:{ValueConverter:r(()=>new AEe,"ValueConverter")}},mt(_Ee,"createWardleyServices"),r(_Ee,"createWardleyServices")});function IEe(e=qwe){var e=Awe(Swe(e),nEe),t=Awe(Ewe({shared:e}),sEe,DEe);return e.ServiceRegistry.register(t),{shared:e,GitGraph:t}}var NEe,DEe,MEe=i(()=>{vEe(),dCe(),NEe=class extends yEe{static{mt(this,"GitGraphTokenBuilder")}static{r(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},DEe={parser:{TokenBuilder:r(()=>new NEe,"TokenBuilder"),ValueConverter:r(()=>new mEe,"ValueConverter")}},mt(IEe,"createGitGraphServices"),r(IEe,"createGitGraphServices")});function OEe(e=qwe){var e=Awe(Swe(e),nEe),t=Awe(Ewe({shared:e}),oEe,PEe);return e.ServiceRegistry.register(t),{shared:e,Info:t}}var BEe,PEe,$Ee=i(()=>{vEe(),dCe(),BEe=class extends yEe{static{mt(this,"InfoTokenBuilder")}static{r(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},PEe={parser:{TokenBuilder:r(()=>new BEe,"TokenBuilder"),ValueConverter:r(()=>new mEe,"ValueConverter")}},mt(OEe,"createInfoServices"),r(OEe,"createInfoServices")});function FEe(e=qwe){var e=Awe(Swe(e),nEe),t=Awe(Ewe({shared:e}),lEe,qEe);return e.ServiceRegistry.register(t),{shared:e,Packet:t}}var zEe,qEe,WEe=i(()=>{vEe(),dCe(),zEe=class extends yEe{static{mt(this,"PacketTokenBuilder")}static{r(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},qEe={parser:{TokenBuilder:r(()=>new zEe,"TokenBuilder"),ValueConverter:r(()=>new mEe,"ValueConverter")}},mt(FEe,"createPacketServices"),r(FEe,"createPacketServices")});function UEe(e=qwe){var e=Awe(Swe(e),nEe),t=Awe(Ewe({shared:e}),hEe,VEe);return e.ServiceRegistry.register(t),{shared:e,Pie:t}}var GEe,jEe,VEe,YEe=i(()=>{vEe(),dCe(),GEe=class extends yEe{static{mt(this,"PieTokenBuilder")}static{r(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},jEe=class extends fEe{static{mt(this,"PieValueConverter")}static{r(this,"PieValueConverter")}runCustomConverter(e,t,r){if("PIE_SECTION_LABEL"===e.name)return t.replace(/"/g,"").trim()}},VEe={parser:{TokenBuilder:r(()=>new GEe,"TokenBuilder"),ValueConverter:r(()=>new jEe,"ValueConverter")}},mt(UEe,"createPieServices"),r(UEe,"createPieServices")});function HEe(e=qwe){var e=Awe(Swe(e),nEe),t=Awe(Ewe({shared:e}),dEe,ZEe);return e.ServiceRegistry.register(t),{shared:e,TreeView:t}}var XEe,KEe,ZEe,QEe=i(()=>{vEe(),dCe(),XEe=class extends fEe{static{mt(this,"TreeViewValueConverter")}static{r(this,"TreeViewValueConverter")}runCustomConverter(e,t,r){return"INDENTATION"===e.name?t?.length||0:"STRING2"===e.name?t.substring(1,t.length-1):void 0}},KEe=class extends yEe{static{mt(this,"TreeViewTokenBuilder")}static{r(this,"TreeViewTokenBuilder")}constructor(){super(["treeView-beta"])}},ZEe={parser:{TokenBuilder:r(()=>new KEe,"TokenBuilder"),ValueConverter:r(()=>new XEe,"ValueConverter")}},mt(HEe,"createTreeViewServices"),r(HEe,"createTreeViewServices")});function JEe(e=qwe){var e=Awe(Swe(e),nEe),t=Awe(Ewe({shared:e}),aEe,rSe);return e.ServiceRegistry.register(t),{shared:e,Architecture:t}}var eSe,tSe,rSe,iSe=i(()=>{vEe(),dCe(),eSe=class extends yEe{static{mt(this,"ArchitectureTokenBuilder")}static{r(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},tSe=class extends fEe{static{mt(this,"ArchitectureValueConverter")}static{r(this,"ArchitectureValueConverter")}runCustomConverter(e,t,r){if("ARCH_ICON"===e.name)return t.replace(/[()]/g,"").trim();if("ARCH_TEXT_ICON"===e.name)return t.replace(/["()]/g,"");if("ARCH_TITLE"===e.name){let e=t.replace(/^\[|]$/g,"").trim();return(e=e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?(e=e.slice(1,-1)).replace(/\\"/g,'"').replace(/\\'/g,"'"):e).trim()}}},rSe={parser:{TokenBuilder:r(()=>new eSe,"TokenBuilder"),ValueConverter:r(()=>new tSe,"ValueConverter")}},mt(JEe,"createArchitectureServices"),r(JEe,"createArchitectureServices")});function nSe(e=qwe){var e=Awe(Swe(e),nEe),t=Awe(Ewe({shared:e}),cEe,sSe);return e.ServiceRegistry.register(t),{shared:e,Radar:t}}var aSe,sSe,oSe=i(()=>{vEe(),dCe(),aSe=class extends yEe{static{mt(this,"RadarTokenBuilder")}static{r(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},sSe={parser:{TokenBuilder:r(()=>new aSe,"TokenBuilder"),ValueConverter:r(()=>new mEe,"ValueConverter")}},mt(nSe,"createRadarServices"),r(nSe,"createRadarServices")}),lSe={},hSe=(sYe(lSe,{InfoModule:()=>PEe,createInfoServices:()=>OEe}),i(()=>{$Ee(),vEe()})),cSe={},uSe=(sYe(cSe,{PacketModule:()=>qEe,createPacketServices:()=>FEe}),i(()=>{WEe(),vEe()})),dSe={},pSe=(sYe(dSe,{PieModule:()=>VEe,createPieServices:()=>UEe}),i(()=>{YEe(),vEe()})),gSe={},fSe=(sYe(gSe,{TreeViewModule:()=>ZEe,createTreeViewServices:()=>HEe}),i(()=>{QEe(),vEe()})),mSe={},ySe=(sYe(mSe,{ArchitectureModule:()=>rSe,createArchitectureServices:()=>JEe}),i(()=>{iSe(),vEe()})),vSe={},xSe=(sYe(vSe,{GitGraphModule:()=>DEe,createGitGraphServices:()=>IEe}),i(()=>{MEe(),vEe()})),bSe={},TSe=(sYe(bSe,{RadarModule:()=>sSe,createRadarServices:()=>nSe}),i(()=>{oSe(),vEe()})),kSe={},wSe=(sYe(kSe,{TreemapModule:()=>EEe,createTreemapServices:()=>bEe}),i(()=>{SEe(),vEe()})),CSe={},ESe=(sYe(CSe,{WardleyModule:()=>LEe,createWardleyServices:()=>_Ee}),i(()=>{REe(),vEe()}));async function SSe(e,t){var r=ASe[e];if(!r)throw new Error("Unknown diagram type: "+e);if(_Se[e]||await r(),0<(r=_Se[e].parse(t)).lexerErrors.length||0<r.parserErrors.length)throw new LSe(r);return r.value}var _Se,ASe,LSe,RSe=i(()=>{SEe(),REe(),MEe(),$Ee(),WEe(),YEe(),QEe(),iSe(),oSe(),vEe(),_Se={},ASe={info:r(async()=>{var e=(e=(await Promise.resolve().then(()=>(hSe(),lSe))).createInfoServices)().Info.parser.LangiumParser;_Se.info=e},"info"),packet:r(async()=>{var e=(e=(await Promise.resolve().then(()=>(uSe(),cSe))).createPacketServices)().Packet.parser.LangiumParser;_Se.packet=e},"packet"),pie:r(async()=>{var e=(e=(await Promise.resolve().then(()=>(pSe(),dSe))).createPieServices)().Pie.parser.LangiumParser;_Se.pie=e},"pie"),treeView:r(async()=>{var e=(e=(await Promise.resolve().then(()=>(fSe(),gSe))).createTreeViewServices)().TreeView.parser.LangiumParser;_Se.treeView=e},"treeView"),architecture:r(async()=>{var e=(e=(await Promise.resolve().then(()=>(ySe(),mSe))).createArchitectureServices)().Architecture.parser.LangiumParser;_Se.architecture=e},"architecture"),gitGraph:r(async()=>{var e=(e=(await Promise.resolve().then(()=>(xSe(),vSe))).createGitGraphServices)().GitGraph.parser.LangiumParser;_Se.gitGraph=e},"gitGraph"),radar:r(async()=>{var e=(e=(await Promise.resolve().then(()=>(TSe(),bSe))).createRadarServices)().Radar.parser.LangiumParser;_Se.radar=e},"radar"),treemap:r(async()=>{var e=(e=(await Promise.resolve().then(()=>(wSe(),kSe))).createTreemapServices)().Treemap.parser.LangiumParser;_Se.treemap=e},"treemap"),wardley:r(async()=>{var e=(e=(await Promise.resolve().then(()=>(ESe(),CSe))).createWardleyServices)().Wardley.parser.LangiumParser;_Se.wardley=e},"wardley")},mt(SSe,"parse"),r(SSe,"parse"),LSe=class extends Error{static{mt(this,"MermaidParseError")}constructor(e){super(`Parsing failed: ${e.lexerErrors.map(e=>`Lexer error on line ${void 0===e.line||isNaN(e.line)?"?":e.line}, column ${void 0===e.column||isNaN(e.column)?"?":e.column}: `+e.message).join(`
`)} `+e.parserErrors.map(e=>`Parse error on line ${void 0===e.token.startLine||isNaN(e.token.startLine)?"?":e.token.startLine}, column ${void 0===e.token.startColumn||isNaN(e.token.startColumn)?"?":e.token.startColumn}: `+e.message).join(`
`)),this.result=e}static{r(this,"MermaidParseError")}}});function ISe(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}var NSe,DSe,MSe=i(()=>{mt(ISe,"populateCommonDb")}),OSe=i(()=>{NSe={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}}),BSe=i(()=>{DSe=class{constructor(e){this.init=e,this.records=this.init()}static{mt(this,"ImperativeState")}reset(){this.records=this.init()}}});function PSe(){return u7({length:7})}function $Se(e,i){let n=Object.create(null);return e.reduce((e,t)=>{var r=i(t);return n[r]||(n[r]=!0,e.push(t)),e},[])}function FSe(e,t,r){-1===(t=e.indexOf(t))?e.push(r):e.splice(t,1,r)}function zSe(e){let t=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),r="";e.forEach(function(e){e===t?r+="\t*":r+="\t|"});var i,n=[r,t.id,t.seq];for(i in y.records.branches)y.records.branches.get(i)===t.id&&n.push(i);if(B.debug(n.join(" ")),t.parents&&2==t.parents.length&&t.parents[0]&&t.parents[1]){var a=y.records.commits.get(t.parents[0]);FSe(e,t,a),t.parents[1]&&e.push(y.records.commits.get(t.parents[1]))}else{if(0==t.parents.length)return;t.parents[0]&&(a=y.records.commits.get(t.parents[0]),FSe(e,t,a))}zSe(e=$Se(e,e=>e.id))}var qSe,WSe,y,USe,GSe,jSe,VSe,YSe,HSe,XSe,KSe,ZSe,QSe,JSe,e_e,t_e,r_e,i_e,n_e,a_e,s_e,o_e,l_e,h_e,c_e,u_e,d_e,p_e,g_e,f_e,m_e,y_e,v_e,x_e,b_e,T_e,k_e,w_e,C_e,E_e,S_e,__e,A_e,L_e,R_e,I_e,N_e,D_e,M_e,O_e,B_e,P_e,$_e,F_e,z_e,q_e,W_e,U_e,G_e,j_e,V_e,Y_e,H_e,X_e,K_e,Z_e,Q_e,J_e,e7e,t7e,r7e,i7e,n7e,a7e=i(()=>{e(),S7(),Ei(),ic(),Gu(),OSe(),BSe(),wi(),qSe=ar.gitGraph,WSe=mt(()=>H_({...qSe,...br().gitGraph}),"getConfig"),y=new DSe(()=>{var e=(t=WSe()).mainBranchName,t=t.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:t}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}}),mt(PSe,"getID"),mt($Se,"uniqBy"),USe=mt(function(e){y.records.direction=e},"setDirection"),GSe=mt(function(e){B.debug("options str",e),e=e?.trim()||"{}";try{y.records.options=JSON.parse(e)}catch(e){B.error("error while parsing gitGraph options",e.message)}},"setOptions"),jSe=mt(function(){return y.records.options},"getOptions"),VSe=mt(function(e){let t=e.msg,r=e.id,i=e.type,n=e.tags,a=(B.info("commit",t,r,i,n),B.debug("Entering commit:",t,r,i,n),WSe());r=I.sanitizeText(r,a),t=I.sanitizeText(t,a),n=n?.map(e=>I.sanitizeText(e,a)),e={id:r||y.records.seq+"-"+PSe(),message:t,seq:y.records.seq++,type:i??NSe.NORMAL,tags:n??[],parents:null==y.records.head?[]:[y.records.head.id],branch:y.records.currBranch},y.records.head=e,B.info("main branch",a.mainBranchName),y.records.commits.has(e.id)&&B.warn(`Commit ID ${e.id} already exists`),y.records.commits.set(e.id,e),y.records.branches.set(y.records.currBranch,e.id),B.debug("in pushCommit "+e.id)},"commit"),YSe=mt(function(e){var t=e.name,e=e.order,t=I.sanitizeText(t,WSe());if(y.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}")`);y.records.branches.set(t,null!=y.records.head?y.records.head.id:null),y.records.branchConfig.set(t,{name:t,order:e}),KSe(t),B.debug("in createBranch")},"branch"),HSe=mt(e=>{var t=e.branch,r=e.id,i=e.type,n=e.tags,a=WSe(),t=I.sanitizeText(t,a),r=r&&I.sanitizeText(r,a),e=y.records.branches.get(y.records.currBranch),a=y.records.branches.get(t),e=e?y.records.commits.get(e):void 0,s=a?y.records.commits.get(a):void 0;if(e&&s&&e.branch===t)throw new Error(`Cannot merge branch '${t}' into itself.`);if(y.records.currBranch===t)throw(o=new Error('Incorrect usage of "merge". Cannot merge a branch to itself')).hash={text:"merge "+t,token:"merge "+t,expected:["branch abc"]},o;if(void 0===e||!e)throw(o=new Error(`Incorrect usage of "merge". Current branch (${y.records.currBranch})has no commits`)).hash={text:"merge "+t,token:"merge "+t,expected:["commit"]},o;if(!y.records.branches.has(t))throw(o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist")).hash={text:"merge "+t,token:"merge "+t,expected:["branch "+t]},o;if(void 0===s||!s)throw(o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits")).hash={text:"merge "+t,token:"merge "+t,expected:['"commit"']},o;if(e===s)throw(o=new Error('Incorrect usage of "merge". Both branches have same head')).hash={text:"merge "+t,token:"merge "+t,expected:["branch abc"]},o;if(r&&y.records.commits.has(r))throw(e=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom id")).hash={text:`merge ${t} ${r} ${i} `+n?.join(" "),token:`merge ${t} ${r} ${i} `+n?.join(" "),expected:[`merge ${t} ${r}_UNIQUE ${i} `+n?.join(" ")]},e;var s=a||"",o={id:r||y.records.seq+"-"+PSe(),message:`merged branch ${t} into `+y.records.currBranch,seq:y.records.seq++,parents:null==y.records.head?[]:[y.records.head.id,s],branch:y.records.currBranch,type:NSe.MERGE,customType:i,customId:!!r,tags:n??[]};y.records.head=o,y.records.commits.set(o.id,o),y.records.branches.set(y.records.currBranch,o.id),B.debug(y.records.branches),B.debug("in mergeBranch")},"merge"),XSe=mt(function(e){let t=e.id,r=e.targetId,i=e.tags,n=e.parent,a=(B.debug("Entering cherryPick:",t,r,i),WSe());if(t=I.sanitizeText(t,a),r=I.sanitizeText(r,a),i=i?.map(e=>I.sanitizeText(e,a)),n=I.sanitizeText(n,a),!t||!y.records.commits.has(t))throw(e=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided')).hash={text:`cherryPick ${t} `+r,token:`cherryPick ${t} `+r,expected:["cherry-pick abc"]},e;if(void 0===(e=y.records.commits.get(t))||!e)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(n&&(!Array.isArray(e.parents)||!e.parents.includes(n)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");var s=e.branch;if(e.type===NSe.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||!y.records.commits.has(r)){if(s===y.records.currBranch)throw(s=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch')).hash={text:`cherryPick ${t} `+r,token:`cherryPick ${t} `+r,expected:["cherry-pick abc"]},s;if(void 0===(s=y.records.branches.get(y.records.currBranch))||!s)throw(o=new Error(`Incorrect usage of "cherry-pick". Current branch (${y.records.currBranch})has no commits`)).hash={text:`cherryPick ${t} `+r,token:`cherryPick ${t} `+r,expected:["cherry-pick abc"]},o;var o=y.records.commits.get(s);if(void 0===o||!o)throw(s=new Error(`Incorrect usage of "cherry-pick". Current branch (${y.records.currBranch})has no commits`)).hash={text:`cherryPick ${t} `+r,token:`cherryPick ${t} `+r,expected:["cherry-pick abc"]},s;o={id:y.records.seq+"-"+PSe(),message:`cherry-picked ${e?.message} into `+y.records.currBranch,seq:y.records.seq++,parents:null==y.records.head?[]:[y.records.head.id,e.id],branch:y.records.currBranch,type:NSe.CHERRY_PICK,tags:i?i.filter(Boolean):["cherry-pick:"+e.id+(e.type===NSe.MERGE?"|parent:"+n:"")]},y.records.head=o,y.records.commits.set(o.id,o),y.records.branches.set(y.records.currBranch,o.id),B.debug(y.records.branches),B.debug("in cherryPick")}},"cherryPick"),KSe=mt(function(e){var t;if(e=I.sanitizeText(e,WSe()),!y.records.branches.has(e))throw(t=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`)).hash={text:"checkout "+e,token:"checkout "+e,expected:["branch "+e]},t;y.records.currBranch=e,t=y.records.branches.get(y.records.currBranch),y.records.head=void 0!==t&&t?y.records.commits.get(t)??null:null},"checkout"),mt(FSe,"upsert"),mt(zSe,"prettyPrintCommitHistory"),ZSe=mt(function(){B.debug(y.records.commits),zSe([r_e()[0]])},"prettyPrint"),QSe=mt(function(){y.reset(),Pc()},"clear"),JSe=mt(function(){return[...y.records.branchConfig.values()].map((e,t)=>null!=e.order?e:{...e,order:parseFloat("0."+t)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),e_e=mt(function(){return y.records.branches},"getBranches"),t_e=mt(function(){return y.records.commits},"getCommits"),r_e=mt(function(){var e=[...y.records.commits.values()];return e.forEach(function(e){B.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},"getCommitsArray"),i_e=mt(function(){return y.records.currBranch},"getCurrentBranch"),n_e=mt(function(){return y.records.direction},"getDirection"),a_e=mt(function(){return y.records.head},"getHead"),s_e={commitType:NSe,getConfig:WSe,setDirection:USe,setOptions:GSe,getOptions:jSe,commit:VSe,branch:YSe,merge:HSe,cherryPick:XSe,checkout:KSe,prettyPrint:ZSe,clear:QSe,getBranchesAsObjArray:JSe,getBranches:e_e,getCommits:t_e,getCommitsArray:r_e,getCurrentBranch:i_e,getDirection:n_e,getHead:a_e,setAccTitle:$c,getAccTitle:Fc,getAccDescription:qc,setAccDescription:zc,setDiagramTitle:Wc,getDiagramTitle:Uc}}),s7e=i(()=>{RSe(),e(),MSe(),a7e(),OSe(),o_e=mt((e,t)=>{ISe(e,t),e.dir&&t.setDirection(e.dir);for(var r of e.statements)l_e(r,t)},"populate"),l_e=mt((e,t)=>{var r={Commit:mt(e=>t.commit(h_e(e)),"Commit"),Branch:mt(e=>t.branch(c_e(e)),"Branch"),Merge:mt(e=>t.merge(u_e(e)),"Merge"),Checkout:mt(e=>t.checkout(d_e(e)),"Checkout"),CherryPicking:mt(e=>t.cherryPick(p_e(e)),"CherryPicking")}[e.$type];r?r(e):B.error("Unknown statement type: "+e.$type)},"parseStatement"),h_e=mt(e=>({id:e.id,msg:e.message??"",type:void 0!==e.type?NSe[e.type]:NSe.NORMAL,tags:e.tags??void 0}),"parseCommit"),c_e=mt(e=>({name:e.name,order:e.order??0}),"parseBranch"),u_e=mt(e=>({branch:e.branch,id:e.id??"",type:void 0!==e.type?NSe[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),d_e=mt(e=>e.branch,"parseCheckout"),p_e=mt(e=>({id:e.id,targetId:"",tags:0===e.tags?.length?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),g_e={parse:mt(async e=>{e=await SSe("gitGraph",e),B.debug(e),o_e(e,s_e)},"parse")}}),o7e=i(()=>{Sk(),ju(),e(),S7(),OSe(),f_e=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),m_e=new Set(["redux-color","redux-dark-color"]),y_e=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),v_e=mt((e,t,r=!1)=>r&&0<e?(e-1)%(t-1)+1:e%t,"calcColorIndex"),x_e=new Map,b_e=new Map,T_e=new Map,k_e=[],w_e=0,C_e="LR",E_e=mt(()=>{x_e.clear(),b_e.clear(),T_e.clear(),w_e=0,k_e=[],C_e="LR"},"clear"),S_e=mt(e=>{let r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof e?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(e=>{var t=document.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.setAttribute("dy","1em"),t.setAttribute("x","0"),t.setAttribute("class","row"),t.textContent=e.trim(),r.appendChild(t)}),r},"drawText"),__e=mt(e=>{let r,i,n;return n="BT"===C_e?(i=mt((e,t)=>e<=t,"comparisonFunc"),1/0):(i=mt((e,t)=>t<=e,"comparisonFunc"),0),e.forEach(e=>{var t="TB"===C_e||"BT"==C_e?b_e.get(e)?.y:b_e.get(e)?.x;void 0!==t&&i(t,n)&&(r=e,n=t)}),r},"findClosestParent"),A_e=mt(e=>{let r="",i=1/0;return e.forEach(e=>{var t=b_e.get(e).y;t<=i&&(r=e,i=t)}),r||void 0},"findClosestParentBT"),L_e=mt((e,i,t)=>{let n=t,a=t,r=[];e.forEach(e=>{var t=i.get(e);if(!t)throw new Error("Commit not found for key "+e);t.parents.length?(n=I_e(t),a=Math.max(n,a)):r.push(t),N_e(t,n)}),n=a,r.forEach(e=>{D_e(e,n,t)}),e.forEach(e=>{var t,r;(e=i.get(e))?.parents.length&&(t=A_e(e.parents),(n=b_e.get(t).y-40)<=a&&(a=n),t=x_e.get(e.branch).pos,r=n-10,b_e.set(e.id,{x:t,y:r}))})},"setParallelBTPos"),R_e=mt(e=>{var t=__e(e.parents.filter(e=>null!==e));if(!t)throw new Error("Closest parent not found for commit "+e.id);if(void 0===(t=b_e.get(t)?.y))throw new Error("Closest parent position not found for commit "+e.id);return t},"findClosestParentPos"),I_e=mt(e=>R_e(e)+40,"calculateCommitPosition"),N_e=mt((e,t)=>{var r=x_e.get(e.branch);if(r)return r=r.pos,b_e.set(e.id,{x:r,y:t+=10}),{x:r,y:t};throw new Error("Branch not found for commit "+e.id)},"setCommitPosition"),D_e=mt((e,t,r)=>{var i=x_e.get(e.branch);if(!i)throw new Error("Branch not found for commit "+e.id);i=i.pos,b_e.set(e.id,{x:i,y:t+r})},"setRootPosition"),M_e=mt((e,t,r,i,n,a)=>{var s=P().theme,o=f_e.has(s??""),l=m_e.has(s??""),s=y_e.has(s??"");a===NSe.HIGHLIGHT?(e.append("rect").attr("x",r.x-10+(o?3:0)).attr("y",r.y-10+(o?3:0)).attr("width",o?14:20).attr("height",o?14:20).attr("class",`commit ${t.id} commit-highlight${v_e(n,8,l)} ${i}-outer`),e.append("rect").attr("x",r.x-6+(o?2:0)).attr("y",r.y-6+(o?2:0)).attr("width",o?8:12).attr("height",o?8:12).attr("class",`commit ${t.id} commit${v_e(n,8,l)} ${i}-inner`)):a===NSe.CHERRY_PICK?(e.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",o?7:10).attr("class",`commit ${t.id} `+i),e.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",o?2.5:2.75).attr("fill",s?"#000000":"#fff").attr("class",`commit ${t.id} `+i),e.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",o?2.5:2.75).attr("fill",s?"#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",s?"#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",s?"#000000":"#fff").attr("class",`commit ${t.id} `+i)):((s=e.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",o?7:10),s.attr("class",`commit ${t.id} commit`+v_e(n,8,l)),a===NSe.MERGE&&((s=e.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",o?5:6),s.attr("class",`commit ${i} ${t.id} commit`+v_e(n,8,l))),a===NSe.REVERSE&&(s=o?4:5,e.append("path").attr("d",`M ${r.x-s},${r.y-s}L${r.x+s},${r.y+s}M${r.x-s},${r.y+s}L${r.x+s},`+(r.y-s)).attr("class",`commit ${i} ${t.id} commit`+v_e(n,8,l))))},"drawCommitBullet"),O_e=mt((e,t,r,i,n)=>{var a,s;t.type!==NSe.CHERRY_PICK&&(t.customId&&t.type===NSe.MERGE||t.type!==NSe.MERGE)&&n.showCommitLabel&&(a=(e=e.append("g")).insert("rect").attr("class","commit-label-bkg"),s=(t=e.append("text").attr("x",i).attr("y",r.y+25).attr("class","commit-label").text(t.id)).node()?.getBBox())&&(a.attr("x",r.posWithOffset-s.width/2-2).attr("y",r.y+13.5).attr("width",s.width+4).attr("height",s.height+4),"TB"===C_e||"BT"===C_e?(a.attr("x",r.x-(s.width+16+5)).attr("y",r.y-12),t.attr("x",r.x-(s.width+16)).attr("y",r.y+s.height-12)):t.attr("x",r.posWithOffset-s.width/2),n.rotateCommitLabel)&&("TB"===C_e||"BT"===C_e?(t.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),a.attr("transform","rotate(-45, "+r.x+", "+r.y+")")):(n=-7.5-(s.width+10)/25*9.5,t=10+s.width/25*8.5,e.attr("transform","translate("+n+", "+t+") rotate(-45, "+i+", "+r.y+")")))},"drawCommitLabel"),B_e=mt((n,a,s,o)=>{if(0<a.tags.length){let e=0,t=0,r=0,i=[];for(var l of a.tags.reverse()){var h=n.insert("polygon"),c=n.append("circle"),u=(l=n.append("text").attr("y",s.y-16-e).attr("class","tag-label").text(l)).node()?.getBBox();if(!u)throw new Error("Tag bbox not found");t=Math.max(t,u.width),r=Math.max(r,u.height),l.attr("x",s.posWithOffset-u.width/2),i.push({tag:l,hole:c,rect:h,yOffset:e}),e+=20}for(var{tag:d,hole:p,rect:g,yOffset:f}of i){var m=r/2,y=s.y-19.2-f;g.attr("class","tag-label-bkg").attr("points",`
${o-t/2-2},${2+y}
${o-t/2-2},${y-2}
${s.posWithOffset-t/2-4},${y-m-2}
${s.posWithOffset+t/2+4},${y-m-2}
${s.posWithOffset+t/2+4},${y+m+2}
${s.posWithOffset-t/2-4},`+(y+m+2)),p.attr("cy",y).attr("cx",o-t/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"!==C_e&&"BT"!==C_e||(y=o+f,g.attr("class","tag-label-bkg").attr("points",`
${s.x},${y+2}
${s.x},${y-2}
${s.x+10},${y-m-2}
${s.x+10+t+4},${y-m-2}
${s.x+10+t+4},${y+m+2}
${s.x+10},`+(y+m+2)).attr("transform","translate(12,12) rotate(45, "+s.x+","+o+")"),p.attr("cx",s.x+2).attr("cy",y).attr("transform","translate(12,12) rotate(45, "+s.x+","+o+")"),d.attr("x",s.x+5).attr("y",y+3).attr("transform","translate(14,14) rotate(45, "+s.x+","+o+")"))}}},"drawCommitTags"),P_e=mt(e=>{switch(e.customType??e.type){case NSe.NORMAL:return"commit-normal";case NSe.REVERSE:return"commit-reverse";case NSe.HIGHLIGHT:return"commit-highlight";case NSe.MERGE:return"commit-merge";case NSe.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),$_e=mt((e,t,r,i)=>{var n,a={x:0,y:0};return 0<e.parents.length?(n=__e(e.parents))?(n=i.get(n)??a,"TB"===t?n.y+40:"BT"===t?(i.get(e.id)??a).y-40:n.x+40):0:"TB"===t?30:"BT"===t?(i.get(e.id)??a).y-40:0},"calculatePosition"),F_e=mt((e,t,r)=>{var r="BT"===C_e&&r?t:t+10,t=x_e.get(e.branch)?.pos,i="TB"===C_e||"BT"===C_e?x_e.get(e.branch)?.pos:r;if(void 0===i||void 0===t)throw new Error("Position were undefined for commit "+e.id);return e=f_e.has(P().theme??""),{x:i,y:"TB"===C_e||"BT"===C_e?r:t+(e?7:-2),posWithOffset:r}},"getCommitPosition"),z_e=mt((e,a,s,o)=>{let l=e.append("g").attr("class","commit-bullets"),h=e.append("g").attr("class","commit-labels"),c="TB"===C_e||"BT"===C_e?30:0,t=[...a.keys()],u=o.parallelCommits??!1,r=mt((e,t)=>(e=a.get(e)?.seq,t=a.get(t)?.seq,void 0!==e&&void 0!==t?e-t:0),"sortKeys"),i=t.sort(r);"BT"===C_e&&(u&&L_e(i,a,c),i=i.reverse()),i.forEach(e=>{var t=a.get(e);if(!t)throw new Error("Commit not found for key "+e);u&&(c=$_e(t,C_e,c,b_e));var r,i,n,e=F_e(t,c,u);s&&(r=P_e(t),i=t.customType??t.type,n=x_e.get(t.branch)?.index??0,M_e(l,t,e,r,n,i),O_e(h,t,e,c,o),B_e(h,t,e,c)),"TB"===C_e||"BT"===C_e?b_e.set(t.id,{x:e.x,y:e.posWithOffset}):b_e.set(t.id,{x:e.posWithOffset,y:e.y}),(c="BT"===C_e&&u?c+40:c+40+10)>w_e&&(w_e=c)})},"drawCommits"),q_e=mt((t,r,e,i,n)=>{let a=(("TB"===C_e||"BT"===C_e?e.x<i.x:e.y<i.y)?r:t).branch,s=mt(e=>e.branch===a,"isOnBranchToGetCurve"),o=mt(e=>e.seq>t.seq&&e.seq<r.seq,"isBetweenCommits");return[...n.values()].some(e=>o(e)&&s(e))},"shouldRerouteArrow"),W_e=mt((e,t,r=0)=>{let i=e+Math.abs(e-t)/2,n;return 5<r?i:k_e.every(e=>10<=Math.abs(e-i))?(k_e.push(i),i):(n=Math.abs(e-t),W_e(e,t-n/5,r+1))},"findLane"),U_e=mt((e,t,r,i)=>{var n,a=P().theme,a=m_e.has(a??""),s=b_e.get(t.id),o=b_e.get(r.id);if(void 0===s||void 0===o)throw new Error(`Commit positions not found for commits ${t.id} and `+r.id);let l=q_e(t,r,s,o,i),h="",c="",u=0,d=0,p=x_e.get(r.branch)?.index;r.type===NSe.MERGE&&t.id!==r.parents[0]&&(p=x_e.get(t.branch)?.index);let g;if(l?(h="A 10 10, 0, 0, 0,",c="A 10 10, 0, 0, 1,",u=10,d=10,i=s.y<o.y?W_e(s.y,o.y):W_e(o.y,s.y),n=s.x<o.x?W_e(s.x,o.x):W_e(o.x,s.x),g="TB"===C_e?s.x<o.x?`M ${s.x} ${s.y} L ${n-u} ${s.y} ${c} ${n} ${s.y+d} L ${n} ${o.y-u} ${h} ${n+d} ${o.y} L ${o.x} `+o.y:(p=x_e.get(t.branch)?.index,`M ${s.x} ${s.y} L ${n+u} ${s.y} ${h} ${n} ${s.y+d} L ${n} ${o.y-u} ${c} ${n-d} ${o.y} L ${o.x} `+o.y):"BT"===C_e?s.x<o.x?`M ${s.x} ${s.y} L ${n-u} ${s.y} ${h} ${n} ${s.y-d} L ${n} ${o.y+u} ${c} ${n+d} ${o.y} L ${o.x} `+o.y:(p=x_e.get(t.branch)?.index,`M ${s.x} ${s.y} L ${n+u} ${s.y} ${c} ${n} ${s.y-d} L ${n} ${o.y+u} ${h} ${n-d} ${o.y} L ${o.x} `+o.y):s.y<o.y?`M ${s.x} ${s.y} L ${s.x} ${i-u} ${h} ${s.x+d} ${i} L ${o.x-u} ${i} ${c} ${o.x} ${i+d} L ${o.x} `+o.y:(p=x_e.get(t.branch)?.index,`M ${s.x} ${s.y} L ${s.x} ${i+u} ${c} ${s.x+d} ${i} L ${o.x-u} ${i} ${h} ${o.x} ${i-d} L ${o.x} `+o.y)):(h="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",u=20,d=20,"TB"===C_e?(s.x<o.x&&(g=r.type===NSe.MERGE&&t.id!==r.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${o.y-u} ${h} ${s.x+d} ${o.y} L ${o.x} `+o.y:`M ${s.x} ${s.y} L ${o.x-u} ${s.y} ${c} ${o.x} ${s.y+d} L ${o.x} `+o.y),s.x>o.x&&(h="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",u=20,d=20,g=r.type===NSe.MERGE&&t.id!==r.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${o.y-u} ${c} ${s.x-d} ${o.y} L ${o.x} `+o.y:`M ${s.x} ${s.y} L ${o.x+u} ${s.y} ${h} ${o.x} ${s.y+d} L ${o.x} `+o.y),s.x===o.x&&(g=`M ${s.x} ${s.y} L ${o.x} `+o.y)):"BT"===C_e?(s.x<o.x&&(g=r.type===NSe.MERGE&&t.id!==r.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${o.y+u} ${c} ${s.x+d} ${o.y} L ${o.x} `+o.y:`M ${s.x} ${s.y} L ${o.x-u} ${s.y} ${h} ${o.x} ${s.y-d} L ${o.x} `+o.y),s.x>o.x&&(h="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",u=20,d=20,g=r.type===NSe.MERGE&&t.id!==r.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${o.y+u} ${h} ${s.x-d} ${o.y} L ${o.x} `+o.y:`M ${s.x} ${s.y} L ${o.x+u} ${s.y} ${c} ${o.x} ${s.y-d} L ${o.x} `+o.y),s.x===o.x&&(g=`M ${s.x} ${s.y} L ${o.x} `+o.y)):(s.y<o.y&&(g=r.type===NSe.MERGE&&t.id!==r.parents[0]?`M ${s.x} ${s.y} L ${o.x-u} ${s.y} ${c} ${o.x} ${s.y+d} L ${o.x} `+o.y:`M ${s.x} ${s.y} L ${s.x} ${o.y-u} ${h} ${s.x+d} ${o.y} L ${o.x} `+o.y),s.y>o.y&&(g=r.type===NSe.MERGE&&t.id!==r.parents[0]?`M ${s.x} ${s.y} L ${o.x-u} ${s.y} ${h} ${o.x} ${s.y-d} L ${o.x} `+o.y:`M ${s.x} ${s.y} L ${s.x} ${o.y+u} ${c} ${s.x+d} ${o.y} L ${o.x} `+o.y),s.y===o.y&&(g=`M ${s.x} ${s.y} L ${o.x} `+o.y))),void 0===g)throw new Error("Line definition not found");e.append("path").attr("d",g).attr("class","arrow arrow"+v_e(p,8,a))},"drawArrow"),G_e=mt((e,r)=>{let i=e.append("g").attr("class","commit-arrows");[...r.keys()].forEach(e=>{let t=r.get(e);t.parents&&0<t.parents.length&&t.parents.forEach(e=>{U_e(i,r.get(e),t,r)})})},"drawArrows"),j_e=mt((e,t,h,c)=>{let{look:u,theme:r,themeVariables:i}=P(),{dropShadow:d,THEME_COLOR_LIMIT:p}=i,g=f_e.has(r??""),f=m_e.has(r??""),m=e.append("g");t.forEach((e,t)=>{var t=v_e(t,g?p:8,f),r=x_e.get(e.name)?.pos;if(void 0===r)throw new Error("Position not found for branch "+e.name);var i="TB"===C_e||"BT"===C_e?r:g?r+6+1:r-2,n=((n=m.append("line")).attr("x1",0),n.attr("y1",i),n.attr("x2",w_e),n.attr("y2",i),n.attr("class","branch branch"+t),"TB"===C_e?(n.attr("y1",30),n.attr("x1",r),n.attr("y2",w_e),n.attr("x2",r)):"BT"===C_e&&(n.attr("y1",w_e),n.attr("x1",r),n.attr("y2",30),n.attr("x2",r)),k_e.push(i),e.name),e=S_e(n),n=m.insert("rect"),a=m.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+t),e=(a.node().appendChild(e),e.getBBox()),s=g?0:4,o=g?16:0,l=g?12:0;"neo"===u&&n.attr("data-look","neo"),n.attr("class","branchLabelBkg label"+t).attr("style","neo"===u?"filter:"+(g?`url(#${c}-drop-shadow)`:d):"").attr("rx",s).attr("ry",s).attr("x",-e.width-4-(!0===h.rotateCommitLabel?30:0)).attr("y",-e.height/2+10).attr("width",e.width+18+o).attr("height",e.height+4+l),a.attr("transform","translate("+(-e.width-14-(!0===h.rotateCommitLabel?30:0)+o/2)+", "+(i-e.height/2-2)+")"),"TB"===C_e?(n.attr("x",r-e.width/2-10).attr("y",0),a.attr("transform","translate("+(r-e.width/2-5)+", 0)"),g&&(n.attr("transform",`translate(${-o/2-3}, ${-l-10})`),a.attr("transform","translate("+(r-e.width/2-5)+", "+(2*-l+7)+")"))):"BT"===C_e?(n.attr("x",r-e.width/2-10).attr("y",w_e),a.attr("transform","translate("+(r-e.width/2-5)+", "+w_e+")"),g&&(n.attr("transform",`translate(${-o/2-3}, ${10+l})`),a.attr("transform","translate("+(r-e.width/2-5)+", "+(w_e+2*l+4)+")"))):n.attr("transform","translate(-19, "+(i-12-l/2)+")")})},"drawBranches"),V_e=mt(function(e,t,r,i,n){return x_e.set(e,{pos:t,index:r}),t+(50+(n?40:0)+("TB"===C_e||"BT"===C_e?i.width/2:0))},"setBranchPosition"),Y_e=mt(function(u,d,p,g){if(E_e(),B.debug("in gitgraph renderer",u+`
`,"id:",d,p),(u=g.db).getConfig){let e=u.getConfig(),s=e.rotateCommitLabel??!1,o=(T_e=u.getCommits(),p=u.getBranchesAsObjArray(),C_e=u.getDirection(),Q(`[id="${d}"]`)),{look:t,theme:r,themeVariables:i}=P(),{useGradient:n,gradientStart:a,gradientStop:l,filterColor:h}=i,c=(n&&((g=o.append("defs").append("linearGradient").attr("id",d+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%")).append("stop").attr("offset","0%").attr("stop-color",a).attr("stop-opacity",1),g.append("stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)),"neo"===t&&f_e.has(r??"")&&o.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",h),0);p.forEach((e,t)=>{var r=S_e(e.name),i=o.append("g"),n=i.insert("g").attr("class","branchLabel"),a=n.insert("g").attr("class","label branch-label"),r=(a.node()?.appendChild(r),r.getBBox());c=V_e(e.name,c,t,r,s),a.remove(),n.remove(),i.remove()}),z_e(o,T_e,!1,e),e.showBranches&&j_e(o,p,e,d),G_e(o,T_e),z_e(o,T_e,!0,e),k7.insertTitle(o,"gitTitleText",e.titleTopMargin??0,u.getDiagramTitle()),Xc(void 0,o,e.diagramPadding,e.useMaxWidth)}else B.error("getConfig method is not available on db")},"draw"),H_e={draw:Y_e}}),l7e=i(()=>{Ei(),X_e=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),K_e=new Set(["redux-color","redux-dark-color"]),Z_e=new Set(["neo","neo-dark"]),Q_e=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),J_e=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),e7e=mt(t=>{let r=t.svgId,i="";if(t.useGradient&&r)for(let e=0;e<t.THEME_COLOR_LIMIT;e++)i+=`
.label${e} { fill: ${t.mainBkg}; stroke: url(${r}-gradient); stroke-width: ${t.strokeWidth};}
`;return i},"genGitGraphGradient"),t7e=mt(r=>{var i,n,{theme:a,themeVariables:e}=br(),s=e.borderColorArray,o=X_e.has(a);if(Z_e.has(a)){let t="";for(let e=0;e<r.THEME_COLOR_LIMIT;e++)0===e?t+=`
.branch-label${e} { fill: ${r.nodeBorder};}
.commit${e} { stroke: ${r.nodeBorder}; }
.commit-highlight${e} { stroke: ${r.nodeBorder}; fill: ${r.nodeBorder}; }
.arrow${e} { stroke: ${r.nodeBorder}; }
.commit-bullets { fill: ${r.nodeBorder}; }
.commit-cherry-pick${e} { stroke: ${r.nodeBorder}; }
`+e7e(r):(i=e%8,t+=`
.branch-label${e} { fill: ${r["gitBranchLabel"+i]}; }
.commit${e} { stroke: ${r["git"+i]}; fill: ${r["git"+i]}; }
.commit-highlight${e} { stroke: ${r["gitInv"+i]}; fill: ${r["gitInv"+i]}; }
.arrow${e} { stroke: ${r["git"+i]}; }
`);return t}if(K_e.has(a)){let t="";for(let e=0;e<r.THEME_COLOR_LIMIT;e++)0===e?t+=`
.branch-label${e} { fill: ${r.nodeBorder}; ${o?"font-weight:"+r.noteFontWeight:""} }
.commit${e} { stroke: ${r.nodeBorder}; }
.commit-highlight${e} { stroke: ${r.nodeBorder}; fill: ${r.mainBkg}; }
.label${e} { fill: ${r.mainBkg}; stroke: ${r.nodeBorder}; stroke-width: ${r.strokeWidth}; ${o?"font-weight:"+r.noteFontWeight:""} }
.arrow${e} { stroke: ${r.nodeBorder}; }
.commit-bullets { fill: ${r.nodeBorder}; }
`:(n=e%s.length,t+=`
.branch-label${e} { fill: ${r.nodeBorder}; ${o?"font-weight:"+r.noteFontWeight:""} }
.commit${e} { stroke: ${s[n]}; fill: ${s[n]}; }
.commit-highlight${e} { stroke: ${s[n]}; fill: ${s[n]}; }
.label${e} { fill: ${Q_e.has(a)?r.mainBkg:s[n]}; stroke: ${s[n]}; stroke-width: ${r.strokeWidth}; }
.arrow${e} { stroke: ${s[n]}; }
`);return t}{let t="";for(let e=0;e<r.THEME_COLOR_LIMIT;e++)t+=`
.branch-label${e} { fill: ${r.nodeBorder}; ${o?"font-weight:"+r.noteFontWeight:""} }
.commit${e} { stroke: ${r.nodeBorder}; }
.commit-highlight${e} { stroke: ${r.nodeBorder}; fill: ${r.nodeBorder}; }
.label${e} { fill: ${r.mainBkg}; stroke: ${r.nodeBorder}; stroke-width: ${r.strokeWidth}; ${o?"font-weight:"+r.noteFontWeight:""}}
.arrow${e} { stroke: ${r.nodeBorder}; }
.commit-bullets { fill: ${r.nodeBorder}; }
.commit-cherry-pick${e} { stroke: ${r.nodeBorder}; }
`;return t}},"genColor"),r7e=mt(r=>""+Array.from({length:r.THEME_COLOR_LIMIT},(e,t)=>t).map(e=>{var t=e%8;return`
.branch-label${e} { fill: ${r["gitBranchLabel"+t]}; }
.commit${e} { stroke: ${r["git"+t]}; fill: ${r["git"+t]}; }
.commit-highlight${e} { stroke: ${r["gitInv"+t]}; fill: ${r["gitInv"+t]}; }
.label${e} { fill: ${r["git"+t]}; }
.arrow${e} { stroke: ${r["git"+t]}; }
`}).join(`
`),"normalTheme"),i7e=mt(e=>{var t=br().theme,r=J_e.has(t);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);
}
${(r?t7e:r7e)(e)}
.branch {
stroke-width: ${e.strokeWidth};
stroke: ${e.commitLineColor??e.lineColor};
stroke-dasharray: ${r?"4 2":"2"};
}
.commit-label { font-size: ${e.commitLabelFontSize}; fill: ${r?e.nodeBorder:e.commitLabelColor}; ${r?`font-weight:${e.noteFontWeight};`:""}}
.commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${r?"transparent":e.commitLabelBackground}; opacity: ${r?"":.5}; }
.tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};}
.tag-label-bkg { fill: ${r?e.mainBkg:e.tagLabelBackground}; stroke: ${r?e.nodeBorder:e.tagLabelBorder}; ${r?"filter:"+e.dropShadow:""} }
.tag-hole { fill: ${e.textColor}; }
.commit-merge {
stroke: ${r?e.mainBkg:e.primaryColor};
fill: ${r?e.mainBkg:e.primaryColor};
}
.commit-reverse {
stroke: ${r?e.mainBkg:e.primaryColor};
fill: ${r?e.mainBkg:e.primaryColor};
stroke-width: ${r?e.strokeWidth:3};
}
.commit-highlight-outer {
}
.commit-highlight-inner {
stroke: ${r?e.mainBkg:e.primaryColor};
fill: ${r?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: ${X_e.has(t)?e.strokeWidth:8};
stroke-linecap: round;
fill: none
}
.gitTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${e.textColor};
}
`},"getStyles"),n7e=i7e}),h7e={};sYe(h7e,{diagram:()=>c7e});var c7e,u7e,d7e,p7e=i(()=>{s7e(),a7e(),o7e(),l7e(),c7e={parser:g_e,db:s_e,renderer:H_e,styles:n7e}}),g7e=i(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[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],i=[1,26],n=[1,27],a=[1,28],s=[1,29],o=[1,30],l=[1,31],h=[1,32],c=[1,33],u=[1,34],d=[1,9],p=[1,10],g=[1,11],f=[1,12],m=[1,13],y=[1,14],v=[1,15],x=[1,16],b=[1,19],T=[1,20],k=[1,21],w=[1,22],C=[1,23],E=[1,25],S=[1,35],i={trace:mt(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:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 1:return a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:i.setWeekday("monday");break;case 9:i.setWeekday("tuesday");break;case 10:i.setWeekday("wednesday");break;case 11:i.setWeekday("thursday");break;case 12:i.setWeekday("friday");break;case 13:i.setWeekday("saturday");break;case 14:i.setWeekday("sunday");break;case 15:i.setWeekend("friday");break;case 16:i.setWeekend("saturday");break;case 17:i.setDateFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 18:i.enableInclusiveEndDates(),this.$=a[o].substr(18);break;case 19:i.TopAxis(),this.$=a[o].substr(8);break;case 20:i.setAxisFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 21:i.setTickInterval(a[o].substr(13)),this.$=a[o].substr(13);break;case 22:i.setExcludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 23:i.setIncludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 24:i.setTodayMarker(a[o].substr(12)),this.$=a[o].substr(12);break;case 27:i.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 28:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 29:case 30:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 31:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 33:i.addTask(a[o-1],a[o]),this.$="task";break;case 34:this.$=a[o-1],i.setClickEvent(a[o-1],a[o],null);break;case 35:this.$=a[o-2],i.setClickEvent(a[o-2],a[o-1],a[o]);break;case 36:this.$=a[o-2],i.setClickEvent(a[o-2],a[o-1],null),i.setLink(a[o-2],a[o]);break;case 37:this.$=a[o-3],i.setClickEvent(a[o-3],a[o-2],a[o-1]),i.setLink(a[o-3],a[o]);break;case 38:this.$=a[o-2],i.setClickEvent(a[o-2],a[o],null),i.setLink(a[o-2],a[o-1]);break;case 39:this.$=a[o-3],i.setClickEvent(a[o-3],a[o-1],a[o]),i.setLink(a[o-3],a[o-2]);break;case 40:this.$=a[o-1],i.setLink(a[o-1],a[o]);break;case 41:case 47:this.$=a[o-1]+" "+a[o];break;case 42:case 43:case 45:this.$=a[o-2]+" "+a[o-1]+" "+a[o];break;case 44:case 46:this.$=a[o-3]+" "+a[o-2]+" "+a[o-1]+" "+a[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:i,13:n,14:a,15:s,16:o,17:l,18:h,19:18,20:c,21:u,22:d,23:p,24:g,25:f,26:m,27:y,28:v,29:x,30:b,31:T,33:k,35:w,36:C,37:24,38:E,40:S},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:36,11:17,12:i,13:n,14:a,15:s,16:o,17:l,18:h,19:18,20:c,21:u,22:d,23:p,24:g,25:f,26:m,27:y,28:v,29:x,30:b,31:T,33:k,35:w,36:C,37:24,38:E,40:S},t(r,[2,5]),t(r,[2,6]),t(r,[2,17]),t(r,[2,18]),t(r,[2,19]),t(r,[2,20]),t(r,[2,21]),t(r,[2,22]),t(r,[2,23]),t(r,[2,24]),t(r,[2,25]),t(r,[2,26]),t(r,[2,27]),{32:[1,37]},{34:[1,38]},t(r,[2,30]),t(r,[2,31]),t(r,[2,32]),{39:[1,39]},t(r,[2,8]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),{41:[1,40],43:[1,41]},t(r,[2,4]),t(r,[2,28]),t(r,[2,29]),t(r,[2,33]),t(r,[2,34],{42:[1,42],43:[1,43]}),t(r,[2,40],{41:[1,44]}),t(r,[2,35],{43:[1,45]}),t(r,[2,36]),t(r,[2,38],{42:[1,46]}),t(r,[2,37]),t(r,[2,39])],defaultActions:{},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",h=0,c=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,T,k,w,C,E,S={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===x||"u"<typeof x)&&(x=v()),o[T]&&o[T][x]))||!k.length||!k[0]){var _,A=[];for(w in o[T])this.terminals_[w]&&2<w&&A.push("'"+this.terminals_[w]+"'");_=g.showPosition?"Parse error on line "+(h+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(c=g.yyleng,l=g.yytext,h=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],S.$=a[a.length-C],S._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(E=this.performAction.apply(S,[l,c,h,f.yy,k[1],a,s].concat(p)))<"u")return E;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),E=o[i[i.length-2]][i[i.length-1]],i.push(E);break;case 3:return!0}}return!0},"parse")},n={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){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:case 9:case 10:break;case 11:return 10;case 12: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}}};i.lexer=n,mt(e,"Parser"),(u7e=new((e.prototype=i).Parser=e)).parser=u7e,d7e=u7e}),f7e=tYe((e,t)=>{function r(){return function(e,t,n){var a=mt(function(e){return e.add(4-e.isoWeekday(),"day")},"a"),s=((t=t.prototype).isoWeekYear=function(){return a(this).year()},t.isoWeek=function(e){var t,r,i;return this.$utils().u(e)?(r=a(this),i=this.isoWeekYear(),t=4-(i=(this.$u?n.utc:n)().year(i).startOf("year")).isoWeekday(),4<i.isoWeekday()&&(t+=7),i=i.add(t,"day"),r.diff(i,"week")+1):this.add(7*(e-this.isoWeek()),"day")},t.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)},t.startOf);t.startOf=function(e,t){var r=this.$utils(),i=!!r.u(t)||t;return"isoweek"===r.p(e)?i?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):s.bind(this)(e,t)}}}"object"==typeof e&&typeof t<"u"?t.exports=r():"function"==typeof define&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_isoWeek=r()}),m7e=tYe((e,t)=>{function r(){var o={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"},l=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,e=/\d/,t=/\d\d/,r=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,g={},n=mt(function(e){return(e=+e)+(68<e?1900:2e3)},"a"),a=mt(function(t){return function(e){this[t]=+e}},"f"),s=[/[+-]\d\d:?(\d\d)?|Z/,function(e){var t;(this.zone||(this.zone={})).offset=e&&"Z"!==e&&0!==(t=60*(e=e.match(/([+-]|\d\d)/g))[1]+(+e[2]||0))?"+"===e[0]?-t:t:0}],h=mt(function(e){return(e=g[e])&&(e.indexOf?e:e.s.concat(e.f))},"u"),c=mt(function(e,t){var r,i=g.meridiem;if(i){for(var n=1;n<=24;n+=1)if(-1<e.indexOf(i(n,0,t))){r=12<n;break}}else r=e===(t?"pm":"PM");return r},"d"),d={A:[i,function(e){this.afternoon=c(e,!1)}],a:[i,function(e){this.afternoon=c(e,!0)}],Q:[e,function(e){this.month=3*(e-1)+1}],S:[e,function(e){this.milliseconds=100*+e}],SS:[t,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[t,a("day")],Do:[i,function(e){var t=g.ordinal,r=e.match(/\d+/);if(this.day=r[0],t)for(var i=1;i<=31;i+=1)t(i).replace(/\[|\]/g,"")===e&&(this.day=i)}],w:[r,a("week")],ww:[t,a("week")],M:[r,a("month")],MM:[t,a("month")],MMM:[i,function(e){var t=h("months");if((t=(h("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1)<1)throw new Error;this.month=t%12||t}],MMMM:[i,function(e){if((e=h("months").indexOf(e)+1)<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,a("year")],YY:[t,function(e){this.year=n(e)}],YYYY:[/\d{4}/,a("year")],Z:s,ZZ:s};function w(e){for(var t=e,n=g&&g.formats,c=(e=t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,t,r){var i=r&&r.toUpperCase();return t||n[r]||o[r]||n[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,r){return t||r.slice(1)})})).match(l),u=c.length,r=0;r<u;r+=1){var i=c[r],a=(s=d[i])&&s[0],s=s&&s[1];c[r]=s?{regex:a,parser:s}:i.replace(/^\[|\]$/g,"")}return function(e){for(var t,r,i,n={},a=0,s=0;a<u;a+=1){var o,l,h=c[a];"string"==typeof h?s+=h.length:(l=h.regex,h=h.parser,o=e.slice(s),l=l.exec(o)[0],h.call(n,l),e=e.replace(l,""))}return void 0!==(i=(t=n).afternoon)&&(r=t.hours,i?r<12&&(t.hours+=12):12===r&&(t.hours=0),delete t.afternoon),n}}return mt(w,"l"),function(e,t,d){d.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(n=e.parseTwoDigitYear);var p=(e=t.prototype).parse;e.parse=function(e){var t=e.date,r=e.utc,i=e.args,n=(this.$u=r,i[1]);if("string"==typeof n){var a=!0===i[2],s=!0===i[3],o=a||s,l=i[2];s&&(l=i[2]),g=this.$locale(),!a&&l&&(g=d.Ls[l]),this.$d=((e,t,r,i)=>{try{if(-1<["x","X"].indexOf(t))return new Date(("X"===t?1e3:1)*e);var n=w(t)(e),a=n.year,s=n.month,o=n.day,l=n.hours,h=n.minutes,c=n.seconds,u=n.milliseconds,d=n.zone,p=n.week,g=new Date,f=o||(a||s?1:g.getDate()),m=a||g.getFullYear(),y=0;a&&!s||(y=0<s?s-1:g.getMonth());var v,x=l||0,b=h||0,T=c||0,k=u||0;return d?new Date(Date.UTC(m,y,f,x,b,T,k+60*d.offset*1e3)):r?new Date(Date.UTC(m,y,f,x,b,T,k)):(v=new Date(m,y,f,x,b,T,k),p?i(v).week(p).toDate():v)}catch{return new Date("")}})(t,n,r,d),this.init(),l&&!0!==l&&(this.$L=this.locale(l).$L),o&&t!=this.format(n)&&(this.$d=new Date("")),g={}}else if(n instanceof Array)for(var h=n.length,c=1;c<=h;c+=1){i[1]=n[c-1];var u=d.apply(this,i);if(u.isValid()){this.$d=u.$d,this.$L=u.$L,this.init();break}c===h&&(this.$d=new Date(""))}else p.call(this,e)}}}"object"==typeof e&&typeof t<"u"?t.exports=r():"function"==typeof define&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=r()}),y7e=tYe((e,t)=>{function r(){return function(e,t){var a=(t=t.prototype).format;t.format=function(e){var t,r,i=this,n=this.$locale();return this.isValid()?(t=this.$utils(),r=(e||"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(e){switch(e){case"Q":return Math.ceil((i.$M+1)/3);case"Do":return n.ordinal(i.$D);case"gggg":return i.weekYear();case"GGGG":return i.isoWeekYear();case"wo":return n.ordinal(i.week(),"W");case"w":case"ww":return t.s(i.week(),"w"===e?1:2,"0");case"W":case"WW":return t.s(i.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return t.s(String(0===i.$H?24:i.$H),"k"===e?1:2,"0");case"X":return Math.floor(i.$d.getTime()/1e3);case"x":return i.$d.getTime();case"z":return"["+i.offsetName()+"]";case"zzz":return"["+i.offsetName("long")+"]";default:return e}}),a.bind(this)(r)):a.bind(this)(e)}}}"object"==typeof e&&typeof t<"u"?t.exports=r():"function"==typeof define&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_advancedFormat=r()});function v7e(r,i,e){let n=!0;for(;n;)n=!1,e.forEach(function(e){var t=new RegExp("^\\s*"+e+"\\s*$");r[0].match(t)&&(i[e]=!0,r.shift(1),n=!0)})}var x7e,b7e,T7e,k7e,w7e,C7e,E7e,S7e,_7e,A7e,L7e,R7e,I7e,N7e,D7e,M7e,O7e,B7e,P7e,$7e,F7e,z7e,q7e,W7e,U7e,G7e,j7e,V7e,Y7e,H7e,X7e,K7e,Z7e,Q7e,J7e,e8e,t8e,r8e,i8e,n8e,a8e,s8e,o8e,l8e,h8e,c8e,u8e,d8e,p8e,g8e,f8e,m8e,y8e,v8e,x8e,b8e,T8e,k8e,w8e,C8e,E8e,S8e,_8e,A8e,L8e,R8e,I8e,N8e,D8e,M8e,O8e,B8e,P8e,$8e,F8e,z8e,q8e,W8e,U8e,G8e,j8e,V8e,Y8e,H8e=i(()=>{x7e=U(Ak(),1),b7e=U(Dr(),1),q7e=U(f7e(),1),W7e=U(m7e(),1),U7e=U(y7e(),1),e(),ju(),S7(),Gu(),b7e.default.extend(q7e.default),b7e.default.extend(W7e.default),b7e.default.extend(U7e.default),T7e={friday:5,saturday:6},E7e=w7e=k7e="",S7e=[],_7e=[],A7e=new Map,L7e=[],R7e=[],D7e=["active","done","crit","milestone","vert"],O7e=N7e=I7e="",P7e=B7e=!(M7e=[]),$7e="sunday",F7e="saturday",z7e=0,q7e=mt(function(){L7e=[],R7e=[],M7e=[],S8e=[],C7e=E8e=C8e=void(b8e=0),E7e=N7e=w7e=k7e=I7e="",S7e=[],P7e=B7e=!(_7e=[]),z7e=0,A7e=new Map,O7e="",Pc(),$7e="sunday",F7e="saturday"},"clear"),W7e=mt(function(e){O7e=e},"setDiagramId"),U7e=mt(function(e){w7e=e},"setAxisFormat"),G7e=mt(function(){return w7e},"getAxisFormat"),j7e=mt(function(e){C7e=e},"setTickInterval"),V7e=mt(function(){return C7e},"getTickInterval"),Y7e=mt(function(e){E7e=e},"setTodayMarker"),H7e=mt(function(){return E7e},"getTodayMarker"),X7e=mt(function(e){k7e=e},"setDateFormat"),K7e=mt(function(){B7e=!0},"enableInclusiveEndDates"),Z7e=mt(function(){return B7e},"endDatesAreInclusive"),Q7e=mt(function(){P7e=!0},"enableTopAxis"),J7e=mt(function(){return P7e},"topAxisEnabled"),e8e=mt(function(e){N7e=e},"setDisplayMode"),t8e=mt(function(){return N7e},"getDisplayMode"),r8e=mt(function(){return k7e},"getDateFormat"),i8e=mt(function(e){S7e=e.toLowerCase().split(/[\s,]+/)},"setIncludes"),n8e=mt(function(){return S7e},"getIncludes"),a8e=mt(function(e){_7e=e.toLowerCase().split(/[\s,]+/)},"setExcludes"),s8e=mt(function(){return _7e},"getExcludes"),o8e=mt(function(){return A7e},"getLinks"),l8e=mt(function(e){I7e=e,L7e.push(e)},"addSection"),h8e=mt(function(){return L7e},"getSections"),c8e=mt(function(){let e=I8e(),t=0;for(;!e&&t<10;)e=I8e(),t++;return R7e=S8e},"getTasks"),u8e=mt(function(e,t,r,i){var t=e.format(t.trim()),n=e.format("YYYY-MM-DD");return!i.includes(t)&&!i.includes(n)&&(!((!r.includes("weekends")||e.isoWeekday()!==T7e[F7e]&&e.isoWeekday()!==T7e[F7e]+1)&&!r.includes(e.format("dddd").toLowerCase()))||r.includes(t)||r.includes(n))},"isInvalidDate"),d8e=mt(function(e){$7e=e},"setWeekday"),p8e=mt(function(){return $7e},"getWeekday"),g8e=mt(function(e){F7e=e},"setWeekend"),f8e=mt(function(t,r,i,n){if(i.length&&!t.manualEndTime){let e;e=(e=t.startTime instanceof Date?(0,b7e.default)(t.startTime):(0,b7e.default)(t.startTime,r,!0)).add(1,"d");var a=t.endTime instanceof Date?(0,b7e.default)(t.endTime):(0,b7e.default)(t.endTime,r,!0),[r,i]=m8e(e,a,r,i,n);t.endTime=r.toDate(),t.renderEndTime=i}},"checkTaskDates"),m8e=mt(function(e,t,r,i,n){let a=!1,s=null;for(;e<=t;)a||(s=t.toDate()),(a=u8e(e,r,i,n))&&(t=t.add(1,"d")),e=e.add(1,"d");return[t,s]},"fixTaskDates"),y8e=mt(function(e,t,r){if(r=r.trim(),mt(e=>"x"===(e=e.trim())||"X"===e,"isTimestampFormat")(t)&&/^\d+$/.test(r))return new Date(Number(r));var i=/^after\s+(?<ids>[\d\w- ]+)/.exec(r);if(null!==i){let e=null;for(var n of i.groups.ids.split(" "))void 0!==(n=L8e(n))&&(!e||n.endTime>e.endTime)&&(e=n);return e?e.endTime:((i=new Date).setHours(0,0,0,0),i)}if((i=(0,b7e.default)(r,t.trim(),!0)).isValid())return i.toDate();if(B.debug("Invalid date:"+r),B.debug("With date format:"+t.trim()),void 0===(i=new Date(r))||isNaN(i.getTime())||i.getFullYear()<-1e4||1e4<i.getFullYear())throw new Error("Invalid date:"+r);return i},"getStartDate"),v8e=mt(function(e){return null!==(e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim()))?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),x8e=mt(function(e,t,r,i=!1){r=r.trim();var n=/^until\s+(?<ids>[\d\w- ]+)/.exec(r);if(null!==n){let e=null;for(var a of n.groups.ids.split(" "))void 0!==(a=L8e(a))&&(!e||a.startTime<e.startTime)&&(e=a);return e?e.startTime:((n=new Date).setHours(0,0,0,0),n)}let s=(0,b7e.default)(r,t.trim(),!0);if(s.isValid())return(s=i?s.add(1,"d"):s).toDate();let o=(0,b7e.default)(e),[l,h]=v8e(r);return Number.isNaN(l)||(n=o.add(l,h)).isValid()&&(o=n),o.toDate()},"getEndDate"),b8e=0,T8e=mt(function(e){return void 0===e?"task"+(b8e+=1):e},"parseId"),k8e=mt(function(e,t){var r=(":"===t.substr(0,1)?t.substr(1,t.length):t).split(","),i={};v7e(r,i,D7e);for(let e=0;e<r.length;e++)r[e]=r[e].trim();let n="";switch(r.length){case 1:i.id=T8e(),i.startTime=e.endTime,n=r[0];break;case 2:i.id=T8e(),i.startTime=y8e(void 0,k7e,r[0]),n=r[1];break;case 3:i.id=T8e(r[0]),i.startTime=y8e(void 0,k7e,r[1]),n=r[2]}return n&&(i.endTime=x8e(i.startTime,k7e,n,B7e),i.manualEndTime=(0,b7e.default)(n,"YYYY-MM-DD",!0).isValid(),f8e(i,k7e,_7e,S7e)),i},"compileData"),w8e=mt(function(e,t){var r=(":"===t.substr(0,1)?t.substr(1,t.length):t).split(","),i={};v7e(r,i,D7e);for(let e=0;e<r.length;e++)r[e]=r[e].trim();switch(r.length){case 1:i.id=T8e(),i.startTime={type:"prevTaskEnd",id:e},i.endTime={data:r[0]};break;case 2:i.id=T8e(),i.startTime={type:"getStartDate",startData:r[0]},i.endTime={data:r[1]};break;case 3:i.id=T8e(r[0]),i.startTime={type:"getStartDate",startData:r[1]},i.endTime={data:r[2]}}return i},"parseData"),S8e=[],_8e={},A8e=mt(function(e,t){e={section:I7e,type:I7e,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:t},task:e,classes:[]},t=w8e(E8e,t),e.raw.startTime=t.startTime,e.raw.endTime=t.endTime,e.id=t.id,e.prevTaskId=E8e,e.active=t.active,e.done=t.done,e.crit=t.crit,e.milestone=t.milestone,e.vert=t.vert,e.order=z7e,z7e++,t=S8e.push(e),_8e[E8e=e.id]=t-1},"addTask"),L8e=mt(function(e){return S8e[_8e[e]]},"findTaskById"),R8e=mt(function(e,t){e={section:I7e,type:I7e,description:e,task:e,classes:[]},t=k8e(C8e,t),e.startTime=t.startTime,e.endTime=t.endTime,e.id=t.id,e.active=t.active,e.done=t.done,e.crit=t.crit,e.milestone=t.milestone,e.vert=t.vert,C8e=e,R7e.push(e)},"addTaskOrg"),I8e=mt(function(){let e=mt(function(e){var t=S8e[e];switch(S8e[e].raw.startTime.type){case"prevTaskEnd":var r=L8e(t.prevTaskId);t.startTime=r.endTime;break;case"getStartDate":(r=y8e(void 0,k7e,S8e[e].raw.startTime.startData))&&(S8e[e].startTime=r)}return S8e[e].startTime&&(S8e[e].endTime=x8e(S8e[e].startTime,k7e,S8e[e].raw.endTime.data,B7e),S8e[e].endTime)&&(S8e[e].processed=!0,S8e[e].manualEndTime=(0,b7e.default)(S8e[e].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),f8e(S8e[e],k7e,_7e,S7e)),S8e[e].processed},"compileTask"),t=!0;for(var[r,i]of S8e.entries())e(r),t=t&&i.processed;return t},"compileTasks"),N8e=mt(function(e,t){let r=t;"loose"!==P().securityLevel&&(r=(0,x7e.sanitizeUrl)(t)),e.split(",").forEach(function(e){void 0!==L8e(e)&&(O8e(e,()=>{window.open(r,"_self")}),A7e.set(e,r))}),D8e(e,"clickable")},"setLink"),D8e=mt(function(e,t){e.split(",").forEach(function(e){void 0!==(e=L8e(e))&&e.classes.push(t)})},"setClass"),M8e=mt(function(e,t,i){if("loose"===P().securityLevel&&void 0!==t){let r=[];if("string"==typeof i){r=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<r.length;t++){let e=r[t].trim();e.startsWith('"')&&e.endsWith('"')&&(e=e.substr(1,e.length-2)),r[t]=e}}0===r.length&&r.push(e),void 0!==L8e(e)&&O8e(e,()=>{k7.runFunc(t,...r)})}},"setClickFun"),O8e=mt(function(t,r){M7e.push(function(){var e=O7e?O7e+"-"+t:t;null!==(e=document.querySelector(`[id="${e}"]`))&&e.addEventListener("click",function(){r()})},function(){var e=O7e?O7e+"-"+t:t;null!==(e=document.querySelector(`[id="${e}-text"]`))&&e.addEventListener("click",function(){r()})})},"pushFun"),B8e=mt(function(e,t,r){e.split(",").forEach(function(e){M8e(e,t,r)}),D8e(e,"clickable")},"setClickEvent"),P8e=mt(function(t){M7e.forEach(function(e){e(t)})},"bindFunctions"),$8e={getConfig:mt(()=>P().gantt,"getConfig"),clear:q7e,setDateFormat:X7e,getDateFormat:r8e,enableInclusiveEndDates:K7e,endDatesAreInclusive:Z7e,enableTopAxis:Q7e,topAxisEnabled:J7e,setAxisFormat:U7e,getAxisFormat:G7e,setTickInterval:j7e,getTickInterval:V7e,setTodayMarker:Y7e,getTodayMarker:H7e,setAccTitle:$c,getAccTitle:Fc,setDiagramTitle:Wc,getDiagramTitle:Uc,setDiagramId:W7e,setDisplayMode:e8e,getDisplayMode:t8e,setAccDescription:zc,getAccDescription:qc,addSection:l8e,getSections:h8e,getTasks:c8e,addTask:A8e,findTaskById:L8e,addTaskOrg:R8e,setIncludes:i8e,getIncludes:n8e,setExcludes:a8e,getExcludes:s8e,setClickEvent:B8e,setLink:N8e,getLinks:o8e,bindFunctions:P8e,parseDuration:v8e,isInvalidDate:u8e,setWeekday:d8e,getWeekday:p8e,setWeekend:g8e},mt(v7e,"getTaskTags")}),X8e=tYe((e,t)=>{function r(){var a,s,e,t=/\[([^\]]+)]|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,n=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,o={years:31536e6,months:2628e6,days:864e5,hours:36e5,minutes:6e4,seconds:1e3,milliseconds:1,weeks:6048e5},l=mt(function(e){return e instanceof p},"c"),h=mt(function(e,t,r){return new p(e,r,t.$l)},"f"),c=mt(function(e){return s.p(e)+"s"},"m"),r=mt(function(e){return e<0},"l"),i=mt(function(e){return r(e)?Math.ceil(e):Math.floor(e)},"$"),u=mt(function(e){return Math.abs(e)},"y"),d=mt(function(e,t){return e?r(e)?{negative:!0,format:""+u(e)+t}:{negative:!1,format:""+e+t}:{negative:!1,format:""}},"v"),p=(mt(f,"l"),(e=f.prototype).calMilliseconds=function(){var r=this;this.$ms=Object.keys(this.$d).reduce(function(e,t){return e+(r.$d[t]||0)*o[t]},0)},e.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=i(e/31536e6),this.$d.months=i((e%=31536e6)/2628e6),this.$d.days=i((e%=2628e6)/864e5),this.$d.hours=i((e%=864e5)/36e5),this.$d.minutes=i((e%=36e5)/6e4),this.$d.seconds=i((e%=6e4)/1e3),this.$d.milliseconds=e%=1e3},e.toISOString=function(){var e=d(this.$d.years,"Y"),t=d(this.$d.months,"M"),r=+this.$d.days||0,r=(this.$d.weeks&&(r+=7*this.$d.weeks),d(r,"D")),i=d(this.$d.hours,"H"),n=d(this.$d.minutes,"M"),a=this.$d.seconds||0,a=(this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3),d(a,"S")),s=e.negative||t.negative||r.negative||i.negative||n.negative||a.negative,o=i.format||n.format||a.format?"T":"";return"P"==(s=(s?"-":"")+"P"+e.format+t.format+r.format+o+i.format+n.format+a.format)||"-P"==s?"P0D":s},e.toJSON=function(){return this.toISOString()},e.format=function(e){var e=e||"YYYY-MM-DDTHH:mm:ss",r={Y:this.$d.years,YY:s.s(this.$d.years,2,"0"),YYYY:s.s(this.$d.years,4,"0"),M:this.$d.months,MM:s.s(this.$d.months,2,"0"),D:this.$d.days,DD:s.s(this.$d.days,2,"0"),H:this.$d.hours,HH:s.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:s.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:s.s(this.$d.seconds,2,"0"),SSS:s.s(this.$d.milliseconds,3,"0")};return e.replace(t,function(e,t){return t||String(r[e])})},e.as=function(e){return this.$ms/o[c(e)]},e.get=function(e){var t=this.$ms;return"milliseconds"===(e=c(e))?t%=1e3:t="weeks"===e?i(t/o[e]):this.$d[e],t||0},e.add=function(e,t,r){return t=t?e*o[c(t)]:(l(e)?e:h(e,this)).$ms,h(this.$ms+t*(r?-1:1),this)},e.subtract=function(e,t){return this.add(e,t,!0)},e.locale=function(e){var t=this.clone();return t.$l=e,t},e.clone=function(){return h(this.$ms,this)},e.humanize=function(e){return a().add(this.$ms,"ms").locale(this.$l).fromNow(!e)},e.valueOf=function(){return this.asMilliseconds()},e.milliseconds=function(){return this.get("milliseconds")},e.asMilliseconds=function(){return this.as("milliseconds")},e.seconds=function(){return this.get("seconds")},e.asSeconds=function(){return this.as("seconds")},e.minutes=function(){return this.get("minutes")},e.asMinutes=function(){return this.as("minutes")},e.hours=function(){return this.get("hours")},e.asHours=function(){return this.as("hours")},e.days=function(){return this.get("days")},e.asDays=function(){return this.as("days")},e.weeks=function(){return this.get("weeks")},e.asWeeks=function(){return this.as("weeks")},e.months=function(){return this.get("months")},e.asMonths=function(){return this.as("months")},e.years=function(){return this.get("years")},e.asYears=function(){return this.as("years")},f),g=mt(function(e,t,r){return e.add(t.years()*r,"y").add(t.months()*r,"M").add(t.days()*r,"d").add(t.hours()*r,"h").add(t.minutes()*r,"m").add(t.seconds()*r,"s").add(t.milliseconds()*r,"ms")},"p");function f(t,e,r){var i=this;return this.$d={},this.$l=r,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),e?h(t*o[c(e)],this):("number"==typeof t?(this.$ms=t,this.parseFromMilliseconds()):"object"==typeof t?(Object.keys(t).forEach(function(e){i.$d[c(e)]=t[e]}),this.calMilliseconds()):"string"==typeof t&&(r=t.match(n))&&(e=r.slice(2).map(function(e){return null!=e?Number(e):0}),this.$d.years=e[0],this.$d.months=e[1],this.$d.weeks=e[2],this.$d.days=e[3],this.$d.hours=e[4],this.$d.minutes=e[5],this.$d.seconds=e[6],this.calMilliseconds()),this)}return function(e,t,i){s=(a=i)().$utils(),i.duration=function(e,t){var r=i.locale();return h(e,{$l:r},t)},i.isDuration=l;var r=t.prototype.add,n=t.prototype.subtract;t.prototype.add=function(e,t){return l(e)?g(this,e,1):r.bind(this)(e,t)},t.prototype.subtract=function(e,t){return l(e)?g(this,e,-1):n.bind(this)(e,t)}}}"object"==typeof e&&typeof t<"u"?t.exports=r():"function"==typeof define&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_duration=r()}),K8e=i(()=>{F8e=U(Dr(),1),z8e=U(X8e(),1),e(),Sk(),ic(),ju(),Rc(),F8e.default.extend(z8e.default),z8e=mt(function(){B.debug("Something is calling, setConf, remove the call")},"setConf"),q8e={monday:Nb,tuesday:Db,wednesday:Mb,thursday:Ob,friday:Bb,saturday:Pb,sunday:Ib},W8e=mt((e,t)=>{let r=[...e].map(()=>-1/0),i=[...e].sort((e,t)=>e.startTime-t.startTime||e.order-t.order),n=0;for(var a of i)for(let e=0;e<r.length;e++)if(a.startTime>=r[e]){r[e]=a.endTime,a.order=e+t,e>n&&(n=e);break}return n},"getMaxIntersections"),G8e=mt(function(e,d,t,g){let f=P().gantt,r=(g.db.setDiagramId(d),P().securityLevel),i,n=("sandbox"===r&&(i=Q("#i"+d)),Q("sandbox"===r?i.nodes()[0].contentDocument.body:"body")),s="sandbox"===r?i.nodes()[0].contentDocument:document,a=s.getElementById(d),l=(void 0===(U8e=a.parentElement.offsetWidth)&&(U8e=1200),void 0!==f.useWidth&&(U8e=f.useWidth),g.db.getTasks()),u=[];for(var o of l)u.push(o.type);u=L(u);let h={},c=2*f.topPadding;if("compact"===g.db.getDisplayMode()||"compact"===f.displayMode){var p,m,y={};for(p of l)void 0===y[p.section]?y[p.section]=[p]:y[p.section].push(p);let e=0;for(m of Object.keys(y)){var v=W8e(y[m],e)+1;e+=v,c+=v*(f.barHeight+f.barGap),h[m]=v}}else{c+=l.length*(f.barHeight+f.barGap);for(let t of u)h[t]=l.filter(e=>e.type===t).length}a.setAttribute("viewBox","0 0 "+U8e+" "+c);let x=n.select(`[id="${d}"]`),b=O5().domain([Td(l,function(e){return e.startTime}),xd(l,function(e){return e.endTime})]).rangeRound([0,U8e-f.leftPadding-f.rightPadding]);function T(e,t){let r=e.startTime,i=t.startTime,n=0;return i<r?n=1:r<i&&(n=-1),n}function k(e,t,r){var i=f.barHeight,n=i+f.barGap,a=f.topPadding,s=f.leftPadding;ob().domain([0,u.length]).range(["#00B9FA","#F95002"]).interpolate(j1),C(n,a,s,0,r,e,g.db.getExcludes(),g.db.getIncludes()),S(s,a,0,r),w(e,n,a,s,i,0,t),_(n,a),A(s,0,0,r)}function w(e,r,i,n,h,t,c){e.sort((e,t)=>e.vert===t.vert?0:e.vert?1:-1);var a=[...new Set(e.map(e=>e.order))].map(t=>e.find(e=>e.order===t));x.append("g").selectAll("rect").data(a).enter().append("rect").attr("x",0).attr("y",function(e,t){return e.order*r+i-2}).attr("width",function(){return c-f.rightPadding/2}).attr("height",r).attr("class",function(e){for(var[t,r]of u.entries())if(e.type===r)return"section section"+t%f.numberSectionStyles;return"section section0"}).enter();let s=x.append("g").selectAll("rect").data(e).enter(),o=g.db.getLinks();if(s.append("rect").attr("id",function(e){return d+"-"+e.id}).attr("rx",3).attr("ry",3).attr("x",function(e){return e.milestone?b(e.startTime)+n+.5*(b(e.endTime)-b(e.startTime))-.5*h:b(e.startTime)+n}).attr("y",function(e,t){return t=e.order,e.vert?f.gridLineStartPadding:t*r+i}).attr("width",function(e){return e.milestone?h:e.vert?.08*h:b(e.renderEndTime||e.endTime)-b(e.startTime)}).attr("height",function(e){return e.vert?l.length*(f.barHeight+f.barGap)+2*f.barHeight:h}).attr("transform-origin",function(e,t){return t=e.order,(b(e.startTime)+n+.5*(b(e.endTime)-b(e.startTime))).toString()+"px "+(t*r+i+.5*h).toString()+"px"}).attr("class",function(e){let t="",r=(0<e.classes.length&&(t=e.classes.join(" ")),0);for(var[i,n]of u.entries())e.type===n&&(r=i%f.numberSectionStyles);let a="";return e.active?e.crit?a+=" activeCrit":a=" active":e.done?a=e.crit?" doneCrit":" done":e.crit&&(a+=" crit"),0===a.length&&(a=" task"),e.milestone&&(a=" milestone "+a),e.vert&&(a=" vert "+a),"task"+(a=(a+=r)+(" "+t))}),s.append("text").attr("id",function(e){return d+"-"+e.id+"-text"}).text(function(e){return e.task}).attr("font-size",f.fontSize).attr("x",function(e){let t=b(e.startTime),r=b(e.renderEndTime||e.endTime);return e.milestone&&(t+=.5*(b(e.endTime)-b(e.startTime))-.5*h,r=t+h),e.vert?b(e.startTime)+n:(e=this.getBBox().width)>r-t?r+e+1.5*f.leftPadding>c?t+n-5:r+n+5:(r-t)/2+t+n}).attr("y",function(e,t){return e.vert?f.gridLineStartPadding+l.length*(f.barHeight+f.barGap)+60:e.order*r+f.barHeight/2+(f.fontSize/2-2)+i}).attr("text-height",h).attr("class",function(e){let t=b(e.startTime),r=b(e.endTime),i=(e.milestone&&(r=t+h),this.getBBox().width),n="",a=(0<e.classes.length&&(n=e.classes.join(" ")),0);for(var[s,o]of u.entries())e.type===o&&(a=s%f.numberSectionStyles);let l="";return e.active&&(l=e.crit?"activeCritText"+a:"activeText"+a),e.done?l=e.crit?l+" doneCritText"+a:l+" doneText"+a:e.crit&&(l=l+" critText"+a),e.milestone&&(l+=" milestoneText"),e.vert&&(l+=" vertText"),i>r-t?r+i+1.5*f.leftPadding>c?n+" taskTextOutsideLeft taskTextOutside"+a+" "+l:n+" taskTextOutsideRight taskTextOutside"+a+" "+l+" width-"+i:n+" taskText taskText"+a+" "+l+" width-"+i}),"sandbox"===P().securityLevel){let a=Q("#i"+d).nodes()[0].contentDocument;s.filter(function(e){return o.has(e.id)}).each(function(e){var t=a.querySelector("#"+CSS.escape(d+"-"+e.id)),r=a.querySelector("#"+CSS.escape(d+"-"+e.id+"-text")),i=t.parentNode,n=a.createElement("a");n.setAttribute("xlink:href",o.get(e.id)),n.setAttribute("target","_top"),i.appendChild(n),n.appendChild(t),n.appendChild(r)})}}function C(s,o,l,e,h,t,c,u){if(0!==c.length||0!==u.length){let n,a;for(var{startTime:r,endTime:i}of t)(void 0===n||r<n)&&(n=r),(void 0===a||i>a)&&(a=i);if(n&&a)if(5<(0,F8e.default)(a).diff((0,F8e.default)(n),"year"))B.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");else{let e=g.db.getDateFormat(),t=[],r=null,i=(0,F8e.default)(n);for(;i.valueOf()<=a;)g.db.isInvalidDate(i,e,c,u)?r?r.end=i:r={start:i,end:i}:r&&(t.push(r),r=null),i=i.add(1,"d");x.append("g").selectAll("rect").data(t).enter().append("rect").attr("id",e=>d+"-exclude-"+e.start.format("YYYY-MM-DD")).attr("x",e=>b(e.start.startOf("day"))+l).attr("y",f.gridLineStartPadding).attr("width",e=>b(e.end.endOf("day"))-b(e.start.startOf("day"))).attr("height",h-o-f.gridLineStartPadding).attr("transform-origin",function(e,t){return(b(e.start)+l+.5*(b(e.end)-b(e.start))).toString()+"px "+(t*s+.5*h).toString()+"px"}).attr("class","exclude-range")}}}function E(e,t,r,i){return r<=0||t<e||(t-=e,(e=F8e.default.duration({[i??"day"]:r}).asMilliseconds())<=0)?1/0:Math.ceil(t/e)}function S(e,t,r,i){var n=g.db.getDateFormat(),n=g.db.getAxisFormat()||("D"===n?"%d":f.axisFormat??"%Y-%m-%d"),a=Od(b).tickSize(-i+t+f.gridLineStartPadding).tickFormat(L5(n)),s=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(g.db.getTickInterval()||f.tickInterval);if(null!==s){var o=parseInt(s[1],10);if(isNaN(o)||o<=0)B.warn(`Invalid tick interval value: "${s[1]}". Skipping custom tick interval.`);else{var l=s[2],h=g.db.getWeekday()||f.weekday;if(1e4<(d=E((d=b.domain())[0],d[1],o,l)))B.warn(`The tick interval "${o}${l}" would generate ${d} ticks, which exceeds the maximum allowed (10000). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(l){case"millisecond":a.ticks(gb.every(o));break;case"second":a.ticks(fb.every(o));break;case"minute":a.ticks(mb.every(o));break;case"hour":a.ticks(vb.every(o));break;case"day":a.ticks(bb.every(o));break;case"week":a.ticks(q8e[h].every(o));break;case"month":a.ticks(jb.every(o))}}}if(x.append("g").attr("class","grid").attr("transform","translate("+e+", "+(i-50)+")").call(a).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),g.db.topAxisEnabled()||f.topAxis){var c=Md(b).tickSize(-i+t+f.gridLineStartPadding).tickFormat(L5(n));if(null!==s){var u=parseInt(s[1],10);if(isNaN(u)||u<=0)B.warn(`Invalid tick interval value: "${s[1]}". Skipping custom tick interval.`);else{var d=s[2],p=g.db.getWeekday()||f.weekday;if(E((l=b.domain())[0],l[1],u,d)<=1e4)switch(d){case"millisecond":c.ticks(gb.every(u));break;case"second":c.ticks(fb.every(u));break;case"minute":c.ticks(mb.every(u));break;case"hour":c.ticks(vb.every(u));break;case"day":c.ticks(bb.every(u));break;case"week":c.ticks(q8e[p].every(u));break;case"month":c.ticks(jb.every(u))}}}x.append("g").attr("class","grid").attr("transform","translate("+e+", "+t+")").call(c).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function _(r,i){let n=0,a=Object.keys(h).map(e=>[e,h[e]]);x.append("g").selectAll("text").data(a).enter().append(function(e){var t,r,i=-((e=e[0].split(I.lineBreakRegex)).length-1)/2,n=s.createElementNS("http://www.w3.org/2000/svg","text");n.setAttribute("dy",i+"em");for([t,r]of e.entries()){var a=s.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttribute("alignment-baseline","central"),a.setAttribute("x","10"),0<t&&a.setAttribute("dy","1em"),a.textContent=r,n.appendChild(a)}return n}).attr("x",10).attr("y",function(e,t){return 0<t?(n+=a[t-1][1],e[1]*r/2+n*r+i):e[1]*r/2+i}).attr("font-size",f.sectionFontSize).attr("class",function(e){for(var[t,r]of u.entries())if(e[0]===r)return"sectionTitle sectionTitle"+t%f.numberSectionStyles;return"sectionTitle"})}function A(e,t,r,i){var n,a,s=g.db.getTodayMarker();"off"!==s&&(a=x.append("g").attr("class","today"),n=new Date,(a=a.append("line")).attr("x1",b(n)+e).attr("x2",b(n)+e).attr("y1",f.titleTopMargin).attr("y2",i-f.titleTopMargin).attr("class","today"),""!==s)&&a.attr("style",s.replace(/,/g,";"))}function L(r){var i={},n=[];for(let e=0,t=r.length;e<t;++e)Object.prototype.hasOwnProperty.call(i,r[e])||(i[r[e]]=!0,n.push(r[e]));return n}mt(T,"taskCompare"),l.sort(T),k(l,U8e,c),xc(x,c,U8e,f.useMaxWidth),x.append("text").text(g.db.getDiagramTitle()).attr("x",U8e/2).attr("y",f.titleTopMargin).attr("class","titleText"),mt(k,"makeGantt"),mt(w,"drawRects"),mt(C,"drawExcludeDays"),mt(E,"getEstimatedTickCount"),mt(S,"makeGrid"),mt(_,"vertLabels"),mt(A,"drawToday"),mt(L,"checkUnique")},"draw"),j8e={setConf:z8e,draw:G8e}}),Z8e=i(()=>{V8e=mt(e=>`
.mermaid-main-font {
font-family: ${e.fontFamily};
}
.exclude-range {
fill: ${e.excludeBkgColor};
}
.section {
stroke: none;
opacity: 0.2;
}
.section0 {
fill: ${e.sectionBkgColor};
}
.section2 {
fill: ${e.sectionBkgColor2};
}
.section1,
.section3 {
fill: ${e.altSectionBkgColor};
opacity: 0.2;
}
.sectionTitle0 {
fill: ${e.titleColor};
}
.sectionTitle1 {
fill: ${e.titleColor};
}
.sectionTitle2 {
fill: ${e.titleColor};
}
.sectionTitle3 {
fill: ${e.titleColor};
}
.sectionTitle {
text-anchor: start;
font-family: ${e.fontFamily};
}
/* Grid and axis */
.grid .tick {
stroke: ${e.gridColor};
opacity: 0.8;
shape-rendering: crispEdges;
}
.grid .tick text {
font-family: ${e.fontFamily};
fill: ${e.textColor};
}
.grid path {
stroke-width: 0;
}
/* Today line */
.today {
fill: none;
stroke: ${e.todayLineColor};
stroke-width: 2px;
}
/* Task styling */
/* Default task */
.task {
stroke-width: 2;
}
.taskText {
text-anchor: middle;
font-family: ${e.fontFamily};
}
.taskTextOutsideRight {
fill: ${e.taskTextDarkColor};
text-anchor: start;
font-family: ${e.fontFamily};
}
.taskTextOutsideLeft {
fill: ${e.taskTextDarkColor};
text-anchor: end;
}
/* Special case clickable */
.task.clickable {
cursor: pointer;
}
.taskText.clickable {
cursor: pointer;
fill: ${e.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideLeft.clickable {
cursor: pointer;
fill: ${e.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideRight.clickable {
cursor: pointer;
fill: ${e.taskTextClickableColor} !important;
font-weight: bold;
}
/* Specific task settings for the sections*/
.taskText0,
.taskText1,
.taskText2,
.taskText3 {
fill: ${e.taskTextColor};
}
.task0,
.task1,
.task2,
.task3 {
fill: ${e.taskBkgColor};
stroke: ${e.taskBorderColor};
}
.taskTextOutside0,
.taskTextOutside2
{
fill: ${e.taskTextOutsideColor};
}
.taskTextOutside1,
.taskTextOutside3 {
fill: ${e.taskTextOutsideColor};
}
/* Active task */
.active0,
.active1,
.active2,
.active3 {
fill: ${e.activeTaskBkgColor};
stroke: ${e.activeTaskBorderColor};
}
.activeText0,
.activeText1,
.activeText2,
.activeText3 {
fill: ${e.taskTextDarkColor} !important;
}
/* Completed task */
.done0,
.done1,
.done2,
.done3 {
stroke: ${e.doneTaskBorderColor};
fill: ${e.doneTaskBkgColor};
stroke-width: 2;
}
.doneText0,
.doneText1,
.doneText2,
.doneText3 {
fill: ${e.taskTextDarkColor} !important;
}
/* Done task text displayed outside the bar sits against the diagram background,
not against the done-task bar, so it must use the outside/contrast color. */
.doneText0.taskTextOutsideLeft,
.doneText0.taskTextOutsideRight,
.doneText1.taskTextOutsideLeft,
.doneText1.taskTextOutsideRight,
.doneText2.taskTextOutsideLeft,
.doneText2.taskTextOutsideRight,
.doneText3.taskTextOutsideLeft,
.doneText3.taskTextOutsideRight {
fill: ${e.taskTextOutsideColor} !important;
}
/* Tasks on the critical line */
.crit0,
.crit1,
.crit2,
.crit3 {
stroke: ${e.critBorderColor};
fill: ${e.critBkgColor};
stroke-width: 2;
}
.activeCrit0,
.activeCrit1,
.activeCrit2,
.activeCrit3 {
stroke: ${e.critBorderColor};
fill: ${e.activeTaskBkgColor};
stroke-width: 2;
}
.doneCrit0,
.doneCrit1,
.doneCrit2,
.doneCrit3 {
stroke: ${e.critBorderColor};
fill: ${e.doneTaskBkgColor};
stroke-width: 2;
cursor: pointer;
shape-rendering: crispEdges;
}
.milestone {
transform: rotate(45deg) scale(0.8,0.8);
}
.milestoneText {
font-style: italic;
}
.doneCritText0,
.doneCritText1,
.doneCritText2,
.doneCritText3 {
fill: ${e.taskTextDarkColor} !important;
}
/* Done-crit task text outside the bar — 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"),Y8e=V8e}),Q8e={};sYe(Q8e,{diagram:()=>J8e});var J8e,eAe,tAe,rAe,iAe,nAe,aAe,sAe,oAe=i(()=>{g7e(),H8e(),K8e(),Z8e(),J8e={parser:d7e,db:$8e,renderer:j8e,styles:Y8e}}),lAe=i(()=>{RSe(),e(),eAe={parse:mt(async e=>{e=await SSe("info",e),B.debug(e)},"parse")}}),hAe=i(()=>{tAe={version:"11.14.0"},rAe=mt(()=>tAe.version,"getVersion"),iAe={getVersion:rAe}}),cAe=i(()=>{Sk(),ju(),nAe=mt(e=>{let t=P().securityLevel,r=Q("body"),i;return"sandbox"===t&&(i=Q("#i"+e).node()?.contentDocument??document,r=Q(i.body)),r.select("#"+e)},"selectSvgElement")}),uAe=i(()=>{e(),cAe(),Rc(),aAe=mt((e,t,r)=>{B.debug(`rendering info diagram
`+e),e=nAe(t),xc(e,100,400,!0),e.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"),sAe={draw:aAe}}),dAe={};sYe(dAe,{diagram:()=>pAe});var pAe,gAe,fAe,mAe,yAe,vAe,xAe,bAe,TAe,kAe,wAe,CAe,EAe,SAe,_Ae,AAe,LAe,RAe,IAe,NAe=i(()=>{lAe(),hAe(),uAe(),pAe={parser:eAe,db:iAe,renderer:sAe}}),DAe=i(()=>{e(),Gu(),wi(),vAe=ar.pie,gAe={sections:new Map,showData:!1,config:vAe},fAe=gAe.sections,mAe=gAe.showData,yAe=structuredClone(vAe),vAe=mt(()=>structuredClone(yAe),"getConfig"),xAe=mt(()=>{fAe=new Map,mAe=gAe.showData,Pc()},"clear"),bAe=mt(({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.`);fAe.has(e)||(fAe.set(e,t),B.debug(`added new section: ${e}, with value: `+t))},"addSection"),TAe=mt(()=>fAe,"getSections"),kAe=mt(e=>{mAe=e},"setShowData"),wAe=mt(()=>mAe,"getShowData"),CAe={getConfig:vAe,clear:xAe,setDiagramTitle:Wc,getDiagramTitle:Uc,setAccTitle:$c,getAccTitle:Fc,setAccDescription:zc,getAccDescription:qc,addSection:bAe,getSections:TAe,setShowData:kAe,getShowData:wAe}}),MAe=i(()=>{RSe(),e(),MSe(),DAe(),EAe=mt((e,t)=>{ISe(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),SAe={parse:mt(async e=>{e=await SSe("pie",e),B.debug(e),EAe(e,CAe)},"parse")}}),OAe=i(()=>{_Ae=mt(e=>`
.pieCircle{
stroke: ${e.pieStrokeColor};
stroke-width : ${e.pieStrokeWidth};
opacity : ${e.pieOpacity};
}
.pieOuterCircle{
stroke: ${e.pieOuterStrokeColor};
stroke-width: ${e.pieOuterStrokeWidth};
fill: none;
}
.pieTitleText {
text-anchor: middle;
font-size: ${e.pieTitleTextSize};
fill: ${e.pieTitleTextColor};
font-family: ${e.fontFamily};
}
.slice {
font-family: ${e.fontFamily};
fill: ${e.pieSectionTextColor};
font-size:${e.pieSectionTextSize};
// fill: white;
}
.legend text {
fill: ${e.pieLegendTextColor};
font-family: ${e.fontFamily};
font-size: ${e.pieLegendTextSize};
}
`,"getStyles"),AAe=_Ae}),BAe=i(()=>{Sk(),ju(),e(),cAe(),Rc(),S7(),LAe=mt(e=>{let t=[...e.values()].reduce((e,t)=>e+t,0),r=[...e.entries()].map(([e,t])=>({label:e,value:t})).filter(e=>1<=e.value/t*100);return R3().value(e=>e.value).sort(null)(r)},"createPieArcs"),RAe=mt((e,t,r,i)=>{B.debug(`rendering pie chart
`+e);let n=i.db,a=P(),s=H_(n.getConfig(),a.pie),o=nAe(t),l=o.append("g");l.attr("transform","translate(225,225)");var e=a.themeVariables,[i]=T7(e.pieOuterStrokeWidth);i??=2;let h=s.textPosition,c=Math.min(450,450)/2-40,u=g3().innerRadius(0).outerRadius(c),d=g3().innerRadius(c*h).outerRadius(c*h),p=(l.append("circle").attr("cx",0).attr("cy",0).attr("r",c+i/2).attr("class","pieOuterCircle"),n.getSections()),g=LAe(p),f=[e.pie1,e.pie2,e.pie3,e.pie4,e.pie5,e.pie6,e.pie7,e.pie8,e.pie9,e.pie10,e.pie11,e.pie12],m=0,y=(p.forEach(e=>{m+=e}),g.filter(e=>"0"!==(e.data.value/m*100).toFixed(0))),v=Fx(f).domain([...p.keys()]),x=(l.selectAll("mySlices").data(y).enter().append("path").attr("d",u).attr("fill",e=>v(e.data.label)).attr("class","pieCircle"),l.selectAll("mySlices").data(y).enter().append("text").text(e=>(e.data.value/m*100).toFixed(0)+"%").attr("transform",e=>"translate("+d.centroid(e)+")").style("text-anchor","middle").attr("class","slice"),l.append("text").text(n.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText")),b=[...p.entries()].map(([e,t])=>({label:e,value:t})),T=l.selectAll(".legend").data(b).enter().append("g").attr("class","legend").attr("transform",(e,t)=>"translate(216,"+(22*t-22*b.length/2)+")");T.append("rect").attr("width",18).attr("height",18).style("fill",e=>v(e.label)).style("stroke",e=>v(e.label)),T.append("text").attr("x",22).attr("y",14).text(e=>n.getShowData()?e.label+` [${e.value}]`:e.label),t=512+Math.max(...T.selectAll("text").nodes().map(e=>e?.getBoundingClientRect().width??0)),e=225+(i=x.node()?.getBoundingClientRect().width??0)/2,i=Math.min(0,225-i/2),t=Math.max(t,e)-i,o.attr("viewBox",i+` 0 ${t} 450`),xc(o,450,t,s.useMaxWidth)},"draw"),IAe={draw:RAe}}),PAe={};sYe(PAe,{diagram:()=>$Ae});var $Ae,FAe,zAe,qAe,WAe,UAe=i(()=>{MAe(),DAe(),OAe(),BAe(),$Ae={parser:SAe,db:CAe,renderer:IAe,styles:AAe}}),GAe=i(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,3],i=[1,4],n=[1,5],a=[1,6],s=[1,7],B=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],P=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],o=[55,56,57],$=[2,36],l=[1,37],h=[1,36],c=[1,38],u=[1,35],d=[1,43],p=[1,41],F=[1,14],z=[1,23],q=[1,18],W=[1,19],U=[1,20],G=[1,21],j=[1,22],V=[1,24],Y=[1,25],H=[1,26],X=[1,27],K=[1,28],Z=[1,29],g=[1,32],f=[1,33],m=[1,34],y=[1,39],v=[1,40],x=[1,42],b=[1,44],T=[1,62],k=[1,61],w=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],Q=[1,65],J=[1,66],ee=[1,67],te=[1,68],re=[1,69],ie=[1,70],ne=[1,71],ae=[1,72],se=[1,73],oe=[1,74],le=[1,75],he=[1,76],C=[4,5,6,7,8,9,10,11,12,13,14,15,18],E=[1,90],S=[1,91],_=[1,92],A=[1,99],L=[1,93],R=[1,96],I=[1,94],N=[1,95],D=[1,97],M=[1,98],ce=[1,102],ue=[10,55,56,57],O=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],r={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 23:this.$=a[o];break;case 24:this.$=a[o-1]+""+a[o];break;case 26:this.$=a[o-1]+a[o];break;case 27:this.$=[a[o].trim()];break;case 28:a[o-2].push(a[o].trim()),this.$=a[o-2];break;case 29:this.$=a[o-4],i.addClass(a[o-2],a[o]);break;case 37:this.$=[];break;case 42:this.$=a[o].trim(),i.setDiagramTitle(this.$);break;case 43:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 44:case 45:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 46:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 47:i.addPoint(a[o-3],"",a[o-1],a[o],[]);break;case 48:i.addPoint(a[o-4],a[o-3],a[o-1],a[o],[]);break;case 49:i.addPoint(a[o-4],"",a[o-2],a[o-1],a[o]);break;case 50:i.addPoint(a[o-5],a[o-4],a[o-2],a[o-1],a[o]);break;case 51:i.setXAxisLeftText(a[o-2]),i.setXAxisRightText(a[o]);break;case 52:a[o-1].text+=" ⟶ ",i.setXAxisLeftText(a[o-1]);break;case 53:i.setXAxisLeftText(a[o]);break;case 54:i.setYAxisBottomText(a[o-2]),i.setYAxisTopText(a[o]);break;case 55:a[o-1].text+=" ⟶ ",i.setYAxisBottomText(a[o-1]);break;case 56:i.setYAxisBottomText(a[o]);break;case 57:i.setQuadrant1Text(a[o]);break;case 58:i.setQuadrant2Text(a[o]);break;case 59:i.setQuadrant3Text(a[o]);break;case 60:i.setQuadrant4Text(a[o]);break;case 64:this.$={text:a[o],type:"text"};break;case 65:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 66:this.$={text:a[o],type:"text"};break;case 67:this.$={text:a[o],type:"markdown"};break;case 68:this.$=a[o];break;case 69:this.$=a[o-1]+""+a[o]}},"anonymous"),table:[{18:r,26:1,27:2,28:i,55:n,56:a,57:s},{1:[3]},{18:r,26:8,27:2,28:i,55:n,56:a,57:s},{18:r,26:9,27:2,28:i,55:n,56:a,57:s},t(B,[2,33],{29:10}),t(P,[2,61]),t(P,[2,62]),t(P,[2,63]),{1:[2,30]},{1:[2,31]},t(o,$,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:l,5:h,10:c,12:u,13:d,14:p,18:F,25:z,35:q,37:W,39:U,41:G,42:j,48:V,50:Y,51:H,52:X,53:K,54:Z,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),t(B,[2,34]),{27:45,55:n,56:a,57:s},t(o,[2,37]),t(o,$,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:l,5:h,10:c,12:u,13:d,14:p,18:F,25:z,35:q,37:W,39:U,41:G,42:j,48:V,50:Y,51:H,52:X,53:K,54:Z,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),t(o,[2,39]),t(o,[2,40]),t(o,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(o,[2,45]),t(o,[2,46]),{18:[1,50]},{4:l,5:h,10:c,12:u,13:d,14:p,43:51,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:h,10:c,12:u,13:d,14:p,43:52,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:h,10:c,12:u,13:d,14:p,43:53,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:h,10:c,12:u,13:d,14:p,43:54,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:h,10:c,12:u,13:d,14:p,43:55,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:h,10:c,12:u,13:d,14:p,43:56,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:h,8:T,10:c,12:u,13:d,14:p,18:k,44:[1,57],47:[1,58],58:60,59:59,63:m,64:y,65:v,66:x,67:b},t(w,[2,64]),t(w,[2,66]),t(w,[2,67]),t(w,[2,70]),t(w,[2,71]),t(w,[2,72]),t(w,[2,73]),t(w,[2,74]),t(w,[2,75]),t(w,[2,76]),t(w,[2,77]),t(w,[2,78]),t(w,[2,79]),t(w,[2,80]),t(B,[2,35]),t(o,[2,38]),t(o,[2,42]),t(o,[2,43]),t(o,[2,44]),{3:64,4:Q,5:J,6:ee,7:te,8:re,9:ie,10:ne,11:ae,12:se,13:oe,14:le,15:he,21:63},t(o,[2,53],{59:59,58:60,4:l,5:h,8:T,10:c,12:u,13:d,14:p,18:k,49:[1,77],63:m,64:y,65:v,66:x,67:b}),t(o,[2,56],{59:59,58:60,4:l,5:h,8:T,10:c,12:u,13:d,14:p,18:k,49:[1,78],63:m,64:y,65:v,66:x,67:b}),t(o,[2,57],{59:59,58:60,4:l,5:h,8:T,10:c,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),t(o,[2,58],{59:59,58:60,4:l,5:h,8:T,10:c,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),t(o,[2,59],{59:59,58:60,4:l,5:h,8:T,10:c,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),t(o,[2,60],{59:59,58:60,4:l,5:h,8:T,10:c,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),{45:[1,79]},{44:[1,80]},t(w,[2,65]),t(w,[2,81]),t(w,[2,82]),t(w,[2,83]),{3:82,4:Q,5:J,6:ee,7:te,8:re,9:ie,10:ne,11:ae,12:se,13:oe,14:le,15:he,18:[1,81]},t(C,[2,23]),t(C,[2,1]),t(C,[2,2]),t(C,[2,3]),t(C,[2,4]),t(C,[2,5]),t(C,[2,6]),t(C,[2,7]),t(C,[2,8]),t(C,[2,9]),t(C,[2,10]),t(C,[2,11]),t(C,[2,12]),t(o,[2,52],{58:31,43:83,4:l,5:h,10:c,12:u,13:d,14:p,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),t(o,[2,55],{58:31,43:84,4:l,5:h,10:c,12:u,13:d,14:p,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),{46:[1,85]},{45:[1,86]},{4:E,5:S,6:_,8:A,11:L,13:R,16:89,17:I,18:N,19:D,20:M,22:88,23:87},t(C,[2,24]),t(o,[2,51],{59:59,58:60,4:l,5:h,8:T,10:c,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),t(o,[2,54],{59:59,58:60,4:l,5:h,8:T,10:c,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),t(o,[2,47],{22:88,16:89,23:100,4:E,5:S,6:_,8:A,11:L,13:R,17:I,18:N,19:D,20:M}),{46:[1,101]},t(o,[2,29],{10:ce}),t(ue,[2,27],{16:103,4:E,5:S,6:_,8:A,11:L,13:R,17:I,18:N,19:D,20:M}),t(O,[2,25]),t(O,[2,13]),t(O,[2,14]),t(O,[2,15]),t(O,[2,16]),t(O,[2,17]),t(O,[2,18]),t(O,[2,19]),t(O,[2,20]),t(O,[2,21]),t(O,[2,22]),t(o,[2,49],{10:ce}),t(o,[2,48],{22:88,16:89,23:104,4:E,5:S,6:_,8:A,11:L,13:R,17:I,18:N,19:D,20:M}),{4:E,5:S,6:_,8:A,11:L,13:R,16:89,17:I,18:N,19:D,20:M,22:105},t(O,[2,26]),t(o,[2,50],{10:ce}),t(ue,[2,28],{16:103,4:E,5:S,6:_,8:A,11:L,13:R,17:I,18:N,19:D,20:M})],defaultActions:{8:[2,30],9:[2,31]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",h=0,c=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,T,k,w,C,E,S={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===x||"u"<typeof x)&&(x=v()),o[T]&&o[T][x]))||!k.length||!k[0]){var _,A=[];for(w in o[T])this.terminals_[w]&&2<w&&A.push("'"+this.terminals_[w]+"'");_=g.showPosition?"Parse error on line "+(h+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(c=g.yyleng,l=g.yytext,h=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],S.$=a[a.length-C],S._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(E=this.performAction.apply(S,[l,c,h,f.yy,k[1],a,s].concat(p)))<"u")return E;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),E=o[i[i.length-2]][i[i.length-1]],i.push(E);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){case 0:case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};r.lexer=i,mt(e,"Parser"),(FAe=new((e.prototype=r).Parser=e)).parser=FAe,zAe=FAe}),jAe=i(()=>{Sk(),wi(),e(),di(),qAe=Pt(),WAe=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{mt(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:ar.quadrantChart?.chartWidth||500,chartWidth:ar.quadrantChart?.chartHeight||500,titlePadding:ar.quadrantChart?.titlePadding||10,titleFontSize:ar.quadrantChart?.titleFontSize||20,quadrantPadding:ar.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:ar.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:ar.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:ar.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:ar.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:ar.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:ar.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:ar.quadrantChart?.pointTextPadding||5,pointLabelFontSize:ar.quadrantChart?.pointLabelFontSize||12,pointRadius:ar.quadrantChart?.pointRadius||5,xAxisPosition:ar.quadrantChart?.xAxisPosition||"top",yAxisPosition:ar.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:ar.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:ar.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:qAe.quadrant1Fill,quadrant2Fill:qAe.quadrant2Fill,quadrant3Fill:qAe.quadrant3Fill,quadrant4Fill:qAe.quadrant4Fill,quadrant1TextFill:qAe.quadrant1TextFill,quadrant2TextFill:qAe.quadrant2TextFill,quadrant3TextFill:qAe.quadrant3TextFill,quadrant4TextFill:qAe.quadrant4TextFill,quadrantPointFill:qAe.quadrantPointFill,quadrantPointTextFill:qAe.quadrantPointTextFill,quadrantXAxisTextFill:qAe.quadrantXAxisTextFill,quadrantYAxisTextFill:qAe.quadrantYAxisTextFill,quadrantTitleFill:qAe.quadrantTitleFill,quadrantInternalBorderStrokeFill:qAe.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:qAe.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,B.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){B.trace("setConfig called with: ",e),this.config={...this.config,...e}}setThemeConfig(e){B.trace("setThemeConfig called with: ",e),this.themeConfig={...this.themeConfig,...e}}calculateSpace(e,t,r,i){var n=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,e={top:"top"===e&&t?n:0,bottom:"bottom"===e&&t?n:0},t=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,n={left:"left"===this.config.yAxisPosition&&r?t:0,right:"right"===this.config.yAxisPosition&&r?t:0},r=this.config.titleFontSize+2*this.config.titlePadding,t={top:i?r:0},i=this.config.quadrantPadding+n.left,r=this.config.quadrantPadding+e.top+t.top,a=this.config.chartWidth-2*this.config.quadrantPadding-n.left-n.right,s=this.config.chartHeight-2*this.config.quadrantPadding-e.top-e.bottom-t.top;return{xAxisSpace:e,yAxisSpace:n,titleSpace:t,quadrantSpace:{quadrantLeft:i,quadrantTop:r,quadrantWidth:a,quadrantHalfWidth:a/2,quadrantHeight:s,quadrantHalfHeight:s/2}}}getAxisLabels(e,t,r,i){var{quadrantSpace:i,titleSpace:n}=i,{quadrantHalfHeight:i,quadrantHeight:a,quadrantLeft:s,quadrantHalfWidth:o,quadrantTop:l,quadrantWidth:h}=i,c=!!this.data.xAxisRightText,u=!!this.data.yAxisTopText,d=[];return this.data.xAxisLeftText&&t&&d.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:s+(c?o/2:0),y:"top"===e?this.config.xAxisLabelPadding+n.top:this.config.xAxisLabelPadding+l+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:c?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&t&&d.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:s+o+(c?o/2:0),y:"top"===e?this.config.xAxisLabelPadding+n.top:this.config.xAxisLabelPadding+l+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:c?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&r&&d.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+s+h+this.config.quadrantPadding,y:l+a-(u?i/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&r&&d.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+s+h+this.config.quadrantPadding,y:l+i-(u?i/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:-90}),d}getQuadrants(e){var t,{quadrantHalfHeight:e,quadrantLeft:r,quadrantHalfWidth:i,quadrantTop:n}=e=e.quadrantSpace;for(t of r=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r+i,y:n,width:i,height:e,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:r,y:n,width:i,height:e,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:r,y:n+e,width:i,height:e,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:r+i,y:n+e,width:i,height:e,fill:this.themeConfig.quadrant4Fill}])t.text.x=t.x+t.width/2,0===this.data.points.length?(t.text.y=t.y+t.height/2,t.text.horizontalPos="middle"):(t.text.y=t.y+this.config.quadrantTextTopPadding,t.text.horizontalPos="top");return r}getQuadrantPoints(e){let t=e.quadrantSpace,{quadrantHeight:r,quadrantLeft:i,quadrantTop:n,quadrantWidth:a}=t,s=ob().domain([0,1]).range([i,a+i]),o=ob().domain([0,1]).range([r+n,n]);return this.data.points.map(e=>{var t=this.classes.get(e.className);return t&&(e={...t,...e}),{x:s(e.x),y:o(e.y),fill:e.color??this.themeConfig.quadrantPointFill,radius:e.radius??this.config.pointRadius,text:{text:e.text,fill:this.themeConfig.quadrantPointTextFill,x:s(e.x),y:o(e.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:e.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:e.strokeWidth??"0px"}})}getBorders(e){var t=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantHalfHeight:e,quadrantHeight:r,quadrantLeft:i,quadrantHalfWidth:n,quadrantTop:a,quadrantWidth:s}=e=e.quadrantSpace;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:i-t,y1:a,x2:i+s+t,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:i+s,y1:a+t,x2:i+s,y2:a+r-t},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:i-t,y1:a+r,x2:i+s+t,y2:a+r},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:i,y1:a+t,x2:i,y2:a+r-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:i+n,y1:a+t,x2:i+n,y2:a+r-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:i+t,y1:a+e,x2:i+s-t,y2:a+e}]}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(){var 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=0<this.data.points.length?"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)}}}});function VAe(e){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(e)}function YAe(e){return!/^\d+$/.test(e)}function HAe(e){return!/^\d+px$/.test(e)}var XAe,KAe=i(()=>{XAe=class extends Error{static{mt(this,"InvalidStyleError")}constructor(e,t,r){super(`value for ${e} ${t} is invalid, please use a valid `+r),this.name="InvalidStyleError"}},mt(VAe,"validateHexCode"),mt(YAe,"validateNumber"),mt(HAe,"validateSizeInPixels")});function ZAe(e){return Ih(e.trim(),d9e)}function QAe(e){p9e.setData({quadrant1Text:ZAe(e.text)})}function JAe(e){p9e.setData({quadrant2Text:ZAe(e.text)})}function e9e(e){p9e.setData({quadrant3Text:ZAe(e.text)})}function t9e(e){p9e.setData({quadrant4Text:ZAe(e.text)})}function r9e(e){p9e.setData({xAxisLeftText:ZAe(e.text)})}function i9e(e){p9e.setData({xAxisRightText:ZAe(e.text)})}function n9e(e){p9e.setData({yAxisTopText:ZAe(e.text)})}function a9e(e){p9e.setData({yAxisBottomText:ZAe(e.text)})}function s9e(e){var t,r={};for(t of e){var[i,n]=t.trim().split(/\s*:\s*/);if("radius"===i){if(YAe(n))throw new XAe(i,n,"number");r.radius=parseInt(n)}else if("color"===i){if(VAe(n))throw new XAe(i,n,"hex code");r.color=n}else if("stroke-color"===i){if(VAe(n))throw new XAe(i,n,"hex code");r.strokeColor=n}else{if("stroke-width"!==i)throw new Error(`style named ${i} is not supported.`);if(HAe(n))throw new XAe(i,n,"number of pixels (eg. 10px)");r.strokeWidth=n}}return r}function o9e(e,t,r,i,n){n=s9e(n),p9e.addPoints([{x:r,y:i,text:ZAe(e.text),className:t,...n}])}function l9e(e,t){p9e.addClass(e,s9e(t))}function h9e(e){p9e.setConfig({chartWidth:e})}function c9e(e){p9e.setConfig({chartHeight:e})}function u9e(){var{themeVariables:e,quadrantChart:t}=P();return t&&p9e.setConfig(t),p9e.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),p9e.setData({titleText:Uc()}),p9e.build()}var d9e,p9e,g9e,f9e,m9e,y9e,v9e=i(()=>{ju(),ic(),Gu(),jAe(),KAe(),d9e=P(),mt(ZAe,"textSanitizer"),p9e=new WAe,mt(QAe,"setQuadrant1Text"),mt(JAe,"setQuadrant2Text"),mt(e9e,"setQuadrant3Text"),mt(t9e,"setQuadrant4Text"),mt(r9e,"setXAxisLeftText"),mt(i9e,"setXAxisRightText"),mt(n9e,"setYAxisTopText"),mt(a9e,"setYAxisBottomText"),mt(s9e,"parseStyles"),mt(o9e,"addPoint"),mt(l9e,"addClass"),mt(h9e,"setWidth"),mt(c9e,"setHeight"),mt(u9e,"getQuadrantData"),g9e=mt(function(){p9e.clear(),Pc()},"clear"),f9e={setWidth:h9e,setHeight:c9e,setQuadrant1Text:QAe,setQuadrant2Text:JAe,setQuadrant3Text:e9e,setQuadrant4Text:t9e,setXAxisLeftText:r9e,setXAxisRightText:i9e,setYAxisTopText:n9e,setYAxisBottomText:a9e,parseStyles:s9e,addPoint:o9e,addClass:l9e,getQuadrantData:u9e,clear:g9e,setAccTitle:$c,getAccTitle:Fc,setDiagramTitle:Wc,getDiagramTitle:Uc,getAccDescription:qc,setAccDescription:zc}}),x9e=i(()=>{Sk(),ju(),e(),Rc(),m9e=mt((e,t,r,i)=>{function n(e){return"top"===e?"hanging":"middle"}function a(e){return"left"===e?"start":"middle"}function s(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}mt(n,"getDominantBaseLine"),mt(a,"getTextAnchor"),mt(s,"getTransformation");var o=P();B.debug(`Rendering quadrant chart
`+e);let l=o.securityLevel,h;"sandbox"===l&&(h=Q("#i"+t));var t=(e=Q("sandbox"===l?h.nodes()[0].contentDocument.body:"body").select(`[id="${t}"]`)).append("g").attr("class","main"),c=o.quadrantChart?.chartWidth??500,u=o.quadrantChart?.chartHeight??500,o=(xc(e,u,c,o.quadrantChart?.useMaxWidth??!0),e.attr("viewBox","0 0 "+c+" "+u),i.db.setHeight(u),i.db.setWidth(c),i.db.getQuadrantData()),e=t.append("g").attr("class","quadrants"),u=t.append("g").attr("class","border"),c=t.append("g").attr("class","data-points"),i=t.append("g").attr("class","labels"),t=t.append("g").attr("class","title");o.title&&t.append("text").attr("x",0).attr("y",0).attr("fill",o.title.fill).attr("font-size",o.title.fontSize).attr("dominant-baseline",n(o.title.horizontalPos)).attr("text-anchor",a(o.title.verticalPos)).attr("transform",s(o.title)).text(o.title.text),o.borderLines&&u.selectAll("line").data(o.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),(t=e.selectAll("g.quadrant").data(o.quadrants).enter().append("g").attr("class","quadrant")).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),t.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),i.selectAll("g.label").data(o.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)),(u=c.selectAll("g.data-point").data(o.points).enter().append("g").attr("class","data-point")).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),u.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"),y9e={draw:m9e}}),b9e={};sYe(b9e,{diagram:()=>T9e});var T9e,k9e,w9e,C9e=i(()=>{GAe(),v9e(),x9e(),T9e={parser:zAe,db:f9e,renderer:y9e,styles:mt(()=>"","styles")}}),E9e=i(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,10,12,14,16,18,19,21,23],i=[2,6],n=[1,3],a=[1,5],s=[1,6],o=[1,7],l=[1,5,10,12,14,16,18,19,21,23,34,35,36],h=[1,25],c=[1,26],u=[1,28],d=[1,29],p=[1,30],g=[1,31],f=[1,32],m=[1,33],y=[1,34],v=[1,35],x=[1,36],b=[1,37],T=[1,43],k=[1,42],w=[1,47],C=[1,50],E=[1,10,12,14,16,18,19,21,23,34,35,36],S=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],_=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],A=[1,64],i={trace:mt(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,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$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",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"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],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 5:i.setOrientation(a[o]);break;case 9:i.setDiagramTitle(a[o].text.trim());break;case 12:i.setLineData({text:"",type:"text"},a[o]);break;case 13:i.setLineData(a[o-1],a[o]);break;case 14:i.setBarData({text:"",type:"text"},a[o]);break;case 15:i.setBarData(a[o-1],a[o]);break;case 16:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 17:case 18:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 19:this.$=a[o-1];break;case 20:this.$=[Number(a[o-2]),...a[o]];break;case 21:this.$=[Number(a[o])];break;case 22:i.setXAxisTitle(a[o]);break;case 23:i.setXAxisTitle(a[o-1]);break;case 24:i.setXAxisTitle({type:"text",text:""});break;case 25:i.setXAxisBand(a[o]);break;case 26:i.setXAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 27:this.$=a[o-1];break;case 28:this.$=[a[o-2],...a[o]];break;case 29:this.$=[a[o]];break;case 30:i.setYAxisTitle(a[o]);break;case 31:i.setYAxisTitle(a[o-1]);break;case 32:i.setYAxisTitle({type:"text",text:""});break;case 33:i.setYAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 37:case 38:this.$={text:a[o],type:"text"};break;case 39:this.$={text:a[o],type:"markdown"};break;case 40:this.$=a[o];break;case 41:this.$=a[o-1]+""+a[o]}},"anonymous"),table:[t(r,i,{3:1,4:2,7:4,5:n,34:a,35:s,36:o}),{1:[3]},t(r,i,{4:2,7:4,3:8,5:n,34:a,35:s,36:o}),t(r,i,{4:2,7:4,6:9,3:10,5:n,8:[1,11],34:a,35:s,36:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(l,[2,34]),t(l,[2,35]),t(l,[2,36]),{1:[2,1]},t(r,i,{4:2,7:4,3:21,5:n,34:a,35:s,36:o}),{1:[2,3]},t(l,[2,5]),t(r,[2,7],{4:22,34:a,35:s,36:o}),{11:23,37:24,38:h,39:c,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{11:39,13:38,24:T,27:k,29:40,30:41,37:24,38:h,39:c,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{11:45,15:44,27:w,33:46,37:24,38:h,39:c,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{11:49,17:48,24:C,37:24,38:h,39:c,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{11:52,17:51,24:C,37:24,38:h,39:c,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{20:[1,53]},{22:[1,54]},t(E,[2,18]),{1:[2,2]},t(E,[2,8]),t(E,[2,9]),t(S,[2,37],{40:55,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b}),t(S,[2,38]),t(S,[2,39]),t(_,[2,40]),t(_,[2,42]),t(_,[2,43]),t(_,[2,44]),t(_,[2,45]),t(_,[2,46]),t(_,[2,47]),t(_,[2,48]),t(_,[2,49]),t(_,[2,50]),t(_,[2,51]),t(E,[2,10]),t(E,[2,22],{30:41,29:56,24:T,27:k}),t(E,[2,24]),t(E,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:h,39:c,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},t(E,[2,11]),t(E,[2,30],{33:60,27:w}),t(E,[2,32]),{31:[1,61]},t(E,[2,12]),{17:62,24:C},{25:63,27:A},t(E,[2,14]),{17:65,24:C},t(E,[2,16]),t(E,[2,17]),t(_,[2,41]),t(E,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(E,[2,31]),{27:[1,69]},t(E,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(E,[2,15]),t(E,[2,26]),t(E,[2,27]),{11:59,32:72,37:24,38:h,39:c,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},t(E,[2,33]),t(E,[2,19]),{25:73,27:A},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",h=0,c=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,T,k,w,C,E,S={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===x||"u"<typeof x)&&(x=v()),o[T]&&o[T][x]))||!k.length||!k[0]){var _,A=[];for(w in o[T])this.terminals_[w]&&2<w&&A.push("'"+this.terminals_[w]+"'");_=g.showPosition?"Parse error on line "+(h+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(c=g.yyleng,l=g.yytext,h=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],S.$=a[a.length-C],S._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(E=this.performAction.apply(S,[l,c,h,f.yy,k[1],a,s].concat(p)))<"u")return E;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),E=o[i[i.length-2]][i[i.length-1]],i.push(E);break;case 3:return!0}}return!0},"parse")},n={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){case 0:case 1:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/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}}};i.lexer=n,mt(e,"Parser"),(k9e=new((e.prototype=i).Parser=e)).parser=k9e,w9e=k9e});function S9e(e){return"bar"===e.type}function _9e(e){return"band"===e.type}function A9e(e){return"linear"===e.type}var L9e,R9e,I9e,N9e,D9e=i(()=>{mt(S9e,"isBarPlot"),mt(_9e,"isBandAxisData"),mt(A9e,"isLinearAxisData")}),M9e=i(()=>{ER(),L9e=class{constructor(e){this.parentGroup=e}static{mt(this,"TextDimensionCalculatorWithFont")}getMaxDimension(e,t){if(!this.parentGroup)return{width:e.reduce((e,t)=>Math.max(t.length,e),0)*t,height:t};var r,i={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",t);for(r of e){var a=(s=xR(n,1,r))?s.width:r.length*t,s=s?s.height:t;i.width=Math.max(i.width,a),i.height=Math.max(i.height,s)}return n.remove(),i}}}),O9e=i(()=>{R9e=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.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{mt(this,"BaseAxis")}setRange(e){this.range=e,"left"===this.axisPosition||"right"===this.axisPosition?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(){var 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()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let t=e.height;var r,i;this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),i=.2*e.width,this.outerPadding=Math.min(r.width/2,i),i=r.height+2*this.axisConfig.labelPadding,this.labelTextHeight=r.height,i<=t)&&(t-=i,this.showLabel=!0),this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title&&(i=(r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize)).height+2*this.axisConfig.titlePadding,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;var r,i;this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),i=.2*e.height,this.outerPadding=Math.min(r.height/2,i),(i=r.width+2*this.axisConfig.labelPadding)<=t)&&(t-=i,this.showLabel=!0),this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title&&(i=(r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize)).height+2*this.axisConfig.titlePadding,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"left"===this.axisPosition||"right"===this.axisPosition?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}getDrawableElementsForLeftAxis(){var e,r=[];if(this.showAxisLine&&(e=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${e},${this.boundingRect.y} L ${e},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(e=>({text:e.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(e),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);r.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${t},${this.getScaleValue(e)} L ${t-this.axisConfig.tickLength},`+this.getScaleValue(e),strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&r.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"}]}),r}getDrawableElementsForBottomAxis(){var e,r=[];if(this.showAxisLine&&(e=this.boundingRect.y+this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},`+e,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let t=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);r.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t} L ${this.getScaleValue(e)},`+(t+this.axisConfig.tickLength),strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&r.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"}]}),r}getDrawableElementsForTopAxis(){var e,r=[];if(this.showAxisLine&&(e=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},`+e,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding: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;r.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},`+(t+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)),strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&r.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"}]}),r}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}}}),B9e=i(()=>{Sk(),e(),O9e(),I9e=class extends R9e{static{mt(this,"BandAxis")}constructor(e,t,r,i,n){super(e,i,n,t),this.categories=r,this.scale=Wx().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=Wx().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),B.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}}}),P9e=i(()=>{Sk(),O9e(),N9e=class extends R9e{static{mt(this,"LinearAxis")}constructor(e,t,r,i,n){super(e,i,n,t),this.domain=r,this.scale=ob().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){var e=[...this.domain];"left"===this.axisPosition&&e.reverse(),this.scale=ob().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}}});function $9e(e,t,r,i){return i=new L9e(i),_9e(e)?new I9e(t,r,e.categories,e.title,i):new N9e(t,r,[e.min,e.max],e.title,i)}var F9e=i(()=>{D9e(),M9e(),B9e(),P9e(),mt($9e,"getAxis")});function z9e(e,t,r,i){return i=new L9e(i),new q9e(i,e,t,r)}var q9e,W9e,U9e,G9e=i(()=>{M9e(),q9e=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{mt(this,"ChartTitle")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){var t=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(t.width,e.width),r=t.height+2*this.chartConfig.titlePadding;return t.width<=e&&t.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){var 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}},mt(z9e,"getChartTitleComponent")}),j9e=i(()=>{Sk(),W9e=class{constructor(e,t,r,i,n){this.plotData=e,this.xAxis=t,this.yAxis=r,this.orientation=i,this.plotIndex=n}static{mt(this,"LinePlot")}getDrawableElement(){var e=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]);return(e=("horizontal"===this.orientation?C3().y(e=>e[0]).x(e=>e[1]):C3().x(e=>e[0]).y(e=>e[1]))(e))?[{groupTexts:["plot","line-plot-"+this.plotIndex],type:"path",data:[{path:e,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}}}),V9e=i(()=>{U9e=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{mt(this,"BarPlot")}getDrawableElement(){let e=this.barData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),r=t/2;return"horizontal"===this.orientation?[{groupTexts:["plot","bar-plot-"+this.plotIndex],type:"rect",data:e.map(e=>({x:this.boundingRect.x,y:e[0]-r,height:t,width:e[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(e=>({x:e[0]-r,y:e[1],width:t,height:this.boundingRect.y+this.boundingRect.height-e[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}}});function Y9e(e,t,r){return new H9e(e,t,r)}var H9e,X9e,K9e,Z9e=i(()=>{j9e(),V9e(),H9e=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{mt(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");var e,t,r=[];for([e,t]of this.chartData.plots.entries())switch(t.type){case"line":var i=new W9e(t,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);r.push(...i.getDrawableElement());break;case"bar":i=new U9e(t,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e),r.push(...i.getDrawableElement())}return r}},mt(Y9e,"getPlotComponent")}),Q9e=i(()=>{F9e(),G9e(),Z9e(),D9e(),X9e=class{constructor(e,t,r,i){this.chartConfig=e,this.chartData=t,this.componentStore={title:z9e(e,t,r,i),plot:Y9e(e,t,r),xAxis:$9e(t.xAxis,e.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},i),yAxis:$9e(t.yAxis,e.yAxis,{titleColor:r.yAxisTitleColor,labelColor:r.yAxisLabelColor,tickColor:r.yAxisTickColor,axisLineColor:r.yAxisLineColor},i)}}static{mt(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,r,i,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,i=(s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t-=s.height})).height,t-=s.height,this.componentStore.xAxis.setAxisPosition("bottom"),t-=this.componentStore.xAxis.calculateSpace({width:e,height:t}).height,this.componentStore.yAxis.setAxisPosition("left"),r=(s=this.componentStore.yAxis.calculateSpace({width:e,height:t})).width,0<(e-=s.width)&&(n+=e),0<t&&(a+=t),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(e=>S9e(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,r,i,n,a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:s});e-=o.width,r=(o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t-=o.height})).height,t-=o.height,this.componentStore.xAxis.setAxisPosition("left"),e-=(o=this.componentStore.xAxis.calculateSpace({width:e,height:t})).width,i=o.width,this.componentStore.yAxis.setAxisPosition("top"),t-=(o=this.componentStore.yAxis.calculateSpace({width:e,height:t})).height,n=r+o.height,0<e&&(a+=e),0<t&&(s+=t),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(e=>S9e(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();var e,t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(e of Object.values(this.componentStore))t.push(...e.getDrawableElements());return t}}}),J9e=i(()=>{Q9e(),K9e=class{static{mt(this,"XYChartBuilder")}static build(e,t,r,i){return new X9e(e,t,r,i).getDrawableElement()}}});function eLe(){var e=Pt(),t=br();return H_(e.xyChart,t.themeVariables.xyChart)}function tLe(){var e=br();return H_(ar.xyChart,e.xyChart)}function rLe(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function iLe(e){var t=br();return Ih(e.trim(),t)}function nLe(e){TLe=e}function aLe(e){kLe.chartOrientation="horizontal"===e?"horizontal":"vertical"}function sLe(e){CLe.xAxis.title=iLe(e.text)}function oLe(e,t){CLe.xAxis={type:"linear",title:CLe.xAxis.title,min:e,max:t},SLe=!0}function lLe(e){CLe.xAxis={type:"band",title:CLe.xAxis.title,categories:e.map(e=>iLe(e.text))},SLe=!0}function hLe(e){CLe.yAxis.title=iLe(e.text)}function cLe(e,t){CLe.yAxis={type:"linear",title:CLe.yAxis.title,min:e,max:t},_Le=!0}function uLe(e){var t=Math.min(...e),e=Math.max(...e),r=A9e(CLe.yAxis)?CLe.yAxis.min:1/0,i=A9e(CLe.yAxis)?CLe.yAxis.max:-1/0;CLe.yAxis={type:"linear",title:CLe.yAxis.title,min:Math.min(r,t),max:Math.max(i,e)}}function dLe(r){let e=[],t;if(0!==r.length&&(SLe||(i=A9e(CLe.xAxis)?CLe.xAxis.min:1/0,t=A9e(CLe.xAxis)?CLe.xAxis.max:-1/0,oLe(Math.min(i,1),Math.max(t,r.length))),_Le||uLe(r),_9e(CLe.xAxis)&&(e=CLe.xAxis.categories.map((e,t)=>[e,r[t]])),A9e(CLe.xAxis))){var i=CLe.xAxis.min,n=CLe.xAxis.max,a=(n-i)/(r.length-1),s=[];for(let e=i;e<=n;e+=a)s.push(""+e);e=s.map((e,t)=>[e,r[t]])}return e}function pLe(e){return ELe[0===e?0:e%ELe.length]}function gLe(e,t){t=dLe(t),CLe.plots.push({type:"line",strokeFill:pLe(bLe),strokeWidth:2,data:t}),bLe++}function fLe(e,t){t=dLe(t),CLe.plots.push({type:"bar",fill:pLe(bLe),data:t}),bLe++}function mLe(){if(0===CLe.plots.length)throw Error("No Plot to render, please provide a plot with some data");return CLe.title=Uc(),K9e.build(kLe,CLe,wLe,TLe)}function yLe(){return wLe}function vLe(){return kLe}function xLe(){return CLe}var bLe,TLe,kLe,wLe,CLe,ELe,SLe,_Le,ALe,LLe,RLe,ILe,NLe=i(()=>{Ei(),wi(),di(),S7(),ic(),Gu(),J9e(),D9e(),bLe=0,kLe=tLe(),wLe=eLe(),CLe=rLe(),ELe=wLe.plotColorPalette.split(",").map(e=>e.trim()),_Le=SLe=!1,mt(eLe,"getChartDefaultThemeConfig"),mt(tLe,"getChartDefaultConfig"),mt(rLe,"getChartDefaultData"),mt(iLe,"textSanitizer"),mt(nLe,"setTmpSVGG"),mt(aLe,"setOrientation"),mt(sLe,"setXAxisTitle"),mt(oLe,"setXAxisRangeData"),mt(lLe,"setXAxisBand"),mt(hLe,"setYAxisTitle"),mt(cLe,"setYAxisRangeData"),mt(uLe,"setYAxisRangeFromPlotData"),mt(dLe,"transformDataWithoutCategory"),mt(pLe,"getPlotColorFromPalette"),mt(gLe,"setLineData"),mt(fLe,"setBarData"),mt(mLe,"getDrawableElem"),mt(yLe,"getChartThemeConfig"),mt(vLe,"getChartConfig"),mt(xLe,"getXYChartData"),ALe=mt(function(){Pc(),bLe=0,kLe=tLe(),CLe=rLe(),wLe=eLe(),ELe=wLe.plotColorPalette.split(",").map(e=>e.trim()),_Le=SLe=!1},"clear"),LLe={getDrawableElem:mLe,clear:ALe,setAccTitle:$c,getAccTitle:Fc,setDiagramTitle:Wc,getDiagramTitle:Uc,getAccDescription:qc,setAccDescription:zc,setOrientation:aLe,setXAxisTitle:sLe,setXAxisRangeData:oLe,setXAxisBand:lLe,setYAxisTitle:hLe,setYAxisRangeData:cLe,setLineData:gLe,setBarData:fLe,setTmpSVGG:nLe,getChartThemeConfig:yLe,getChartConfig:vLe,getXYChartData:xLe}}),DLe=i(()=>{e(),cAe(),Rc(),RLe=mt((e,t,r,i)=>{let n=i.db,a=n.getChartThemeConfig(),s=n.getChartConfig(),o=n.getXYChartData().plots[0].data.map(e=>e[1]);function l(e){return"top"===e?"text-before-edge":"middle"}function h(e){return"left"===e?"start":"right"===e?"end":"middle"}function c(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}mt(l,"getDominantBaseLine"),mt(h,"getTextAnchor"),mt(c,"getTextTransformation"),B.debug(`Rendering xychart chart
`+e);let u=nAe(t),d=u.append("g").attr("class","main"),p=d.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background"),g=(xc(u,s.height,s.width,!0),u.attr("viewBox",`0 0 ${s.width} `+s.height),p.attr("fill",a.backgroundColor),n.setTmpSVGG(u.append("g").attr("class","mermaid-tmp-group")),n.getDrawableElem()),f={};function m(t){let r=d,i="";for(var[n]of t.entries()){let e=d;0<n&&f[i]&&(e=f[i]),i+=t[n],r=(r=f[i])||(f[i]=e.append("g").attr("class",t[n]))}return r}mt(m,"getGroup");for(var y of g)if(0!==y.data.length){var v=m(y.groupTexts);switch(y.type){case"rect":if(v.selectAll("rect").data(y.data).enter().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).attr("stroke",e=>e.strokeFill).attr("stroke-width",e=>e.strokeWidth),s.showDataLabel){let t=s.showDataLabelOutsideBar;if("horizontal"===s.chartOrientation){let i=function(e,t){var{data:e,label:r}=e;return t*r.length*.7<=e.width-10};i,mt(i,"fitsHorizontally");var x=(T=y.data.map((e,t)=>({data:e,label:o[t].toString()})).filter(e=>0<e.data.width&&0<e.data.height)).map(e=>{let t=e.data,r=.7*t.height;for(;!i(e,r)&&0<r;)--r;return r}),x=Math.floor(Math.min(...x)),b=mt(e=>t?e.data.x+e.data.width+10:e.data.x+e.data.width-10,"determineLabelXPosition");v.selectAll("text").data(T).enter().append("text").attr("x",b).attr("y",e=>e.data.y+e.data.height/2).attr("text-anchor",t?"start":"end").attr("dominant-baseline","middle").attr("fill",a.dataLabelColor).attr("font-size",x+"px").text(e=>e.label)}else{let n=function(e,t,r){var{data:e,label:i}=e,i=t*i.length*.7,n=e.x+e.width/2;return e.x<=n-i/2&&n+i/2<=e.x+e.width&&e.y+r+t<=e.y+e.height};n,mt(n,"fitsInBar");var T,b=(T=y.data.map((e,t)=>({data:e,label:o[t].toString()})).filter(e=>0<e.data.width&&0<e.data.height)).map(e=>{let{data:t,label:r}=e,i=t.width/(.7*r.length);for(;!n(e,i,10)&&0<i;)--i;return i}),x=Math.floor(Math.min(...b)),k=mt(e=>t?e.data.y-10:e.data.y+10,"determineLabelYPosition");v.selectAll("text").data(T).enter().append("text").attr("x",e=>e.data.x+e.data.width/2).attr("y",k).attr("text-anchor","middle").attr("dominant-baseline",t?"auto":"hanging").attr("fill",a.dataLabelColor).attr("font-size",x+"px").text(e=>e.label)}}break;case"text":v.selectAll("text").data(y.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",e=>e.fill).attr("font-size",e=>e.fontSize).attr("dominant-baseline",e=>l(e.verticalPos)).attr("text-anchor",e=>h(e.horizontalPos)).attr("transform",e=>c(e)).text(e=>e.text);break;case"path":v.selectAll("path").data(y.data).enter().append("path").attr("d",e=>e.path).attr("fill",e=>e.fill||"none").attr("stroke",e=>e.strokeFill).attr("stroke-width",e=>e.strokeWidth)}}},"draw"),ILe={draw:RLe}}),MLe={};sYe(MLe,{diagram:()=>OLe});var OLe,BLe,PLe,$Le,FLe,zLe,qLe,WLe=i(()=>{E9e(),NLe(),DLe(),OLe={parser:w9e,db:LLe,renderer:ILe}}),ULe=i(()=>{function B(){this.yy={}}var e=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),t=[1,3],r=[1,4],i=[1,5],n=[1,6],P=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],a=[1,22],s=[2,7],o=[1,26],l=[1,27],h=[1,28],c=[1,29],u=[1,33],d=[1,34],p=[1,35],g=[1,36],f=[1,37],m=[1,38],y=[1,24],v=[1,31],x=[1,32],b=[1,30],T=[1,39],k=[1,40],w=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],C=[1,61],E=[89,90],$=[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],F=[27,29],z=[1,70],q=[1,71],W=[1,72],U=[1,73],G=[1,74],j=[1,75],V=[1,76],S=[1,83],_=[1,80],Y=[1,84],H=[1,85],X=[1,86],K=[1,87],Z=[1,88],Q=[1,89],J=[1,90],ee=[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],A=[63,64],ie=[1,101],ne=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],L=[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],R=[1,110],I=[1,106],N=[1,107],D=[1,108],M=[1,109],O=[1,111],ae=[1,116],se=[1,117],oe=[1,114],le=[1,115],t={trace:mt(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:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 4:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 5:case 6:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:i.setDirection("TB");break;case 18:i.setDirection("BT");break;case 19:i.setDirection("RL");break;case 20:i.setDirection("LR");break;case 21:i.addRequirement(a[o-3],a[o-4]);break;case 22:i.addRequirement(a[o-5],a[o-6]),i.setClass([a[o-5]],a[o-3]);break;case 23:i.setNewReqId(a[o-2]);break;case 24:i.setNewReqText(a[o-2]);break;case 25:i.setNewReqRisk(a[o-2]);break;case 26:i.setNewReqVerifyMethod(a[o-2]);break;case 29:this.$=i.RequirementType.REQUIREMENT;break;case 30:this.$=i.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=i.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=i.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=i.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=i.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=i.RiskLevel.LOW_RISK;break;case 36:this.$=i.RiskLevel.MED_RISK;break;case 37:this.$=i.RiskLevel.HIGH_RISK;break;case 38:this.$=i.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=i.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=i.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=i.VerifyType.VERIFY_TEST;break;case 42:i.addElement(a[o-3]);break;case 43:i.addElement(a[o-5]),i.setClass([a[o-5]],a[o-3]);break;case 44:i.setNewElementType(a[o-2]);break;case 45:i.setNewElementDocRef(a[o-2]);break;case 48:i.addRelationship(a[o-2],a[o],a[o-4]);break;case 49:i.addRelationship(a[o-2],a[o-4],a[o]);break;case 50:this.$=i.Relationships.CONTAINS;break;case 51:this.$=i.Relationships.COPIES;break;case 52:this.$=i.Relationships.DERIVES;break;case 53:this.$=i.Relationships.SATISFIES;break;case 54:this.$=i.Relationships.VERIFIES;break;case 55:this.$=i.Relationships.REFINES;break;case 56:this.$=i.Relationships.TRACES;break;case 57:this.$=a[o-2],i.defineClass(a[o-1],a[o]);break;case 58:i.setClass(a[o-1],a[o]);break;case 59:i.setClass([a[o-2]],a[o]);break;case 60:case 62:this.$=[a[o]];break;case 61:case 63:this.$=a[o-2].concat([a[o]]);break;case 64:this.$=a[o-2],i.setCssStyle(a[o-1],a[o]);break;case 65:this.$=[a[o]];break;case 66:a[o-2].push(a[o]),this.$=a[o-2];break;case 68:this.$=a[o-1]+a[o]}},"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(P,[2,6]),{3:12,4:2,6:t,9:r,11:i,13:n},{1:[2,2]},{4:17,5:a,7:13,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:h,24:c,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:T,90:k},e(P,[2,4]),e(P,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:a,7:42,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:h,24:c,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:T,90:k},{4:17,5:a,7:43,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:h,24:c,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:T,90:k},{4:17,5:a,7:44,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:h,24:c,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:T,90:k},{4:17,5:a,7:45,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:h,24:c,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:T,90:k},{4:17,5:a,7:46,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:h,24:c,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:T,90:k},{4:17,5:a,7:47,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:h,24:c,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:T,90:k},{4:17,5:a,7:48,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:h,24:c,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:T,90:k},{4:17,5:a,7:49,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:h,24:c,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:T,90:k},{4:17,5:a,7:50,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:h,24:c,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:x,77:b,89:T,90:k},{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(w,[2,17]),e(w,[2,18]),e(w,[2,19]),e(w,[2,20]),{30:60,33:62,75:C,89:T,90:k},{30:63,33:62,75:C,89:T,90:k},{30:64,33:62,75:C,89:T,90:k},e(E,[2,29]),e(E,[2,30]),e(E,[2,31]),e(E,[2,32]),e(E,[2,33]),e(E,[2,34]),e($,[2,81]),e($,[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(F,[2,79]),e(F,[2,80]),{27:[1,67],29:[1,68]},e(F,[2,85]),e(F,[2,86]),{62:69,65:z,66:q,67:W,68:U,69:G,70:j,71:V},{62:77,65:z,66:q,67:W,68:U,69:G,70:j,71:V},{30:78,33:62,75:C,89:T,90:k},{73:79,75:S,76:_,78:81,79:82,80:Y,81:H,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te},e(re,[2,60]),e(re,[2,62]),{73:93,75:S,76:_,78:81,79:82,80:Y,81:H,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te},{30:94,33:62,75:C,76:_,89:T,90:k},{5:[1,95]},{30:96,33:62,75:C,89:T,90:k},{5:[1,97]},{30:98,33:62,75:C,89:T,90:k},{63:[1,99]},e(A,[2,50]),e(A,[2,51]),e(A,[2,52]),e(A,[2,53]),e(A,[2,54]),e(A,[2,55]),e(A,[2,56]),{64:[1,100]},e(w,[2,59],{76:_}),e(w,[2,64],{76:ie}),{33:103,75:[1,102],89:T,90:k},e(ne,[2,65],{79:104,75:S,80:Y,81:H,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te}),e(L,[2,67]),e(L,[2,69]),e(L,[2,70]),e(L,[2,71]),e(L,[2,72]),e(L,[2,73]),e(L,[2,74]),e(L,[2,75]),e(L,[2,76]),e(L,[2,77]),e(L,[2,78]),e(w,[2,57],{76:ie}),e(w,[2,58],{76:_}),{5:R,28:105,31:I,34:N,36:D,38:M,40:O},{27:[1,112],76:_},{5:ae,40:se,56:113,57:oe,59:le},{27:[1,118],76:_},{33:119,89:T,90:k},{33:120,89:T,90:k},{75:S,78:121,79:82,80:Y,81:H,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te},e(re,[2,61]),e(re,[2,63]),e(L,[2,68]),e(w,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:R,28:126,31:I,34:N,36:D,38:M,40:O},e(w,[2,28]),{5:[1,127]},e(w,[2,42]),{32:[1,128]},{32:[1,129]},{5:ae,40:se,56:130,57:oe,59:le},e(w,[2,47]),{5:[1,131]},e(w,[2,48]),e(w,[2,49]),e(ne,[2,66],{79:104,75:S,80:Y,81:H,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te}),{33:132,89:T,90:k},{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(w,[2,27]),{5:R,28:145,31:I,34:N,36:D,38:M,40:O},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(w,[2,46]),{5:ae,40:se,56:152,57:oe,59:le},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(w,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(w,[2,43]),{5:R,28:159,31:I,34:N,36:D,38:M,40:O},{5:R,28:160,31:I,34:N,36:D,38:M,40:O},{5:R,28:161,31:I,34:N,36:D,38:M,40:O},{5:R,28:162,31:I,34:N,36:D,38:M,40:O},{5:ae,40:se,56:163,57:oe,59:le},{5:ae,40:se,56:164,57:oe,59:le},e(w,[2,23]),e(w,[2,24]),e(w,[2,25]),e(w,[2,26]),e(w,[2,44]),e(w,[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:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",h=0,c=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,T,k,w,C,E,S={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===x||"u"<typeof x)&&(x=v()),o[T]&&o[T][x]))||!k.length||!k[0]){var _,A=[];for(w in o[T])this.terminals_[w]&&2<w&&A.push("'"+this.terminals_[w]+"'");_=g.showPosition?"Parse error on line "+(h+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(c=g.yyleng,l=g.yytext,h=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],S.$=a[a.length-C],S._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(E=this.performAction.apply(S,[l,c,h,f.yy,k[1],a,s].concat(p)))<"u")return E;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),E=o[i[i.length-2]][i[i.length-1]],i.push(E);break;case 3:return!0}}return!0},"parse")},P={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){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:case 14: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 t.yytext=t.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}}};t.lexer=P,mt(B,"Parser"),(BLe=new((B.prototype=t).Parser=B)).parser=BLe,PLe=BLe}),GLe=i(()=>{ju(),e(),Gu(),$Le=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=$c,this.getAccTitle=Fc,this.setAccDescription=zc,this.getAccDescription=qc,this.setDiagramTitle=Wc,this.getDiagramTitle=Uc,this.getConfig=mt(()=>P().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{mt(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){void 0!==this.latestRequirement&&(this.latestRequirement.requirementId=e)}setNewReqText(e){void 0!==this.latestRequirement&&(this.latestRequirement.text=e)}setNewReqRisk(e){void 0!==this.latestRequirement&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){void 0!==this.latestRequirement&&(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"]}),B.info("Added new element: ",e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){void 0!==this.latestElement&&(this.latestElement.type=e)}setNewElementDocRef(e){void 0!==this.latestElement&&(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,Pc()}setCssStyle(e,t){for(var r of e){var i,n=this.requirements.get(r)??this.elements.get(r);if(!t||!n)return;for(i of t)i.includes(",")?n.cssStyles.push(...i.split(",")):n.cssStyles.push(i)}}setClass(e,t){for(var r of e){var i=this.requirements.get(r)??this.elements.get(r);if(i)for(var n of t)i.classes.push(n),(n=this.classes.get(n)?.styles)&&i.cssStyles.push(...n)}}defineClass(e,i){for(let t of e){let r=this.classes.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},this.classes.set(t,r)),i&&i.forEach(function(e){var t;/color/.exec(e)&&(t=e.replace("fill","bgFill"),r.textStyles.push(t)),r.styles.push(e)}),this.requirements.forEach(e=>{e.classes.includes(t)&&e.cssStyles.push(...i.flatMap(e=>e.split(",")))}),this.elements.forEach(e=>{e.classes.includes(t)&&e.cssStyles.push(...i.flatMap(e=>e.split(",")))})}}getClasses(){return this.classes}getData(){var e,t,r,i=P(),n=[],a=[];for(e of this.requirements.values()){var s=e;s.id=e.name,s.cssStyles=e.cssStyles,s.cssClasses=e.classes.join(" "),s.shape="requirementBox",s.look=i.look,s.colorIndex=n.length,n.push(s)}for(t of this.elements.values()){var o=t;o.shape="requirementBox",o.look=i.look,o.id=t.name,o.cssStyles=t.cssStyles,o.cssClasses=t.classes.join(" "),o.colorIndex=n.length,n.push(o)}for(r of this.relations){var l=r.type===this.Relationships.CONTAINS,l={id:r.src+`-${r.dst}-0`,start:this.requirements.get(r.src)?.name??this.elements.get(r.src)?.name,end:this.requirements.get(r.dst)?.name??this.elements.get(r.dst)?.name,label:`&lt;&lt;${r.type}&gt;&gt;`,classes:"relationshipLine",style:["fill:none",l?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:l?"normal":"dashed",arrowTypeStart:l?"requirement_contains":"",arrowTypeEnd:l?"":"requirement_arrow",look:i.look,labelType:"markdown"};a.push(l)}return{nodes:n,edges:a,other:{},config:i,direction:this.getDirection()}}}}),jLe=i(()=>{Ei(),FLe=mt(t=>{var{themeVariables:e,look:r}=br(),{bkgColorArray:i,borderColorArray:n}=e;if(!n?.length)return"";let a="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)a+=`
[data-look="${r}"][data-color-id="color-${e}"].node path {
stroke: ${n[e]};
fill: ${i?.length?i[e]:""};
}
[data-look="${r}"][data-color-id="color-${e}"].node rect {
stroke: ${n[e]};
fill: ${i?.length?i[e]:""};
}
`;return a},"genColor"),zLe=mt(e=>{var{look:t,themeVariables:r}=br(),r=r.requirementEdgeLabelBackground;return`
${FLe(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: ${"neo"===t?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: ${r??e.edgeLabelBackground};
}
`},"getStyles"),qLe=zLe}),VLe={};sYe(VLe,{draw:()=>YLe});var YLe,HLe=i(()=>{ju(),e(),QO(),tde(),rde(),S7(),YLe=mt(async function(e,t,r,i){B.info("REF0:"),B.info("Drawing requirement diagram (unified)",t);var{securityLevel:n,state:a,layout:s,look:o}=P(),l=i.db.getData(),n=$O(t,n);l.type=i.type,l.layoutAlgorithm=Fue(s),l.nodeSpacing=a?.nodeSpacing??50,l.rankSpacing=a?.rankSpacing??50,l.markers="neo"===o?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],l.diagramId=t,await $ue(l,n),k7.insertTitle(n,"requirementDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),zue(n,8,"requirementDiagram",a?.useMaxWidth??!0)},"draw")}),XLe={};sYe(XLe,{diagram:()=>KLe});var KLe,ZLe,QLe,JLe,eRe,tRe,rRe,iRe,nRe,aRe,sRe,oRe,lRe,hRe,cRe,uRe,dRe,pRe,gRe,fRe,mRe,yRe,vRe,xRe,bRe,TRe,kRe,wRe,CRe,ERe,SRe,_Re,ARe,LRe,RRe,IRe,NRe,DRe,MRe,ORe,BRe,PRe,$Re,FRe,zRe,qRe,WRe,URe,GRe,jRe,VRe,YRe,HRe,XRe,KRe,ZRe,QRe=i(()=>{ULe(),GLe(),jLe(),HLe(),KLe={parser:PLe,get db(){return new $Le},renderer:VLe,styles:qLe}}),JRe=i(()=>{function B(){this.yy={}}var e=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),t=[1,2],P=[1,3],$=[1,4],r=[2,4],i=[1,9],n=[1,11],a=[1,12],s=[1,14],o=[1,15],l=[1,17],h=[1,18],c=[1,19],u=[1,25],d=[1,26],p=[1,27],g=[1,28],f=[1,29],m=[1,30],y=[1,31],v=[1,32],x=[1,33],b=[1,34],T=[1,35],k=[1,36],w=[1,37],C=[1,38],E=[1,39],S=[1,40],_=[1,42],A=[1,43],L=[1,44],R=[1,45],I=[1,46],N=[1,47],D=[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],F=[1,74],z=[1,80],q=[1,81],W=[1,82],U=[1,83],G=[1,84],j=[1,85],V=[1,86],Y=[1,87],H=[1,88],X=[1,89],K=[1,90],Z=[1,91],Q=[1,92],J=[1,93],ee=[1,94],te=[1,95],re=[1,96],ie=[1,97],ne=[1,98],ae=[1,99],se=[1,100],oe=[1,101],le=[1,102],he=[1,103],ce=[1,104],ue=[1,105],de=[2,78],pe=[4,5,17,51,53,54],ge=[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],fe=[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],me=[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],ye=[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],ve=[5,52],M=[70,71,72,73],O=[1,151],t={trace:mt(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:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 3:return i.apply(a[o]),a[o];case 4:case 10:this.$=[];break;case 5:case 11:a[o-1].push(a[o]),this.$=a[o-1];break;case 6:case 7:case 12:case 13:this.$=a[o];break;case 8:case 9:case 14:this.$=[];break;case 16:a[o].type="createParticipant",this.$=a[o];break;case 17:a[o-1].unshift({type:"boxStart",boxData:i.parseBoxData(a[o-2])}),a[o-1].push({type:"boxEnd",boxText:a[o-2]}),this.$=a[o-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-2]),sequenceIndexStep:Number(a[o-1]),sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:i.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:i.LINETYPE.ACTIVE_START,actor:a[o-1].actor};break;case 24:this.$={type:"activeEnd",signalType:i.LINETYPE.ACTIVE_END,actor:a[o-1].actor};break;case 30:i.setDiagramTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 31:i.setDiagramTitle(a[o].substring(7)),this.$=a[o].substring(7);break;case 32:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 33:case 34:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 35:a[o-1].unshift({type:"loopStart",loopText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:i.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 36:a[o-1].unshift({type:"rectStart",color:i.parseMessage(a[o-2]),signalType:i.LINETYPE.RECT_START}),a[o-1].push({type:"rectEnd",color:i.parseMessage(a[o-2]),signalType:i.LINETYPE.RECT_END}),this.$=a[o-1];break;case 37:a[o-1].unshift({type:"optStart",optText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.OPT_END}),this.$=a[o-1];break;case 38:a[o-1].unshift({type:"altStart",altText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.ALT_START}),a[o-1].push({type:"altEnd",signalType:i.LINETYPE.ALT_END}),this.$=a[o-1];break;case 39:a[o-1].unshift({type:"parStart",parText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.PAR_START}),a[o-1].push({type:"parEnd",signalType:i.LINETYPE.PAR_END}),this.$=a[o-1];break;case 40:a[o-1].unshift({type:"parStart",parText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.PAR_OVER_START}),a[o-1].push({type:"parEnd",signalType:i.LINETYPE.PAR_END}),this.$=a[o-1];break;case 41:a[o-1].unshift({type:"criticalStart",criticalText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.CRITICAL_START}),a[o-1].push({type:"criticalEnd",signalType:i.LINETYPE.CRITICAL_END}),this.$=a[o-1];break;case 42:a[o-1].unshift({type:"breakStart",breakText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.BREAK_START}),a[o-1].push({type:"breakEnd",optText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.BREAK_END}),this.$=a[o-1];break;case 44:this.$=a[o-3].concat([{type:"option",optionText:i.parseMessage(a[o-1]),signalType:i.LINETYPE.CRITICAL_OPTION},a[o]]);break;case 46:this.$=a[o-3].concat([{type:"and",parText:i.parseMessage(a[o-1]),signalType:i.LINETYPE.PAR_AND},a[o]]);break;case 48:this.$=a[o-3].concat([{type:"else",altText:i.parseMessage(a[o-1]),signalType:i.LINETYPE.ALT_ELSE},a[o]]);break;case 49:a[o-3].draw="participant",a[o-3].type="addParticipant",a[o-3].description=i.parseMessage(a[o-1]),this.$=a[o-3];break;case 50:a[o-1].draw="participant",a[o-1].type="addParticipant",this.$=a[o-1];break;case 51:a[o-3].draw="actor",a[o-3].type="addParticipant",a[o-3].description=i.parseMessage(a[o-1]),this.$=a[o-3];break;case 52:case 57:a[o-1].draw="actor",a[o-1].type="addParticipant",this.$=a[o-1];break;case 53:a[o-1].type="destroyParticipant",this.$=a[o-1];break;case 54:a[o-3].draw="participant",a[o-3].type="addParticipant",a[o-3].description=i.parseMessage(a[o-1]),this.$=a[o-3];break;case 55:a[o-1].draw="participant",a[o-1].type="addParticipant",this.$=a[o-1];break;case 56:a[o-3].draw="actor",a[o-3].type="addParticipant",a[o-3].description=i.parseMessage(a[o-1]),this.$=a[o-3];break;case 58:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 59:a[o-2]=[].concat(a[o-1],a[o-1]).slice(0,2),a[o-2][0]=a[o-2][0].actor,a[o-2][1]=a[o-2][1].actor,this.$=[a[o-1],{type:"addNote",placement:i.PLACEMENT.OVER,actor:a[o-2].slice(0,2),text:a[o]}];break;case 60:this.$=[a[o-1],{type:"addLinks",actor:a[o-1].actor,text:a[o]}];break;case 61:this.$=[a[o-1],{type:"addALink",actor:a[o-1].actor,text:a[o]}];break;case 62:this.$=[a[o-1],{type:"addProperties",actor:a[o-1].actor,text:a[o]}];break;case 63:this.$=[a[o-1],{type:"addDetails",actor:a[o-1].actor,text:a[o]}];break;case 66:this.$=[a[o-2],a[o]];break;case 67:this.$=a[o];break;case 68:this.$=i.PLACEMENT.LEFTOF;break;case 69:this.$=i.PLACEMENT.RIGHTOF;break;case 70:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o],activate:!0},{type:"activeStart",signalType:i.LINETYPE.ACTIVE_START,actor:a[o-1].actor}];break;case 71:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o]},{type:"activeEnd",signalType:i.LINETYPE.ACTIVE_END,actor:a[o-4].actor}];break;case 72:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o],activate:!0,centralConnection:i.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:i.LINETYPE.CENTRAL_CONNECTION,actor:a[o-1].actor}];break;case 73:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o],activate:!1,centralConnection:i.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:i.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[o-4].actor}];break;case 74:this.$=[a[o-5],a[o-1],{type:"addMessage",from:a[o-5].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o],activate:!0,centralConnection:i.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:i.LINETYPE.CENTRAL_CONNECTION,actor:a[o-1].actor},{type:"centralConnectionReverse",signalType:i.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[o-5].actor}];break;case 75:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 76:this.$={type:"addParticipant",actor:a[o-1],config:a[o]};break;case 77:this.$=a[o-1].trim();break;case 78:this.$={type:"addParticipant",actor:a[o]};break;case 79:this.$=i.LINETYPE.SOLID_OPEN;break;case 80:this.$=i.LINETYPE.DOTTED_OPEN;break;case 81:this.$=i.LINETYPE.SOLID;break;case 82:this.$=i.LINETYPE.SOLID_TOP;break;case 83:this.$=i.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=i.LINETYPE.STICK_TOP;break;case 85:this.$=i.LINETYPE.STICK_BOTTOM;break;case 86:this.$=i.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=i.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=i.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=i.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=i.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=i.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=i.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=i.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=i.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=i.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=i.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=i.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=i.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=i.LINETYPE.DOTTED;break;case 100:this.$=i.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=i.LINETYPE.SOLID_CROSS;break;case 102:this.$=i.LINETYPE.DOTTED_CROSS;break;case 103:this.$=i.LINETYPE.SOLID_POINT;break;case 104:this.$=i.LINETYPE.DOTTED_POINT;break;case 105:this.$=i.parseMessage(a[o].trim().substring(1))}},"anonymous"),table:[{3:1,4:t,5:P,6:$},{1:[3]},{3:5,4:t,5:P,6:$},{3:6,4:t,5:P,6:$},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],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:n,8:8,9:10,10:a,13:13,14:s,15:o,18:16,19:l,22:h,23:41,24:c,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:x,42:b,44:T,45:k,47:w,51:C,53:E,54:S,56:_,61:A,62:L,63:R,64:I,73:N},e(D,[2,5]),{9:48,13:13,14:s,15:o,18:16,19:l,22:h,23:41,24:c,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:x,42:b,44:T,45:k,47:w,51:C,53:E,54:S,56:_,61:A,62:L,63:R,64:I,73:N},e(D,[2,7]),e(D,[2,8]),e(D,[2,9]),e(D,[2,15]),{13:49,51:C,53:E,54:S},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:N},{23:56,73:N},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(D,[2,30]),e(D,[2,31]),{33:[1,62]},{35:[1,63]},e(D,[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:F},{23:75,55:76,73:F},{23:77,73:N},{69:78,72:[1,79],78:z,79:q,80:W,81:U,82:G,83:j,84:V,85:Y,86:H,87:X,88:K,89:Z,90:Q,91:J,92:ee,93:te,94:re,95:ie,96:ne,97:ae,98:se,99:oe,100:le,101:he,102:ce,103:ue},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:N},{23:111,73:N},{23:112,73:N},{23:113,73:N},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],de),e(D,[2,6]),e(D,[2,16]),e(pe,[2,10],{11:114}),e(D,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(D,[2,22]),{5:[1,118]},{5:[1,119]},e(D,[2,25]),e(D,[2,26]),e(D,[2,27]),e(D,[2,28]),e(D,[2,29]),e(D,[2,32]),e(D,[2,33]),e(ge,r,{7:120}),e(ge,r,{7:121}),e(ge,r,{7:122}),e(fe,r,{41:123,7:124}),e(me,r,{43:125,7:126}),e(me,r,{7:126,43:127}),e(ye,r,{46:128,7:129}),e(ge,r,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(ve,de,{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:N},{69:146,78:z,79:q,80:W,81:U,82:G,83:j,84:V,85:Y,86:H,87:X,88:K,89:Z,90:Q,91:J,92:ee,93:te,94:re,95:ie,96:ne,97:ae,98:se,99:oe,100:le,101:he,102:ce,103:ue},e(M,[2,79]),e(M,[2,80]),e(M,[2,81]),e(M,[2,82]),e(M,[2,83]),e(M,[2,84]),e(M,[2,85]),e(M,[2,86]),e(M,[2,87]),e(M,[2,88]),e(M,[2,89]),e(M,[2,90]),e(M,[2,91]),e(M,[2,92]),e(M,[2,93]),e(M,[2,94]),e(M,[2,95]),e(M,[2,96]),e(M,[2,97]),e(M,[2,98]),e(M,[2,99]),e(M,[2,100]),e(M,[2,101]),e(M,[2,102]),e(M,[2,103]),e(M,[2,104]),{23:147,73:N},{23:149,60:148,73:N},{73:[2,68]},{73:[2,69]},{58:150,104:O},{58:152,104:O},{58:153,104:O},{58:154,104:O},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:C,53:E,54:S},{5:[1,160]},e(D,[2,20]),e(D,[2,21]),e(D,[2,23]),e(D,[2,24]),{4:i,5:n,8:8,9:10,10:a,13:13,14:s,15:o,17:[1,161],18:16,19:l,22:h,23:41,24:c,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:x,42:b,44:T,45:k,47:w,51:C,53:E,54:S,56:_,61:A,62:L,63:R,64:I,73:N},{4:i,5:n,8:8,9:10,10:a,13:13,14:s,15:o,17:[1,162],18:16,19:l,22:h,23:41,24:c,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:x,42:b,44:T,45:k,47:w,51:C,53:E,54:S,56:_,61:A,62:L,63:R,64:I,73:N},{4:i,5:n,8:8,9:10,10:a,13:13,14:s,15:o,17:[1,163],18:16,19:l,22:h,23:41,24:c,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:x,42:b,44:T,45:k,47:w,51:C,53:E,54:S,56:_,61:A,62:L,63:R,64:I,73:N},{17:[1,164]},{4:i,5:n,8:8,9:10,10:a,13:13,14:s,15:o,17:[2,47],18:16,19:l,22:h,23:41,24:c,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:x,42:b,44:T,45:k,47:w,50:[1,165],51:C,53:E,54:S,56:_,61:A,62:L,63:R,64:I,73:N},{17:[1,166]},{4:i,5:n,8:8,9:10,10:a,13:13,14:s,15:o,17:[2,45],18:16,19:l,22:h,23:41,24:c,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:x,42:b,44:T,45:k,47:w,49:[1,167],51:C,53:E,54:S,56:_,61:A,62:L,63:R,64:I,73:N},{17:[1,168]},{17:[1,169]},{4:i,5:n,8:8,9:10,10:a,13:13,14:s,15:o,17:[2,43],18:16,19:l,22:h,23:41,24:c,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:x,42:b,44:T,45:k,47:w,48:[1,170],51:C,53:E,54:S,56:_,61:A,62:L,63:R,64:I,73:N},{4:i,5:n,8:8,9:10,10:a,13:13,14:s,15:o,17:[1,171],18:16,19:l,22:h,23:41,24:c,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:x,42:b,44:T,45:k,47:w,51:C,53:E,54:S,56:_,61:A,62:L,63:R,64:I,73:N},{16:[1,172]},e(D,[2,50]),{16:[1,173]},e(D,[2,55]),e(ve,[2,76]),{76:[1,174]},{16:[1,175]},e(D,[2,52]),{16:[1,176]},e(D,[2,57]),e(D,[2,53]),{23:177,73:N},{23:178,73:N},{23:179,73:N},{58:180,104:O},{23:181,72:[1,182],73:N},{58:183,104:O},{58:184,104:O},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(D,[2,17]),e(pe,[2,11]),{13:186,51:C,53:E,54:S},e(pe,[2,13]),e(pe,[2,14]),e(D,[2,19]),e(D,[2,35]),e(D,[2,36]),e(D,[2,37]),e(D,[2,38]),{16:[1,187]},e(D,[2,39]),{16:[1,188]},e(D,[2,40]),e(D,[2,41]),{16:[1,189]},e(D,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:O},{58:196,104:O},{58:197,104:O},{5:[2,75]},{58:198,104:O},{23:199,73:N},{5:[2,58]},{5:[2,59]},{23:200,73:N},e(pe,[2,12]),e(fe,r,{7:124,41:201}),e(me,r,{7:126,43:202}),e(ye,r,{7:129,46:203}),e(D,[2,49]),e(D,[2,54]),e(ve,[2,77]),e(D,[2,51]),e(D,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:O},{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:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",h=0,c=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,T,k,w,C,E,S={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===x||"u"<typeof x)&&(x=v()),o[T]&&o[T][x]))||!k.length||!k[0]){var _,A=[];for(w in o[T])this.terminals_[w]&&2<w&&A.push("'"+this.terminals_[w]+"'");_=g.showPosition?"Parse error on line "+(h+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(c=g.yyleng,l=g.yytext,h=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],S.$=a[a.length-C],S._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(E=this.performAction.apply(S,[l,c,h,f.yy,k[1],a,s].concat(p)))<"u")return E;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),E=o[i[i.length-2]][i[i.length-1]],i.push(E);break;case 3:return!0}}return!0},"parse")},P={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){case 0:return 5;case 1:case 2:case 3:case 4: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 t.yytext=t.yytext.trim(),73;case 12:return t.yytext=t.yytext.trim(),this.begin("ALIAS"),73;case 13:return t.yytext=t.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return t.yytext=t.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 t.yytext=t.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: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]+(?=[ \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}}};t.lexer=P,mt(B,"Parser"),(ZLe=new((B.prototype=t).Parser=B)).parser=ZLe,QLe=ZLe}),eIe=i(()=>{ju(),lL(),e(),BSe(),ic(),Gu(),JLe={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},eRe={FILLED:0,OPEN:1},tRe={LEFTOF:0,RIGHTOF:1,OVER:2},rRe={ACTOR:"actor",BOUNDARY:"boundary",COLLECTIONS:"collections",CONTROL:"control",DATABASE:"database",ENTITY:"entity",PARTICIPANT:"participant",QUEUE:"queue"},iRe=class{constructor(){this.state=new DSe(()=>({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=$c,this.setAccDescription=zc,this.setDiagramTitle=Wc,this.getAccTitle=Fc,this.getAccDescription=qc,this.getDiagramTitle=Uc,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(P().wrap),this.LINETYPE=JLe,this.ARROWTYPE=eRe,this.PLACEMENT=tRe}static{mt(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,o;if(void 0!==n&&(o=n.includes(`
`)?n+`
`:`{
`+n+`
}`,s=oL(o,{schema:sL})),i=s?.type??i,!s?.alias||r&&r.text!==t||(r={text:s.alias,wrap:r?.wrap,type:i}),n=this.state.records.actors.get(e)){if(this.state.records.currentBox&&n.box&&this.state.records.currentBox!==n.box)throw new Error(`A same participant should only be defined in one Box: ${n.name} can't be in '${n.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(a=n.box||this.state.records.currentBox,n.box=a,n&&t===n.name&&null==r)return}null==r?.text&&(r={text:t,type:i}),null!=i&&null!=r.text||(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&&(n=this.state.records.actors.get(this.state.records.prevActor))&&(n.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<this.state.records.messages.length;t++)this.state.records.messages[t].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[t].from===e&&r++,this.state.records.messages[t].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[t].from===e&&r--;return r}addMessage(e,t,r,i){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:r.text,wrap:r.wrap??this.autoWrap(),answer:i})}addSignal(e,t,r,i,n=!1,a){var s;if(i===this.LINETYPE.ACTIVE_END&&this.activationCount(e??"")<1)throw(s=new Error("Trying to inactivate an inactive participant ("+e+")")).hash={text:"->>-",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 0<this.state.records.boxes.length}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(void 0===e)return{};e=e.trim();var t=null!==/^:?wrap:/.exec(e)||null===/^:?nowrap:/.exec(e)&&void 0;return{cleanedText:(void 0===t?e:e.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:t}}autoWrap(){return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:P().sequence?.wrap??!1}clear(){this.state.reset(),Pc()}parseMessage(e){var e=e.trim(),{wrap:e,cleanedText:t}=this.extractWrap(e),t={text:t,wrap:e};return B.debug("parseMessage: "+JSON.stringify(t)),t}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;window?.CSS?window.CSS.supports("color",r)||(r="transparent",i=e.trim()):((n=(new Option).style).color=r,n.color!==r&&(r="transparent",i=e.trim()));var{wrap:n,cleanedText:e}=this.extractWrap(i);return{text:e?Ih(e,P()):void 0,color:r,wrap:n}}addNote(e,t,r){var i={actor:e,placement:t,message:r.text,wrap:r.wrap??this.autoWrap()},e=[].concat(e,e);this.state.records.notes.push(i),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e[0],to:e[1],message:r.text,wrap:r.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:t})}addLinks(t,r){t=this.getActor(t);try{let e=Ih(r.text,P());e=(e=e.replace(/&equals;/g,"=")).replace(/&amp;/g,"&");var i=JSON.parse(e);this.insertLinks(t,i)}catch(e){B.error("error while parsing actor link text",e)}}addALink(a,s){a=this.getActor(a);try{let e={},t=Ih(s.text,P()),r=t.indexOf("@"),i=(t=(t=t.replace(/&equals;/g,"=")).replace(/&amp;/g,"&")).slice(0,r-1).trim(),n=t.slice(r+1).trim();e[i]=n,this.insertLinks(a,e)}catch(e){B.error("error while parsing actor link text",e)}}insertLinks(e,t){if(null==e.links)e.links=t;else for(var r in t)e.links[r]=t[r]}addProperties(e,t){e=this.getActor(e);try{var r=Ih(t.text,P()),i=JSON.parse(r);this.insertProperties(e,i)}catch(e){B.error("error while parsing actor properties text",e)}}insertProperties(e,t){if(null==e.properties)e.properties=t;else for(var r in t)e.properties[r]=t[r]}boxEnd(){this.state.records.currentBox=void 0}addDetails(e,t){e=this.getActor(e),t=document.getElementById(t.text);try{var r=t.innerHTML,i=JSON.parse(r);i.properties&&this.insertProperties(e,i.properties),i.links&&this.insertLinks(e,i.links)}catch(e){B.error("error while parsing actor details text",e)}}getActorProperty(e,t){if(void 0!==e?.properties)return e.properties[t]}apply(e){if(Array.isArray(e))e.forEach(e=>{this.apply(e)});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":case"centralConnection":case"centralConnectionReverse":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":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":$c(e.text);break;case"parStart":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)}}getConfig(){return P().sequence}}}),tIe=i(()=>{ju(),nRe=mt(e=>{var t=e.dropShadow??"none",r=P().look;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: ${"neo"===r?t:"none"};
}
.labelText, .labelText > tspan {
fill: ${e.labelTextColor};
stroke: none;
}
.loopText, .loopText > tspan {
fill: ${e.loopTextColor};
stroke: none;
}
.loopLine {
stroke-width: 2px;
stroke-dasharray: 2, 2;
stroke: ${e.labelBoxBorderColor};
fill: ${e.labelBoxBorderColor};
}
.note {
//stroke: #decc93;
stroke: ${e.noteBorderColor};
fill: ${e.noteBkgColor};
}
.noteText, .noteText > tspan {
fill: ${e.noteTextColor};
stroke: none;
${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"),aRe=nRe}),rIe=i(()=>{function t(e,t,r,i,n,a,s){g(t.append("text").attr("x",r).attr("y",i).style("text-anchor","start").text(e),s)}function l(e,t,r,i,n,a,s,o){var{actorFontSize:l,actorFontFamily:h,actorFontWeight:c}=o,u=e.split(I.lineBreakRegex);for(let e=0;e<u.length;e++){var d=e*l-l*(u.length-1)/2,p=t.append("text").attr("x",r).attr("y",i).style("text-anchor","start").style("font-size",l).style("font-weight",c).style("font-family",h);p.append("tspan").attr("x",r).attr("dy",d).text(u[e]),p.attr("y",i+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(p,s)}}function r(e,t,r,i,n,a,s,o){(n=(t=t.append("switch")).append("foreignObject").attr("x",r).attr("y",i).attr("width",n).attr("height",a).append("xhtml:div").style("display","table").style("height","100%").style("width","100%")).append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(e),l(e,t,r,i,0,a,s,o),g(n,s)}function g(e,t){for(var r in t)t.hasOwnProperty(r)&&e.attr(r,t[r])}function i(e,t,r,i,n,a,s){f(t.append("text").attr("x",r+n/2).attr("y",i+a/2+5).style("text-anchor","middle").text(e),s)}function h(e,t,r,i,n,a,s,o){var{actorFontSize:o,actorFontFamily:l,actorFontWeight:h}=o,[c,u]=T7(o),d=e.split(I.lineBreakRegex);for(let e=0;e<d.length;e++){var p=e*c-c*(d.length-1)/2,g=t.append("text").attr("x",r+n/2).attr("y",i).style("text-anchor","middle").style("font-size",u).style("font-weight",h).style("font-family",l);g.append("tspan").attr("x",r+n/2).attr("dy",p).text(d[e]),g.attr("y",i+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),f(g,s)}}function n(e,t,r,i,n,a,s,o){var l=(t=t.append("switch")).append("foreignObject").attr("x",r).attr("y",i).attr("width",n).attr("height",a).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(e),h(e,t,r,i,n,a,s,o),f(l,s)}async function a(e,t,r,i,n,a,s,o){var l=await Yh(e,br());(l=(t=t.append("switch")).append("foreignObject").attr("x",r+n/2-l.width/2).attr("y",i+a/2-l.height/2).attr("width",l.width).attr("height",l.height).append("xhtml:div").style("height","100%").style("width","100%")).append("div").style("text-align","center").style("vertical-align","middle").html(await Xh(e,br())),h(e,t,r,i,n,a,s,o),f(l,s)}function f(e,t){for(var r in t)t.hasOwnProperty(r)&&e.attr(r,t[r])}sRe=U(Ak(),1),Ei(),S7(),ic(),Lk(),oRe=36,lRe="actor-top",hRe="actor-bottom",cRe="actor-box",uRe="actor-man",dRe=new Set(["redux-color","redux-dark-color"]),pRe=mt(function(e,t){return e=VT(e,t),"neo"===br().look&&e.attr("data-look","neo"),e},"drawRect"),gRe=mt(function(e,t,r,i,n){if(null==t.links||0===Object.keys(t.links).length)return{height:0,width:0};var a=t.links,s=t.actorCnt,o=t.rectData,t="none",l=(n&&(t="block !important"),e.append("g")),n=(l.attr("id","actor"+s+"_popup"),l.attr("class","actorPopupMenu"),l.attr("display",t),""),h=(void 0!==o.class&&(n=" "+o.class),o.width>r?o.width:r);if((e=l.append("rect")).attr("class","actorPopupMenuPanel"+n),e.attr("x",o.x),e.attr("y",o.height),e.attr("fill",o.fill),e.attr("stroke",o.stroke),e.attr("width",h),e.attr("height",o.height),e.attr("rx",o.rx),e.attr("ry",o.ry),null!=a){var c,u=20;for(c in a){var d=l.append("a"),p=(0,sRe.sanitizeUrl)(a[c]);d.attr("xlink:href",p),d.attr("target","_blank"),VRe(i)(c,d,o.x+10,o.height+u,h,20,{class:"actor"},i),u+=30}}return e.attr("height",u),{height:o.height+u,width:h}},"drawPopup"),fRe=mt(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),mRe=mt(async function(i,n,a=null){var s=i.append("foreignObject"),o=await Xh(n.text,br()),o=s.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(o).node().getBoundingClientRect();if(s.attr("height",Math.round(o.height)).attr("width",Math.round(o.width)),"noteText"===n.class)(i=i.node().firstChild).setAttribute("height",o.height+2*n.textMargin),i=i.getBBox(),s.attr("x",Math.round(i.x+i.width/2-o.width/2)).attr("y",Math.round(i.y+i.height/2-o.height/2));else if(a){let{startx:e,stopx:t,starty:r}=a;e>t&&(i=e,e=t,t=i),s.attr("x",Math.round(e+Math.abs(e-t)/2-o.width/2)),"loopText"===n.class?s.attr("y",Math.round(r)):s.attr("y",Math.round(r-o.height))}return[s]},"drawKatex"),yRe=mt(function(e,t){let r=0,i=0,n=t.text.split(I.lineBreakRegex),[a,s]=T7(t.fontSize),o=[],l=0,h=mt(()=>t.y,"yfunc");if(void 0!==t.valign&&void 0!==t.textMargin&&0<t.textMargin)switch(t.valign){case"top":case"start":h=mt(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":h=mt(()=>Math.round(t.y+(r+i+t.textMargin)/2),"yfunc");break;case"bottom":case"end":h=mt(()=>Math.round(t.y+(r+i+2*t.textMargin)-t.textMargin),"yfunc")}if(void 0!==t.anchor&&void 0!==t.textMargin&&void 0!==t.width)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"}for(var[c,u]of n.entries()){void 0!==t.textMargin&&0===t.textMargin&&void 0!==a&&(l=c*a),(c=e.append("text")).attr("x",t.x),c.attr("y",h()),void 0!==t.anchor&&c.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),void 0!==t.fontFamily&&c.style("font-family",t.fontFamily),void 0!==s&&c.style("font-size",s),void 0!==t.fontWeight&&c.style("font-weight",t.fontWeight),void 0!==t.fill&&c.attr("fill",t.fill),void 0!==t.class&&c.attr("class",t.class),void 0!==t.dy?c.attr("dy",t.dy):0!==l&&c.attr("dy",l);var d,u=u||Q_;(t.tspan?((d=c.append("tspan")).attr("x",t.x),void 0!==t.fill&&d.attr("fill",t.fill),d):c).text(u),void 0!==t.valign&&void 0!==t.textMargin&&0<t.textMargin&&(i+=(c._groups||c)[0][0].getBBox().height,r=i),o.push(c)}return o},"drawText"),vRe=mt(function(e,t){function r(e,t,r,i,n){return e+","+t+" "+(e+r)+","+t+" "+(e+r)+","+(t+i-n)+" "+(e+r-1.2*n)+","+(t+i)+" "+e+","+(t+i)}mt(r,"genPoints");var 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,yRe(e,t),i},"drawLabel"),xRe=-1,bRe=mt((r,i,e,n)=>{r.select&&e.forEach(e=>{var e=i.get(e),t=r.select("#actor"+e.actorCnt);!n.mirrorActors&&e.stopy?t.attr("y2",e.stopy+e.height/2):n.mirrorActors&&t.attr("y2",e.stopy)})},"fixLifeLineHeights"),TRe=mt(function(e,t,r,i,n){var a=i?t.stopy:t.starty,s=t.x+t.width/2,o=a+t.height,{look:l,theme:h,themeVariables:c}=r,{bkgColorArray:c,borderColorArray:u}=c,d=e=e.append("g").lower(),o=(i||(xRe++,Object.keys(t.links||{}).length&&!r.forceMenus&&d.attr("onclick",fRe(`actor${xRe}_popup`)).attr("cursor","pointer"),d.append("line").attr("id","actor"+xRe).attr("x1",s).attr("y1",o).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),d=e.append("g"),t.actorCnt=xRe,null!=t.links&&d.attr("id","root-"+xRe),"neo"===l&&d.attr("data-look","neo")),ZT()),s="actor",e=(t.properties?.class?s=t.properties.class:o.fill="#eaeaea",s+=i?" "+hRe:" "+lRe,o.x=t.x,o.y=a,o.width=t.width,o.height=t.height,o.class=s,o.rx=3,o.ry=3,o.name=t.name,"neo"===l&&(o.rx=6,o.ry=6),pRe(d,o)),a=n.get(t.name)??0;dRe.has(h)&&(e.style("stroke",u[a%u.length]),e.style("fill",c[a%u.length])),"neo"===l&&e.attr("filter","url(#drop-shadow)"),t.rectData=o,t.properties?.icon&&("@"===(s=t.properties.icon.trim()).charAt(0)?KT(d,o.x+o.width-20,o.y+10,s.substr(1)):XT(d,o.x+o.width-20,o.y+10,s)),i||(d.attr("data-et","participant"),d.attr("data-type","participant"),d.attr("data-id",t.name)),jRe(r,Vh(t.description))(t.description,d,o.x,o.y,o.width,o.height,{class:"actor "+cRe},r);let p=t.height;return e.node&&(n=e.node().getBBox(),t.height=n.height,p=n.height),p},"drawActorTypeParticipant"),kRe=mt(function(e,t,r,i,n){var a=i?t.stopy:t.starty,s=t.x+t.width/2,o=a+t.height,{look:l,theme:h,themeVariables:c}=r,{bkgColorArray:c,borderColorArray:u}=c,d=e=e.append("g").lower(),o=(i||(xRe++,Object.keys(t.links||{}).length&&!r.forceMenus&&d.attr("onclick",fRe(`actor${xRe}_popup`)).attr("cursor","pointer"),d.append("line").attr("id","actor"+xRe).attr("x1",s).attr("y1",o).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),d=e.append("g"),t.actorCnt=xRe,null!=t.links&&d.attr("id","root-"+xRe),"neo"===l&&d.attr("data-look","neo")),ZT()),s="actor",e=(t.properties?.class?s=t.properties.class:o.fill="#eaeaea",s+=i?" "+hRe:" "+lRe,o.x=t.x,o.y=a,o.width=t.width,o.height=t.height,o.class=s,o.name=t.name,{...o,x:o.x+-6,y:o.y+6,class:"actor"}),a=pRe(d,o),s=pRe(d,e),e=(t.rectData=o,"neo"===l&&d.attr("filter","url(#drop-shadow)"),n.get(t.name)??0);dRe.has(h)&&(a.style("stroke",u[e%u.length]),a.style("fill",c[e%u.length]),s.style("stroke",u[e%u.length]),s.style("fill",c[e%u.length])),t.properties?.icon&&("@"===(l=t.properties.icon.trim()).charAt(0)?KT(d,o.x+o.width-20,o.y+10,l.substr(1)):XT(d,o.x+o.width-20,o.y+10,l)),jRe(r,Vh(t.description))(t.description,d,o.x-6,o.y+6,o.width,o.height,{class:"actor "+cRe},r);let p=t.height;return a.node&&(n=a.node().getBBox(),t.height=n.height,p=n.height),i||(d.attr("data-et","participant"),d.attr("data-type","collections"),d.attr("data-id",t.name)),p},"drawActorTypeCollections"),wRe=mt(function(e,t,r,i,n){let a=i?t.stopy:t.starty,s=t.x+t.width/2,o=a+t.height,{look:l,theme:h,themeVariables:c}=r,{bkgColorArray:u,borderColorArray:d}=c,p=e.append("g").lower(),g=p,f=(i||(xRe++,Object.keys(t.links||{}).length&&!r.forceMenus&&g.attr("onclick",fRe(`actor${xRe}_popup`)).attr("cursor","pointer"),g.append("line").attr("id","actor"+xRe).attr("x1",s).attr("y1",o).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),g=p.append("g"),t.actorCnt=xRe,null!=t.links&&g.attr("id","root-"+xRe),"neo"===l&&g.attr("data-look","neo")),ZT()),m="actor";t.properties?.class?m=t.properties.class:f.fill="#eaeaea",m+=i?" "+hRe:" "+lRe,g.attr("class",m),f.x=t.x,f.y=a,f.width=t.width,f.height=t.height,f.name=t.name;var y=(e=f.height/2)/(2.5+f.height/50),v=g.append("g"),x=g.append("g"),b=`M ${f.x},${f.y+e}
a ${y},${e} 0 0 0 0,${f.height}
h ${f.width-2*y}
a ${y},${e} 0 0 0 0,-${f.height}
Z
`,b=(v.append("path").attr("d",b),x.append("path").attr("d",`M ${f.x},${f.y+e}
a ${y},${e} 0 0 0 0,`+f.height),v.attr("transform",`translate(${y}, ${-f.height/2})`),x.attr("transform",`translate(${f.width-y}, ${-f.height/2})`),t.rectData=f,"neo"===l&&v.attr("filter","url(#drop-shadow)"),n.get(t.name)??0);dRe.has(h)&&(v.style("stroke",d[b%d.length]),v.style("fill",u[b%d.length]),x.style("stroke",d[b%d.length]),x.style("fill",u[b%d.length])),t.properties?.icon&&(e=t.properties.icon.trim(),y=f.x+f.width-20,n=f.y+10,"@"===e.charAt(0)?KT(g,y,n,e.substr(1)):XT(g,y,n,e)),jRe(r,Vh(t.description))(t.description,g,f.x,f.y,f.width,f.height,{class:"actor "+cRe},r);let T=t.height,k=v.select("path:last-child");return k.node()&&(x=k.node().getBBox(),t.height=x.height,T=x.height),i||(g.attr("data-et","participant"),g.attr("data-type","queue"),g.attr("data-id",t.name)),T},"drawActorTypeQueue"),CRe=mt(function(e,t,r,i,n,a){var s=i?t.stopy:t.starty,o=t.x+t.width/2,l=s+75,{look:h,theme:c,themeVariables:u}=r,{bkgColorArray:u,borderColorArray:d,actorBorder:p,actorBkg:g}=u,f=e.append("g").lower(),m=(i||(xRe++,f.append("line").attr("id","actor"+xRe).attr("x1",o).attr("y1",l).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=xRe),e.append("g")),y=uRe;return m.attr("class",y+=i?" "+hRe:" "+lRe),m.attr("name",t.name),(f=ZT()).x=t.x,f.y=s,f.fill="#eaeaea",f.width=t.width,f.height=t.height,f.class="actor",l=t.x+t.width/2,o=s+32,m.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"),m.append("circle").attr("cx",l).attr("cy",o).attr("r",22).attr("filter","neo"===h?"url(#drop-shadow)":""),m.append("line").attr("marker-end","url(#"+n+"-filled-head-control)").attr("transform",`translate(${l}, ${o-22})`),e=a.get(t.name)??0,dRe.has(c)?(m.style("stroke",d[e%d.length]),m.style("fill",u[e%d.length])):(m.style("stroke",p),m.style("fill",g)),s=m.node().getBBox(),t.height=s.height+2*(r?.sequence?.labelBoxHeight??0),jRe(r,Vh(t.description))(t.description,m,f.x,f.y+22+(i?5:12),f.width,f.height,{class:"actor "+uRe},r),i||(m.attr("data-et","participant"),m.attr("data-type","control"),m.attr("data-id",t.name)),t.height},"drawActorTypeControl"),ERe=mt(function(e,t,r,i,n){var a=i?t.stopy:t.starty,s=t.x+t.width/2,o=a+75,{look:l,theme:h,themeVariables:c}=r,{bkgColorArray:c,borderColorArray:u}=c,d=e.append("g").lower(),p=e.append("g"),g="actor";return p.attr("class",g+=i?" "+hRe:" "+lRe),p.attr("name",t.name),(e=ZT()).x=t.x,e.y=a,e.fill="#eaeaea",e.width=t.width,e.height=t.height,e.class="actor",g=t.x+t.width/2,a+=i?10:25,p.append("circle").attr("cx",g).attr("cy",a).attr("r",22).attr("width",t.width).attr("height",t.height),p.append("line").attr("x1",g-22).attr("x2",g+22).attr("y1",a+22).attr("y2",a+22).attr("stroke-width",2),"neo"===l&&p.attr("filter","url(#drop-shadow)"),g=n.get(t.name)??0,dRe.has(h)&&(p.style("stroke",u[g%u.length]),p.style("fill",c[g%u.length])),a=p.node().getBBox(),t.height=a.height+(r?.sequence?.labelBoxHeight??0),i||(xRe++,d.append("line").attr("id","actor"+xRe).attr("x1",s).attr("y1",o).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=xRe),jRe(r,Vh(t.description))(t.description,p,e.x,e.y+(i?15:30),e.width,e.height,{class:"actor "+uRe},r),i?p.attr("transform","translate(0, 22)"):(p.attr("transform","translate(0, 6)"),p.attr("data-et","participant"),p.attr("data-type","entity"),p.attr("data-id",t.name)),t.height},"drawActorTypeEntity"),SRe=mt(function(e,t,r,i,n){let a=i?t.stopy:t.starty,s=t.x+t.width/2,o=a+t.height+2*r.boxTextMargin,{theme:l,themeVariables:h,look:c}=r,{bkgColorArray:u,borderColorArray:d,actorBorder:p}=h,g=e.append("g").lower(),f=g,m=(i||(xRe++,Object.keys(t.links||{}).length&&!r.forceMenus&&f.attr("onclick",fRe(`actor${xRe}_popup`)).attr("cursor","pointer"),f.append("line").attr("id","actor"+xRe).attr("x1",s).attr("y1",o).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),f=g.append("g"),t.actorCnt=xRe,null!=t.links&&f.attr("id","root-"+xRe),"neo"===c&&f.attr("data-look","neo")),ZT()),y="actor";t.properties?.class?y=t.properties.class:m.fill="#eaeaea",y+=i?" "+hRe:" "+lRe,m.x=t.x,m.y=a,m.width=t.width,m.height=t.height,m.class=y,m.name=t.name,m.x=t.x,m.y=a;var e=m.width/3,v=m.width/3,x=(T=e/2)/(2.5+e/50),b=f.append("g"),T=(b.attr("class",y),`
M ${m.x},${m.y+x}
a ${T},${x} 0 0 0 ${e},0
a ${T},${x} 0 0 0 -${e},0
l 0,${v-2*x}
a ${T},${x} 0 0 0 ${e},0
l 0,-${v-2*x}
`),v=(b.append("path").attr("d",T),"neo"===c&&b.attr("filter","url(#drop-shadow)"),n.get(t.name)??0);return dRe.has(l)?(b.style("stroke",d[v%d.length]),b.style("fill",u[v%d.length])):b.style("stroke",p),b.attr("transform",`translate(${e}, ${x})`),t.rectData=m,jRe(r,Vh(t.description))(t.description,f,m.x,m.y+35,m.width,m.height,{class:"actor "+cRe},r),(T=b.select("path:last-child")).node()&&(n=T.node().getBBox(),t.height=n.height+(r.sequence.labelBoxHeight??0)),i||(f.attr("data-et","participant"),f.attr("data-type","database"),f.attr("data-id",t.name)),t.height},"drawActorTypeDatabase"),_Re=mt(function(e,t,r,i,n){var a=i?t.stopy:t.starty,s=t.x+t.width/2,o=a+80,l=e.append("g").lower(),{look:h,theme:c,themeVariables:u}=r,{bkgColorArray:u,borderColorArray:d,actorBorder:p}=u,e=(i||(xRe++,l.append("line").attr("id","actor"+xRe).attr("x1",s).attr("y1",o).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=xRe),e.append("g")),g=uRe;return e.attr("class",g+=i?" "+hRe:" "+lRe),e.attr("name",t.name),(l=ZT()).x=t.x,l.y=a,l.fill="#eaeaea",l.width=t.width,l.height=t.height,l.class="actor",e.append("line").attr("id","actor-man-torso"+xRe).attr("x1",t.x+t.width/2-55).attr("y1",a+12).attr("x2",t.x+t.width/2-15).attr("y2",a+12),e.append("line").attr("id","actor-man-arms"+xRe).attr("x1",t.x+t.width/2-55).attr("y1",a+2).attr("x2",t.x+t.width/2-55).attr("y2",a+22),e.append("circle").attr("cx",t.x+t.width/2).attr("cy",a+12).attr("r",22),"neo"===h&&e.attr("filter","url(#drop-shadow)"),o=n.get(t.name)??0,dRe.has(c)?(e.style("stroke",d[o%d.length]),e.style("fill",u[o%d.length])):e.style("stroke",p),s=e.node().getBBox(),t.height=s.height+(r.sequence.labelBoxHeight??0),jRe(r,Vh(t.description))(t.description,e,l.x,l.y+15,l.width,l.height,{class:"actor "+uRe},r),e.attr("transform","translate(0,21)"),i||(e.attr("data-et","participant"),e.attr("data-type","boundary"),e.attr("data-id",t.name)),t.height},"drawActorTypeBoundary"),ARe=mt(function(e,t,r,i,n){var a=i?t.stopy:t.starty,s=t.x+t.width/2,o=a+80,{look:l,theme:h,themeVariables:c}=r,{bkgColorArray:c,borderColorArray:u,actorBorder:d}=c,p=e.append("g").lower(),g=(i||(xRe++,p.append("line").attr("id","actor"+xRe).attr("x1",s).attr("y1",o).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=xRe),e.append("g")),f=uRe;return g.attr("class",f+=i?" "+hRe:" "+lRe),g.attr("name",t.name),i||g.attr("data-et","participant").attr("data-type","actor").attr("data-id",t.name),p="neo"===l?.5:1,o="neo"===l?a+30*(1-p):a,g.append("line").attr("id","actor-man-torso"+xRe).attr("x1",s).attr("y1",o+25*p).attr("x2",s).attr("y2",o+45*p),g.append("line").attr("id","actor-man-arms"+xRe).attr("x1",s-oRe/2*p).attr("y1",o+33*p).attr("x2",s+oRe/2*p).attr("y2",o+33*p),g.append("line").attr("x1",s-oRe/2*p).attr("y1",o+60*p).attr("x2",s).attr("y2",o+45*p),g.append("line").attr("x1",s).attr("y1",o+45*p).attr("x2",s+(oRe/2-2)*p).attr("y2",o+60*p),(e=g.append("circle")).attr("cx",t.x+t.width/2),e.attr("cy",o+10*p),e.attr("r",15*p),e.attr("width",t.width*p),e.attr("height",t.height*p),i=g.node().getBBox(),t.height=i.height,(a=ZT()).x=t.x,a.y=o,a.fill="#eaeaea",a.width=t.width,a.height=t.height/p,a.class="actor",a.rx=3,a.ry=3,s=n.get(t.name)??0,dRe.has(h)?(g.style("stroke",u[s%u.length]),g.style("fill",c[s%u.length])):g.style("stroke",d),jRe(r,Vh(t.description))(t.description,g,a.x,o+35*p-("neo"===l?10:0),a.width,a.height,{class:"actor "+uRe},r),t.height},"drawActorTypeActor"),LRe=mt(async function(e,t,r,i,n,a,s){var o=s??new Map([...a.db.getActors().values()].map((e,t)=>[e.name,t]));switch(t.type){case"actor":return ARe(e,t,r,i,o);case"participant":return TRe(e,t,r,i,o);case"boundary":return _Re(e,t,r,i,o);case"control":return CRe(e,t,r,i,n,o);case"entity":return ERe(e,t,r,i,o);case"database":return SRe(e,t,r,i,o);case"collections":return kRe(e,t,r,i,o);case"queue":return wRe(e,t,r,i,o)}},"drawActor"),RRe=mt(function(e,t,r){e=e.append("g"),MRe(e,t),t.name&&jRe(r)(t.name,e,t.x,t.y+r.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},r),e.lower()},"drawBox"),IRe=mt(function(e){return e.append("g")},"anchorElement"),NRe=mt(function(e,t,r,i,n,a,s){var{theme:i,themeVariables:o}=i,{bkgColorArray:o,borderColorArray:l,mainBkg:h}=o,c=ZT(),u=t.anchored,d=t.actor,n=(c.x=t.startx,c.y=t.starty,c.class="activation"+n%3,c.width=t.stopx-t.startx,c.height=r-t.starty,pRe(u,c)),r=(s??new Map([...a.db.getActors().values()].map((e,t)=>[e.name,t]))).get(d)??0;dRe.has(i)&&(n.style("stroke",l[r%l.length]),n.style("fill",o[r%l.length]??h))},"drawActivation"),DRe=mt(async function(e,t,r,i,n){let{boxMargin:a,boxTextMargin:s,labelBoxHeight:o,labelBoxWidth:l,messageFontFamily:h,messageFontSize:c,messageFontWeight:u}=i,d=e.append("g").attr("data-et","control-structure").attr("data-id","i"+n.id),p=mt(function(e,t,r,i){return d.append("line").attr("x1",e).attr("y1",t).attr("x2",r).attr("y2",i).attr("class","loopLine")},"drawLoopLine"),g=(p(t.startx,t.starty,t.stopx,t.starty),p(t.stopx,t.starty,t.stopx,t.stopy),p(t.startx,t.stopy,t.stopx,t.stopy),p(t.startx,t.starty,t.startx,t.stopy),void 0!==t.sections&&t.sections.forEach(function(e){p(t.startx,e.y,t.stopx,e.y).style("stroke-dasharray","3, 3")}),QT());g.text=r,g.x=t.startx,g.y=t.starty,g.fontFamily=h,g.fontSize=c,g.fontWeight=u,g.anchor="middle",g.valign="middle",g.tspan=!1,g.width=Math.max(l??0,50),g.height=o+("neo"===i.look?15:0)||20,g.textMargin=s,g.class="labelText",vRe(d,g),(g=URe()).text=t.title,g.x=t.startx+l/2+(t.stopx-t.startx)/2,g.y=t.starty+a+s,g.anchor="middle",g.valign="middle",g.textMargin=s,g.class="loopText",g.fontFamily=h,g.fontSize=c,g.fontWeight=u,g.wrap=!0;var f=Vh(g.text)?await mRe(d,g,t):yRe(d,g);if(void 0!==t.sectionTitles)for(var[m,y]of Object.entries(t.sectionTitles))y.message&&(g.text=y.message,g.x=t.startx+(t.stopx-t.startx)/2,g.y=t.sections[m].y+a+s,g.class="loopText",g.anchor="middle",g.valign="middle",g.tspan=!1,g.fontFamily=h,g.fontSize=c,g.fontWeight=u,g.wrap=t.wrap,Vh(g.text)?(t.starty=t.sections[m].y,await mRe(d,g,t)):yRe(d,g),y=Math.round(f.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t)),t.sections[m].height+=y-(a+s));return t.height=Math.round(t.stopy-t.starty),d},"drawLoop"),MRe=mt(function(e,t){YT(e,t)},"drawBackgroundRect"),ORe=mt(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"),BRe=mt(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"),PRe=mt(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"),$Re=mt(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"),FRe=mt(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"),zRe=mt(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"),qRe=mt(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"),WRe=mt(function(e,t){t=t.theme,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","redux"===t||"redux-color"===t?"#000000":"#FFFFFF")},"insertDropShadow"),URe=mt(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"),GRe=mt(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),mt(i,"byText"),mt(h,"byTspan"),mt(n,"byFo"),mt(a,"byKatex"),mt(f,"_setTextAttrs"),jRe=function(e,t=!1){return t?a:"fo"===e.textPlacement?n:"old"===e.textPlacement?i:h},mt(t,"byText"),mt(l,"byTspan"),mt(r,"byFo"),mt(g,"_setTextAttrs"),VRe=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:l},YRe=mt(function(e,t){e.append("defs").append("marker").attr("id",t+"-solidTopArrowHead").attr("refX",7.9).attr("refY",7.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 8 L 0 8 z")},"insertSolidTopArrowHead"),HRe=mt(function(e,t){e.append("defs").append("marker").attr("id",t+"-solidBottomArrowHead").attr("refX",7.9).attr("refY",.75).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 0 L 0 8 z")},"insertSolidBottomArrowHead"),XRe=mt(function(e,t){e.append("defs").append("marker").attr("id",t+"-stickTopArrowHead").attr("refX",7.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 7 7").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickTopArrowHead"),KRe=mt(function(e,t){e.append("defs").append("marker").attr("id",t+"-stickBottomArrowHead").attr("refX",7.5).attr("refY",0).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 7 L 7 0").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickBottomArrowHead"),ZRe={drawRect:pRe,drawText:yRe,drawLabel:vRe,drawActor:LRe,drawBox:RRe,drawPopup:gRe,anchorElement:IRe,drawActivation:NRe,drawLoop:DRe,drawBackgroundRect:MRe,insertArrowHead:$Re,insertArrowFilledHead:FRe,insertSequenceNumber:zRe,insertArrowCrossHead:qRe,insertDatabaseIcon:ORe,insertComputerIcon:BRe,insertClockIcon:PRe,getTextObj:URe,getNoteRect:GRe,fixLifeLineHeights:bRe,sanitizeUrl:sRe.sanitizeUrl,insertDropShadow:WRe,insertSolidTopArrowHead:YRe,insertSolidBottomArrowHead:HRe,insertStickTopArrowHead:XRe,insertStickBottomArrowHead:KRe}});async function iIe(e,t){F.bumpVerticalPos(10);var{startx:r,stopx:i,message:n}=t,a=I.splitBreaks(n).length,s=Vh(n),n=s?await Yh(n,P()):k7.calculateTextDimensions(n,cIe($));s||(s=n.height/a,t.height+=s,F.bumpVerticalPos(s));let o,l=n.height-10,h=n.width;return r===i?(o=F.getVerticalPos()+l,$.rightAngles||(l+=$.boxMargin,o=F.getVerticalPos()+l),l+=30,a=I.getMax(h/2,$.width/2),F.insert(r-a,F.getVerticalPos()-10+l,i+a,F.getVerticalPos()+30+l)):(l+=$.boxMargin,o=F.getVerticalPos()+l,F.insert(r,o-10,i,o)),F.bumpVerticalPos(l),t.height+=l,t.stopy=t.starty+t.height,F.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),o}function nIe(e,t,r,i,n){F.bumpVerticalPos(r);let a=i;t.id&&t.message&&e[t.id]&&(r=e[t.id].width,e=cIe($),t.message=k7.wrapLabel(`[${t.message}]`,r-2*$.wrapPadding,e),t.width=r,t.wrap=!0,r=k7.calculateTextDimensions(t.message,e),e=I.getMax(r.height,$.labelBoxHeight),a=i+e,B.debug(e+" - "+t.message)),n(t),F.bumpVerticalPos(a)}function aIe(r,i,e,t,n,a,s){function o(e,t){e.x<n.get(r.from).x?(F.insert(i.stopx-t,i.starty,i.startx,i.stopy+e.height/2+$.noteMargin),i.stopx=i.stopx+t):(F.insert(i.startx,i.starty,i.stopx+t,i.stopy+e.height/2+$.noteMargin),i.stopx=i.stopx-t)}function l(e,t){e.x<n.get(r.to).x?(F.insert(i.startx-t,i.starty,i.stopx,i.stopy+e.height/2+$.noteMargin),i.startx=i.startx+t):(F.insert(i.stopx,i.starty,i.startx+t,i.stopy+e.height/2+$.noteMargin),i.startx=i.startx-t)}mt(o,"receiverAdjustment"),mt(l,"senderAdjustment");var h=[rRe.ACTOR,rRe.CONTROL,rRe.ENTITY,rRe.DATABASE];a.get(r.to)==t?(o(a=n.get(r.to),h.includes(a.type)?oRe/2+3:a.width/2+3),a.starty=e-a.height/2,F.bumpVerticalPos(a.height/2)):s.get(r.from)==t?(a=n.get(r.from),$.mirrorActors&&l(a,h.includes(a.type)?oRe/2:a.width/2),a.stopy=e-a.height/2,F.bumpVerticalPos(a.height/2)):s.get(r.to)==t&&(a=n.get(r.to),$.mirrorActors&&o(a,h.includes(a.type)?oRe/2+3:a.width/2+3),a.stopy=e-a.height/2,F.bumpVerticalPos(a.height/2))}async function sIe(e,t,r){var i,n={};for(i of t)if(e.get(i.to)&&e.get(i.from)){var a=e.get(i.to);if(i.placement===r.db.PLACEMENT.LEFTOF&&!a.prevActor||i.placement===r.db.PLACEMENT.RIGHTOF&&!a.nextActor)continue;var s=!(o=void 0!==i.placement),o=(o?uIe:cIe)($),l=i.wrap?k7.wrapLabel(i.message,$.width-2*$.wrapPadding,o):i.message,l=(Vh(l)?await Yh(i.message,P()):k7.calculateTextDimensions(l,o)).width+2*$.wrapPadding;s&&i.from===a.nextActor?n[i.to]=I.getMax(n[i.to]||0,l):s&&i.from===a.prevActor?n[i.from]=I.getMax(n[i.from]||0,l):s&&i.from===i.to?(n[i.from]=I.getMax(n[i.from]||0,l/2),n[i.to]=I.getMax(n[i.to]||0,l/2)):i.placement===r.db.PLACEMENT.RIGHTOF?n[i.from]=I.getMax(n[i.from]||0,l):i.placement===r.db.PLACEMENT.LEFTOF?n[a.prevActor]=I.getMax(n[a.prevActor]||0,l):i.placement===r.db.PLACEMENT.OVER&&(a.prevActor&&(n[a.prevActor]=I.getMax(n[a.prevActor]||0,l/2)),a.nextActor)&&(n[i.from]=I.getMax(n[i.from]||0,l/2))}return B.debug("maxMessageWidthPerActor:",n),n}async function oIe(i,e,t){let r=0;for(var n of i.keys()){(n=i.get(n)).wrap&&(n.description=k7.wrapLabel(n.description,$.width-2*$.wrapPadding,dIe($)));var a=Vh(n.description)?await Yh(n.description,P()):k7.calculateTextDimensions(n.description,dIe($));n.width=n.wrap?$.width:I.getMax($.width,a.width+2*$.wrapPadding),n.height=n.wrap?I.getMax(a.height,$.height):$.height,r=I.getMax(r,n.height)}for(var s in e){var o,l=i.get(s);l&&(o=(o=i.get(l.nextActor))?e[s]+$.actorMargin-l.width/2-o.width/2:e[s]+$.actorMargin-l.width/2,l.margin=I.getMax(o,$.actorMargin))}let h=0;return t.forEach(e=>{var t,r=cIe($),r=(t=e.actorKeys.reduce((e,t)=>e+(i.get(t).width+(i.get(t).margin||0)),0)+8*$.boxMargin-2*$.boxTextMargin,e.wrap&&(e.name=k7.wrapLabel(e.name,t-2*$.wrapPadding,r)),k7.calculateTextDimensions(e.name,r)),r=(h=I.getMax(r.height,h),I.getMax(t,r.width+2*$.wrapPadding));e.margin=$.boxTextMargin,t<r&&(e.margin+=(r-t)/2)}),t.forEach(e=>e.textMaxHeight=h),I.getMax(r,$.height)}var $,F,lIe,hIe,cIe,uIe,dIe,pIe,gIe,fIe,mIe,yIe,vIe,xIe,bIe,TIe,kIe,wIe,CIe,EIe,SIe,_Ie,AIe,LIe,RIe=i(()=>{Sk(),rIe(),e(),ic(),ic(),Lk(),ju(),Nr(),S7(),Rc(),eIe(),$={},F={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:mt(function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map(e=>e.height||0))+(0===this.loops.length?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(0===this.messages.length?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(0===this.notes.length?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},"getHeight"),clear:mt(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:mt(function(e){this.boxes.push(e)},"addBox"),addActor:mt(function(e){this.actors.push(e)},"addActor"),addLoop:mt(function(e){this.loops.push(e)},"addLoop"),addMessage:mt(function(e){this.messages.push(e)},"addMessage"),addNote:mt(function(e){this.notes.push(e)},"addNote"),lastActor:mt(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:mt(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:mt(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:mt(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:mt(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,yIe(P())},"init"),updateVal:mt(function(e,t,r,i){void 0===e[t]?e[t]=r:e[t]=i(r,e[t])},"updateVal"),updateBounds:mt(function(i,n,a,s){let o=this,l=0;function e(r){return mt(function(e){l++;var t=o.sequenceItems.length-l+1;o.updateVal(e,"starty",n-t*$.boxMargin,Math.min),o.updateVal(e,"stopy",s+t*$.boxMargin,Math.max),o.updateVal(F.data,"startx",i-t*$.boxMargin,Math.min),o.updateVal(F.data,"stopx",a+t*$.boxMargin,Math.max),"activation"!==r&&(o.updateVal(e,"startx",i-t*$.boxMargin,Math.min),o.updateVal(e,"stopx",a+t*$.boxMargin,Math.max),o.updateVal(F.data,"starty",n-t*$.boxMargin,Math.min),o.updateVal(F.data,"stopy",s+t*$.boxMargin,Math.max))},"updateItemBounds")}mt(e,"updateFn"),this.sequenceItems.forEach(e()),this.activations.forEach(e("activation"))},"updateBounds"),insert:mt(function(e,t,r,i){var n=I.getMin(e,r),e=I.getMax(e,r),r=I.getMin(t,i),t=I.getMax(t,i);this.updateVal(F.data,"startx",n,Math.min),this.updateVal(F.data,"starty",r,Math.min),this.updateVal(F.data,"stopx",e,Math.max),this.updateVal(F.data,"stopy",t,Math.max),this.updateBounds(n,r,e,t)},"insert"),newActivation:mt(function(e,t,r){var r=r.get(e.from),i=vIe(e.from).length||0,r=r.x+r.width/2+(i-1)*$.activationWidth/2;this.activations.push({startx:r,starty:this.verticalPos+2,stopx:r+$.activationWidth,stopy:void 0,actor:e.from,anchored:ZRe.anchorElement(t)})},"newActivation"),endActivation:mt(function(e){return e=this.activations.map(function(e){return e.actor}).lastIndexOf(e.from),this.activations.splice(e,1)[0]},"endActivation"),createLoop:mt(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:mt(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:mt(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:mt(function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},"isLoopOverlap"),addSectionToLoop:mt(function(e){var t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:F.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:mt(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:mt(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:mt(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=I.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:mt(function(){return this.verticalPos},"getVerticalPos"),getBounds:mt(function(){return{bounds:this.data,models:this.models}},"getBounds")},lIe=mt(async function(e,t,r){F.bumpVerticalPos($.boxMargin),t.height=$.boxMargin,t.starty=F.getVerticalPos();var i=ZT(),r=(i.x=t.startx,i.y=t.starty,i.width=t.width||$.width,i.class="note",(e=e.append("g")).attr("data-et","note"),e.attr("data-id","i"+r),ZRe.drawRect(e,i)),e=((n=QT()).x=t.startx,n.y=t.starty,n.width=i.width,n.dy="1em",n.text=t.message,n.class="noteText",n.fontFamily=$.noteFontFamily,n.fontSize=$.noteFontSize,n.fontWeight=$.noteFontWeight,n.anchor=$.noteAlign,n.textMargin=$.noteMargin,n.valign="center",Vh(n.text)?await mRe(e,n):yRe(e,n)),n=Math.round(e.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));r.attr("height",n+2*$.noteMargin),t.height+=n+2*$.noteMargin,F.bumpVerticalPos(n+2*$.noteMargin),t.stopy=t.starty+n+2*$.noteMargin,t.stopx=t.startx+i.width,F.insert(t.startx,t.starty,t.stopx,t.stopy),F.models.addNote(t)},"drawNote"),hIe=mt(function(e,t,r,i,n,a,s){let o=i.db.getActors(),l=o.get(t.from),h=o.get(t.to),c=r.sequenceVisible,u=l.x+l.width/2,d=h.x+h.width/2,p=u<=d,g=EIe(t,i),f=e.append("g"),m=mt((e,t)=>(e=e?16.5:-16.5,t?-e:e),"getCircleOffset"),y=mt(e=>{f.append("circle").attr("cx",e).attr("cy",s).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:v,CENTRAL_CONNECTION_REVERSE:x,CENTRAL_CONNECTION_DUAL:b}=i.db.LINETYPE;if(c)switch(t.centralConnection){case v:g&&(d+=m(p,!0));break;case x:g||(u+=m(p,!1));break;case b:g?d+=m(p,!0):u+=m(p,!1)}switch(t.centralConnection){case v:y(d);break;case x:y(u);break;case b:y(u),y(d)}},"drawCentralConnection"),cIe=mt(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),uIe=mt(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),dIe=mt(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont"),mt(iIe,"boundMessage"),pIe=mt(async function(l,h,c,u,d,p){var{startx:g,stopx:f,starty:e,message:t,type:m,sequenceIndex:y,sequenceVisible:r}=h,i=k7.calculateTextDimensions(t,cIe($)),n=QT();n.x=g,n.y=e+10,n.width=f-g,n.class="messageText",n.dy="1em",n.text=t,n.fontFamily=$.messageFontFamily,n.fontSize=$.messageFontSize,n.fontWeight=$.messageFontWeight,n.anchor=$.messageAlign,n.valign="center",n.textMargin=$.wrapPadding,n.tspan=!1,Vh(n.text)?await mRe(l,n,{startx:g,stopx:f,starty:c}):yRe(l,n);let a=i.width,v,x=(g===f?(e=r||$.showSequenceNumbers,t=EIe(d,u),n=SIe(d,u),i=g+(e&&(t||n)?10:0),v=$.rightAngles?l.append("path").attr("d",`M ${i},${c} H ${g+I.getMax($.width/2,a/2)} V ${c+25} H `+g):l.append("path").attr("d","M "+i+","+c+" C "+(i+60)+","+(c-10)+" "+(g+60)+","+(c+30)+" "+g+","+(c+20))):((v=l.append("line")).attr("x1",g),v.attr("y1",c),v.attr("x2",f),v.attr("y2",c)),wIe(d,u)&&hIe(l,d,h,u,g,f,c),m===u.db.LINETYPE.DOTTED||m===u.db.LINETYPE.DOTTED_CROSS||m===u.db.LINETYPE.DOTTED_POINT||m===u.db.LINETYPE.DOTTED_OPEN||m===u.db.LINETYPE.BIDIRECTIONAL_DOTTED||m===u.db.LINETYPE.SOLID_TOP_DOTTED||m===u.db.LINETYPE.SOLID_BOTTOM_DOTTED||m===u.db.LINETYPE.STICK_TOP_DOTTED||m===u.db.LINETYPE.STICK_BOTTOM_DOTTED||m===u.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||m===u.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||m===u.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||m===u.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(v.style("stroke-dasharray","3, 3"),v.attr("class","messageLine1")):v.attr("class","messageLine0"),v.attr("data-et","message"),v.attr("data-id","i"+h.id),v.attr("data-from",h.from),v.attr("data-to",h.to),"");if($.arrowMarkerAbsolute&&(x=Ph(!0)),v.attr("stroke-width",2),v.attr("stroke","none"),v.style("fill","none"),m!==u.db.LINETYPE.SOLID_TOP&&m!==u.db.LINETYPE.SOLID_TOP_DOTTED||v.attr("marker-end","url("+x+"#"+p+"-solidTopArrowHead)"),m!==u.db.LINETYPE.SOLID_BOTTOM&&m!==u.db.LINETYPE.SOLID_BOTTOM_DOTTED||v.attr("marker-end","url("+x+"#"+p+"-solidBottomArrowHead)"),m!==u.db.LINETYPE.STICK_TOP&&m!==u.db.LINETYPE.STICK_TOP_DOTTED||v.attr("marker-end","url("+x+"#"+p+"-stickTopArrowHead)"),m!==u.db.LINETYPE.STICK_BOTTOM&&m!==u.db.LINETYPE.STICK_BOTTOM_DOTTED||v.attr("marker-end","url("+x+"#"+p+"-stickBottomArrowHead)"),m!==u.db.LINETYPE.SOLID_ARROW_TOP_REVERSE&&m!==u.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||v.attr("marker-start","url("+x+"#"+p+"-solidBottomArrowHead)"),m!==u.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE&&m!==u.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||v.attr("marker-start","url("+x+"#"+p+"-solidTopArrowHead)"),m!==u.db.LINETYPE.STICK_ARROW_TOP_REVERSE&&m!==u.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||v.attr("marker-start","url("+x+"#"+p+"-stickBottomArrowHead)"),m!==u.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE&&m!==u.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED||v.attr("marker-start","url("+x+"#"+p+"-stickTopArrowHead)"),m!==u.db.LINETYPE.SOLID&&m!==u.db.LINETYPE.DOTTED||v.attr("marker-end","url("+x+"#"+p+"-arrowhead)"),m!==u.db.LINETYPE.BIDIRECTIONAL_SOLID&&m!==u.db.LINETYPE.BIDIRECTIONAL_DOTTED||(v.attr("marker-start","url("+x+"#"+p+"-arrowhead)"),v.attr("marker-end","url("+x+"#"+p+"-arrowhead)")),m!==u.db.LINETYPE.SOLID_POINT&&m!==u.db.LINETYPE.DOTTED_POINT||v.attr("marker-end","url("+x+"#"+p+"-filled-head)"),m!==u.db.LINETYPE.SOLID_CROSS&&m!==u.db.LINETYPE.DOTTED_CROSS||v.attr("marker-end","url("+x+"#"+p+"-crosshead)"),r||$.showSequenceNumbers){let e=m===u.db.LINETYPE.BIDIRECTIONAL_SOLID||m===u.db.LINETYPE.BIDIRECTIONAL_DOTTED,t=m===u.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||m===u.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||m===u.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||m===u.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||m===u.db.LINETYPE.STICK_ARROW_TOP_REVERSE||m===u.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||m===u.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||m===u.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r=wIe(d,u),i=g,n=f,a=void(e?(g<f?i=g+12:(i=g-6+(r?-5:0),i+=d?.centralConnection===u.db.LINETYPE.CENTRAL_CONNECTION_DUAL||d?.centralConnection===u.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),v.attr("x1",i)):t?(g<f?n=f-12:(n=f-6,i+=d?.centralConnection===u.db.LINETYPE.CENTRAL_CONNECTION_DUAL||d?.centralConnection===u.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),n+=r?15:0,v.attr("x2",n),v.attr("x1",i)):v.attr("x1",g+6)),s=g===f,o=g<=f;a=s?h.fromBounds+1:t?o?h.toBounds-1:h.fromBounds+1:o?h.fromBounds+1:h.toBounds-1,l.append("line").attr("x1",a).attr("y1",c).attr("x2",a).attr("y2",c).attr("stroke-width",0).attr("marker-start","url("+x+"#"+p+"-sequencenumber)"),l.append("text").attr("x",a).attr("y",c+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(y)}},"drawMessage"),gIe=mt(function(e,t,r,i,n,a,s){let o=0,l=0,h,c=0;for(var u of i){var d=(u=t.get(u)).box;h&&h!=d&&(s||F.models.addBox(h),l+=$.boxMargin+h.margin),d&&d!=h&&(s||(d.x=o+l,d.y=n),l+=d.margin),u.width=I.getMax(u.width||$.width,$.width),u.height=I.getMax(u.height||$.height,$.height),u.margin=u.margin||$.actorMargin,c=I.getMax(c,u.height),r.get(u.name)&&(l+=u.width/2),u.x=o+l,u.starty=F.getVerticalPos(),F.insert(u.x,n,u.x+u.width,u.height),o+=u.width+l,u.box&&(u.box.width=o+d.margin-u.box.x),l=u.margin,h=u.box,F.models.addActor(u)}h&&!s&&F.models.addBox(h),F.bumpVerticalPos(c)},"addActorRenderingData"),fIe=mt(async function(t,r,i,e,n,a,s){if(e){let e=0;F.bumpVerticalPos(2*$.boxMargin);for(var o of i)(o=r.get(o)).stopy||(o.stopy=F.getVerticalPos()),o=await ZRe.drawActor(t,o,$,!0,n,a,s),e=I.getMax(e,o);F.bumpVerticalPos(e+$.boxMargin)}else for(var l of i)l=r.get(l),await ZRe.drawActor(t,l,$,!1,n,a,s)},"drawActors"),mIe=mt(function(e,t,r,i){let n=0,a=0;for(var s of r){var s=t.get(s),o=TIe(s);(o=ZRe.drawPopup(e,s,o,$,$.forceMenus,i)).height>n&&(n=o.height),o.width+s.x>a&&(a=o.width+s.x)}return{maxHeight:n,maxWidth:a}},"drawActorsPopup"),yIe=mt(function(e){Le($,e),e.fontFamily&&($.actorFontFamily=$.noteFontFamily=$.messageFontFamily=e.fontFamily),e.fontSize&&($.actorFontSize=$.noteFontSize=$.messageFontSize=e.fontSize),e.fontWeight&&($.actorFontWeight=$.noteFontWeight=$.messageFontWeight=e.fontWeight)},"setConf"),vIe=mt(function(t){return F.activations.filter(function(e){return e.actor===t})},"actorActivations"),xIe=mt(function(e,t){return t=t.get(e),[(e=vIe(e)).reduce(function(e,t){return I.getMin(e,t.startx)},t.x+t.width/2-1),e.reduce(function(e,t){return I.getMax(e,t.stopx)},t.x+t.width/2+1)]},"activationBounds"),mt(nIe,"adjustLoopHeightForWrap"),mt(aIe,"adjustCreatedDestroyedData"),bIe=mt(async function(i,e,O,n){var{securityLevel:t,sequence:r,look:a}=P();$=r;let s;"sandbox"===t&&(s=Q("#i"+e));var r=Q("sandbox"===t?s.nodes()[0].contentDocument.body:"body"),o="sandbox"===t?s.nodes()[0].contentDocument:document;F.init(),B.debug(n.db);let l="sandbox"===t?r.select(`[id="${e}"]`):Q(`[id="${e}"]`),h=n.db.getActors(),c=n.db.getCreatedActors(),u=n.db.getDestroyedActors(),d=n.db.getBoxes(),p=n.db.getActorKeys(),g=n.db.getMessages(),f=n.db.getDiagramTitle(),m=n.db.hasAtLeastOneBox(),y=n.db.hasAtLeastOneBoxWithTitle(),v=await sIe(h,g,n);if($.height=await oIe(h,v,d),ZRe.insertComputerIcon(l,e),ZRe.insertDatabaseIcon(l,e),ZRe.insertClockIcon(l,e),m&&(F.bumpVerticalPos($.boxMargin),y)&&F.bumpVerticalPos(d[0].textMaxHeight),!0===$.hideUnusedParticipants){let t=new Set;g.forEach(e=>{t.add(e.from),t.add(e.to)}),p=p.filter(e=>t.has(e))}let x=new Map(p.map((e,t)=>[h.get(e)?.name??e,t]));gIe(l,h,c,p,0,g,!1);var b,T,k,w=await AIe(g,h,v,n);function C(e,t){var r=F.endActivation(e);r.starty+18>t&&(r.starty=t-6,t+=12),ZRe.drawActivation(l,r,t,$,vIe(e.from).length,n,x),F.insert(r.startx,t-10,r.stopx,t)}ZRe.insertArrowHead(l,e),ZRe.insertArrowCrossHead(l,e),ZRe.insertArrowFilledHead(l,e),ZRe.insertSequenceNumber(l,e),ZRe.insertSolidTopArrowHead(l,e),ZRe.insertSolidBottomArrowHead(l,e),ZRe.insertStickTopArrowHead(l,e),ZRe.insertStickBottomArrowHead(l,e),"neo"===a&&ZRe.insertDropShadow(l,$),mt(C,"activeEnd");let E=1,S=1,_=[],A=[],L=0;for(b of g){let e,t,r;switch(b.type){case n.db.LINETYPE.NOTE:F.resetVerticalPos(),t=b.noteModel,await lIe(l,t,b.id);break;case n.db.LINETYPE.ACTIVE_START:case n.db.LINETYPE.CENTRAL_CONNECTION:case n.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:F.newActivation(b,l,h);break;case n.db.LINETYPE.ACTIVE_END:C(b,F.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:nIe(w,b,$.boxMargin,$.boxMargin+$.boxTextMargin,e=>F.newLoop(e));break;case n.db.LINETYPE.LOOP_END:e=F.endLoop(),await ZRe.drawLoop(l,e,"loop",$,b),F.bumpVerticalPos(e.stopy-F.getVerticalPos()),F.models.addLoop(e);break;case n.db.LINETYPE.RECT_START:nIe(w,b,$.boxMargin,$.boxMargin,e=>F.newLoop(void 0,e.message));break;case n.db.LINETYPE.RECT_END:e=F.endLoop(),A.push(e),F.models.addLoop(e),F.bumpVerticalPos(e.stopy-F.getVerticalPos());break;case n.db.LINETYPE.OPT_START:nIe(w,b,$.boxMargin,$.boxMargin+$.boxTextMargin,e=>F.newLoop(e));break;case n.db.LINETYPE.OPT_END:e=F.endLoop(),await ZRe.drawLoop(l,e,"opt",$,b),F.bumpVerticalPos(e.stopy-F.getVerticalPos()),F.models.addLoop(e);break;case n.db.LINETYPE.ALT_START:nIe(w,b,$.boxMargin,$.boxMargin+$.boxTextMargin,e=>F.newLoop(e));break;case n.db.LINETYPE.ALT_ELSE:nIe(w,b,$.boxMargin+$.boxTextMargin,$.boxMargin,e=>F.addSectionToLoop(e));break;case n.db.LINETYPE.ALT_END:e=F.endLoop(),await ZRe.drawLoop(l,e,"alt",$,b),F.bumpVerticalPos(e.stopy-F.getVerticalPos()),F.models.addLoop(e);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:nIe(w,b,$.boxMargin,$.boxMargin+$.boxTextMargin,e=>F.newLoop(e)),F.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:nIe(w,b,$.boxMargin+$.boxTextMargin,$.boxMargin,e=>F.addSectionToLoop(e));break;case n.db.LINETYPE.PAR_END:e=F.endLoop(),await ZRe.drawLoop(l,e,"par",$,b),F.bumpVerticalPos(e.stopy-F.getVerticalPos()),F.models.addLoop(e);break;case n.db.LINETYPE.AUTONUMBER:E=b.message.start||E,S=b.message.step||S,b.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:nIe(w,b,$.boxMargin,$.boxMargin+$.boxTextMargin,e=>F.newLoop(e));break;case n.db.LINETYPE.CRITICAL_OPTION:nIe(w,b,$.boxMargin+$.boxTextMargin,$.boxMargin,e=>F.addSectionToLoop(e));break;case n.db.LINETYPE.CRITICAL_END:e=F.endLoop(),await ZRe.drawLoop(l,e,"critical",$,b),F.bumpVerticalPos(e.stopy-F.getVerticalPos()),F.models.addLoop(e);break;case n.db.LINETYPE.BREAK_START:nIe(w,b,$.boxMargin,$.boxMargin+$.boxTextMargin,e=>F.newLoop(e));break;case n.db.LINETYPE.BREAK_END:e=F.endLoop(),await ZRe.drawLoop(l,e,"break",$,b),F.bumpVerticalPos(e.stopy-F.getVerticalPos()),F.models.addLoop(e);break;default:try{(r=b.msgModel).starty=F.getVerticalPos(),r.sequenceIndex=E,r.sequenceVisible=n.db.showSequenceNumbers(),r.id=b.id,r.from=b.from,r.to=b.to;var R=await iIe(l,r);aIe(b,r,R,L,h,c,u),_.push({messageModel:r,lineStartY:R,msg:b}),F.models.addMessage(r)}catch(i){B.error("error while drawing message",i)}}[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.SOLID_TOP,n.db.LINETYPE.SOLID_BOTTOM,n.db.LINETYPE.STICK_TOP,n.db.LINETYPE.STICK_BOTTOM,n.db.LINETYPE.SOLID_TOP_DOTTED,n.db.LINETYPE.SOLID_BOTTOM_DOTTED,n.db.LINETYPE.STICK_TOP_DOTTED,n.db.LINETYPE.STICK_BOTTOM_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT,n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(b.type)&&(E+=S),L++}B.debug("createdActors",c),B.debug("destroyedActors",u),await fIe(l,h,p,!1,e,n,x);for(T of _)await pIe(l,T.messageModel,T.lineStartY,n,T.msg,e);$.mirrorActors&&await fIe(l,h,p,!0,e,n,x),A.forEach(e=>ZRe.drawBackgroundRect(l,e)),bRe(l,h,p,$);for(k of F.models.boxes){k.height=F.getVerticalPos()-k.y,F.insert(k.x,k.y,k.x+k.width,k.height);var I=2*$.boxMargin;k.startx=k.x-I,k.starty=k.y-.25*I,k.stopx=k.startx+k.width+2*I,k.stopy=k.starty+k.height+.75*I,k.stroke="rgb(0,0,0, 0.5)",ZRe.drawBox(l,k,$)}m&&F.bumpVerticalPos($.boxMargin),t=mIe(l,h,p,o),void 0===(r=F.getBounds().bounds).startx&&(r.startx=0),void 0===r.starty&&(r.starty=0),void 0===r.stopx&&(r.stopx=0),void 0===r.stopy&&(r.stopy=0);let N=r.stopy-r.starty,D=(N<t.maxHeight?t.maxHeight:N)+2*$.diagramMarginY,M=($.mirrorActors&&(D=D-$.boxMargin+$.bottomMarginAdj),r.stopx-r.startx);o=(M<t.maxWidth?t.maxWidth:M)+2*$.diagramMarginX,f&&l.append("text").text(f).attr("x",(r.stopx-r.startx)/2-2*$.diagramMarginX).attr("y",-25),xc(l,D,o,$.useMaxWidth),t=f?40:0,a=h.size&&"neo"===a?30:0,l.attr("viewBox",r.startx-$.diagramMarginX+" -"+($.diagramMarginY+t)+" "+o+" "+(D+t+a)),B.debug("models:",F.models)},"draw"),mt(sIe,"getMaxMessageWidthPerActor"),TIe=mt(function(e){let t=0,r=dIe($);for(var i in e.links)i=k7.calculateTextDimensions(i,r).width+2*$.wrapPadding+2*$.boxMargin,t<i&&(t=i);return t},"getRequiredPopupWidth"),mt(oIe,"calculateActorMargins"),kIe=mt(async function(e,t,r){var i=t.get(e.from),t=t.get(e.to),n=i.x,a=t.x,s=e.wrap&&e.message,o=Vh(e.message)?await Yh(e.message,P()):k7.calculateTextDimensions(s?k7.wrapLabel(e.message,$.width,uIe($)):e.message,uIe($)),l={width:s?$.width:I.getMax($.width,o.width+2*$.noteMargin),height:0,startx:i.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===r.db.PLACEMENT.RIGHTOF?(l.width=s?I.getMax($.width,o.width):I.getMax(i.width/2+t.width/2,o.width+2*$.noteMargin),l.startx=n+(i.width+$.actorMargin)/2):e.placement===r.db.PLACEMENT.LEFTOF?(l.width=s?I.getMax($.width,o.width+2*$.noteMargin):I.getMax(i.width/2+t.width/2,o.width+2*$.noteMargin),l.startx=n-l.width+(i.width-$.actorMargin)/2):e.to===e.from?(o=k7.calculateTextDimensions(s?k7.wrapLabel(e.message,I.getMax($.width,i.width),uIe($)):e.message,uIe($)),l.width=s?I.getMax($.width,i.width):I.getMax(i.width,$.width,o.width+2*$.noteMargin),l.startx=n+(i.width-l.width)/2):(l.width=Math.abs(n+i.width/2-(a+t.width/2))+$.actorMargin,l.startx=n<a?n+i.width/2-$.actorMargin/2:a+t.width/2-$.actorMargin/2),s&&(l.message=k7.wrapLabel(e.message,l.width-2*$.wrapPadding,uIe($))),B.debug(`NM:[${l.startx},${l.stopx},${l.starty},${l.stopy}:${l.width},${l.height}=${e.message}]`),l},"buildNoteModel"),wIe=mt(function(e,t){var{CENTRAL_CONNECTION:t,CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i}=t.db.LINETYPE;return[t,r,i].includes(e.centralConnection)},"hasCentralConnection"),CIe=mt(function(e,t,r){let{CENTRAL_CONNECTION_REVERSE:i,CENTRAL_CONNECTION_DUAL:n,BIDIRECTIONAL_SOLID:a,BIDIRECTIONAL_DOTTED:s}=t.db.LINETYPE,o=0;return e.centralConnection!==i&&e.centralConnection!==n||(o+=4),e.centralConnection!==i&&e.centralConnection!==n||e.type!==a&&e.type!==s||(o+=r?0:-6),o},"calculateCentralConnectionOffset"),EIe=mt(function(e,t){var{SOLID_ARROW_TOP_REVERSE:t,SOLID_ARROW_TOP_REVERSE_DOTTED:r,SOLID_ARROW_BOTTOM_REVERSE:i,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:n,STICK_ARROW_TOP_REVERSE:a,STICK_ARROW_TOP_REVERSE_DOTTED:s,STICK_ARROW_BOTTOM_REVERSE:o,STICK_ARROW_BOTTOM_REVERSE_DOTTED:l}=t.db.LINETYPE;return[t,r,i,n,a,s,o,l].includes(e.type)},"isReverseArrowType"),SIe=mt(function(e,t){var{BIDIRECTIONAL_SOLID:t,BIDIRECTIONAL_DOTTED:r}=t.db.LINETYPE;return[t,r].includes(e.type)},"isBidirectionalArrowType"),_Ie=mt(function(e,t,r){var i=P().look;if(![r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.SOLID_TOP,r.db.LINETYPE.SOLID_BOTTOM,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.SOLID_TOP_DOTTED,r.db.LINETYPE.SOLID_BOTTOM_DOTTED,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type))return{};let[n,a]=xIe(e.from,t),[s,o]=xIe(e.to,t),l=n<=s,h=l?a:n,c=l?s:o;return"neo"===i&&(e.type!==r.db.LINETYPE.SOLID_OPEN&&(c+=l?-3:3),e.type===r.db.LINETYPE.BIDIRECTIONAL_SOLID||e.type===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(h+=l?3:-3),h+=CIe(e,r,l),t=2<Math.abs(s-o),i=mt(e=>l?-e:e,"adjustValue"),e.from===e.to?c=h:(e.activate&&!t&&(c+=i($.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)||(c+=i(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)&&(h-=i(3))),t=[n,a,s,o],r=Math.abs(h-c),e.wrap&&e.message&&(e.message=k7.wrapLabel(e.message,I.getMax(r+2*$.wrapPadding,$.width),cIe($))),i=k7.calculateTextDimensions(e.message,cIe($)),{width:I.getMax(e.wrap?0:i.width+2*$.wrapPadding,r+2*$.wrapPadding,$.width),height:0,startx:h,stopx:c,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,t),toBounds:Math.max.apply(null,t)}},"buildMessageModel"),AIe=mt(async function(e,i,t,n){let a={},s=[],o,l,h;for(let r of e){switch(r.type){case n.db.LINETYPE.LOOP_START:case n.db.LINETYPE.ALT_START:case n.db.LINETYPE.OPT_START:case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:case n.db.LINETYPE.CRITICAL_START:case n.db.LINETYPE.BREAK_START:s.push({id:r.id,msg:r.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case n.db.LINETYPE.ALT_ELSE:case n.db.LINETYPE.PAR_AND:case n.db.LINETYPE.CRITICAL_OPTION:r.message&&(o=s.pop(),a[o.id]=o,a[r.id]=o,s.push(o));break;case n.db.LINETYPE.LOOP_END:case n.db.LINETYPE.ALT_END:case n.db.LINETYPE.OPT_END:case n.db.LINETYPE.PAR_END:case n.db.LINETYPE.CRITICAL_END:case n.db.LINETYPE.BREAK_END:o=s.pop(),a[o.id]=o;break;case n.db.LINETYPE.ACTIVE_START:var c=i.get(r.from||r.to.actor),u=vIe(r.from||r.to.actor).length,u={startx:c=c.x+c.width/2+(u-1)*$.activationWidth/2,stopx:c+$.activationWidth,actor:r.from,enabled:!0};F.activations.push(u);break;case n.db.LINETYPE.ACTIVE_END:c=F.activations.map(e=>e.actor).lastIndexOf(r.from),F.activations.splice(c,1).splice(0,1)}void 0!==r.placement?(l=await kIe(r,i,n),r.noteModel=l,s.forEach(e=>{(o=e).from=I.getMin(o.from,l.startx),o.to=I.getMax(o.to,l.startx+l.width),o.width=I.getMax(o.width,Math.abs(o.from-o.to))-$.labelBoxWidth})):(h=_Ie(r,i,n),(r.msgModel=h).startx&&h.stopx&&0<s.length&&s.forEach(e=>{var t;o=e,h.startx===h.stopx?(e=i.get(r.from),t=i.get(r.to),o.from=I.getMin(e.x-h.width/2,e.x-e.width/2,o.from),o.to=I.getMax(t.x+h.width/2,t.x+e.width/2,o.to),o.width=I.getMax(o.width,Math.abs(o.to-o.from))-$.labelBoxWidth):(o.from=I.getMin(h.startx,o.from),o.to=I.getMax(h.stopx,o.to),o.width=I.getMax(o.width,h.width)-$.labelBoxWidth)}))}return F.activations=[],B.debug("Loop type widths:",a),a},"calculateLoopBounds"),LIe={bounds:F,drawActors:fIe,drawActorsPopup:mIe,setConf:yIe,draw:bIe}}),IIe={};sYe(IIe,{diagram:()=>NIe});var NIe,DIe,MIe,OIe,BIe,PIe,$Ie,FIe,zIe,qIe,WIe,UIe,GIe,jIe,VIe,YIe=i(()=>{JRe(),eIe(),tIe(),ju(),RIe(),NIe={parser:QLe,get db(){return new iRe},renderer:LIe,styles:aRe,init:mt(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,Vc({sequence:{wrap:e.wrap}}))},"init")}}),HIe=i(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,18],i=[1,19],n=[1,20],B=[1,41],P=[1,26],a=[1,42],$=[1,24],F=[1,25],s=[1,32],o=[1,33],z=[1,34],l=[1,45],q=[1,35],W=[1,36],U=[1,37],G=[1,38],j=[1,27],V=[1,28],Y=[1,29],H=[1,30],X=[1,31],h=[1,44],c=[1,46],u=[1,43],d=[1,47],K=[1,9],p=[1,8,9],g=[1,58],f=[1,59],m=[1,60],y=[1,61],v=[1,62],Z=[1,63],Q=[1,64],x=[1,8,9,41],J=[1,77],b=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],T=[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],k=[13,60,86,100,102,103],w=[13,60,73,74,86,100,102,103],ee=[13,60,68,69,70,71,72,86,100,102,103],C=[1,102],E=[1,120],S=[1,116],_=[1,112],A=[1,118],L=[1,113],R=[1,114],I=[1,115],N=[1,117],D=[1,119],te=[22,50,60,61,82,86,87,88,89,90],re=[1,8,9,39,41,44,46],M=[1,8,9,22],ie=[1,150],ne=[1,8,9,61],O=[1,8,9,22,50,60,61,82,86,87,88,89,90],T={trace:mt(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],[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:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 8:this.$=a[o-1];break;case 9:case 10:case 13:case 15:this.$=a[o];break;case 11:case 14:this.$=a[o-2]+"."+a[o];break;case 12:case 16:this.$=a[o-1]+a[o];break;case 17:case 18:this.$=a[o-1]+"~"+a[o]+"~";break;case 19:i.addRelation(a[o]);break;case 20:a[o-1].title=i.cleanupLabel(a[o]),i.addRelation(a[o-1]);break;case 31:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 32:case 33:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 34:i.addClassesToNamespace(a[o-3],a[o-1][0],a[o-1][1]);break;case 35:i.addClassesToNamespace(a[o-4],a[o-1][0],a[o-1][1]);break;case 36:this.$=a[o],i.addNamespace(a[o]);break;case 37:this.$=[[a[o]],[]];break;case 38:this.$=[[a[o-1]],[]];break;case 39:a[o][0].unshift(a[o-2]),this.$=a[o];break;case 40:this.$=[[],[a[o]]];break;case 41:this.$=[[],[a[o-1]]];break;case 42:a[o][1].unshift(a[o-2]),this.$=a[o];break;case 44:i.setCssClass(a[o-2],a[o]);break;case 45:i.addMembers(a[o-3],a[o-1]);break;case 47:i.setCssClass(a[o-5],a[o-3]),i.addMembers(a[o-5],a[o-1]);break;case 48:i.addAnnotation(a[o-3],a[o-1]);break;case 49:i.addAnnotation(a[o-6],a[o-4]),i.addMembers(a[o-6],a[o-1]);break;case 50:i.addAnnotation(a[o-5],a[o-3]);break;case 51:this.$=a[o],i.addClass(a[o]);break;case 52:this.$=a[o-1],i.addClass(a[o-1]),i.setClassLabel(a[o-1],a[o]);break;case 56:i.addAnnotation(a[o],a[o-2]);break;case 57:case 70:this.$=[a[o]];break;case 58:a[o].push(a[o-1]),this.$=a[o];break;case 59:break;case 60:i.addMember(a[o-1],i.cleanupLabel(a[o]));break;case 61:case 62:break;case 63:this.$={id1:a[o-2],id2:a[o],relation:a[o-1],relationTitle1:"none",relationTitle2:"none"};break;case 64:this.$={id1:a[o-3],id2:a[o],relation:a[o-1],relationTitle1:a[o-2],relationTitle2:"none"};break;case 65:this.$={id1:a[o-3],id2:a[o],relation:a[o-2],relationTitle1:"none",relationTitle2:a[o-1]};break;case 66:this.$={id1:a[o-4],id2:a[o],relation:a[o-2],relationTitle1:a[o-3],relationTitle2:a[o-1]};break;case 67:this.$=i.addNote(a[o],a[o-1]);break;case 68:this.$=i.addNote(a[o]);break;case 69:this.$=a[o-2],i.defineClass(a[o-1],a[o]);break;case 71:this.$=a[o-2].concat([a[o]]);break;case 72:i.setDirection("TB");break;case 73:i.setDirection("BT");break;case 74:i.setDirection("RL");break;case 75:i.setDirection("LR");break;case 76:this.$={type1:a[o-2],type2:a[o],lineType:a[o-1]};break;case 77:this.$={type1:"none",type2:a[o],lineType:a[o-1]};break;case 78:this.$={type1:a[o-1],type2:"none",lineType:a[o]};break;case 79:this.$={type1:"none",type2:"none",lineType:a[o]};break;case 80:this.$=i.relationType.AGGREGATION;break;case 81:this.$=i.relationType.EXTENSION;break;case 82:this.$=i.relationType.COMPOSITION;break;case 83:this.$=i.relationType.DEPENDENCY;break;case 84:this.$=i.relationType.LOLLIPOP;break;case 85:this.$=i.lineType.LINE;break;case 86:this.$=i.lineType.DOTTED_LINE;break;case 87:case 93:this.$=a[o-2],i.setClickEvent(a[o-1],a[o]);break;case 88:case 94:this.$=a[o-3],i.setClickEvent(a[o-2],a[o-1]),i.setTooltip(a[o-2],a[o]);break;case 89:this.$=a[o-2],i.setLink(a[o-1],a[o]);break;case 90:this.$=a[o-3],i.setLink(a[o-2],a[o-1],a[o]);break;case 91:this.$=a[o-3],i.setLink(a[o-2],a[o-1]),i.setTooltip(a[o-2],a[o]);break;case 92:this.$=a[o-4],i.setLink(a[o-3],a[o-2],a[o]),i.setTooltip(a[o-3],a[o-1]);break;case 95:this.$=a[o-3],i.setClickEvent(a[o-2],a[o-1],a[o]);break;case 96:this.$=a[o-4],i.setClickEvent(a[o-3],a[o-2],a[o-1]),i.setTooltip(a[o-3],a[o]);break;case 97:this.$=a[o-3],i.setLink(a[o-2],a[o]);break;case 98:this.$=a[o-4],i.setLink(a[o-3],a[o-1],a[o]);break;case 99:this.$=a[o-4],i.setLink(a[o-3],a[o-1]),i.setTooltip(a[o-3],a[o]);break;case 100:this.$=a[o-5],i.setLink(a[o-4],a[o-2],a[o]),i.setTooltip(a[o-4],a[o-1]);break;case 101:this.$=a[o-2],i.setCssStyle(a[o-1],a[o]);break;case 102:i.setCssClass(a[o-1],a[o]);break;case 103:this.$=[a[o]];break;case 104:a[o-2].push(a[o]),this.$=a[o-2];break;case 106:this.$=a[o-1]+a[o]}},"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:r,35:i,37:n,38:22,42:B,43:23,46:P,48:a,51:$,52:F,54:s,56:o,57:z,60:l,62:q,63:W,64:U,65:G,75:j,76:V,78:Y,82:H,83:X,86:h,100:c,102:u,103:d},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(K,[2,5],{8:[1,48]}),{8:[1,49]},t(p,[2,19],{22:[1,50]}),t(p,[2,21]),t(p,[2,22]),t(p,[2,23]),t(p,[2,24]),t(p,[2,25]),t(p,[2,26]),t(p,[2,27]),t(p,[2,28]),t(p,[2,29]),t(p,[2,30]),{34:[1,51]},{36:[1,52]},t(p,[2,33]),t(p,[2,59],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:g,69:f,70:m,71:y,72:v,73:Z,74:Q}),{39:[1,65]},t(x,[2,43],{39:[1,67],44:[1,66],46:[1,68]}),t(p,[2,61]),t(p,[2,62]),{16:69,60:l,86:h,100:c,102:u},{16:39,17:40,19:70,60:l,86:h,100:c,102:u,103:d},{16:39,17:40,19:71,60:l,86:h,100:c,102:u,103:d},{16:39,17:40,19:72,60:l,86:h,100:c,102:u,103:d},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:l,86:h,100:c,102:u,103:d},{13:J,55:76},{58:78,60:[1,79]},t(p,[2,72]),t(p,[2,73]),t(p,[2,74]),t(p,[2,75]),t(b,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:l,86:h,100:c,102:u,103:d}),t(b,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:l,86:h,100:c,102:u,103:d},{16:39,17:40,19:87,60:l,86:h,100:c,102:u,103:d},t(T,[2,129]),t(T,[2,130]),t(T,[2,131]),t(T,[2,132]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,133]),t(K,[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:r,35:i,37:n,42:B,46:P,48:a,51:$,52:F,54:s,56:o,57:z,60:l,62:q,63:W,64:U,65:G,75:j,76:V,78:Y,82:H,83:X,86:h,100:c,102:u,103:d}),{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:r,35:i,37:n,38:22,42:B,43:23,46:P,48:a,51:$,52:F,54:s,56:o,57:z,60:l,62:q,63:W,64:U,65:G,75:j,76:V,78:Y,82:H,83:X,86:h,100:c,102:u,103:d},t(p,[2,20]),t(p,[2,31]),t(p,[2,32]),{13:[1,91],16:39,17:40,19:90,60:l,86:h,100:c,102:u,103:d},{53:92,66:56,67:57,68:g,69:f,70:m,71:y,72:v,73:Z,74:Q},t(p,[2,60]),{67:93,73:Z,74:Q},t(k,[2,79],{66:94,68:g,69:f,70:m,71:y,72:v}),t(w,[2,80]),t(w,[2,81]),t(w,[2,82]),t(w,[2,83]),t(w,[2,84]),t(ee,[2,85]),t(ee,[2,86]),{8:[1,96],24:97,30:98,40:95,43:23,48:a,54:s,56:o},{16:99,60:l,86:h,100:c,102:u},{41:[1,101],45:100,51:C},{16:103,60:l,86:h,100:c,102:u},{47:[1,104]},{13:[1,105]},{13:[1,106]},{79:[1,107],81:[1,108]},{22:E,50:S,59:109,60:_,82:A,84:110,85:111,86:L,87:R,88:I,89:N,90:D},{60:[1,121]},{13:J,55:122},t(x,[2,68]),t(x,[2,134]),{22:E,50:S,59:123,60:_,61:[1,124],82:A,84:110,85:111,86:L,87:R,88:I,89:N,90:D},t(te,[2,70]),{16:39,17:40,19:125,60:l,86:h,100:c,102:u,103:d},t(b,[2,16]),t(b,[2,17]),t(b,[2,18]),{39:[2,36]},{15:127,16:85,17:86,18:[1,126],39:[2,9],60:l,86:h,100:c,102:u,103:d},{39:[2,10]},t(re,[2,51],{11:128,12:[1,129]}),t(K,[2,7]),{9:[1,130]},t(M,[2,63]),{16:39,17:40,19:131,60:l,86:h,100:c,102:u,103:d},{13:[1,133],16:39,17:40,19:132,60:l,86:h,100:c,102:u,103:d},t(k,[2,78],{66:134,68:g,69:f,70:m,71:y,72:v}),t(k,[2,77]),{41:[1,135]},{24:97,30:98,40:136,43:23,48:a,54:s,56:o},{8:[1,137],41:[2,37]},{8:[1,138],41:[2,40]},t(x,[2,44],{39:[1,139]}),{41:[1,140]},t(x,[2,46]),{41:[2,57],45:141,51:C},{47:[1,142]},{16:39,17:40,19:143,60:l,86:h,100:c,102:u,103:d},t(p,[2,87],{13:[1,144]}),t(p,[2,89],{13:[1,146],77:[1,145]}),t(p,[2,93],{13:[1,147],80:[1,148]}),{13:[1,149]},t(p,[2,101],{61:ie}),t(ne,[2,103],{85:151,22:E,50:S,60:_,82:A,86:L,87:R,88:I,89:N,90:D}),t(O,[2,105]),t(O,[2,107]),t(O,[2,108]),t(O,[2,109]),t(O,[2,110]),t(O,[2,111]),t(O,[2,112]),t(O,[2,113]),t(O,[2,114]),t(O,[2,115]),t(p,[2,102]),t(x,[2,67]),t(p,[2,69],{61:ie}),{60:[1,152]},t(b,[2,14]),{15:153,16:85,17:86,60:l,86:h,100:c,102:u,103:d},{39:[2,12]},t(re,[2,52]),{13:[1,154]},{1:[2,4]},t(M,[2,65]),t(M,[2,64]),{16:39,17:40,19:155,60:l,86:h,100:c,102:u,103:d},t(k,[2,76]),t(p,[2,34]),{41:[1,156]},{24:97,30:98,40:157,41:[2,38],43:23,48:a,54:s,56:o},{24:97,30:98,40:158,41:[2,41],43:23,48:a,54:s,56:o},{45:159,51:C},t(x,[2,45]),{41:[2,58]},t(x,[2,48],{39:[1,160]}),t(p,[2,56]),t(p,[2,88]),t(p,[2,90]),t(p,[2,91],{77:[1,161]}),t(p,[2,94]),t(p,[2,95],{13:[1,162]}),t(p,[2,97],{13:[1,164],77:[1,163]}),{22:E,50:S,60:_,82:A,84:165,85:111,86:L,87:R,88:I,89:N,90:D},t(O,[2,106]),t(te,[2,71]),{39:[2,11]},{14:[1,166]},t(M,[2,66]),t(p,[2,35]),{41:[2,39]},{41:[2,42]},{41:[1,167]},{41:[1,169],45:168,51:C},t(p,[2,92]),t(p,[2,96]),t(p,[2,98]),t(p,[2,99],{77:[1,170]}),t(ne,[2,104],{85:151,22:E,50:S,60:_,82:A,86:L,87:R,88:I,89:N,90:D}),t(re,[2,8]),t(x,[2,47]),{41:[1,171]},t(x,[2,50]),t(p,[2,100]),t(x,[2,49])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],84:[2,36],86:[2,10],127:[2,12],130:[2,4],141:[2,58],153:[2,11],157:[2,39],158:[2,42]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",h=0,c=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,T,k,w,C,E,S={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===x||"u"<typeof x)&&(x=v()),o[T]&&o[T][x]))||!k.length||!k[0]){var _,A=[];for(w in o[T])this.terminals_[w]&&2<w&&A.push("'"+this.terminals_[w]+"'");_=g.showPosition?"Parse error on line "+(h+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(c=g.yyleng,l=g.yytext,h=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],S.$=a[a.length-C],S._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(E=this.performAction.apply(S,[l,c,h,f.yy,k[1],a,s].concat(p)))<"u")return E;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),E=o[i[i.length-2]][i[i.length-1]],i.push(E);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:mt(function(e,t,r,i){switch(r){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4: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:case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;case 30:return this.popState(),8;case 31:break;case 32:return this.begin("namespace-body"),39;case 33:return this.popState(),41;case 34:return"EOF_IN_STRUCT";case 35:return 8;case 36:break;case 37:return"EDGE_STATE";case 38:return this.begin("class"),48;case 39:return this.popState(),8;case 40:break;case 41:return this.popState(),this.popState(),41;case 42:return this.begin("class-body"),39;case 43:return this.popState(),41;case 44:return"EOF_IN_STRUCT";case 45:return"EDGE_STATE";case 46:return"OPEN_IN_STRUCT";case 47:break;case 48:return"MEMBER";case 49:return 83;case 50:return 75;case 51:return 76;case 52:return 78;case 53:return 54;case 54:return 56;case 55:return 46;case 56:return 47;case 57:return 81;case 58:this.popState();break;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 61:this.popState();break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:case 65:case 66:case 67:return 77;case 68:case 69:return 69;case 70:case 71:return 71;case 72:return 70;case 73:return 68;case 74:return 72;case 75:return 73;case 76:return 74;case 77:return 22;case 78:return 44;case 79:return 100;case 80:return 18;case 81:return"PLUS";case 82:return 87;case 83:return 61;case 84:case 85:return 89;case 86:return 90;case 87:case 88:return"EQUALS";case 89:return 60;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 86;case 94:return 102;case 95:case 96:return 50;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}};T.lexer=r,mt(e,"Parser"),(DIe=new((e.prototype=T).Parser=e)).parser=DIe,MIe=DIe}),XIe=i(()=>{ju(),ic(),OIe=["#","+","~","-",""],BIe=class{static{mt(this,"ClassMember")}constructor(e,t){this.memberType=t,this.visibility="",this.classifier="",this.text="",t=Ih(e,P()),this.parseMember(t)}getDisplayDetails(){let e=this.visibility+zh(this.id);"method"===this.memberType&&(e+=`(${zh(this.parameters.trim())})`,this.returnType)&&(e+=" : "+zh(this.returnType)),e=e.trim();var t=this.parseClassifier();return{displayText:e,cssStyle:t}}parseMember(e){let t="";"method"===this.memberType?(r=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(e))&&(n=r[1]?r[1].trim():"",OIe.includes(n)&&(this.visibility=n),this.id=r[2],this.parameters=r[3]?r[3].trim():"",t=r[4]?r[4].trim():"",this.returnType=r[5]?r[5].trim():"",""===t)&&(n=this.returnType.substring(this.returnType.length-1),/[$*]/.exec(n))&&(t=n,this.returnType=this.returnType.substring(0,this.returnType.length-1)):(r=e.length,n=e.substring(0,1),i=e.substring(r-1),OIe.includes(n)&&(this.visibility=n),/[$*]/.exec(i)&&(t=i),this.id=e.substring(""===this.visibility?0:1,""===t?r:r-1)),this.classifier=t,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();var r,i,n=(this.visibility?"\\"+this.visibility:"")+zh(this.id)+("method"===this.memberType?`(${zh(this.parameters)})`+(this.returnType?" : "+zh(this.returnType):""):"");this.text=n.replaceAll("<","&lt;").replaceAll(">","&gt;"),this.text.startsWith("\\&lt;")&&(this.text=this.text.replace("\\&lt;","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}}}),KIe=i(()=>{Sk(),e(),ju(),ic(),S7(),Gu(),Lk(),XIe(),Rn(),PIe="classId-",$Ie=0,FIe=mt(e=>I.sanitizeText(e,P()),"sanitizeText"),zIe=class{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.diagramId="",this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=mt(e=>{let i=JT();Q(e).select("svg").selectAll("g").filter(function(){return null!==Q(this).attr("title")}).on("mouseover",e=>{var t=Q(e.currentTarget),r=t.attr("title");r&&(e=e.currentTarget.getBoundingClientRect(),i.transition().duration(200).style("opacity",".9"),i.html(Ln.sanitize(r)).style("left",window.scrollX+e.left+e.width/2+"px").style("top",window.scrollY+e.bottom+4+"px"),t.classed("hover",!0))}).on("mouseout",e=>{i.transition().duration(500).style("opacity",0),Q(e.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=$c,this.getAccTitle=Fc,this.setAccDescription=zc,this.getAccDescription=qc,this.setDiagramTitle=Wc,this.getDiagramTitle=Uc,this.getConfig=mt(()=>P().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{mt(this,"ClassDB")}splitClassNameAndType(e){let t=I.sanitizeText(e,P()),r="",i=t;return 0<t.indexOf("~")&&(e=t.split("~"),i=FIe(e[0]),r=FIe(e[1])),{className:i,type:r}}setClassLabel(e,t){e=I.sanitizeText(e,P()),t=t&&FIe(t),e=this.splitClassNameAndType(e).className,this.classes.get(e).label=t,this.classes.get(e).text=""+t+(this.classes.get(e).type?`<${this.classes.get(e).type}>`:"")}addClass(e){var e=I.sanitizeText(e,P()),{className:e,type:t}=this.splitClassNameAndType(e);this.classes.has(e)||(e=I.sanitizeText(e,P()),this.classes.set(e,{id:e,type:t,label:e,text:e+(t?`&lt;${t}&gt;`:""),shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:PIe+e+"-"+$Ie}),$Ie++)}addInterface(e,t){e={id:"interface"+this.interfaces.length,label:e,classId:t},this.interfaces.push(e)}setDiagramId(e){this.diagramId=e}lookUpDomId(e){var t,e=I.sanitizeText(e,P());if(this.classes.has(e))return t=this.classes.get(e).domId,this.diagramId?this.diagramId+"-"+t:t;throw new Error("Class not found: "+e)}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.diagramId="",this.direction="TB",Pc()}getClass(e){return this.classes.get(e)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(e){return this.notes.get("number"==typeof e?"note"+e:e)}getNotes(){return this.notes}addRelation(e){B.debug("Adding relation: "+JSON.stringify(e));var t=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];e.relation.type1!==this.relationType.LOLLIPOP||t.includes(e.relation.type2)?e.relation.type2!==this.relationType.LOLLIPOP||t.includes(e.relation.type1)?(this.addClass(e.id1),this.addClass(e.id2)):(this.addClass(e.id1),this.addInterface(e.id2,e.id1),e.id2="interface"+(this.interfaces.length-1)):(this.addClass(e.id2),this.addInterface(e.id1,e.id2),e.id1="interface"+(this.interfaces.length-1)),e.id1=this.splitClassNameAndType(e.id1).className,e.id2=this.splitClassNameAndType(e.id2).className,e.relationTitle1=I.sanitizeText(e.relationTitle1.trim(),P()),e.relationTitle2=I.sanitizeText(e.relationTitle2.trim(),P()),this.relations.push(e)}addAnnotation(e,t){e=this.splitClassNameAndType(e).className,this.classes.get(e).annotations.push(t)}addMember(e,t){this.addClass(e),e=this.splitClassNameAndType(e).className,e=this.classes.get(e),"string"==typeof t&&((t=t.trim()).startsWith("<<")&&t.endsWith(">>")?e.annotations.push(FIe(t.substring(2,t.length-2))):0<t.indexOf(")")?e.methods.push(new BIe(t,"method")):t&&e.members.push(new BIe(t,"attribute")))}addMembers(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(e=>this.addMember(t,e)))}addNote(e,t){var r=this.notes.size,t={id:"note"+r,class:t,text:e,index:r};return this.notes.set(t.id,t),t.id}cleanupLabel(e){return e.startsWith(":")&&(e=e.substring(1)),FIe(e.trim())}setCssClass(e,r){e.split(",").forEach(e=>{let t=e;/\d/.exec(e[0])&&(t=PIe+t),(e=this.classes.get(t))&&(e.cssClasses+=" "+r)})}defineClass(e,i){for(let t of e){let r=this.styleClasses.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},this.styleClasses.set(t,r)),i&&i.forEach(e=>{var t;/color/.exec(e)&&(t=e.replace("fill","bgFill"),r.textStyles.push(t)),r.styles.push(e)}),this.classes.forEach(e=>{e.cssClasses.includes(t)&&e.styles.push(...i.flatMap(e=>e.split(",")))})}}setTooltip(e,t){e.split(",").forEach(e=>{void 0!==t&&(this.classes.get(e).tooltip=FIe(t))})}getTooltip(e,t){return(t&&this.namespaces.has(t)?this.namespaces.get(t):this).classes.get(e).tooltip}setLink(e,r,i){let n=P();e.split(",").forEach(e=>{let t=e;/\d/.exec(e[0])&&(t=PIe+t),(e=this.classes.get(t))&&(e.link=k7.formatUrl(r,n),"sandbox"===n.securityLevel?e.linkTarget="_top":e.linkTarget="string"==typeof i?FIe(i):"_blank")}),this.setCssClass(e,"clickable")}setClickEvent(e,t,r){e.split(",").forEach(e=>{this.setClickFunc(e,t,r),this.classes.get(e).haveCallback=!0}),this.setCssClass(e,"clickable")}setClickFunc(e,i,n){if(e=I.sanitizeText(e,P()),"loose"===P().securityLevel&&void 0!==i){let t=e;if(this.classes.has(t)){let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<r.length;t++){let e=r[t].trim();e.startsWith('"')&&e.endsWith('"')&&(e=e.substr(1,e.length-2)),r[t]=e}}0===r.length&&r.push(t),this.functions.push(()=>{var e=this.lookUpDomId(t);null!==(e=document.querySelector(`[id="${e}"]`))&&e.addEventListener("click",()=>{k7.runFunc(i,...r)},!1)})}}}bindFunctions(t){this.functions.forEach(e=>{e(t)})}escapeHtml(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}getDirection(){return this.direction}setDirection(e){this.direction=e}addNamespace(e){this.namespaces.has(e)||(this.namespaces.set(e,{id:e,classes:new Map,notes:new Map,children:new Map,domId:PIe+e+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(e){return this.namespaces.get(e)}getNamespaces(){return this.namespaces}addClassesToNamespace(e,t,r){if(this.namespaces.has(e)){for(var i of t){var i=this.splitClassNameAndType(i).className,n=this.getClass(i);n.parent=e,this.namespaces.get(e).classes.set(i,n)}for(var a of r){var s=this.getNote(a);s.parent=e,this.namespaces.get(e).notes.set(a,s)}}}setCssStyle(e,t){var r=this.classes.get(e);if(t&&r)for(var i of t)i.includes(",")?r.styles.push(...i.split(",")):r.styles.push(i)}getArrowMarker(e){let t;switch(e){case 0:t="aggregation";break;case 1:t="extension";break;case 2:t="composition";break;case 3:t="dependency";break;case 4:t="lollipop";break;default:t="none"}return t}getData(){var e,t,r,i,n,a=[],s=[],o=P();for(e of this.namespaces.values()){var l={id:e.id,label:e.id,isGroup:!0,padding:o.class.padding??16,shape:"rect",cssStyles:[],look:o.look};a.push(l)}for(t of this.classes.values()){var h={...t,type:void 0,isGroup:!1,parentId:t.parent,look:o.look};a.push(h)}for(r of this.notes.values()){var c={id:r.id,label:r.text,isGroup:!1,shape:"note",padding:o.class.padding??6,cssStyles:["text-align: left","white-space: nowrap","fill: "+o.themeVariables.noteBkgColor,"stroke: "+o.themeVariables.noteBorderColor],look:o.look,parentId:r.parent,labelType:"markdown"};a.push(c),(c=this.classes.get(r.class)?.id)&&(c={id:"edgeNote"+r.index,start:r.id,end:c,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:o.look},s.push(c))}for(i of this.interfaces){var u={id:i.id,label:i.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:o.look};a.push(u)}let d=0;for(n of this.relations){d++;var p={id:E7(n.id1,n.id2,{prefix:"id",counter:d}),start:n.id1,end:n.id2,type:"normal",label:n.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(n.relation.type1),arrowTypeEnd:this.getArrowMarker(n.relation.type2),startLabelRight:"none"===n.relationTitle1?"":n.relationTitle1,endLabelLeft:"none"===n.relationTitle2?"":n.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:n.style||"",pattern:1==n.relation.lineType?"dashed":"solid",look:o.look,labelType:"markdown"};s.push(p)}return{nodes:a,edges:s,other:{},config:o,direction:this.getDirection()}}}}),ZIe=i(()=>{sde(),qIe=mt(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;
}
${Kue()}
`,"getStyles"),WIe=qIe}),QIe=i(()=>{ju(),e(),QO(),tde(),rde(),S7(),UIe=mt((e,t="TB")=>{if(!e.doc)return t;let r=t;for(var i of e.doc)"dir"===i.stmt&&(r=i.value);return r},"getDir"),GIe=mt(function(e,t){return t.db.getClasses()},"getClasses"),jIe=mt(async function(e,t,r,i){B.info("REF0:"),B.info("Drawing class diagram (v3)",t);var{securityLevel:n,state:a,layout:s}=P(),o=(i.db.setDiagramId(t),i.db.getData()),n=$O(t,n);o.type=i.type,o.layoutAlgorithm=Fue(s),o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["aggregation","extension","composition","dependency","lollipop"],o.diagramId=t,await $ue(o,n),k7.insertTitle(n,"classDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),zue(n,8,"classDiagram",a?.useMaxWidth??!0)},"draw"),VIe={getClasses:GIe,draw:jIe,getDir:UIe}}),JIe={};sYe(JIe,{diagram:()=>eNe});var eNe,tNe=i(()=>{HIe(),KIe(),ZIe(),QIe(),eNe={parser:MIe,get db(){return new zIe},renderer:VIe,styles:WIe,init:mt(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),rNe={};sYe(rNe,{diagram:()=>iNe});var iNe,nNe,aNe,sNe,oNe,lNe,hNe,cNe,uNe,dNe,pNe,gNe,fNe,mNe,yNe,vNe,xNe,bNe,TNe,kNe,wNe,CNe,ENe,SNe,_Ne,ANe,LNe,RNe,INe,NNe,DNe,MNe,ONe,BNe,PNe,$Ne,FNe=i(()=>{HIe(),KIe(),ZIe(),QIe(),iNe={parser:MIe,get db(){return new zIe},renderer:VIe,styles:WIe,init:mt(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),zNe=i(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,2],i=[1,3],n=[1,4],a=[2,4],s=[1,9],o=[1,11],l=[1,16],h=[1,17],c=[1,18],u=[1,19],d=[1,33],p=[1,20],g=[1,21],f=[1,22],m=[1,23],y=[1,24],v=[1,26],x=[1,27],b=[1,28],T=[1,29],k=[1,30],w=[1,31],C=[1,32],E=[1,35],S=[1,36],_=[1,37],A=[1,38],L=[1,34],R=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],I=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],N=[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],r={trace:mt(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,"--\x3e":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:"--\x3e",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:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 3:return i.setRootDoc(a[o]),a[o];case 4:this.$=[];break;case 5:"nl"!=a[o]&&(a[o-1].push(a[o]),this.$=a[o-1]);break;case 6:case 7:this.$=a[o];break;case 8:this.$="nl";break;case 12:this.$=a[o];break;case 13:(h=a[o-1]).description=i.trimColon(a[o]),this.$=h;break;case 14:this.$={stmt:"relation",state1:a[o-2],state2:a[o]};break;case 15:h=i.trimColon(a[o]),this.$={stmt:"relation",state1:a[o-3],state2:a[o-1],description:h};break;case 19:this.$={stmt:"state",id:a[o-3],type:"default",description:"",doc:a[o-1]};break;case 20:var l,h=a[o],c=a[o-2].trim();a[o].match(":")&&(h=(l=a[o].split(":"))[0],c=[c,l[1]]),this.$={stmt:"state",id:h,type:"default",description:c};break;case 21:this.$={stmt:"state",id:a[o-3],type:"default",description:a[o-5],doc:a[o-1]};break;case 22:this.$={stmt:"state",id:a[o],type:"fork"};break;case 23:this.$={stmt:"state",id:a[o],type:"join"};break;case 24:this.$={stmt:"state",id:a[o],type:"choice"};break;case 25:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:a[o-1].trim(),note:{position:a[o-2].trim(),text:a[o].trim()}};break;case 29:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 30:case 31:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:a[o-3],url:a[o-2],tooltip:a[o-1]};break;case 33:this.$={stmt:"click",id:a[o-3],url:a[o-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:a[o-1].trim(),classes:a[o].trim()};break;case 36:this.$={stmt:"style",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 37:this.$={stmt:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:a[o].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:a[o-2].trim(),classes:[a[o].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:r,5:i,6:n},{1:[3]},{3:5,4:r,5:i,6:n},{3:6,4:r,5:i,6:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:h,19:c,22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:T,41:k,45:w,48:C,51:E,52:S,53:_,54:A,57:L},t(R,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:l,17:h,19:c,22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:T,41:k,45:w,48:C,51:E,52:S,53:_,54:A,57:L},t(R,[2,7]),t(R,[2,8]),t(R,[2,9]),t(R,[2,10]),t(R,[2,11]),t(R,[2,12],{14:[1,40],15:[1,41]}),t(R,[2,16]),{18:[1,42]},t(R,[2,18],{20:[1,43]}),{23:[1,44]},t(R,[2,22]),t(R,[2,23]),t(R,[2,24]),t(R,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(R,[2,28]),{34:[1,49]},{36:[1,50]},t(R,[2,31]),{13:51,24:d,57:L},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(I,[2,44],{58:[1,56]}),t(I,[2,45],{58:[1,57]}),t(R,[2,38]),t(R,[2,39]),t(R,[2,40]),t(R,[2,41]),t(R,[2,6]),t(R,[2,13]),{13:58,24:d,57:L},t(R,[2,17]),t(N,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(R,[2,29]),t(R,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(R,[2,14],{14:[1,71]}),{4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:h,19:c,21:[1,72],22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:T,41:k,45:w,48:C,51:E,52:S,53:_,54:A,57:L},t(R,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(R,[2,34]),t(R,[2,35]),t(R,[2,36]),t(R,[2,37]),t(I,[2,46]),t(I,[2,47]),t(R,[2,15]),t(R,[2,19]),t(N,a,{7:78}),t(R,[2,26]),t(R,[2,27]),{5:[1,79]},{5:[1,80]},{4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:h,19:c,21:[1,81],22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:T,41:k,45:w,48:C,51:E,52:S,53:_,54:A,57:L},t(R,[2,32]),t(R,[2,33]),t(R,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",h=0,c=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,T,k,w,C,E,S={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===x||"u"<typeof x)&&(x=v()),o[T]&&o[T][x]))||!k.length||!k[0]){var _,A=[];for(w in o[T])this.terminals_[w]&&2<w&&A.push("'"+this.terminals_[w]+"'");_=g.showPosition?"Parse error on line "+(h+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(c=g.yyleng,l=g.yytext,h=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],S.$=a[a.length-C],S._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(E=this.performAction.apply(S,[l,c,h,f.yy,k[1],a,s].concat(p)))<"u")return E;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),E=o[i[i.length-2]][i[i.length-1]],i.push(E);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){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:case 9:break;case 10:return 5;case 11:case 12:case 13:case 14:break;case 15:return this.pushState("SCALE"),17;case 16:return 18;case 17:this.popState();break;case 18:return this.begin("acc_title"),33;case 19:return this.popState(),"acc_title_value";case 20:return this.begin("acc_descr"),35;case 21:return this.popState(),"acc_descr_value";case 22:this.begin("acc_descr_multiline");break;case 23:this.popState();break;case 24:return"acc_descr_multiline_value";case 25:return this.pushState("CLASSDEF"),41;case 26:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 27:return this.popState(),this.pushState("CLASSDEFID"),42;case 28:return this.popState(),43;case 29:return this.pushState("CLASS"),48;case 30:return this.popState(),this.pushState("CLASS_STYLE"),49;case 31:return this.popState(),50;case 32:return this.pushState("STYLE"),45;case 33:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 34:return this.popState(),47;case 35:return this.pushState("SCALE"),17;case 36:return 18;case 37:this.popState();break;case 38:this.pushState("STATE");break;case 39:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),25;case 40:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),26;case 41:return this.popState(),t.yytext=t.yytext.slice(0,-10).trim(),27;case 42:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),25;case 43:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),26;case 44:return this.popState(),t.yytext=t.yytext.slice(0,-10).trim(),27;case 45:return 51;case 46:return 52;case 47:return 53;case 48:return 54;case 49:this.pushState("STATE_STRING");break;case 50:return this.pushState("STATE_ID"),"AS";case 51:return this.popState(),"ID";case 52:this.popState();break;case 53:return"STATE_DESCR";case 54:return 19;case 55:this.popState();break;case 56:return this.popState(),this.pushState("struct"),20;case 57:break;case 58:return this.popState(),21;case 59:break;case 60:return this.begin("NOTE"),29;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:return this.popState(),this.pushState("NOTE_ID"),60;case 63:this.popState(),this.pushState("FLOATING_NOTE");break;case 64:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 65:break;case 66:return"NOTE_TEXT";case 67:return this.popState(),"ID";case 68:return this.popState(),this.pushState("NOTE_TEXT"),24;case 69:return this.popState(),t.yytext=t.yytext.substr(2).trim(),31;case 70:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),31;case 71:case 72:return 6;case 73:return 16;case 74:return 57;case 75:return 24;case 76:return t.yytext=t.yytext.trim(),14;case 77:return 15;case 78:return 28;case 79:return 58;case 80:return 5;case 81:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[12,13],inclusive:!1},struct:{rules:[12,13,25,29,32,38,45,46,47,48,57,58,59,60,74,75,76,77,78,79],inclusive:!1},FLOATING_NOTE_ID:{rules:[67],inclusive:!1},FLOATING_NOTE:{rules:[64,65,66],inclusive:!1},NOTE_TEXT:{rules:[69,70],inclusive:!1},NOTE_ID:{rules:[68],inclusive:!1},NOTE:{rules:[61,62,63],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[34],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[33],inclusive:!1},CLASS_STYLE:{rules:[31],inclusive:!1},CLASS:{rules:[30],inclusive:!1},CLASSDEFID:{rules:[28],inclusive:!1},CLASSDEF:{rules:[26,27],inclusive:!1},acc_descr_multiline:{rules:[23,24],inclusive:!1},acc_descr:{rules:[21],inclusive:!1},acc_title:{rules:[19],inclusive:!1},SCALE:{rules:[16,17,36,37],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[51],inclusive:!1},STATE_STRING:{rules:[52,53],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[12,13,39,40,41,42,43,44,49,50,54,55,56],inclusive:!1},ID:{rules:[12,13],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,18,20,22,25,29,32,35,38,56,60,71,72,73,74,75,76,77,79,80,81],inclusive:!0}}};r.lexer=i,mt(e,"Parser"),(nNe=new((e.prototype=r).Parser=e)).parser=nNe,aNe=nNe}),qNe=i(()=>{oNe="root",lNe="relation",hNe="classDef",cNe="style",uNe="applyClass",dNe="default",gNe="fill:none",fNe="fill: #333",mNe="markdown",yNe="normal",vNe="rect",xNe="rectWithTitle",bNe="stateStart",TNe="stateEnd",kNe=pNe="divider",wNe="roundedWithTitle",ENe="noteGroup",_Ne=(SNe="statediagram")+"-state",LNe=(ANe="transition")+" note-edge",RNe=SNe+"-note",INe=SNe+"-cluster",NNe=SNe+"-cluster-alt",ONe=sNe="state",PNe=(BNe="----")+(MNe=CNe="note"),$Ne=""+BNe+(DNe="parent")});function WNe(e="",t=0,r="",i=BNe){return i=null!==r&&0<r.length?""+i+r:"",ONe+`-${e}${i}-`+t}function UNe(e,t,r){var i;t.id&&"</join></fork>"!==t.id&&"</choice>"!==t.id&&(t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(" ").forEach(e=>{(e=r.get(e))&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...e.styles])})),(i=e.find(e=>e.id===t.id))?Object.assign(i,t):e.push(t))}function GNe(e){return e?.classes?.join(" ")??""}function jNe(e){return e?.styles??[]}var VNe,YNe,HNe,XNe,KNe,ZNe,QNe,JNe,eDe,tDe,rDe,iDe,nDe,aDe,sDe,oDe,lDe,hDe,cDe,uDe,dDe,pDe,gDe,fDe,mDe,yDe,vDe,xDe,bDe,TDe,kDe,wDe,CDe,EDe,SDe,_De,ADe,LDe=i(()=>{ju(),e(),ic(),qNe(),VNe=new Map,YNe=0,mt(WNe,"stateDomId"),HNe=mt((r,e,i,n,a,s,o,l)=>{B.trace("items",e),e.forEach(e=>{switch(e.stmt){case sNe:case dNe:KNe(r,e,i,n,a,s,o,l);break;case lNe:KNe(r,e.state1,i,n,a,s,o,l),KNe(r,e.state2,i,n,a,s,o,l);var t={id:"edge"+YNe,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:"neo"===o?"arrow_barb_neo":"arrow_barb",style:gNe,labelStyle:"",label:I.sanitizeText(e.description??"",P()),arrowheadStyle:fNe,labelpos:"c",labelType:mNe,thickness:yNe,classes:ANe,look:o};a.push(t),YNe++}})},"setupDoc"),XNe=mt((e,t="TB")=>{let r=t;if(e.doc)for(var i of e.doc)"dir"===i.stmt&&(r=i.value);return r},"getDir"),mt(UNe,"insertOrUpdateNode"),mt(GNe,"getClassesFromDbInfo"),mt(jNe,"getStylesFromDbInfo"),KNe=mt((r,i,e,n,a,t,s,o)=>{var l=i.id,h=e.get(l),c=GNe(h),u=jNe(h),d=P();if(B.info("dataFetcher parsedItem",i,h,u),"root"!==l){let e=vNe;if(!0===i.start?e=bNe:!1===i.start&&(e=TNe),i.type!==dNe&&(e=i.type),VNe.get(l)||VNe.set(l,{id:l,shape:e,description:I.sanitizeText(l,d),cssClasses:c+" "+_Ne,cssStyles:u}),h=VNe.get(l),i.description&&(Array.isArray(h.description)?(h.shape=xNe,h.description.push(i.description)):h.description?.length&&0<h.description.length?(h.shape=xNe,h.description===l?h.description=[i.description]:h.description=[h.description,i.description]):(h.shape=vNe,h.description=i.description),h.description=I.sanitizeTextOrArray(h.description,d)),1===h.description?.length&&h.shape===xNe&&("group"===h.type?h.shape=wNe:h.shape=vNe),!h.type&&i.doc&&(B.info("Setting cluster for XCX",l,XNe(i)),h.type="group",h.isGroup=!0,h.dir=XNe(i),h.shape=i.type===pNe?kNe:wNe,h.cssClasses=h.cssClasses+` ${INe} `+(t?NNe:"")),(c={labelStyle:"",shape:h.shape,label:h.description,cssClasses:h.cssClasses,cssCompiledStyles:[],cssStyles:h.cssStyles,id:l,dir:h.dir,domId:WNe(l,YNe),type:h.type,isGroup:"group"===h.type,padding:8,rx:10,ry:10,look:s,labelType:"markdown"}).shape===kNe&&(c.label=""),r&&"root"!==r.id&&(B.trace("Setting node ",l," to be child of its parent ",r.id),c.parentId=r.id),c.centerLabel=!0,i.note){u={labelStyle:"",shape:CNe,label:i.note.text,labelType:"markdown",cssClasses:RNe,cssStyles:[],cssCompiledStyles:[],id:l+PNe+"-"+YNe,domId:WNe(l,YNe,MNe),type:h.type,isGroup:"group"===h.type,padding:d.flowchart?.padding,look:s,position:i.note.position},r=l+$Ne,d={labelStyle:"",shape:ENe,label:i.note.text,cssClasses:h.cssClasses,cssStyles:[],id:l+$Ne,domId:WNe(l,YNe,DNe),type:"group",isGroup:!0,padding:16,look:s,position:i.note.position},YNe++,u.parentId=d.id=r,UNe(n,d,o),UNe(n,u,o),UNe(n,c,o);let e=l,t=u.id;"left of"===i.note.position&&(e=u.id,t=l),a.push({id:e+"-"+t,start:e,end:t,arrowhead:"none",arrowTypeEnd:"",style:gNe,labelStyle:"",classes:LNe,arrowheadStyle:fNe,labelpos:"c",labelType:mNe,thickness:yNe,look:s})}else UNe(n,c,o)}i.doc&&(B.trace("Adding nodes children "),HNe(i,i.doc,e,n,a,!t,s,o))},"dataFetcher"),ZNe=mt(()=>{VNe.clear(),YNe=0},"reset")}),RDe=i(()=>{ju(),e(),QO(),tde(),rde(),S7(),qNe(),QNe=mt((e,t="TB")=>{if(!e.doc)return t;let r=t;for(var i of e.doc)"dir"===i.stmt&&(r=i.value);return r},"getDir"),JNe=mt(function(e,t){return t.db.getClasses()},"getClasses"),eDe=mt(async function(e,t,r,i){B.info("REF0:"),B.info("Drawing state diagram (v2)",t);var{securityLevel:n,state:a,layout:s}=P();i.db.extract(i.db.getRootDocV2());let o=i.db.getData(),l=$O(t,n);o.type=i.type,o.layoutAlgorithm=s,o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,"neo"===P().look?o.markers=["barbNeo"]:o.markers=["barb"],o.diagramId=t,await $ue(o,l);try{("function"==typeof i.db.getLinks?i.db.getLinks():new Map).forEach((a,e)=>{let s="string"==typeof e?e:"string"==typeof e?.id?e.id:"";if(s){let e=l.node()?.querySelectorAll("g"),t,r,i,n;e?.forEach(e=>{e.textContent?.trim()===s&&(t=e)}),t?(r=t.parentNode)?(i=document.createElementNS("http://www.w3.org/2000/svg","a"),n=a.url.replace(/^"+|"+$/g,""),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n),i.setAttribute("target","_blank"),a.tooltip&&(n=a.tooltip.replace(/^"+|"+$/g,""),i.setAttribute("title",n)),r.replaceChild(i,t),i.appendChild(t),B.info("🔗 Wrapped node in <a> tag for:",s,a.url)):B.warn("⚠️ Node has no parent, cannot wrap:",s):B.warn("⚠️ Could not find node matching text:",s)}else B.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(e))})}catch(e){B.error("❌ Error injecting clickable links:",e)}k7.insertTitle(l,"statediagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),zue(l,8,SNe,a?.useMaxWidth??!0)},"draw"),tDe={getClasses:JNe,draw:eDe,getDir:QNe}}),IDe=i(()=>{ju(),e(),S7(),ic(),Gu(),LDe(),RDe(),qNe(),rDe={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},iDe=mt(()=>new Map,"newClassesList"),nDe=mt(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),aDe=mt(e=>JSON.parse(JSON.stringify(e)),"clone"),sDe=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=iDe(),this.documents={root:nDe()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=Fc,this.setAccTitle=$c,this.getAccDescription=qc,this.setAccDescription=zc,this.setDiagramTitle=Wc,this.getDiagramTitle=Uc,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}static{mt(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(e){this.clear(!0);for(var t of Array.isArray(e)?e:e.doc)switch(t.stmt){case sNe:this.addState(t.id.trim(),t.type,t.doc,t.description,t.note);break;case lNe:this.addRelation(t.state1,t.state2,t.description);break;case hNe:this.addStyleClass(t.id.trim(),t.classes);break;case cNe:this.handleStyleDef(t);break;case uNe:this.setCssClass(t.id.trim(),t.styleClass);break;case"click":this.addLink(t.id,t.url,t.tooltip)}var r,e=this.getStates(),i=P();ZNe(),KNe(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,i.look,this.classes);for(r of this.nodes)if(Array.isArray(r.label)){if(r.description=r.label.slice(1),r.isGroup&&0<r.description.length)throw new Error(`Group nodes can only have label. Remove the additional description for node [${r.id}]`);r.label=r.label[0]}}handleStyleDef(e){var t,r,i=e.id.trim().split(","),n=e.styleClass.split(",");for(t of i){let e=this.getState(t);e||(r=t.trim(),this.addState(r),e=this.getState(r)),e&&(e.styles=n.map(e=>e.replace(/;/g,"")?.trim()))}}setRootDoc(e){B.info("Setting root doc",e),this.rootDoc=e,1===this.version?this.extract(e):this.extract(this.getRootDocV2())}docTranslator(r,i,e){if(i.stmt===lNe)this.docTranslator(r,i.state1,!0),this.docTranslator(r,i.state2,!1);else if(i.stmt===sNe&&(i.id===rDe.START_NODE?(i.id=r.id+(e?"_start":"_end"),i.start=e):i.id=i.id.trim()),(i.stmt===oNe||i.stmt===sNe)&&i.doc){let e=[],t=[];for(var n of i.doc){var a;n.type===pNe?((a=aDe(n)).doc=aDe(t),e.push(a),t=[]):t.push(n)}0<e.length&&0<t.length&&(r={stmt:sNe,id:c7(),type:"divider",doc:aDe(t)},e.push(aDe(r)),i.doc=e),i.doc.forEach(e=>this.docTranslator(i,e,!0))}}getRootDocV2(){return this.docTranslator({id:oNe,stmt:oNe},{id:oNe,stmt:oNe,doc:this.rootDoc},!0),{id:oNe,doc:this.rootDoc}}addState(e,t=dNe,r=void 0,i=void 0,n=void 0,a=void 0,s=void 0,o=void 0){let l=e?.trim();if(this.currentDocument.states.has(l)){if(!(e=this.currentDocument.states.get(l)))throw new Error("State not found: "+l);e.doc||(e.doc=r),e.type||(e.type=t)}else B.info("Adding state ",l,i),this.currentDocument.states.set(l,{stmt:sNe,id:l,descriptions:[],type:t,doc:r,note:n,classes:[],styles:[],textStyles:[]});if(i&&(B.info("Setting state description",l,i),(Array.isArray(i)?i:[i]).forEach(e=>this.addDescription(l,e.trim()))),n){if(!(e=this.currentDocument.states.get(l)))throw new Error("State not found: "+l);e.note=n,e.note.text=I.sanitizeText(e.note.text,P())}a&&(B.info("Setting state classes",l,a),(Array.isArray(a)?a:[a]).forEach(e=>this.setCssClass(l,e.trim()))),s&&(B.info("Setting state styles",l,s),(Array.isArray(s)?s:[s]).forEach(e=>this.setStyle(l,e.trim()))),o&&(B.info("Setting state styles",l,s),(Array.isArray(o)?o:[o]).forEach(e=>this.setTextStyle(l,e.trim())))}clear(e){this.nodes=[],this.edges=[],this.documents={root:nDe()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=iDe(),e||(this.links=new Map,Pc())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){B.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,t,r){this.links.set(e,{url:t,tooltip:r}),B.warn("Adding link",e,t,r)}getLinks(){return this.links}startIdIfNeeded(e=""){return e===rDe.START_NODE?(this.startEndCount++,""+rDe.START_TYPE+this.startEndCount):e}startTypeIfNeeded(e="",t=dNe){return e===rDe.START_NODE?rDe.START_TYPE:t}endIdIfNeeded(e=""){return e===rDe.END_NODE?(this.startEndCount++,""+rDe.END_TYPE+this.startEndCount):e}endTypeIfNeeded(e="",t=dNe){return e===rDe.END_NODE?rDe.END_TYPE:t}addRelationObjs(e,t,r=""){var 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:I.sanitizeText(r,P())})}addRelation(e,t,r){var i,n;"object"==typeof e&&"object"==typeof t?this.addRelationObjs(e,t,r):"string"==typeof e&&"string"==typeof t&&(i=this.startIdIfNeeded(e.trim()),e=this.startTypeIfNeeded(e),n=this.endIdIfNeeded(t.trim()),t=this.endTypeIfNeeded(t),this.addState(i,e),this.addState(n,t),this.currentDocument.relations.push({id1:i,id2:n,relationTitle:r?I.sanitizeText(r,P()):void 0}))}addDescription(e,t){e=this.currentDocument.states.get(e),t=t.startsWith(":")?t.replace(":","").trim():t,e?.descriptions?.push(I.sanitizeText(t,P()))}cleanupLabel(e){return(e.startsWith(":")?e.slice(2):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(rDe.STYLECLASS_SEP).forEach(e=>{var t=e.replace(/([^;]*);/,"$1").trim();RegExp(rDe.COLOR_KEYWORD).exec(e)&&(e=t.replace(rDe.FILL_KEYWORD,rDe.BG_FILL).replace(rDe.COLOR_KEYWORD,rDe.FILL_KEYWORD),r.textStyles.push(e)),r.styles.push(t)})}getClasses(){return this.classes}setCssClass(e,r){e.split(",").forEach(e=>{let t=this.getState(e);t||(e=e.trim(),this.addState(e),t=this.getState(e)),t?.classes?.push(r)})}setStyle(e,t){this.getState(e)?.styles?.push(t)}setTextStyle(e,t){this.getState(e)?.textStyles?.push(t)}getDirectionStatement(){return this.rootDoc.find(e=>"dir"===e.stmt)}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(e){var t=this.getDirectionStatement();t?t.value=e:this.rootDoc.unshift({stmt:"dir",value:e})}trimColon(e){return(e.startsWith(":")?e.slice(1):e).trim()}getData(){var e=P();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:QNe(this.getRootDocV2())}}getConfig(){return P().state}}}),NDe=i(()=>{oDe=mt(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||"#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||"#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"),lDe=oDe}),DDe=i(()=>{Sk(),IDe(),S7(),ic(),ju(),e(),hDe=mt(e=>e.append("circle").attr("class","start-state").attr("r",P().state.sizeUnit).attr("cx",P().state.padding+P().state.sizeUnit).attr("cy",P().state.padding+P().state.sizeUnit),"drawStartState"),cDe=mt(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",P().state.textHeight).attr("class","divider").attr("x2",2*P().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),uDe=mt((e,t)=>{var r=(t=e.append("text").attr("x",2*P().state.padding).attr("y",P().state.textHeight+2*P().state.padding).attr("font-size",P().state.fontSize).attr("class","state-title").text(t.id)).node().getBBox();return e.insert("rect",":first-child").attr("x",P().state.padding).attr("y",P().state.padding).attr("width",r.width+2*P().state.padding).attr("height",r.height+2*P().state.padding).attr("rx",P().state.radius),t},"drawSimpleState"),dDe=mt((e,t)=>{let r=mt(function(e,t,r){e=e.append("tspan").attr("x",2*P().state.padding).text(t),r||e.attr("dy",P().state.textHeight)},"addTspan"),i=e.append("text").attr("x",2*P().state.padding).attr("y",P().state.textHeight+1.3*P().state.padding).attr("font-size",P().state.fontSize).attr("class","state-title").text(t.descriptions[0]).node().getBBox(),n=i.height,a=e.append("text").attr("x",P().state.padding).attr("y",n+.4*P().state.padding+P().state.dividerMargin+P().state.textHeight).attr("class","state-description"),s=!0,o=!0;t.descriptions.forEach(function(e){s||(r(a,e,o),o=!1),s=!1});var t=e.append("line").attr("x1",P().state.padding).attr("y1",P().state.padding+n+P().state.dividerMargin/2).attr("y2",P().state.padding+n+P().state.dividerMargin/2).attr("class","descr-divider"),l=a.node().getBBox(),h=Math.max(l.width,i.width);return t.attr("x2",h+3*P().state.padding),e.insert("rect",":first-child").attr("x",P().state.padding).attr("y",P().state.padding).attr("width",h+2*P().state.padding).attr("height",l.height+n+2*P().state.padding).attr("rx",P().state.radius),e},"drawDescrState"),pDe=mt((e,t,r)=>{let i=P().state.padding,n=2*P().state.padding,a=e.node().getBBox(),s=a.width,o=a.x,l=e.append("text").attr("x",0).attr("y",P().state.titleShift).attr("font-size",P().state.fontSize).attr("class","state-title").text(t.id),h=l.node().getBBox().width+n,c=Math.max(h,s);c===s&&(c+=n);let u,d=e.node().getBBox();return t.doc,u=o-i,s<h&&(u=(s-c)/2+i),Math.abs(o-d.x)<i&&s<h&&(u=o-(h-s)/2),t=1-P().state.textHeight,e.insert("rect",":first-child").attr("x",u).attr("y",t).attr("class",r?"alt-composit":"composit").attr("width",c).attr("height",d.height+P().state.textHeight+P().state.titleShift+1).attr("rx","0"),l.attr("x",u+i),h<=s&&l.attr("x",o+(c-n)/2-h/2+i),e.insert("rect",":first-child").attr("x",u).attr("y",P().state.titleShift-P().state.textHeight-P().state.padding).attr("width",c).attr("height",3*P().state.textHeight).attr("rx",P().state.radius),e.insert("rect",":first-child").attr("x",u).attr("y",P().state.titleShift-P().state.textHeight-P().state.padding).attr("width",c).attr("height",d.height+3+2*P().state.textHeight).attr("rx",P().state.radius),e},"addTitleAndBox"),gDe=mt(e=>(e.append("circle").attr("class","end-state-outer").attr("r",P().state.sizeUnit+P().state.miniPadding).attr("cx",P().state.padding+P().state.sizeUnit+P().state.miniPadding).attr("cy",P().state.padding+P().state.sizeUnit+P().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",P().state.sizeUnit).attr("cx",P().state.padding+P().state.sizeUnit+2).attr("cy",P().state.padding+P().state.sizeUnit+2)),"drawEndState"),fDe=mt((e,t)=>{let r=P().state.forkWidth,i=P().state.forkHeight;return t.parentId&&(t=r,r=i,i=t),e.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",i).attr("x",P().state.padding).attr("y",P().state.padding)},"drawForkJoinState"),mDe=mt((e,t,r,i)=>{let n=0,a=i.append("text"),s=(a.style("text-anchor","start"),a.attr("class","noteText"),e.replace(/\r\n/g,"<br/>")),o=(s=s.replace(/\n/g,"<br/>")).split(I.lineBreakRegex),l=1.25*P().state.noteMargin;for(var h of o){var c;0<(h=h.trim()).length&&((c=a.append("tspan")).text(h),0===l&&(h=c.node().getBBox(),l+=h.height),n+=l,c.attr("x",t+P().state.noteMargin),c.attr("y",r+n+1.25*P().state.noteMargin))}return{textWidth:a.node().getBBox().width,textHeight:n}},"_drawLongText"),yDe=mt((e,t)=>{t.attr("class","state-note");var r=t.append("rect").attr("x",0).attr("y",P().state.padding),t=t.append("g"),{textWidth:e,textHeight:t}=mDe(e,0,0,t);return r.attr("height",t+2*P().state.noteMargin),r.attr("width",e+2*P().state.noteMargin),r},"drawNote"),vDe=mt(function(e,t){var r={id:i=t.id,label:t.id,width:0,height:0},e=e.append("g").attr("id",i).attr("class","stateGroup"),i=("start"===t.type&&hDe(e),"end"===t.type&&gDe(e),"fork"!==t.type&&"join"!==t.type||fDe(e,t),"note"===t.type&&yDe(t.note.text,e),"divider"===t.type&&cDe(e),"default"===t.type&&0===t.descriptions.length&&uDe(e,t),"default"===t.type&&0<t.descriptions.length&&dDe(e,t),e.node().getBBox());return r.width=i.width+2*P().state.padding,r.height=i.height+2*P().state.padding,r},"drawState"),xDe=0,bDe=mt(function(h,c,u){var d=mt(function(e){switch(e){case sDe.relationType.AGGREGATION:return"aggregation";case sDe.relationType.EXTENSION:return"extension";case sDe.relationType.COMPOSITION:return"composition";case sDe.relationType.DEPENDENCY:return"dependency"}},"getRelationType");c.points=c.points.filter(e=>!Number.isNaN(e.y));let e=c.points,t=C3().x(function(e){return e.x}).y(function(e){return e.y}).curve(z3),r=h.append("path").attr("d",t(e)).attr("id","edge"+xDe).attr("class","transition"),i="";if(P().state.arrowMarkerAbsolute&&(i=Ph(!0)),r.attr("marker-end","url("+i+"#"+d(sDe.relationType.DEPENDENCY)+"End)"),void 0!==u.title){let t=h.append("g").attr("class","stateLabel"),{x:r,y:i}=k7.calcLabelPosition(c.points),n=I.getRows(u.title),a=0,s=[],o=0,l=0;for(let e=0;e<=n.length;e++){var p=t.append("text").attr("text-anchor","middle").text(n[e]).attr("x",r).attr("y",i+a),g=p.node().getBBox();o=Math.max(o,g.width),l=Math.min(l,g.x),B.info(g.x,r,i+a),0===a&&(a=p.node().getBBox().height,B.info("Title height",a,i)),s.push(p)}let e=a*n.length;if(1<n.length){let r=(n.length-1)*a*.5;s.forEach((e,t)=>e.attr("y",i+t*a-r)),e=a*n.length}d=t.node().getBBox(),t.insert("rect",":first-child").attr("class","box").attr("x",r-o/2-P().state.padding/2).attr("y",i-e/2-P().state.padding/2-3.5).attr("width",o+P().state.padding).attr("height",e+P().state.padding),B.info(d)}xDe++},"drawEdge")}),MDe=i(()=>{Sk(),TZ(),lH(),e(),ic(),DDe(),ju(),Rc(),kDe={},wDe=mt(function(){},"setConf"),CDe=mt(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"),EDe=mt(function(e,t,r,i){TDe=P().state;let n=P().securityLevel,a;"sandbox"===n&&(a=Q("#i"+t));var s=Q("sandbox"===n?a.nodes()[0].contentDocument.body:"body"),o="sandbox"===n?a.nodes()[0].contentDocument:document,e=(B.debug("Rendering diagram "+e),s.select(`[id='${t}']`)),l=(CDe(e),i.db.getRootDoc()),t=e.append("g").attr("id",t+"-root"),l=(_De(l,t,void 0,!1,s,o,i),TDe.padding),s=(t=e.node().getBBox()).width+2*l;xc(e,o=t.height+2*l,1.75*s,TDe.useMaxWidth),e.attr("viewBox",`${t.x-TDe.padding} ${t.y-TDe.padding} `+s+" "+o)},"draw"),SDe=mt(e=>e?e.length*TDe.fontSizeFactor:1,"getLabelWidth"),_De=mt((e,t,r,i,n,a,s)=>{let o=new sH({compound:!0,multigraph:!0}),l,h=!0;for(l=0;l<e.length;l++)if("relation"===e[l].stmt){h=!1;break}r?o.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:h?1:TDe.edgeLengthFactor,nodeSep:h?1:50,isMultiGraph:!0}):o.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:h?1:TDe.edgeLengthFactor,nodeSep:h?1:50,ranker:"tight-tree",isMultiGraph:!0}),o.setDefaultEdgeLabel(function(){return{}});var c,u=s.db.getStates(),d=s.db.getRelations();for(c of Object.keys(u)){var p,g,f=u[c];r&&(f.parentId=r);let e;f.doc?(g=t.append("g").attr("id",f.id).attr("class","stateGroup"),e=_De(f.doc,g,f.id,!i,n,a,s),g=(g=pDe(g,f,i)).node().getBBox(),e.width=g.width,e.height=g.height+TDe.padding/2,kDe[f.id]={y:TDe.compositTitleSize}):e=vDe(t,f,o),f.note?(g={descriptions:[],id:f.id+"-note",note:f.note,type:"note"},p=vDe(t,g,o),"left of"===f.note.position?(o.setNode(e.id+"-note",p),o.setNode(e.id,e)):(o.setNode(e.id,e),o.setNode(e.id+"-note",p)),o.setParent(e.id,e.id+"-group"),o.setParent(e.id+"-note",e.id+"-group")):o.setNode(e.id,e)}B.debug("Count=",o.nodeCount(),o);let m=0,y=(d.forEach(function(e){m++,B.debug("Setting edge",e),o.setEdge(e.id1,e.id2,{relation:e,width:SDe(e.title),height:TDe.labelHeight*I.getRows(e.title).length,labelpos:"c"},"id"+m)}),HK(o),B.debug("Graph after layout",o.nodes()),t.node());o.nodes().forEach(function(e){void 0!==e&&void 0!==o.node(e)?(B.warn("Node "+e+": "+JSON.stringify(o.node(e))),n.select("#"+y.id+" #"+e).attr("transform","translate("+(o.node(e).x-o.node(e).width/2)+","+(o.node(e).y+(kDe[e]?kDe[e].y:0)-o.node(e).height/2)+" )"),n.select("#"+y.id+" #"+e).attr("data-x-shift",o.node(e).x-o.node(e).width/2),a.querySelectorAll("#"+y.id+" #"+e+" .divider").forEach(e=>{let t=e.parentElement,r=0,i=0;t&&(t.parentElement&&(r=t.parentElement.getBBox().width),i=parseInt(t.getAttribute("data-x-shift"),10),Number.isNaN(i))&&(i=0),e.setAttribute("x1",0-i+8),e.setAttribute("x2",r-i-8)})):B.debug("No Node "+e+": "+JSON.stringify(o.node(e)))}),y.getBBox(),o.edges().forEach(function(e){void 0!==e&&void 0!==o.edge(e)&&(B.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(o.edge(e))),bDe(t,o.edge(e),o.edge(e).relation))});var d=y.getBBox(),v={id:r||"root",label:r||"root",width:0,height:0};return v.width=d.width+2*TDe.padding,v.height=d.height+2*TDe.padding,B.debug("Doc rendered",v,o),v},"renderDoc"),ADe={setConf:wDe,draw:EDe}}),ODe={};sYe(ODe,{diagram:()=>BDe});var BDe,PDe=i(()=>{zNe(),IDe(),NDe(),MDe(),BDe={parser:aNe,get db(){return new sDe(1)},renderer:ADe,styles:lDe,init:mt(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),$De={};sYe($De,{diagram:()=>FDe});var FDe,zDe,qDe,WDe,UDe,GDe,jDe,VDe,YDe,HDe,XDe,KDe,ZDe,QDe,JDe,eMe,tMe,rMe,iMe,nMe,aMe,sMe,oMe,lMe,hMe,cMe,uMe,dMe,pMe,gMe,fMe,mMe=i(()=>{zNe(),IDe(),NDe(),RDe(),FDe={parser:aNe,get db(){return new sDe(2)},renderer:tDe,styles:lDe,init:mt(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),yMe=i(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[6,8,10,11,12,14,16,17,18],i=[1,9],n=[1,10],a=[1,11],s=[1,12],o=[1,13],l=[1,14],i={trace:mt(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:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 1:return a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:i.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 13:i.addTask(a[o-1],a[o]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:i,12:n,14:a,16:s,17:o,18:l},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:15,11:i,12:n,14:a,16:s,17:o,18:l},t(r,[2,5]),t(r,[2,6]),t(r,[2,8]),{13:[1,16]},{15:[1,17]},t(r,[2,11]),t(r,[2,12]),{19:[1,18]},t(r,[2,4]),t(r,[2,9]),t(r,[2,10]),t(r,[2,13])],defaultActions:{},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",h=0,c=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,T,k,w,C,E,S={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===x||"u"<typeof x)&&(x=v()),o[T]&&o[T][x]))||!k.length||!k[0]){var _,A=[];for(w in o[T])this.terminals_[w]&&2<w&&A.push("'"+this.terminals_[w]+"'");_=g.showPosition?"Parse error on line "+(h+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(c=g.yyleng,l=g.yytext,h=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],S.$=a[a.length-C],S._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(E=this.performAction.apply(S,[l,c,h,f.yy,k[1],a,s].concat(p)))<"u")return E;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),E=o[i[i.length-2]][i[i.length-1]],i.push(E);break;case 3:return!0}}return!0},"parse")},n={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){case 0:case 1:break;case 2:return 10;case 3: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}}};i.lexer=n,mt(e,"Parser"),(zDe=new((e.prototype=i).Parser=e)).parser=zDe,qDe=zDe}),vMe=i(()=>{ju(),Gu(),WDe="",UDe=[],GDe=[],jDe=[],VDe=mt(function(){UDe.length=0,GDe.length=0,WDe="",jDe.length=0,Pc()},"clear"),YDe=mt(function(e){WDe=e,UDe.push(e)},"addSection"),HDe=mt(function(){return UDe},"getSections"),XDe=mt(function(){let e=JDe(),t=0;for(;!e&&t<100;)e=JDe(),t++;return GDe.push(...jDe),GDe},"getTasks"),KDe=mt(function(){let t=[];return GDe.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()},"updateActors"),ZDe=mt(function(e,t){let r=t.substr(1).split(":"),i=0;t=(1===r.length?(i=Number(r[0]),[]):(i=Number(r[0]),r[1].split(","))).map(e=>e.trim()),t={section:WDe,type:WDe,people:t,task:e,score:i},jDe.push(t)},"addTask"),QDe=mt(function(e){e={section:WDe,type:WDe,description:e,task:e,classes:[]},GDe.push(e)},"addTaskOrg"),JDe=mt(function(){let e=mt(function(e){return jDe[e].processed},"compileTask"),t=!0;for(var[r,i]of jDe.entries())e(r),t=t&&i.processed;return t},"compileTasks"),eMe=mt(function(){return KDe()},"getActors"),tMe={getConfig:mt(()=>P().journey,"getConfig"),clear:VDe,setDiagramTitle:Wc,getDiagramTitle:Uc,setAccTitle:$c,getAccTitle:Fc,setAccDescription:zc,getAccDescription:qc,addSection:YDe,getSections:HDe,getTasks:XDe,addTask:ZDe,addTaskOrg:QDe,getActors:eMe}}),xMe=i(()=>{sde(),rMe=mt(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:""};
}
${Kue()}
`,"getStyles"),iMe=rMe}),bMe=i(()=>{function t(e,t,r,i,n,a,s,o){g(t.append("text").attr("x",r+n/2).attr("y",i+a/2+5).style("font-color",o).style("text-anchor","middle").text(e),s)}function h(e,t,r,i,n,a,s,o,l){var{taskFontSize:h,taskFontFamily:c}=o,u=e.split(/<br\s*\/?>/gi);for(let e=0;e<u.length;e++){var d=e*h-h*(u.length-1)/2,p=t.append("text").attr("x",r+n/2).attr("y",i).attr("fill",l).style("text-anchor","middle").style("font-size",h).style("font-family",c);p.append("tspan").attr("x",r+n/2).attr("dy",d).text(u[e]),p.attr("y",i+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(p,s)}}function r(e,t,r,i,n,a,s,o){var l=(t=t.append("switch")).append("foreignObject").attr("x",r).attr("y",i).attr("width",n).attr("height",a).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(e),h(e,t,r,i,n,a,s,o),g(l,s)}function g(e,t){for(var r in t)r in t&&e.attr(r,t[r])}Sk(),Lk(),nMe=mt(function(e,t){return VT(e,t)},"drawRect"),aMe=mt(function(e,r){var t=e.append("circle").attr("cx",r.cx).attr("cy",r.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible");function i(e){var t=g3().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(6.8181818181818175);e.append("path").attr("class","mouth").attr("d",t).attr("transform","translate("+r.cx+","+(r.cy+2)+")")}function n(e){var t=g3().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(6.8181818181818175);e.append("path").attr("class","mouth").attr("d",t).attr("transform","translate("+r.cx+","+(r.cy+7)+")")}function a(e){e.append("line").attr("class","mouth").attr("stroke",2).attr("x1",r.cx-5).attr("y1",r.cy+7).attr("x2",r.cx+5).attr("y2",r.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return(e=e.append("g")).append("circle").attr("cx",r.cx-5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),e.append("circle").attr("cx",r.cx+5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),mt(i,"smile"),mt(n,"sad"),mt(a,"ambivalent"),(3<r.score?i:r.score<3?n:a)(e),t},"drawFace"),sMe=mt(function(e,t){return(e=e.append("circle")).attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),void 0!==e.class&&e.attr("class",e.class),void 0!==t.title&&e.append("title").text(t.title),e},"drawCircle"),oMe=mt(function(e,t){return HT(e,t)},"drawText"),lMe=mt(function(e,t){function r(e,t,r,i,n){return e+","+t+" "+(e+r)+","+t+" "+(e+r)+","+(t+i-n)+" "+(e+r-1.2*n)+","+(t+i)+" "+e+","+(t+i)}mt(r,"genPoints");var 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,oMe(e,t)},"drawLabel"),hMe=mt(function(e,t,r){var e=e.append("g"),i=ZT();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=r.width*t.taskCount+r.diagramMarginX*(t.taskCount-1),i.height=r.height,i.class="journey-section section-type-"+t.num,i.rx=3,i.ry=3,nMe(e,i),pMe(r)(t.text,e,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),cMe=-1,uMe=mt(function(e,r,t,i){let n=r.x+t.width/2,a=e.append("g"),s=(cMe++,a.append("line").attr("id",i+"-task"+cMe).attr("x1",n).attr("y1",r.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),aMe(a,{cx:n,cy:300+30*(5-r.score),score:r.score}),(e=ZT()).x=r.x,e.y=r.y,e.fill=r.fill,e.width=t.width,e.height=t.height,e.class="task task-type-"+r.num,e.rx=3,e.ry=3,nMe(a,e),r.x+14);r.people.forEach(e=>{var t=r.actors[e].color,t={cx:s,cy:r.y,r:7,fill:t,stroke:"#000",title:e,pos:r.actors[e].position};sMe(a,t),s+=10}),pMe(t)(r.task,a,e.x,e.y,e.width,e.height,{class:"task"},t,r.colour)},"drawTask"),dMe=mt(function(e,t){YT(e,t)},"drawBackgroundRect"),mt(t,"byText"),mt(h,"byTspan"),mt(r,"byFo"),mt(g,"_setTextAttrs"),pMe=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:h},gMe=mt(function(e,t){cMe=-1,e.append("defs").append("marker").attr("id",t+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),fMe={drawRect:nMe,drawCircle:sMe,drawSection:hMe,drawText:oMe,drawLabel:lMe,drawTask:uMe,drawBackgroundRect:dMe,initGraphics:gMe}});function TMe(s){let i=P().journey,o=i.maxLabelWidth,l=(CMe=0,60);Object.keys(wMe).forEach(t=>{var e=wMe[t].color,e={cx:20,cy:l,r:7,fill:e,stroke:"#000",pos:wMe[t].position};fMe.drawCircle(s,e);let n=s.append("text").attr("visibility","hidden").text(t),r=n.node().getBoundingClientRect().width,a=(n.remove(),[]);if(r<=o)a=[t];else{let e=t.split(" "),i="";n=s.append("text").attr("visibility","hidden"),e.forEach(t=>{var e=i?i+" "+t:t;if(n.text(e),n.node().getBoundingClientRect().width>o){if(i&&a.push(i),i=t,n.text(t),n.node().getBoundingClientRect().width>o){let e="";for(var r of t)e+=r,n.text(e+"-"),n.node().getBoundingClientRect().width>o&&(a.push(e.slice(0,-1)+"-"),e=r);i=e}}else i=e}),i&&a.push(i),n.remove()}a.forEach((e,t)=>{t={x:40,y:l+7+20*t,fill:"#666",text:e,textMargin:i.boxTextMargin??5},e=fMe.drawText(s,t).node().getBoundingClientRect().width,CMe<e&&e>i.leftMargin-e&&(CMe=e)}),l+=Math.max(20,20*a.length)})}var kMe,wMe,CMe,EMe,SMe,_Me,AMe,LMe,RMe,IMe,NMe,DMe=i(()=>{Sk(),bMe(),ju(),Rc(),kMe=mt(function(t){Object.keys(t).forEach(function(e){EMe[e]=t[e]})},"setConf"),wMe={},CMe=0,mt(TMe,"drawActorLegend"),EMe=P().journey,SMe=0,_Me=mt(function(e,t,r,i){let n=P(),a=n.journey.titleColor,s=n.journey.titleFontSize,o=n.journey.titleFontFamily,l=n.securityLevel,h;"sandbox"===l&&(h=Q("#i"+t));var c,u=Q("sandbox"===l?h.nodes()[0].contentDocument.body:"body"),u=(AMe.init(),u.select("#"+t)),d=(fMe.initGraphics(u,t),i.db.getTasks()),p=i.db.getDiagramTitle(),i=i.db.getActors();for(c in wMe)delete wMe[c];let g=0;i.forEach(e=>{wMe[e]={color:EMe.actorColours[g%EMe.actorColours.length],position:g},g++}),TMe(u),SMe=EMe.leftMargin+CMe,AMe.insert(0,0,SMe,50*Object.keys(wMe).length),IMe(u,d,0,t);var i=AMe.getBounds(),d=(p&&u.append("text").text(p).attr("x",SMe).attr("font-size",s).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",o),i.stopy-i.starty+2*EMe.diagramMarginY),f=SMe+i.stopx+2*EMe.diagramMarginX,t=(xc(u,d,f,EMe.useMaxWidth),u.append("line").attr("x1",SMe).attr("y1",4*EMe.height).attr("x2",f-SMe-4).attr("y2",4*EMe.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+t+"-arrowhead)"),p?70:0);u.attr("viewBox",i.startx+` -25 ${f} `+(d+t)),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",d+t+25)},"draw"),AMe={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:mt(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:mt(function(e,t,r,i){void 0===e[t]?e[t]=r:e[t]=i(r,e[t])},"updateVal"),updateBounds:mt(function(i,n,a,s){let o=P().journey,l=this,h=0;function e(r){return mt(function(e){h++;var t=l.sequenceItems.length-h+1;l.updateVal(e,"starty",n-t*o.boxMargin,Math.min),l.updateVal(e,"stopy",s+t*o.boxMargin,Math.max),l.updateVal(AMe.data,"startx",i-t*o.boxMargin,Math.min),l.updateVal(AMe.data,"stopx",a+t*o.boxMargin,Math.max),"activation"!==r&&(l.updateVal(e,"startx",i-t*o.boxMargin,Math.min),l.updateVal(e,"stopx",a+t*o.boxMargin,Math.max),l.updateVal(AMe.data,"starty",n-t*o.boxMargin,Math.min),l.updateVal(AMe.data,"stopy",s+t*o.boxMargin,Math.max))},"updateItemBounds")}mt(e,"updateFn"),this.sequenceItems.forEach(e())},"updateBounds"),insert:mt(function(e,t,r,i){var n=Math.min(e,r),e=Math.max(e,r),r=Math.min(t,i),t=Math.max(t,i);this.updateVal(AMe.data,"startx",n,Math.min),this.updateVal(AMe.data,"starty",r,Math.min),this.updateVal(AMe.data,"stopx",e,Math.max),this.updateVal(AMe.data,"stopy",t,Math.max),this.updateBounds(n,r,e,t)},"insert"),bumpVerticalPos:mt(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:mt(function(){return this.verticalPos},"getVerticalPos"),getBounds:mt(function(){return this.data},"getBounds")},LMe=EMe.sectionFills,RMe=EMe.sectionColours,IMe=mt(function(e,i,t,r){let n=P().journey,a="",s=2*n.height+n.diagramMarginY,o=t+s,l=0,h="#CCC",c="black",u=0;for(var[d,p]of i.entries()){if(a!==p.section){h=LMe[l%LMe.length],u=l%LMe.length,c=RMe[l%RMe.length];let t=0,r=p.section;for(let e=d;e<i.length&&i[e].section==r;e++)t+=1;var g={x:d*n.taskMargin+d*n.width+SMe,y:50,text:p.section,fill:h,num:u,colour:c,taskCount:t};fMe.drawSection(e,g,n),a=p.section,l++}g=p.people.reduce((e,t)=>(wMe[t]&&(e[t]=wMe[t]),e),{}),p.x=d*n.taskMargin+d*n.width+SMe,p.y=o,p.width=n.diagramMarginX,p.height=n.diagramMarginY,p.colour=c,p.fill=h,p.num=u,p.actors=g,fMe.drawTask(e,p,n,r),AMe.insert(p.x,p.y,p.x+p.width+n.taskMargin,450)}},"drawTasks"),NMe={setConf:kMe,draw:_Me}}),MMe={};sYe(MMe,{diagram:()=>OMe});var OMe,BMe,PMe,$Me=i(()=>{yMe(),vMe(),xMe(),DMe(),OMe={parser:qDe,db:tMe,renderer:NMe,styles:iMe,init:mt(e=>{NMe.setConf(e.journey),tMe.clear()},"init")}}),FMe=i(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[6,11,13,14,15,17,19,20,23,24],i=[1,12],n=[1,13],a=[1,14],s=[1,15],o=[1,16],l=[1,19],h=[1,20],i={trace:mt(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:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 1:return a[o-1];case 3:i.setDirection("LR");break;case 4:i.setDirection("TD");break;case 5:this.$=[];break;case 6:a[o-1].push(a[o]),this.$=a[o-1];break;case 7:case 8:this.$=a[o];break;case 9:case 10:this.$=[];break;case 11:i.getCommonDb().setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 12:this.$=a[o].trim(),i.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[o].trim(),i.getCommonDb().setAccDescription(this.$);break;case 15:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 18:i.addTask(a[o],0,""),this.$=a[o];break;case 19:i.addEvent(a[o].substr(2)),this.$=a[o]}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},t(r,[2,5],{5:6}),t(r,[2,2]),t(r,[2,3]),t(r,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:i,15:n,17:a,19:s,20:o,21:17,22:18,23:l,24:h},t(r,[2,10],{1:[2,1]}),t(r,[2,6]),{12:21,14:i,15:n,17:a,19:s,20:o,21:17,22:18,23:l,24:h},t(r,[2,8]),t(r,[2,9]),t(r,[2,11]),{16:[1,22]},{18:[1,23]},t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),t(r,[2,17]),t(r,[2,18]),t(r,[2,19]),t(r,[2,7]),t(r,[2,12]),t(r,[2,13])],defaultActions:{},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",h=0,c=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,T,k,w,C,E,S={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===x||"u"<typeof x)&&(x=v()),o[T]&&o[T][x]))||!k.length||!k[0]){var _,A=[];for(w in o[T])this.terminals_[w]&&2<w&&A.push("'"+this.terminals_[w]+"'");_=g.showPosition?"Parse error on line "+(h+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(c=g.yyleng,l=g.yytext,h=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],S.$=a[a.length-C],S._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(E=this.performAction.apply(S,[l,c,h,f.yy,k[1],a,s].concat(p)))<"u")return E;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),E=o[i[i.length-2]][i[i.length-1]],i.push(E);break;case 3:return!0}}return!0},"parse")},n={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){case 0:case 1:break;case 2:return 13;case 3: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}}};i.lexer=n,mt(e,"Parser"),(BMe=new((e.prototype=i).Parser=e)).parser=BMe,PMe=BMe}),zMe={};sYe(zMe,{addEvent:()=>tOe,addSection:()=>ZMe,addTask:()=>eOe,addTaskOrg:()=>rOe,clear:()=>HMe,default:()=>nOe,getCommonDb:()=>YMe,getDirection:()=>KMe,getSections:()=>QMe,getTasks:()=>JMe,setDirection:()=>XMe});var qMe,WMe,UMe,GMe,jMe,VMe,YMe,HMe,XMe,KMe,ZMe,QMe,JMe,eOe,tOe,rOe,iOe,nOe,aOe=i(()=>{Gu(),qMe="",WMe=0,UMe="LR",GMe=[],jMe=[],VMe=[],YMe=mt(()=>Nc,"getCommonDb"),HMe=mt(function(){GMe.length=0,jMe.length=0,qMe="",VMe.length=0,UMe="LR",Pc()},"clear"),XMe=mt(function(e){UMe=e},"setDirection"),KMe=mt(function(){return UMe},"getDirection"),ZMe=mt(function(e){qMe=e,GMe.push(e)},"addSection"),QMe=mt(function(){return GMe},"getSections"),JMe=mt(function(){let e=iOe(),t=0;for(;!e&&t<100;)e=iOe(),t++;return jMe.push(...VMe),jMe},"getTasks"),eOe=mt(function(e,t,r){e={id:WMe++,section:qMe,type:qMe,task:e,score:t||0,events:r?[r]:[]},VMe.push(e)},"addTask"),tOe=mt(function(e){VMe.find(e=>e.id===WMe-1).events.push(e)},"addEvent"),rOe=mt(function(e){e={section:qMe,type:qMe,description:e,task:e,classes:[]},jMe.push(e)},"addTaskOrg"),iOe=mt(function(){let e=mt(function(e){return VMe[e].processed},"compileTask"),t=!0;for(var[r,i]of VMe.entries())e(r),t=t&&i.processed;return t},"compileTasks"),nOe={clear:HMe,getCommonDb:YMe,getDirection:KMe,setDirection:XMe,addSection:ZMe,getSections:QMe,getTasks:JMe,addTask:eOe,addTaskOrg:rOe,addEvent:tOe}});function sOe(e,o){e.each(function(){var t,r=Q(this),i=r.text().split(/(\s+|<br>)/).reverse(),n=[],a=r.attr("y"),e=parseFloat(r.attr("dy")),s=r.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",e+"em");for(let e=0;e<i.length;e++)t=i[i.length-1-e],n.push(t),s.text(n.join(" ").trim()),(s.node().getComputedTextLength()>o||"<br>"===t)&&(n.pop(),s.text(n.join(" ").trim()),n="<br>"===t?[""]:[t],s=r.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(t))})}var oOe,lOe,hOe,cOe,uOe,dOe,pOe,gOe,fOe,mOe,yOe,vOe,xOe,bOe,TOe,kOe,wOe,COe,EOe,SOe,_Oe,AOe,LOe,ROe,IOe,NOe,DOe,MOe,OOe,BOe,POe=i(()=>{function t(e,t,r,i,n,a,s,o){g(t.append("text").attr("x",r+n/2).attr("y",i+a/2+5).style("font-color",o).style("text-anchor","middle").text(e),s)}function h(e,t,r,i,n,a,s,o,l){var{taskFontSize:h,taskFontFamily:c}=o,u=e.split(/<br\s*\/?>/gi);for(let e=0;e<u.length;e++){var d=e*h-h*(u.length-1)/2,p=t.append("text").attr("x",r+n/2).attr("y",i).attr("fill",l).style("text-anchor","middle").style("font-size",h).style("font-family",c);p.append("tspan").attr("x",r+n/2).attr("dy",d).text(u[e]),p.attr("y",i+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(p,s)}}function r(e,t,r,i,n,a,s,o){var l=(t=t.append("switch")).append("foreignObject").attr("x",r).attr("y",i).attr("width",n).attr("height",a).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(e),h(e,t,r,i,n,a,s,o),g(l,s)}function g(e,t){for(var r in t)r in t&&e.attr(r,t[r])}Sk(),oOe=0,lOe=mt(function(e,t){return(e=e.append("rect")).attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),e.attr("rx",t.rx),e.attr("ry",t.ry),void 0!==t.class&&e.attr("class",t.class),e},"drawRect"),hOe=mt(function(e,r){var t=e.append("circle").attr("cx",r.cx).attr("cy",r.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible");function i(e){var t=g3().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(6.8181818181818175);e.append("path").attr("class","mouth").attr("d",t).attr("transform","translate("+r.cx+","+(r.cy+2)+")")}function n(e){var t=g3().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(6.8181818181818175);e.append("path").attr("class","mouth").attr("d",t).attr("transform","translate("+r.cx+","+(r.cy+7)+")")}function a(e){e.append("line").attr("class","mouth").attr("stroke",2).attr("x1",r.cx-5).attr("y1",r.cy+7).attr("x2",r.cx+5).attr("y2",r.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return(e=e.append("g")).append("circle").attr("cx",r.cx-5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),e.append("circle").attr("cx",r.cx+5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),mt(i,"smile"),mt(n,"sad"),mt(a,"ambivalent"),(3<r.score?i:r.score<3?n:a)(e),t},"drawFace"),cOe=mt(function(e,t){return(e=e.append("circle")).attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),void 0!==e.class&&e.attr("class",e.class),void 0!==t.title&&e.append("title").text(t.title),e},"drawCircle"),uOe=mt(function(e,t){var r=t.text.replace(/<br\s*\/?>/gi," "),i=((e=e.append("text")).attr("x",t.x),e.attr("y",t.y),e.attr("class","legend"),e.style("text-anchor",t.anchor),void 0!==t.class&&e.attr("class",t.class),e.append("tspan"));return i.attr("x",t.x+2*t.textMargin),i.text(r),e},"drawText"),dOe=mt(function(e,t){function r(e,t,r,i,n){return e+","+t+" "+(e+r)+","+t+" "+(e+r)+","+(t+i-n)+" "+(e+r-1.2*n)+","+(t+i)+" "+e+","+(t+i)}mt(r,"genPoints");var 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,uOe(e,t)},"drawLabel"),pOe=mt(function(e,t,r){var e=e.append("g"),i=vOe();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=r.width,i.height=r.height,i.class="journey-section section-type-"+t.num,i.rx=3,i.ry=3,lOe(e,i),xOe(r)(t.text,e,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),gOe=-1,fOe=mt(function(e,t,r,i){var n=t.x+r.width/2,e=e.append("g");gOe++,e.append("line").attr("id",i+"-task"+gOe).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"),hOe(e,{cx:n,cy:300+30*(5-t.score),score:t.score}),(i=vOe()).x=t.x,i.y=t.y,i.fill=t.fill,i.width=r.width,i.height=r.height,i.class="task task-type-"+t.num,i.rx=3,i.ry=3,lOe(e,i),xOe(r)(t.task,e,i.x,i.y,i.width,i.height,{class:"task"},r,t.colour)},"drawTask"),mOe=mt(function(e,t){lOe(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),yOe=mt(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),vOe=mt(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),mt(t,"byText"),mt(h,"byTspan"),mt(r,"byFo"),mt(g,"_setTextAttrs"),xOe=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:h},bOe=mt(function(e,t){oOe=0,gOe=-1,e.append("defs").append("marker").attr("id",t+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),mt(sOe,"wrap"),TOe=mt(function(e,t,r,i,n,a=!1){var{theme:s,look:o}=i,l=s?.includes("redux"),r=r%(i?.themeVariables?.THEME_COLOR_LIMIT??12)-1,h=e.append("g"),c=(t.section=r,h.attr("class",(t.class?t.class+" ":"")+"timeline-node section-"+r),h.append("g")),u=h.append("g"),d=u.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(sOe,t.width).node().getBBox(),p=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;return t.height=d.height+1.1*p*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,u.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),l&&u.attr("transform",`translate(${t.width/2}, ${a?t.padding/2+3:t.padding})`),wOe(c,t,r,n,i),"neo"===o&&(h.attr("data-look","neo"),l)&&(d=s.includes("dark"),u=(p=Q(e.node()?.ownerSVGElement??e.node())).attr("id")??"",p.select("#"+(a=u?u+"-drop-shadow":"drop-shadow")).empty()&&((c=p.select("defs")).empty()?p.append("defs"):c).append("filter").attr("id",a).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity",d?"0.2":"0.06").attr("flood-color",d?"#FFFFFF":"#000000")),t},"drawNode"),kOe=mt(function(e,t,r){var i=(e=e.append("g")).append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(sOe,t.width).node().getBBox(),r=r.fontSize?.replace?r.fontSize.replace("px",""):r.fontSize;return e.remove(),i.height+1.1*r*.5+t.padding},"getVirtualNodeHeight"),wOe=mt(function(e,t,r,i,n){var a=0<(a=(n=n.theme)?.includes("redux")?0:5)?`M0 ${t.height-5} v${10-t.height} q0,-${a},${a},-${a} h${t.width-10} q${a},0,${a},${a} v${t.height-5} H0 Z`:`M0 ${t.height-5} v${-(t.height-5)} h${t.width} v${t.height} H0 Z`;e.append("path").attr("id",i+"-node-"+oOe++).attr("class","node-bkg node-"+t.type).attr("d",a),n?.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"),COe={drawRect:lOe,drawCircle:cOe,drawSection:pOe,drawText:uOe,drawLabel:dOe,drawTask:fOe,drawBackgroundRect:mOe,getTextObj:yOe,getNoteRect:vOe,initGraphics:bOe,drawNode:TOe,getVirtualNodeHeight:kOe}}),$Oe=i(()=>{Sk(),POe(),e(),ju(),Rc(),EOe=mt(function(e,n,t,r){let a=P(),{look:i,theme:s,themeVariables:o}=a,{useGradient:l,gradientStart:h,gradientStop:c}=o,u=a.timeline?.leftMargin??50,d=(B.debug("timeline",r.db),a.securityLevel),p,g=("sandbox"===d&&(p=Q("#i"+n)),Q("sandbox"===d?p.nodes()[0].contentDocument.body:"body").select("#"+n)),f=(g.append("g"),r.db.getTasks()),m=r.db.getCommonDb().getDiagramTitle();B.debug("task",f),COe.initGraphics(g,n);var y,v,r=r.db.getSections();B.debug("sections",r);let x=0,b=0,T,k=50+u,w=50,C=0,E=!0,S=(r.forEach(function(e){e={number:C,descr:e,section:C,width:150,padding:20,maxHeight:x},e=COe.getVirtualNodeHeight(g,e,a),B.debug("sectionHeight before draw",e),x=Math.max(x,e+20)}),0),_=0;B.debug("tasks.length",f.length);for([y,v]of f.entries()){var A,L={number:y,descr:v,section:v.section,width:150,padding:20,maxHeight:b},L=COe.getVirtualNodeHeight(g,L,a);B.debug("taskHeight before draw",L),b=Math.max(b,L+20),S=Math.max(S,v.events.length);let e=0;for(A of v.events){var R={descr:A,section:v.section,number:v.section,width:150,padding:20,maxHeight:50};e+=COe.getVirtualNodeHeight(g,R,a)}0<v.events.length&&(e+=10*(v.events.length-1)),_=Math.max(_,e)}B.debug("maxSectionHeight before draw",x),B.debug("maxTaskHeight before draw",b),r&&0<r.length?r.forEach(t=>{var e=f.filter(e=>e.section===t),r={number:C,descr:t,section:C,width:200*Math.max(e.length,1)-50,padding:20,maxHeight:x},i=(B.debug("sectionNode",r),g.append("g")),r=COe.drawNode(i,r,C,a,n);B.debug("sectionNode output",r),i.attr("transform",`translate(${k}, 50)`),w+=x+50,0<e.length&&SOe(g,e,C,k,w,b,a,S,_,x,!1,n),k+=200*Math.max(e.length,1),w=50,C++}):(E=!1,SOe(g,f,C,k,w,b,a,S,_,x,!0,n)),r=g.node().getBBox(),B.debug("bounds",r),m&&g.append("text").text(m).attr("x","neo"===i?2*r.x+u:r.width/2-u).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),T=E?x+b+150:b+100,g.append("g").attr("class","lineWrapper").append("line").attr("x1",u).attr("y1",T).attr("x2",r.width+3*u).attr("y2",T).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${n}-arrowhead)`),"neo"===i&&l&&"neutral"!==s&&((r=((r=g.select("defs")).empty()?g.append("defs"):r).append("linearGradient").attr("id",g.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%")).append("stop").attr("offset","0%").attr("stop-color",h).attr("stop-opacity",1),r.append("stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)),bc(void 0,g,a.timeline?.padding??50,a.timeline?.useMaxWidth??!1)},"draw"),SOe=mt(function(e,t,r,i,n,a,s,o,l,h,c,u){for(var d of t){var p={descr:d.task,section:r,number:r,width:150,padding:20,maxHeight:a},g=(B.debug("taskNode",p),e.append("g").attr("class","taskWrapper")),p=COe.drawNode(g,p,r,s,u).height;B.debug("taskHeight after draw",p),g.attr("transform",`translate(${i}, ${n})`),a=Math.max(a,p),d.events&&(g=e.append("g").attr("class","lineWrapper"),n+=100,_Oe(e,d.events,r,i,n,s,u),n-=100,g.append("line").attr("x1",i+95).attr("y1",n+a).attr("x2",i+95).attr("y2",n+a+100+l+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${u}-arrowhead)`).attr("stroke-dasharray","5,5")),i+=200,c&&!s.timeline?.disableMulticolor&&r++}},"drawTasks"),_Oe=mt(function(e,t,r,i,n,a,s){let o=0,l=n;n+=100;for(var h of t){var h={descr:h,section:r,number:r,width:150,padding:20,maxHeight:50},c=(B.debug("eventNode",h),e.append("g").attr("class","eventWrapper")),h=COe.drawNode(c,h,r,a,s,!0).height;o+=h,c.attr("transform",`translate(${i}, ${n})`),n=n+10+h}return n=l,o},"drawEvents"),AOe={setConf:mt(()=>{},"setConf"),draw:EOe}}),FOe=i(()=>{POe(),e(),ju(),Rc(),cAe(),S7(),LOe=mt(function(e,t,r,i){let a=P(),n=a.timeline?.leftMargin??50,s=(B.debug("timeline",i.db),nAe(t)),o=(s.append("g"),i.db.getTasks()),l=i.db.getCommonDb().getDiagramTitle();B.debug("task",o),COe.initGraphics(s);var h,c,t=i.db.getSections();B.debug("sections",t);let u=0,d=0,p=50+n,g=50,f=g,m=p,y=m+230,v=0,x=t&&0<t.length,b=x?y:p+230,T=Math.max(50,580),k=(t.forEach(function(e){e={number:v,descr:e,section:v,width:T,padding:5,maxHeight:u},e=COe.getVirtualNodeHeight(s,e,a),B.debug("sectionHeight before draw",e),u=Math.max(u,e)}),0);B.debug("tasks.length",o.length);for([h,c]of o.entries()){var w,C={number:h,descr:c,section:c.section,width:200,padding:5,maxHeight:d},C=COe.getVirtualNodeHeight(s,C,a);B.debug("taskHeight before draw",C),d=Math.max(d,C);let e=0;for(w of c.events){var E={descr:w,section:c.section,number:c.section,width:300,padding:5,maxHeight:50};e+=COe.getVirtualNodeHeight(s,E,a)}0<c.events.length&&(e+=10*(c.events.length-1)),k=Math.max(k,e)+0}B.debug("maxSectionHeight before draw",u),B.debug("maxTaskHeight before draw",d);let S=Math.max(d,k)+30,_=(x?t.forEach(t=>{var e=o.filter(e=>e.section===t),r={number:v,descr:t,section:v,width:T,padding:5,maxHeight:u},i=(B.debug("sectionNode",r),s.append("g")),r=COe.drawNode(i,r,v,a),n=(B.debug("sectionNode output",r),b-230),i=(i.attr("transform",`translate(${n}, ${g})`),g+r.height+20),n=(0<e.length&&ROe(s,e,v,b,i,d,a,S,!1),e.length),i=r.height+20+S*Math.max(n,1)-(0<n?60:0);g+=i,v++}):ROe(s,o,v,b,g,d,a,S,!0),s.node()?.getBBox());if(!_)throw new Error("bbox not found");if(B.debug("bounds",_),l){if(s.append("text").text(l).attr("x",_.width/2-n).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),!(_=s.node()?.getBBox()))throw new Error("bbox not found");B.debug("bounds after title",_)}var[i]=T7(a.fontSize),t=2*(i??16),i=.5*(i??16)+20,A=s.append("g").attr("class","lineWrapper");A.append("line").attr("x1",b).attr("y1",f-t).attr("x2",b).attr("y2",_.y+_.height+i).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),A.lower(),bc(void 0,s,a.timeline?.padding??50,a.timeline?.useMaxWidth??!1)},"draw"),ROe=mt(function(e,t,r,i,n,a,s,o,l){for(var h of t){var c={descr:h.task,section:r,number:r,width:200,padding:5,maxHeight:a},u=(B.debug("taskNode",c),e.append("g").attr("class","taskWrapper")),d=(c=COe.drawNode(u,c,r,s)).height,c=(B.debug("taskHeight after draw",d),i-20-c.width);u.attr("transform",`translate(${c}, ${n})`),a=Math.max(a,d),h.events&&0<h.events.length&&(u=n,IOe(e,h.events,r,i,i+50,u,s)),n+=o,l&&!s.timeline?.disableMulticolor&&r++}},"drawTasks"),IOe=mt(function(e,t,r,i,n,a,s){let o=a;for(var l of t){var l={descr:l,section:r,number:r,width:300,padding:5,maxHeight:0},h=(B.debug("eventNode",l),e.append("g").attr("class","eventWrapper")),l=COe.drawNode(h,l,r,s).height,h=(h.attr("transform",`translate(${n}, ${o})`),e.append("g").attr("class","lineWrapper")),c=o+l/2;h.append("line").attr("x1",i).attr("y1",c).attr("x2",n).attr("y2",c).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),o=o+l+10}return o-a},"drawEvents"),NOe={setConf:mt(()=>{},"setConf"),draw:LOe}}),zOe=i(()=>{oi(),Ei(),DOe=mt(t=>{let e=br().theme,r=e?.includes("dark"),i=e?.includes("color"),n=t.svgId?.replace(/^#/,"")??"",a=n?`url(#${n}-drop-shadow)`:t.dropShadow??"none",s="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++){var o=""+(17-3*e),l=i?t.borderColorArray[e]:t.mainBkg,h=i?t.borderColorArray[e]:t.nodeBorder;s+=`
.section-${e-1} rect,
.section-${e-1} path,
.section-${e-1} circle {
fill: ${r&&i?t.mainBkg:l};
stroke: ${h};
stroke-width: ${t.strokeWidth};
filter: ${a};
}
.section-${e-1} text {
fill: ${t.nodeBorder};
font-weight: ${t.fontWeight}
}
.node-icon-${e-1} {
font-size: 40px;
color: ${t["cScaleLabel"+e]};
}
.section-edge-${e-1} {
stroke: ${t["cScale"+e]};
}
.edge-depth-${e-1} {
stroke-width: ${o};
}
.section-${e-1} line {
stroke: ${t["cScaleInv"+e]};
stroke-width: 3;
}
.lineWrapper line {
stroke: ${t.nodeBorder};
stroke-width:${t.strokeWidth}
}
.disabled,
.disabled circle,
.disabled text {
fill: ${t.tertiaryColor??"lightgray"};
}
.disabled text {
fill: ${t.clusterBorder??"#efefef"};
}
`}return s},"genReduxSections"),MOe=mt(t=>{let r="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t["lineColor"+e]=t["lineColor"+e]||t["cScaleInv"+e],vt(t["lineColor"+e])?t["lineColor"+e]=L(t["lineColor"+e],20):t["lineColor"+e]=R(t["lineColor"+e],20);for(let e=0;e<t.THEME_COLOR_LIMIT;e++){var i=""+(17-3*e);r+=`
.section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} path {
fill: ${t["cScale"+e]};
}
.section-${e-1} text {
fill: ${t["cScaleLabel"+e]};
}
.node-icon-${e-1} {
font-size: 40px;
color: ${t["cScaleLabel"+e]};
}
.section-edge-${e-1}{
stroke: ${t["cScale"+e]};
}
.edge-depth-${e-1}{
stroke-width: ${i};
}
.section-${e-1} line {
stroke: ${t["cScaleInv"+e]} ;
stroke-width: 3;
}
.lineWrapper line{
stroke: ${t["cScaleLabel"+e]} ;
}
.disabled, .disabled circle, .disabled text {
fill: ${t.tertiaryColor??"lightgray"};
}
.disabled text {
fill: ${t.clusterBorder??"#efefef"};
}
`}return r},"genSections"),OOe=mt(t=>{let e=br().theme,r=e?.includes("redux"),i="neutral"===e,n=t.svgId?.replace(/^#/,"")??"",a="";if(t.useGradient&&n&&t.THEME_COLOR_LIMIT&&!i)for(let e=0;e<t.THEME_COLOR_LIMIT;e++)a+=`
.section-${e-1}[data-look="neo"] rect,
.section-${e-1}[data-look="neo"] path,
.section-${e-1}[data-look="neo"] circle {
fill: ${t.mainBkg};
stroke: url(#${n}-gradient);
stroke-width: 2;
}
.section-${e-1}[data-look="neo"] line {
stroke: url(#${n}-gradient);
stroke-width: 2;
}`;return`
.edge {
stroke-width: 3;
}
${(r?DOe:MOe)(t)}
${a}
.section-root rect, .section-root path, .section-root circle {
fill: ${t.git0};
}
.section-root text {
fill: ${t.gitBranchLabel0};
}
.icon-container {
height:100%;
display: flex;
justify-content: center;
align-items: center;
}
.edge {
fill: none;
}
.eventWrapper {
filter: brightness(120%);
}
`},"getStyles"),BOe=OOe}),qOe={};sYe(qOe,{diagram:()=>UOe});var WOe,UOe,GOe,jOe,VOe=i(()=>{FMe(),aOe(),$Oe(),FOe(),zOe(),WOe={setConf:mt(()=>{},"setConf"),draw:mt((e,t,r,i)=>("TD"===(i?.db?.getDirection?.()??"LR")?NOe:AOe).draw(e,t,r,i),"draw")},UOe={db:zMe,renderer:WOe,parser:PMe,styles:BOe}}),YOe=i(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,4],i=[1,13],n=[1,12],a=[1,15],s=[1,16],o=[1,20],l=[1,19],h=[6,7,8],c=[1,26],u=[1,24],d=[1,25],p=[6,7,11],g=[1,6,13,15,16,19,22],f=[1,33],m=[1,34],y=[1,6,7,11,13,15,16,19,22],r={trace:mt(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:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",a[o].id),i.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 16:i.getLogger().trace("Icon: ",a[o]),i.decorateNode({icon:a[o]});break;case 17:case 21:i.decorateNode({class:a[o]});break;case 18:i.getLogger().trace("SPACELIST");break;case 19:i.getLogger().trace("Node: ",a[o].id),i.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 20:i.decorateNode({icon:a[o]});break;case 25:i.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:i.getType(a[o-2],a[o])};break;case 26:this.$={id:a[o],descr:a[o],type:i.nodeType.DEFAULT};break;case 27:i.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:i.getType(a[o-2],a[o])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:r},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:r},{6:i,7:[1,10],9:9,12:11,13:n,14:14,15:a,16:s,17:17,18:18,19:o,22:l},t(h,[2,3]),{1:[2,2]},t(h,[2,4]),t(h,[2,5]),{1:[2,6],6:i,12:21,13:n,14:14,15:a,16:s,17:17,18:18,19:o,22:l},{6:i,9:22,12:11,13:n,14:14,15:a,16:s,17:17,18:18,19:o,22:l},{6:c,7:u,10:23,11:d},t(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:o,22:l}),t(p,[2,18]),t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),t(p,[2,23]),t(p,[2,24]),t(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:c,7:u,10:32,11:d},{1:[2,7],6:i,12:21,13:n,14:14,15:a,16:s,17:17,18:18,19:o,22:l},t(g,[2,14],{7:f,11:m}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(p,[2,15]),t(p,[2,16]),t(p,[2,17]),{20:[1,35]},{21:[1,36]},t(g,[2,13],{7:f,11:m}),t(y,[2,11]),t(y,[2,12]),{21:[1,37]},t(p,[2,25]),t(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",h=0,c=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,T,k,w,C,E,S={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===x||"u"<typeof x)&&(x=v()),o[T]&&o[T][x]))||!k.length||!k[0]){var _,A=[];for(w in o[T])this.terminals_[w]&&2<w&&A.push("'"+this.terminals_[w]+"'");_=g.showPosition?"Parse error on line "+(h+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(c=g.yyleng,l=g.yytext,h=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],S.$=a[a.length-C],S._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(E=this.performAction.apply(S,[l,c,h,f.yy,k[1],a,s].concat(p)))<"u")return E;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),E=o[i[i.length-2]][i[i.length-1]],i.push(E);break;case 3:return!0}}return!0},"parse")},h={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){case 0:return e.getLogger().trace("Found comment",t.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:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return e.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:e.getLogger().trace("end icon"),this.popState();break;case 10:return e.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return e.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16: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:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return e.getLogger().trace("description:",t.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),e.getLogger().trace("node end ...",t.yytext),"NODE_DEND";case 30:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 33:case 34:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 35:case 36:return e.getLogger().trace("Long description:",t.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}}};r.lexer=h,mt(e,"Parser"),(GOe=new((e.prototype=r).Parser=e)).parser=GOe,jOe=GOe});function HOe(e,t=0){return(XOe[e[t+0]]+XOe[e[t+1]]+XOe[e[t+2]]+XOe[e[t+3]]+"-"+XOe[e[t+4]]+XOe[e[t+5]]+"-"+XOe[e[t+6]]+XOe[e[t+7]]+"-"+XOe[e[t+8]]+XOe[e[t+9]]+"-"+XOe[e[t+10]]+XOe[e[t+11]]+XOe[e[t+12]]+XOe[e[t+13]]+XOe[e[t+14]]+XOe[e[t+15]]).toLowerCase()}var XOe,KOe=i(()=>{XOe=[];for(let e=0;e<256;++e)XOe.push((e+256).toString(16).slice(1));mt(HOe,"unsafeStringify")});function ZOe(){if(!QOe){if("u"<typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");QOe=crypto.getRandomValues.bind(crypto)}return QOe(JOe)}var QOe,JOe,eBe,tBe,rBe=i(()=>{JOe=new Uint8Array(16),mt(ZOe,"rng")}),iBe=i(()=>{eBe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),tBe={randomUUID:eBe}});function nBe(e,t,r){if(tBe.randomUUID&&!t&&!e)return tBe.randomUUID();var i=(e=e||{}).random??e.rng?.()??ZOe();if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){if((r=r||0)<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=i[e];return t}return HOe(i)}var aBe,sBe,oBe,lBe,hBe,cBe,uBe,dBe,pBe,gBe,fBe=i(()=>{iBe(),rBe(),KOe(),mt(nBe,"v4"),aBe=nBe}),mBe=i(()=>{fBe()}),yBe=i(()=>{ER(),S7(),sBe=12}),vBe=i(()=>{ju(),mBe(),ic(),e(),wi(),Ei(),yBe(),oBe={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},lBe=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=oBe,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{mt(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(t){for(let e=this.nodes.length-1;0<=e;e--)if(this.nodes[e].level<t)return this.nodes[e];return null}getMindmap(){return 0<this.nodes.length?this.nodes[0]:null}addNode(e,t,r,i){B.info("addNode",e,t,r,i);let n=!1,a=(0===this.nodes.length?(this.baseLevel=e,e=0,n=!0):void 0!==this.baseLevel&&(e-=this.baseLevel,n=!1),P()),s=a.mindmap?.padding??ar.mindmap.padding;switch(i){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:s*=2}if(t={id:this.count++,nodeId:Ih(t,a),level:e,descr:Ih(r,a),type:i,children:[],width:a.mindmap?.maxNodeWidth??ar.mindmap.maxNodeWidth,padding:s,isRoot:n},r=this.getParent(e))r.children.push(t);else if(!n)throw new Error(`There can be only one root. No parent could be found for ("${t.descr}")`);this.nodes.push(t)}getType(e,t){switch(B.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){var t,r;e&&(t=P(),r=this.nodes[this.nodes.length-1],e.icon&&(r.icon=Ih(e.icon,t)),e.class)&&(r.class=Ih(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(0===e.level?e.section=void 0:e.section=t,e.children)for(var[r,i]of e.children.entries())r=0===e.level?r%(sBe-1):t,this.assignSections(i,r)}flattenNodes(e,t){let r=P(),i=["mindmap-node"];!0===e.isRoot?i.push("section-root","section--1"):void 0!==e.section&&i.push("section-"+e.section),e.class&&i.push(e.class);var n=i.join(" "),a=mt(e=>{var t=(r.theme?.toLowerCase()??"").includes("redux");switch(e){case oBe.CIRCLE:return"mindmapCircle";case oBe.RECT:return"rect";case oBe.ROUNDED_RECT:return"rounded";case oBe.CLOUD:return"cloud";case oBe.BANG:return"bang";case oBe.HEXAGON:return"hexagon";case oBe.DEFAULT:return t?"rounded":"defaultMindmapNode";default:return"rect"}},"getShapeFromType"),a={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(a),e.children)for(var s of e.children)this.flattenNodes(s,t)}generateEdges(t,r){if(t.children){var i,n=P();for(i of t.children){let e="edge";void 0!==i.section&&(e+=" section-edge-"+i.section);var a=t.level+1,a=(e+=" edge-depth-"+a,{id:`edge_${t.id}_`+i.id,start:t.id.toString(),end:i.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:n.look,classes:e,depth:t.level,section:i.section});r.push(a),this.generateEdges(i,r)}}}getData(){var e=this.getMindmap(),t=P(),r=t;if(void 0===Ar().layout&&(r.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:r};B.debug("getData: mindmapRoot",e,t),this.assignSections(e);var i,n=[],a=(this.flattenNodes(e,t=[]),this.generateEdges(e,n),B.debug(`getData: processed ${t.length} nodes and ${n.length} edges`),new Map);for(i of t)a.set(i.id,{shape:i.shape,width:i.width,height:i.height,padding:i.padding});return{nodes:t,edges:n,config:r,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(a),type:"mindmap",diagramId:"mindmap-"+aBe()}}getLogger(){return B}}}),xBe=i(()=>{e(),QO(),tde(),rde(),wi(),Ei(),hBe=mt(async(e,t,r,i)=>{B.debug(`Rendering mindmap diagram
`+e);var n=(e=i.db).getData(),a=$O(t,n.config.securityLevel);n.type=i.type,n.layoutAlgorithm=Fue(n.config.layout,{fallback:"cose-bilkent"}),n.diagramId=t,e.getMindmap()&&(n.nodes.forEach(e=>{"rounded"===e.shape?(e.radius=15,e.taper=15,e.stroke="none",e.width=0,e.padding=15):"circle"===e.shape?e.padding=10:"rect"===e.shape?(e.width=0,e.padding=10):"hexagon"===e.shape&&(e.width=0,e.height=0)}),await $ue(n,a),i=br().themeVariables,{useGradient:t,gradientStart:e,gradientStop:i}=i,t&&e&&i&&(t=a.attr("id"),(t=a.append("defs").append("linearGradient").attr("id",t+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%")).append("stop").attr("offset","0%").attr("stop-color",e).attr("stop-opacity",1),t.append("stop").attr("offset","100%").attr("stop-color",i).attr("stop-opacity",1)),zue(a,n.config.mindmap?.padding??ar.mindmap.padding,"mindmapDiagram",n.config.mindmap?.useMaxWidth??ar.mindmap.useMaxWidth))},"draw"),cBe={draw:hBe}}),bBe=i(()=>{oi(),uBe=mt(t=>{let{theme:r,look:i}=t,n="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t["lineColor"+e]=t["lineColor"+e]||t["cScaleInv"+e],vt(t["lineColor"+e])?t["lineColor"+e]=L(t["lineColor"+e],20):t["lineColor"+e]=R(t["lineColor"+e],20);for(let e=0;e<t.THEME_COLOR_LIMIT;e++){var a=""+("neo"===i?Math.max(10-2*(e-1),2):17-3*e);n+=`
.section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} polygon, .section-${e-1} path {
fill: ${t["cScale"+e]};
}
.section-${e-1} text {
fill: ${t["cScaleLabel"+e]};
}
.section-${e-1} span {
color: ${t["cScaleLabel"+e]};
}
.node-icon-${e-1} {
font-size: 40px;
color: ${t["cScaleLabel"+e]};
}
.section-edge-${e-1}{
stroke: ${t["cScale"+e]};
}
.edge-depth-${e-1}{
stroke-width: ${a};
}
.section-${e-1} line {
stroke: ${t["cScaleInv"+e]} ;
stroke-width: 3;
}
.disabled, .disabled circle, .disabled text {
fill: lightgray;
}
.disabled text {
fill: #efefef;
}
[data-look="neo"].mindmap-node.section-${e-1} rect, [data-look="neo"].mindmap-node.section-${e-1} path, [data-look="neo"].mindmap-node.section-${e-1} circle, [data-look="neo"].mindmap-node.section-${e-1} polygon {
fill: ${"redux"===r||"redux-dark"===r||"neutral"===r?t.mainBkg:t["cScale"+e]};
stroke: ${"redux"===r||"redux-dark"===r?t.nodeBorder:t["cScale"+e]};
stroke-width: ${t.strokeWidth??2}px;
}
[data-look="neo"].section-edge-${e-1}{
stroke: ${r?.includes("redux")||"neo-dark"===r?t.nodeBorder:t["cScale"+e]};
}
[data-look="neo"].mindmap-node.section-${e-1} text {
fill: ${"redux"===r||"redux-dark"===r?t.nodeBorder:t["cScaleLabel"+("neutral"===r?1:e)]};
}
`}return n},"genSections"),dBe=mt((t,r,i)=>{let n="";for(let e=0;e<t;e++)n+=`
[data-look="neo"].mindmap-node.section-${e-1} rect, [data-look="neo"].mindmap-node.section-${e-1} path, [data-look="neo"].mindmap-node.section-${e-1} circle, [data-look="neo"].mindmap-node.section-${e-1} polygon {
stroke: url(${r}-gradient);
fill: ${i};
}
.section-${e-1} line {
stroke-width: 0;
}`;return n},"genGradient"),pBe=mt(e=>{var t=e.theme,r=e.svgId,i=e.dropShadow?e.dropShadow.replace("url(#drop-shadow)",`url(${r}-drop-shadow)`):"none";return`
.edge {
stroke-width: 3;
}
${uBe(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"+("neutral"===t?1:0)]};
}
${e.useGradient&&r&&e.mainBkg?dBe(e.THEME_COLOR_LIMIT,r,e.mainBkg):""}
`},"getStyles"),gBe=pBe}),TBe={};sYe(TBe,{diagram:()=>kBe});var kBe,wBe,CBe,EBe,SBe,_Be,ABe,LBe,RBe,IBe,NBe,DBe,MBe,OBe,BBe,PBe,$Be,FBe,zBe,qBe,WBe,UBe,GBe,jBe,VBe,YBe=i(()=>{YOe(),vBe(),xBe(),bBe(),kBe={get db(){return new lBe},renderer:cBe,parser:jOe,styles:gBe}}),HBe=i(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,4],i=[1,13],n=[1,12],a=[1,15],s=[1,16],o=[1,20],l=[1,19],h=[6,7,8],c=[1,26],u=[1,24],d=[1,25],p=[6,7,11],g=[1,31],f=[6,7,11,24],m=[1,6,13,16,17,20,23],y=[1,35],v=[1,36],x=[1,6,7,11,13,16,17,20,23],b=[1,38],r={trace:mt(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:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",a[o-1].id),i.addNode(a[o-2].length,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 16:i.getLogger().info("Node: ",a[o].id),i.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 17:i.getLogger().trace("Icon: ",a[o]),i.decorateNode({icon:a[o]});break;case 18:case 23:i.decorateNode({class:a[o]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",a[o-1].id),i.addNode(0,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 21:i.getLogger().trace("Node: ",a[o].id),i.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 22:i.decorateNode({icon:a[o]});break;case 27:i.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:i.getType(a[o-2],a[o])};break;case 28:this.$={id:a[o],descr:a[o],type:0};break;case 29:i.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:i.getType(a[o-2],a[o])};break;case 30:this.$=a[o-1]+a[o];break;case 31:this.$=a[o]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:r},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:r},{6:i,7:[1,10],9:9,12:11,13:n,14:14,16:a,17:s,18:17,19:18,20:o,23:l},t(h,[2,3]),{1:[2,2]},t(h,[2,4]),t(h,[2,5]),{1:[2,6],6:i,12:21,13:n,14:14,16:a,17:s,18:17,19:18,20:o,23:l},{6:i,9:22,12:11,13:n,14:14,16:a,17:s,18:17,19:18,20:o,23:l},{6:c,7:u,10:23,11:d},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:l}),t(p,[2,19]),t(p,[2,21],{15:30,24:g}),t(p,[2,22]),t(p,[2,23]),t(f,[2,25]),t(f,[2,26]),t(f,[2,28],{20:[1,32]}),{21:[1,33]},{6:c,7:u,10:34,11:d},{1:[2,7],6:i,12:21,13:n,14:14,16:a,17:s,18:17,19:18,20:o,23:l},t(m,[2,14],{7:y,11:v}),t(x,[2,8]),t(x,[2,9]),t(x,[2,10]),t(p,[2,16],{15:37,24:g}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:b}),t(f,[2,31]),{21:[1,39]},{22:[1,40]},t(m,[2,13],{7:y,11:v}),t(x,[2,11]),t(x,[2,12]),t(p,[2,15],{24:b}),t(f,[2,30]),{22:[1,41]},t(f,[2,27]),t(f,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",h=0,c=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,T,k,w,C,E,S={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===x||"u"<typeof x)&&(x=v()),o[T]&&o[T][x]))||!k.length||!k[0]){var _,A=[];for(w in o[T])this.terminals_[w]&&2<w&&A.push("'"+this.terminals_[w]+"'");_=g.showPosition?"Parse error on line "+(h+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(c=g.yyleng,l=g.yytext,h=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],S.$=a[a.length-C],S._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(E=this.performAction.apply(S,[l,c,h,f.yy,k[1],a,s].concat(p)))<"u")return E;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),E=o[i[i.length-2]][i[i.length-1]],i.push(E);break;case 3:return!0}}return!0},"parse")},h={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){case 0:return this.pushState("shapeData"),t.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:return t.yytext=t.yytext.replace(/\n\s*/g,"<br/>"),24;case 4:return 24;case 5:this.popState();break;case 6:return e.getLogger().trace("Found comment",t.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:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return e.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:e.getLogger().trace("end icon"),this.popState();break;case 16:return e.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return e.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22: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:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return e.getLogger().trace("description:",t.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),e.getLogger().trace("node end ...",t.yytext),"NODE_DEND";case 36:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 39:case 40:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 41:case 42:return e.getLogger().trace("Long description:",t.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}}};r.lexer=h,mt(e,"Parser"),(wBe=new((e.prototype=r).Parser=e)).parser=wBe,CBe=wBe}),XBe=i(()=>{ju(),ic(),e(),wi(),lL(),EBe=[],SBe=[],_Be=0,ABe={},LBe=mt(()=>{EBe=[],SBe=[],_Be=0,ABe={}},"clear"),RBe=mt(e=>{if(0===EBe.length)return null;let t=EBe[0].level,r=null;for(let e=EBe.length-1;0<=e;e--)if(EBe[e].level===t&&(r=r||EBe[e]),EBe[e].level<t)throw new Error('Items without section detected, found section ("'+EBe[e].label+'")');return e===r?.level?null:r},"getSection"),IBe=mt(function(){return SBe},"getSections"),NBe=mt(function(){var e=[],r=IBe(),i=P();for(let t of r){var n,a={id:t.id,label:Ih(t.label??"",i),labelType:"markdown",isGroup:!0,ticket:t.ticket,shape:"kanbanSection",level:t.level,look:i.look};e.push(a);for(n of EBe.filter(e=>e.parentId===t.id)){var s={id:n.id,parentId:t.id,label:Ih(n.label??"",i),labelType:"markdown",isGroup:!1,ticket:n?.ticket,priority:n?.priority,assigned:n?.assigned,icon:n?.icon,shape:"kanbanItem",level:n.level,rx:5,ry:5,cssStyles:["text-align: left"]};e.push(s)}}return{nodes:e,edges:[],other:{},config:P()}},"getData"),DBe=mt((e,t,r,i,n)=>{let a=P(),s=a.mindmap?.padding??ar.mindmap.padding;switch(i){case MBe.ROUNDED_RECT:case MBe.RECT:case MBe.HEXAGON:s*=2}if(i={id:Ih(t,a)||"kbn"+_Be++,level:e,label:Ih(r,a),width:a.mindmap?.maxNodeWidth??ar.mindmap.maxNodeWidth,padding:s,isGroup:!1},void 0!==n){if(n=n.includes(`
`)?n+`
`:`{
`+n+`
}`,(t=oL(n,{schema:sL})).shape&&(t.shape!==t.shape.toLowerCase()||t.shape.includes("_")))throw new Error(`No such shape: ${t.shape}. Shape names should be lowercase.`);t?.shape&&"kanbanItem"===t.shape&&(i.shape=t?.shape),t?.label&&(i.label=t?.label),t?.icon&&(i.icon=t?.icon.toString()),t?.assigned&&(i.assigned=t?.assigned.toString()),t?.ticket&&(i.ticket=t?.ticket.toString()),t?.priority&&(i.priority=t?.priority)}(r=RBe(e))?i.parentId=r.id||"kbn"+_Be++:SBe.push(i),EBe.push(i)},"addNode"),MBe={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},OBe=mt((e,t)=>{switch(B.debug("In get type",e,t),e){case"[":return MBe.RECT;case"(":return")"===t?MBe.ROUNDED_RECT:MBe.CLOUD;case"((":return MBe.CIRCLE;case")":return MBe.CLOUD;case"))":return MBe.BANG;case"{{":return MBe.HEXAGON;default:return MBe.DEFAULT}},"getType"),BBe=mt((e,t)=>{ABe[e]=t},"setElementForId"),PBe=mt(e=>{var t,r;e&&(t=P(),r=EBe[EBe.length-1],e.icon&&(r.icon=Ih(e.icon,t)),e.class)&&(r.cssClasses=Ih(e.class,t))},"decorateNode"),$Be=mt(e=>{switch(e){case MBe.DEFAULT:return"no-border";case MBe.RECT:return"rect";case MBe.ROUNDED_RECT:return"rounded-rect";case MBe.CIRCLE:return"circle";case MBe.CLOUD:return"cloud";case MBe.BANG:return"bang";case MBe.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),FBe=mt(()=>B,"getLogger"),zBe=mt(e=>ABe[e],"getElementById"),qBe={clear:LBe,addNode:DBe,getSections:IBe,getData:NBe,nodeType:MBe,getType:OBe,setElementForId:BBe,decorateNode:PBe,type2Str:$Be,getLogger:FBe,getElementById:zBe}}),KBe=i(()=>{ju(),e(),cAe(),Rc(),wi(),eB(),uP(),WBe=mt(async(e,t,r,i)=>{B.debug(`Rendering kanban diagram
`+e);var n,a=i.db.getData(),s=P(),e=(s.htmlLabels=!1,nAe(t));for(n of a.nodes)n.domId=t+"-"+n.id;var o,l=e.append("g"),h=(l.attr("class","sections"),e.append("g"));h.attr("class","items");let c=a.nodes.filter(e=>e.isGroup),u=0,d=[],p=25;for(o of c){var g=s?.kanban?.sectionWidth||200,g=(u+=1,o.x=g*u+10*(u-1)/2,o.width=g,o.y=0,o.height=3*g,o.rx=5,o.ry=5,o.cssClasses=o.cssClasses+" section-"+u,await YO(l,o));p=Math.max(p,g?.labelBBox?.height),d.push(g)}let f=0;for(let n of c){var m,y=d[f];f+=1;let e=s?.kanban?.sectionWidth||200,t=3*-e/2+p,r=t,i=a.nodes.filter(e=>e.parentId===n.id);for(m of i){if(m.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");m.x=n.x,m.width=e-15;var v=(await aP(h,m,{config:s})).node().getBBox();m.y=r+v.height/2,await hP(m),r=m.y+v.height/2+5}var y=y.cluster.select("rect"),x=Math.max(r-t+30,50)+(p-25);y.attr("height",x)}bc(void 0,e,s.mindmap?.padding??ar.kanban.padding,s.mindmap?.useMaxWidth??ar.kanban.useMaxWidth)},"draw"),UBe={draw:WBe}}),ZBe=i(()=>{oi(),sde(),GBe=mt(r=>{let t="";for(let e=0;e<r.THEME_COLOR_LIMIT;e++)r["lineColor"+e]=r["lineColor"+e]||r["cScaleInv"+e],vt(r["lineColor"+e])?r["lineColor"+e]=L(r["lineColor"+e],20):r["lineColor"+e]=R(r["lineColor"+e],20);var i=mt((e,t)=>(r.darkMode?R:L)(e,t),"adjuster");for(let e=0;e<r.THEME_COLOR_LIMIT;e++){var n=""+(17-3*e);t+=`
.section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} polygon, .section-${e-1} path {
fill: ${i(r["cScale"+e],10)};
stroke: ${i(r["cScale"+e],10)};
}
.section-${e-1} text {
fill: ${r["cScaleLabel"+e]};
}
.node-icon-${e-1} {
font-size: 40px;
color: ${r["cScaleLabel"+e]};
}
.section-edge-${e-1}{
stroke: ${r["cScale"+e]};
}
.edge-depth-${e-1}{
stroke-width: ${n};
}
.section-${e-1} line {
stroke: ${r["cScaleInv"+e]} ;
stroke-width: 3;
}
.disabled, .disabled circle, .disabled text {
fill: lightgray;
}
.disabled text {
fill: #efefef;
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${r.background};
stroke: ${r.nodeBorder};
stroke-width: 1px;
}
.kanban-ticket-link {
fill: ${r.background};
stroke: ${r.nodeBorder};
text-decoration: underline;
}
`}return t},"genSections"),jBe=mt(e=>`
.edge {
stroke-width: 3;
}
${GBe(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;
}
${Kue()}
`,"getStyles"),VBe=jBe}),QBe={};sYe(QBe,{diagram:()=>JBe});var JBe,ePe,tPe,rPe,iPe,nPe,aPe,sPe,oPe,lPe,hPe,cPe,uPe,dPe,pPe,gPe=i(()=>{HBe(),XBe(),KBe(),ZBe(),JBe={db:qBe,renderer:UBe,parser:CBe,styles:VBe}}),fPe=i(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,9],i=[1,10],n=[1,5,10,12],n={trace:mt(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:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 7:var l=i.findOrCreateNode(a[o-4].trim().replaceAll('""','"')),h=i.findOrCreateNode(a[o-2].trim().replaceAll('""','"')),c=parseFloat(a[o].trim());i.addLink(l,h,c);break;case 8:case 9:case 11:this.$=a[o];break;case 10:this.$=a[o-1]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:r,20:i},{1:[2,6],7:11,10:[1,12]},t(i,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(n,[2,8]),t(n,[2,9]),{19:[1,16]},t(n,[2,11]),{1:[2,1]},{1:[2,5]},t(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:r,20:i},{15:18,16:7,17:8,18:r,20:i},{18:[1,19]},t(i,[2,3]),{12:[1,20]},t(n,[2,10]),{15:21,16:7,17:8,18:r,20:i},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",h=0,c=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,T,k,w,C,E,S={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===x||"u"<typeof x)&&(x=v()),o[T]&&o[T][x]))||!k.length||!k[0]){var _,A=[];for(w in o[T])this.terminals_[w]&&2<w&&A.push("'"+this.terminals_[w]+"'");_=g.showPosition?"Parse error on line "+(h+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(c=g.yyleng,l=g.yytext,h=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],S.$=a[a.length-C],S._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(E=this.performAction.apply(S,[l,c,h,f.yy,k[1],a,s].concat(p)))<"u")return E;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),E=o[i[i.length-2]][i[i.length-1]],i.push(E);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){case 0: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}}};n.lexer=r,mt(e,"Parser"),(ePe=new((e.prototype=n).Parser=e)).parser=ePe,tPe=ePe}),mPe=i(()=>{ju(),ic(),Gu(),rPe=[],iPe=[],nPe=new Map,aPe=mt(()=>{rPe=[],iPe=[],nPe=new Map,Pc()},"clear"),sPe=class{constructor(e,t,r=0){this.source=e,this.target=t,this.value=r}static{mt(this,"SankeyLink")}},oPe=mt((e,t,r)=>{rPe.push(new sPe(e,t,r))},"addLink"),lPe=class{constructor(e){this.ID=e}static{mt(this,"SankeyNode")}},hPe=mt(e=>{e=I.sanitizeText(e,P());let t=nPe.get(e);return void 0===t&&(t=new lPe(e),nPe.set(e,t),iPe.push(t)),t},"findOrCreateNode"),cPe=mt(()=>iPe,"getNodes"),uPe=mt(()=>rPe,"getLinks"),dPe=mt(()=>({nodes:iPe.map(e=>({id:e.ID})),links:rPe.map(e=>({source:e.source.ID,target:e.target.ID,value:e.value}))}),"getGraph"),pPe={nodesMap:nPe,getConfig:mt(()=>P().sankey,"getConfig"),getNodes:cPe,getLinks:uPe,getGraph:dPe,addLink:oPe,findOrCreateNode:hPe,getAccTitle:Fc,setAccTitle:$c,getAccDescription:qc,setAccDescription:zc,getDiagramTitle:Uc,setDiagramTitle:Wc,clear:aPe}});function yPe(t,r){let i;if(void 0===r)for(var e of t)null!=e&&(i<e||void 0===i&&e<=e)&&(i=e);else{let e=-1;for(var n of t)null!=(n=r(n,++e,t))&&(i<n||void 0===i&&n<=n)&&(i=n)}return i}var vPe=i(()=>{mt(yPe,"max")});function xPe(t,r){let i;if(void 0===r)for(var e of t)null!=e&&(i>e||void 0===i&&e<=e)&&(i=e);else{let e=-1;for(var n of t)null!=(n=r(n,++e,t))&&(i>n||void 0===i&&n<=n)&&(i=n)}return i}var bPe=i(()=>{mt(xPe,"min")});function TPe(t,r){let i=0;if(void 0===r)for(var e of t)(e=+e)&&(i+=e);else{let e=-1;for(var n of t)(n=+r(n,++e,t))&&(i+=n)}return i}var kPe=i(()=>{mt(TPe,"sum")}),wPe=i(()=>{vPe(),bPe(),kPe()});function CPe(e){return e.target.depth}function EPe(e){return e.depth}function SPe(e,t){return t-1-e.height}function _Pe(e,t){return e.sourceLinks.length?e.depth:t-1}function APe(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?xPe(e.sourceLinks,CPe)-1:0}var LPe=i(()=>{wPe(),mt(CPe,"targetDepth"),mt(EPe,"left"),mt(SPe,"right"),mt(_Pe,"justify"),mt(APe,"center")});function RPe(e){return function(){return e}}var IPe=i(()=>{mt(RPe,"constant")});function NPe(e,t){return MPe(e.source,t.source)||e.index-t.index}function DPe(e,t){return MPe(e.target,t.target)||e.index-t.index}function MPe(e,t){return e.y0-t.y0}function OPe(e){return e.value}function BPe(e){return e.index}function PPe(e){return e.nodes}function $Pe(e){return e.links}function FPe(e,t){if(e=e.get(t))return e;throw new Error("missing: "+t)}function zPe({nodes:e}){for(var r of e){let e=r.y0,t=e;for(var i of r.sourceLinks)i.y0=e+i.width/2,e+=i.width;for(var n of r.targetLinks)n.y1=t+n.width/2,t+=n.width}}function qPe(){let o=0,l=0,h=1,c=1,u=24,n=8,d,p=BPe,g=_Pe,f,m,t=PPe,r=$Pe,a=6;function i(){var e={nodes:t.apply(null,arguments),links:r.apply(null,arguments)};return s(e),y(e),v(e),x(e),k(e),zPe(e),e}function s({nodes:r,links:e}){for(var[t,i]of r.entries())i.index=t,i.sourceLinks=[],i.targetLinks=[];var n,a,s=new Map(r.map((e,t)=>[p(e,t,r),e]));for([n,a]of e.entries()){a.index=n;let{source:e,target:t}=a;"object"!=typeof e&&(e=a.source=FPe(s,e)),"object"!=typeof t&&(t=a.target=FPe(s,t)),e.sourceLinks.push(a),t.targetLinks.push(a)}if(null!=m)for(var{sourceLinks:o,targetLinks:l}of r)o.sort(m),l.sort(m)}function y({nodes:e}){for(var t of e)t.value=void 0===t.fixedValue?Math.max(TPe(t.sourceLinks,OPe),TPe(t.targetLinks,OPe)):t.fixedValue}function v({nodes:e}){let t=e.length,r=new Set(e),i=new Set,n=0;for(;r.size;){for(var a of r){a.depth=n;for(var{target:s}of a.sourceLinks)i.add(s)}if(++n>t)throw new Error("circular link");r=i,i=new Set}}function x({nodes:e}){let t=e.length,r=new Set(e),i=new Set,n=0;for(;r.size;){for(var a of r){a.height=n;for(var{source:s}of a.targetLinks)i.add(s)}if(++n>t)throw new Error("circular link");r=i,i=new Set}}function b({nodes:e}){var t,r=yPe(e,e=>e.depth)+1,i=(h-o-u)/(r-1),n=new Array(r);for(t of e){var a=Math.max(0,Math.min(r-1,Math.floor(g.call(null,t,r))));t.layer=a,t.x0=o+a*i,t.x1=t.x0+u,n[a]?n[a].push(t):n[a]=[t]}if(f)for(var s of n)s.sort(f);return n}function T(e){var r,i=xPe(e,e=>(c-l-(e.length-1)*d)/TPe(e,OPe));for(r of e){let t=l;for(var n of r){n.y0=t,n.y1=t+n.value*i,t=n.y1+d;for(var a of n.sourceLinks)a.width=a.value*i}t=(c-t+d)/(r.length+1);for(let e=0;e<r.length;++e){var s=r[e];s.y0+=t*(e+1),s.y1+=t*(e+1)}L(r)}}function k(e){var t=b(e);d=Math.min(n,(c-l)/(yPe(t,e=>e.length)-1)),T(t);for(let e=0;e<a;++e){var r=Math.pow(.99,e),i=Math.max(1-r,(e+1)/a);C(t,r,i),w(t,r,i)}}function w(r,i,n){for(let e=1,t=r.length;e<t;++e){var a,s,o=r[e];for(a of o){let e=0,t=0;for(var{source:l,value:h}of a.targetLinks)h*=a.layer-l.layer,e+=R(l,a)*h,t+=h;0<t&&(s=(e/t-a.y0)*i,a.y0+=s,a.y1+=s,A(a))}void 0===f&&o.sort(MPe),E(o,n)}}function C(r,i,n){for(let e=r.length,t=e-2;0<=t;--t){var a,s,o=r[t];for(a of o){let e=0,t=0;for(var{target:l,value:h}of a.sourceLinks)h*=l.layer-a.layer,e+=I(a,l)*h,t+=h;0<t&&(s=(e/t-a.y0)*i,a.y0+=s,a.y1+=s,A(a))}void 0===f&&o.sort(MPe),E(o,n)}}function E(e,t){var r=e.length>>1,i=e[r];_(e,i.y0-d,r-1,t),S(e,i.y1+d,1+r,t),_(e,c,e.length-1,t),S(e,l,0,t)}function S(e,t,r,i){for(;r<e.length;++r){var n=e[r],a=(t-n.y0)*i;1e-6<a&&(n.y0+=a,n.y1+=a),t=n.y1+d}}function _(e,t,r,i){for(;0<=r;--r){var n=e[r],a=(n.y1-t)*i;1e-6<a&&(n.y0-=a,n.y1-=a),t=n.y0-d}}function A({sourceLinks:e,targetLinks:t}){if(void 0===m){for(var{source:{sourceLinks:r}}of t)r.sort(DPe);for(var{target:{targetLinks:i}}of e)i.sort(NPe)}}function L(e){if(void 0===m)for(var{sourceLinks:t,targetLinks:r}of e)t.sort(DPe),r.sort(NPe)}function R(e,t){let r=e.y0-(e.sourceLinks.length-1)*d/2;for(var{target:i,width:n}of e.sourceLinks){if(i===t)break;r+=n+d}for(var{source:a,width:s}of t.targetLinks){if(a===e)break;r-=s}return r}function I(e,t){let r=t.y0-(t.targetLinks.length-1)*d/2;for(var{source:i,width:n}of t.targetLinks){if(i===e)break;r+=n+d}for(var{target:a,width:s}of e.sourceLinks){if(a===t)break;r-=s}return r}return mt(i,"sankey"),i.update=function(e){return zPe(e),e},i.nodeId=function(e){return arguments.length?(p="function"==typeof e?e:RPe(e),i):p},i.nodeAlign=function(e){return arguments.length?(g="function"==typeof e?e:RPe(e),i):g},i.nodeSort=function(e){return arguments.length?(f=e,i):f},i.nodeWidth=function(e){return arguments.length?(u=+e,i):u},i.nodePadding=function(e){return arguments.length?(n=d=+e,i):n},i.nodes=function(e){return arguments.length?(t="function"==typeof e?e:RPe(e),i):t},i.links=function(e){return arguments.length?(r="function"==typeof e?e:RPe(e),i):r},i.linkSort=function(e){return arguments.length?(m=e,i):m},i.size=function(e){return arguments.length?(o=l=0,h=+e[0],c=+e[1],i):[h-o,c-l]},i.extent=function(e){return arguments.length?(o=+e[0][0],h=+e[1][0],l=+e[0][1],c=+e[1][1],i):[[o,l],[h,c]]},i.iterations=function(e){return arguments.length?(a=+e,i):a},mt(s,"computeNodeLinks"),mt(y,"computeNodeValues"),mt(v,"computeNodeDepths"),mt(x,"computeNodeHeights"),mt(b,"computeNodeLayers"),mt(T,"initializeNodeBreadths"),mt(k,"computeNodeBreadths"),mt(w,"relaxLeftToRight"),mt(C,"relaxRightToLeft"),mt(E,"resolveCollisions"),mt(S,"resolveCollisionsTopToBottom"),mt(_,"resolveCollisionsBottomToTop"),mt(A,"reorderNodeLinks"),mt(L,"reorderLinks"),mt(R,"targetTop"),mt(I,"sourceTop"),i}var WPe=i(()=>{wPe(),LPe(),IPe(),mt(NPe,"ascendingSourceBreadth"),mt(DPe,"ascendingTargetBreadth"),mt(MPe,"ascendingBreadth"),mt(OPe,"value"),mt(BPe,"defaultId"),mt(PPe,"defaultNodes"),mt($Pe,"defaultLinks"),mt(FPe,"find"),mt(zPe,"computeLinkBreadths"),mt(qPe,"Sankey")});function UPe(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function GPe(){return new UPe}var jPe,VPe,YPe,HPe,XPe=i(()=>{jPe=Math.PI,YPe=(VPe=2*jPe)-1e-6,mt(UPe,"Path"),mt(GPe,"path"),UPe.prototype=GPe.prototype={constructor:UPe,moveTo:mt(function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},"moveTo"),closePath:mt(function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:mt(function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},"lineTo"),quadraticCurveTo:mt(function(e,t,r,i){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+i)},"quadraticCurveTo"),bezierCurveTo:mt(function(e,t,r,i,n,a){this._+="C"+ +e+","+ +t+","+ +r+","+ +i+","+(this._x1=+n)+","+(this._y1=+a)},"bezierCurveTo"),arcTo:mt(function(e,t,r,i,n){var a,s,o=this._x1,l=this._y1,h=(r=+r)-(e=+e),c=(i=+i)-(t=+t),u=o-e,d=l-t,p=u*u+d*d;if((n=+n)<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+(this._x1=e)+","+(this._y1=t):1e-6<p&&(1e-6<Math.abs(d*h-c*u)&&n?(s=h*h+c*c,i=(r-=o)*r+(o=i-l)*o,l=Math.sqrt(s),a=Math.sqrt(p),p=(s=n*Math.tan((jPe-Math.acos((s+p-i)/(2*l*a)))/2))/a,i=s/l,1e-6<Math.abs(p-1)&&(this._+="L"+(e+p*u)+","+(t+p*d)),this._+="A"+n+","+n+",0,0,"+ +(u*o<d*r)+","+(this._x1=e+i*h)+","+(this._y1=t+i*c)):this._+="L"+(this._x1=e)+","+(this._y1=t))},"arcTo"),arc:mt(function(e,t,r,i,n,a){e=+e,t=+t,a=!!a;var s=(r=+r)*Math.cos(i),o=r*Math.sin(i),l=e+s,h=t+o,c=1^a,a=a?i-n:n-i;if(r<0)throw new Error("negative radius: "+r);null===this._x1?this._+="M"+l+","+h:(1e-6<Math.abs(this._x1-l)||1e-6<Math.abs(this._y1-h))&&(this._+="L"+l+","+h),r&&(YPe<(a=a<0?a%VPe+VPe:a)?this._+="A"+r+","+r+",0,1,"+c+","+(e-s)+","+(t-o)+"A"+r+","+r+",0,1,"+c+","+(this._x1=l)+","+(this._y1=h):1e-6<a&&(this._+="A"+r+","+r+",0,"+ +(jPe<=a)+","+c+","+(this._x1=e+r*Math.cos(n))+","+(this._y1=t+r*Math.sin(n))))},"arc"),rect:mt(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:mt(function(){return this._},"toString")},HPe=GPe}),KPe=i(()=>{XPe()});function ZPe(e){return mt(function(){return e},"constant")}var QPe=i(()=>{mt(ZPe,"default")});function JPe(e){return e[0]}function e$e(e){return e[1]}var t$e,r$e=i(()=>{mt(JPe,"x"),mt(e$e,"y")}),i$e=i(()=>{t$e=Array.prototype.slice});function n$e(e){return e.source}function a$e(e){return e.target}function s$e(n){var a=n$e,s=a$e,o=JPe,l=e$e,h=null;function t(){var e,t=t$e.call(arguments),r=a.apply(this,t),i=s.apply(this,t);if(h=h||(e=HPe()),n(h,+o.apply(this,(t[0]=r,t)),+l.apply(this,t),+o.apply(this,(t[0]=i,t)),+l.apply(this,t)),e)return h=null,e+""||null}return mt(t,"link"),t.source=function(e){return arguments.length?(a=e,t):a},t.target=function(e){return arguments.length?(s=e,t):s},t.x=function(e){return arguments.length?(o="function"==typeof e?e:ZPe(+e),t):o},t.y=function(e){return arguments.length?(l="function"==typeof e?e:ZPe(+e),t):l},t.context=function(e){return arguments.length?(h=e??null,t):h},t}function o$e(e,t,r,i,n){e.moveTo(t,r),e.bezierCurveTo(t=(t+i)/2,r,t,n,i,n)}function l$e(){return s$e(o$e)}var h$e=i(()=>{KPe(),i$e(),QPe(),r$e(),mt(n$e,"linkSource"),mt(a$e,"linkTarget"),mt(s$e,"link"),mt(o$e,"curveHorizontal"),mt(l$e,"linkHorizontal")}),c$e=i(()=>{h$e()});function u$e(e){return[e.source.x1,e.y0]}function d$e(e){return[e.target.x0,e.y1]}function p$e(){return l$e().source(u$e).target(d$e)}var g$e,f$e,m$e,y$e,v$e,x$e,b$e,T$e=i(()=>{c$e(),mt(u$e,"horizontalSource"),mt(d$e,"horizontalTarget"),mt(p$e,"default")}),k$e=i(()=>{WPe(),LPe(),T$e()}),w$e=i(()=>{g$e=class t{static{mt(this,"Uid")}static{this.count=0}static next(e){return new t(e+ ++t.count)}constructor(e){this.id=e,this.href="#"+e}toString(){return"url("+this.href+")"}}}),C$e=i(()=>{ju(),Sk(),k$e(),Rc(),w$e(),f$e={left:EPe,right:SPe,center:APe,justify:_Pe},m$e=mt(function(e,t,r,i){let{securityLevel:n,sankey:a}=P(),s=Yc.sankey,o,l=("sandbox"===n&&(o=Q("#i"+t)),Q("sandbox"===n?o.nodes()[0].contentDocument.body:"body")),h="sandbox"===n?l.select(`[id="${t}"]`):Q(`[id="${t}"]`),c=a?.width??s.width,u=a?.height??s.width,d=a?.useMaxWidth??s.useMaxWidth,p=a?.nodeAlignment??s.nodeAlignment,g=a?.prefix??s.prefix,f=a?.suffix??s.suffix,m=a?.showValues??s.showValues,y=i.db.getGraph(),v=f$e[p],x=(qPe().nodeId(e=>e.id).nodeWidth(10).nodePadding(10+(m?15:0)).nodeAlign(v).extent([[0,0],[c,u]])(y),Fx(F5));h.append("g").attr("class","nodes").selectAll(".node").data(y.nodes).join("g").attr("class","node").attr("id",e=>(e.uid=g$e.next("node-")).id).attr("transform",function(e){return"translate("+e.x0+","+e.y0+")"}).attr("x",e=>e.x0).attr("y",e=>e.y0).append("rect").attr("height",e=>e.y1-e.y0).attr("width",e=>e.x1-e.x0).attr("fill",e=>x(e.id));var t=mt(({id:e,value:t})=>m?e+`
`+g+Math.round(100*t)/100+f:e,"getText"),i=(h.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(y.nodes).join("text").attr("x",e=>e.x0<c/2?e.x1+6:e.x0-6).attr("y",e=>(e.y1+e.y0)/2).attr("dy",`${m?"0":"0.35"}em`).attr("text-anchor",e=>e.x0<c/2?"start":"end").text(t),h.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(y.links).join("g").attr("class","link").style("mix-blend-mode","multiply")),b=a?.linkColor??"gradient";"gradient"===b&&((t=i.append("linearGradient").attr("id",e=>(e.uid=g$e.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",e=>e.source.x1).attr("x2",e=>e.target.x0)).append("stop").attr("offset","0%").attr("stop-color",e=>x(e.source.id)),t.append("stop").attr("offset","100%").attr("stop-color",e=>x(e.target.id)));let T;switch(b){case"gradient":T=mt(e=>e.uid,"coloring");break;case"source":T=mt(e=>x(e.source.id),"coloring");break;case"target":T=mt(e=>x(e.target.id),"coloring");break;default:T=b}i.append("path").attr("d",p$e()).attr("stroke",T).attr("stroke-width",e=>Math.max(1,e.width)),bc(void 0,h,0,d)},"draw"),y$e={draw:m$e}}),E$e=i(()=>{v$e=mt(e=>e.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
`).trim(),"prepareTextForParsing")}),S$e=i(()=>{x$e=mt(e=>`.label {
font-family: ${e.fontFamily};
}`,"getStyles"),b$e=x$e}),_$e={};sYe(_$e,{diagram:()=>L$e});var A$e,L$e,R$e,I$e,N$e,D$e,M$e,O$e,B$e,P$e,$$e,F$e,z$e=i(()=>{fPe(),mPe(),C$e(),E$e(),S$e(),A$e=tPe.parse.bind(tPe),tPe.parse=e=>A$e(v$e(e)),L$e={styles:b$e,parser:tPe,db:pPe,renderer:y$e}}),q$e=i(()=>{Ei(),wi(),S7(),Gu(),R$e=ar.packet,I$e=class{constructor(){this.packet=[],this.setAccTitle=$c,this.getAccTitle=Fc,this.setDiagramTitle=Wc,this.getDiagramTitle=Uc,this.getAccDescription=qc,this.setAccDescription=zc}static{mt(this,"PacketDB")}getConfig(){var e=H_({...R$e,...br().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){0<e.length&&this.packet.push(e)}clear(){Pc(),this.packet=[]}}}),W$e=i(()=>{RSe(),e(),MSe(),q$e(),N$e=mt((e,t)=>{ISe(e,t);let r=-1,i=[],n=1,a=t.getConfig().bitsPerRow;for(var{start:s,end:o,bits:l,label:h}of e.blocks){if(void 0!==s&&void 0!==o&&o<s)throw new Error(`Packet block ${s} - ${o} is invalid. End must be greater than start.`);if((s??=r+1)!==r+1)throw new Error(`Packet block ${s} - ${o??s} is not contiguous. It should start from ${r+1}.`);if(0===l)throw new Error(`Packet block ${s} is invalid. Cannot have a zero bit field.`);for(o??=s+(l??1)-1,l??=o-s+1,r=o,B.debug(`Packet block ${s} - ${r} with label `+h);i.length<=a+1&&t.getPacket().length<1e4;){var[c,u]=D$e({start:s,end:o,bits:l,label:h},n,a);if(i.push(c),c.end+1===n*a&&(t.pushWord(i),i=[],n++),!u)break;({start:s,end:o,bits:l,label:h}=u)}}t.pushWord(i)},"populate"),D$e=mt((e,t,r)=>{if(void 0===e.start)throw new Error("start should have been set during first phase");if(void 0===e.end)throw new Error("end should have been set during first phase");if(e.end<e.start)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);var i;return e.end+1<=t*r?[e,void 0]:[{start:e.start,end:i=t*r-1,label:e.label,bits:i-e.start},{start:i=t*r,end:e.end,label:e.label,bits:e.end-i}]},"getNextFittingBlock"),M$e={parser:{yy:void 0},parse:mt(async e=>{var e=await SSe("packet",e),t=M$e.parser?.yy;if(!(t instanceof I$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.");B.debug(e),N$e(e,t)},"parse")}}),U$e=i(()=>{cAe(),Rc(),O$e=mt((e,t,r,i)=>{var n,a,s=(i=i.db).getConfig(),{rowHeight:o,paddingY:l,bitWidth:h,bitsPerRow:c}=s,u=i.getPacket(),i=i.getDiagramTitle(),o=(l=o+l)*(u.length+1)-(i?0:o),h=h*c+2,d=nAe(t);d.attr("viewBox",`0 0 ${h} `+o),xc(d,o,h,s.useMaxWidth);for([n,a]of u.entries())B$e(d,a,n,s);d.append("text").text(i).attr("x",h/2).attr("y",o-l/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),B$e=mt((e,t,r,{rowHeight:i,paddingX:n,paddingY:a,bitWidth:s,bitsPerRow:o,showBits:l})=>{var h,c=e.append("g"),u=r*(i+a)+a;for(h of t){var d,p,g=h.start%o*s+1,f=(h.end-h.start+1)*s-n;c.append("rect").attr("x",g).attr("y",u).attr("width",f).attr("height",i).attr("class","packetBlock"),c.append("text").attr("x",g+f/2).attr("y",u+i/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(h.label),l&&(d=h.end===h.start,p=u-2,c.append("text").attr("x",g+(d?f/2:0)).attr("y",p).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",d?"middle":"start").text(h.start),d||c.append("text").attr("x",g+f).attr("y",p).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(h.end))}},"drawWord"),P$e={draw:O$e}}),G$e=i(()=>{S7(),$$e={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},F$e=mt(({packet:e}={})=>`
.packetByte {
font-size: ${(e=H_($$e,e)).byteFontSize};
}
.packetByte.start {
fill: ${e.startByteColor};
}
.packetByte.end {
fill: ${e.endByteColor};
}
.packetLabel {
fill: ${e.labelColor};
font-size: ${e.labelFontSize};
}
.packetTitle {
fill: ${e.titleColor};
font-size: ${e.titleFontSize};
}
.packetBlock {
stroke: ${e.blockStrokeColor};
stroke-width: ${e.blockStrokeWidth};
fill: ${e.blockFillColor};
}
`,"styles")}),j$e={};sYe(j$e,{diagram:()=>V$e});var V$e,Y$e,H$e,X$e,K$e,Z$e,Q$e,J$e,eFe,tFe,rFe,iFe,nFe,aFe,sFe,oFe,lFe,hFe=i(()=>{q$e(),W$e(),U$e(),G$e(),V$e={parser:M$e,get db(){return new I$e},renderer:P$e,styles:F$e}}),cFe=i(()=>{Ei(),wi(),S7(),Gu(),H$e={axes:[],curves:[],options:Y$e={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"}},X$e=structuredClone(H$e),K$e=ar.radar,Z$e=mt(()=>H_({...K$e,...br().radar}),"getConfig"),Q$e=mt(()=>X$e.axes,"getAxes"),J$e=mt(()=>X$e.curves,"getCurves"),eFe=mt(()=>X$e.options,"getOptions"),tFe=mt(e=>{X$e.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},"setAxes"),rFe=mt(e=>{X$e.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:iFe(e.entries)}))},"setCurves"),iFe=mt(r=>{if(null==r[0].axis)return r.map(e=>e.value);var e=Q$e();if(0===e.length)throw new Error("Axes must be populated before curves for reference entries");return e.map(t=>{var e=r.find(e=>e.axis?.$refText===t.name);if(void 0===e)throw new Error("Missing entry for axis "+t.label);return e.value})},"computeCurveEntries"),nFe=mt(e=>{e=e.reduce((e,t)=>(e[t.name]=t,e),{}),X$e.options={showLegend:e.showLegend?.value??Y$e.showLegend,ticks:e.ticks?.value??Y$e.ticks,max:e.max?.value??Y$e.max,min:e.min?.value??Y$e.min,graticule:e.graticule?.value??Y$e.graticule}},"setOptions"),aFe=mt(()=>{Pc(),X$e=structuredClone(H$e)},"clear"),sFe={getAxes:Q$e,getCurves:J$e,getOptions:eFe,setAxes:tFe,setCurves:rFe,setOptions:nFe,getConfig:Z$e,clear:aFe,setAccTitle:$c,getAccTitle:Fc,setDiagramTitle:Wc,getDiagramTitle:Uc,getAccDescription:qc,setAccDescription:zc}}),uFe=i(()=>{RSe(),e(),MSe(),cFe(),oFe=mt(e=>{ISe(e,sFe);var{axes:e,curves:t,options:r}=e;sFe.setAxes(e),sFe.setCurves(t),sFe.setOptions(r)},"populate"),lFe={parse:mt(async e=>{e=await SSe("radar",e),B.debug(e),oFe(e)},"parse")}});function dFe(r,e,t,i,n,a,s){let o=e.length,l=Math.min(s.width,s.height)/2;t.forEach((e,t)=>{e.entries.length===o&&(e=e.entries.map((e,t)=>(t=2*Math.PI*t/o-Math.PI/2,{x:(e=pFe(e,i,n,l))*Math.cos(t),y:e*Math.sin(t)})),"circle"===a?r.append("path").attr("d",gFe(e,s.curveTension)).attr("class","radarCurve-"+t):"polygon"===a&&r.append("polygon").attr("points",e.map(e=>e.x+","+e.y).join(" ")).attr("class","radarCurve-"+t))})}function pFe(e,t,r,i){return i*(Math.min(Math.max(e,t),r)-t)/(r-t)}function gFe(t,r){let i=t.length,n=`M${t[0].x},`+t[0].y;for(let e=0;e<i;e++){var a=t[(e-1+i)%i],s=t[e],o=t[(e+1)%i],l=t[(e+2)%i],h=s.x+(o.x-a.x)*r,a=s.y+(o.y-a.y)*r,c=o.x-(l.x-s.x)*r;n+=` C${h},${a} ${c},${o.y-(l.y-s.y)*r} ${o.x},`+o.y}return n+" Z"}function fFe(a,e,t,r){if(t){let i=3*(r.width/2+r.marginRight)/4,n=3*-(r.height/2+r.marginTop)/4;e.forEach((e,t)=>{var r=a.append("g").attr("transform",`translate(${i}, ${n+20*t})`);r.append("rect").attr("width",12).attr("height",12).attr("class","radarLegendBox-"+t),r.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(e.label)})}}var mFe,yFe,vFe,xFe,bFe,TFe,kFe,wFe,CFe=i(()=>{cAe(),Rc(),mFe=mt((e,t,r,i)=>{var n=(i=i.db).getAxes(),a=i.getCurves(),s=i.getOptions(),o=i.getConfig(),i=i.getDiagramTitle(),t=nAe(t),t=yFe(t,o),l=s.max??Math.max(...a.map(e=>Math.max(...e.entries))),h=s.min,c=Math.min(o.width,o.height)/2;vFe(t,n,c,s.ticks,s.graticule),xFe(t,n,c,o),dFe(t,n,a,h,l,s.graticule,o),fFe(t,a,s.showLegend,o),t.append("text").attr("class","radarTitle").text(i).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),yFe=mt((e,t)=>{var r=t.width+t.marginLeft+t.marginRight,i=t.height+t.marginTop+t.marginBottom,n=t.marginLeft+t.width/2,a=t.marginTop+t.height/2;return xc(e,i,r,t.useMaxWidth??!0),e.attr("viewBox",`0 0 ${r} `+i),e.append("g").attr("transform",`translate(${n}, ${a})`)},"drawFrame"),vFe=mt((n,a,s,o,e)=>{if("circle"===e)for(let e=0;e<o;e++){var t=s*(e+1)/o;n.append("circle").attr("r",t).attr("class","radarGraticule")}else if("polygon"===e){let i=a.length;for(let t=0;t<o;t++){let r=s*(t+1)/o,e=a.map((e,t)=>(t=2*t*Math.PI/i-Math.PI/2,r*Math.cos(t)+","+r*Math.sin(t))).join(" ");n.append("polygon").attr("points",e).attr("class","radarGraticule")}}},"drawGraticule"),xFe=mt((t,r,i,n)=>{var a=r.length;for(let e=0;e<a;e++){var s=r[e].label,o=2*e*Math.PI/a-Math.PI/2;t.append("line").attr("x1",0).attr("y1",0).attr("x2",i*n.axisScaleFactor*Math.cos(o)).attr("y2",i*n.axisScaleFactor*Math.sin(o)).attr("class","radarAxisLine"),t.append("text").text(s).attr("x",i*n.axisLabelFactor*Math.cos(o)).attr("y",i*n.axisLabelFactor*Math.sin(o)).attr("class","radarAxisLabel")}},"drawAxes"),mt(dFe,"drawCurves"),mt(pFe,"relativeRadius"),mt(gFe,"closedRoundCurve"),mt(fFe,"drawLegend"),bFe={draw:mFe}}),EFe=i(()=>{S7(),di(),Ei(),TFe=mt((t,r)=>{let i="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++){var n=t["cScale"+e];i+=`
.radarCurve-${e} {
color: ${n};
fill: ${n};
fill-opacity: ${r.curveOpacity};
stroke: ${n};
stroke-width: ${r.curveStrokeWidth};
}
.radarLegendBox-${e} {
fill: ${n};
fill-opacity: ${r.curveOpacity};
stroke: ${n};
}
`}return i},"genIndexStyles"),kFe=mt(e=>{var t=H_(Pt(),br().themeVariables);return{themeVariables:t,radarOptions:H_(t.radar,e)}},"buildRadarStyleOptions"),wFe=mt(({radar:e}={})=>{var{themeVariables:e,radarOptions:t}=kFe(e);return`
.radarTitle {
font-size: ${e.fontSize};
color: ${e.titleColor};
dominant-baseline: hanging;
text-anchor: middle;
}
.radarAxisLine {
stroke: ${t.axisColor};
stroke-width: ${t.axisStrokeWidth};
}
.radarAxisLabel {
dominant-baseline: middle;
text-anchor: middle;
font-size: ${t.axisLabelFontSize}px;
color: ${t.axisColor};
}
.radarGraticule {
fill: ${t.graticuleColor};
fill-opacity: ${t.graticuleOpacity};
stroke: ${t.graticuleColor};
stroke-width: ${t.graticuleStrokeWidth};
}
.radarLegendText {
text-anchor: start;
font-size: ${t.legendFontSize}px;
dominant-baseline: hanging;
}
${TFe(e,t)}
`},"styles")}),SFe={};sYe(SFe,{diagram:()=>_Fe});var _Fe,AFe,LFe,RFe=i(()=>{cFe(),uFe(),CFe(),EFe(),_Fe={parser:lFe,db:sFe,renderer:bFe,styles:wFe}}),IFe=i(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,15],i=[1,7],n=[1,13],a=[1,14],s=[1,19],o=[1,16],l=[1,17],h=[1,18],c=[8,30],u=[8,10,21,28,29,30,31,39,43,46],d=[1,23],p=[1,24],g=[8,10,15,16,21,28,29,30,31,39,43,46],f=[8,10,15,16,21,27,28,29,30,31,39,43,46],m=[1,49],c={trace:mt(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:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 4:i.getLogger().debug("Rule: separator (NL) ");break;case 5:i.getLogger().debug("Rule: separator (Space) ");break;case 6:i.getLogger().debug("Rule: separator (EOF) ");break;case 7:i.getLogger().debug("Rule: hierarchy: ",a[o-1]),i.setHierarchy(a[o-1]);break;case 8:i.getLogger().debug("Stop NL ");break;case 9:i.getLogger().debug("Stop EOF ");break;case 10:i.getLogger().debug("Stop NL2 ");break;case 11:i.getLogger().debug("Stop EOF2 ");break;case 12:i.getLogger().debug("Rule: statement: ",a[o]),"number"==typeof a[o].length?this.$=a[o]:this.$=[a[o]];break;case 13:i.getLogger().debug("Rule: statement #2: ",a[o-1]),this.$=[a[o-1]].concat(a[o]);break;case 14:i.getLogger().debug("Rule: link: ",a[o],e),this.$={edgeTypeStr:a[o],label:""};break;case 15:i.getLogger().debug("Rule: LABEL link: ",a[o-3],a[o-1],a[o]),this.$={edgeTypeStr:a[o],label:a[o-1]};break;case 18:var l=parseInt(a[o]),h=i.generateId();this.$={id:h,type:"space",label:"",width:l,children:[]};break;case 23:i.getLogger().debug("Rule: (nodeStatement link node) ",a[o-2],a[o-1],a[o]," typestr: ",a[o-1].edgeTypeStr),h=i.edgeStrToEdgeData(a[o-1].edgeTypeStr),this.$=[{id:a[o-2].id,label:a[o-2].label,type:a[o-2].type,directions:a[o-2].directions},{id:a[o-2].id+"-"+a[o].id,start:a[o-2].id,end:a[o].id,label:a[o-1].label,type:"edge",directions:a[o].directions,arrowTypeEnd:h,arrowTypeStart:"arrow_open"},{id:a[o].id,label:a[o].label,type:i.typeStr2Type(a[o].typeStr),directions:a[o].directions}];break;case 24:i.getLogger().debug("Rule: nodeStatement (abc88 node size) ",a[o-1],a[o]),this.$={id:a[o-1].id,label:a[o-1].label,type:i.typeStr2Type(a[o-1].typeStr),directions:a[o-1].directions,widthInColumns:parseInt(a[o],10)};break;case 25:i.getLogger().debug("Rule: nodeStatement (node) ",a[o]),this.$={id:a[o].id,label:a[o].label,type:i.typeStr2Type(a[o].typeStr),directions:a[o].directions,widthInColumns:1};break;case 26:i.getLogger().debug("APA123",this||"na"),i.getLogger().debug("COLUMNS: ",a[o]),this.$={type:"column-setting",columns:"auto"===a[o]?-1:parseInt(a[o])};break;case 27:i.getLogger().debug("Rule: id-block statement : ",a[o-2],a[o-1]),i.generateId(),this.$={...a[o-2],type:"composite",children:a[o-1]};break;case 28:i.getLogger().debug("Rule: blockStatement : ",a[o-2],a[o-1],a[o]),l=i.generateId(),this.$={id:l,type:"composite",label:"",children:a[o-1]};break;case 29:i.getLogger().debug("Rule: node (NODE_ID separator): ",a[o]),this.$={id:a[o]};break;case 30:i.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",a[o-1],a[o]),this.$={id:a[o-1],label:a[o].label,typeStr:a[o].typeStr,directions:a[o].directions};break;case 31:i.getLogger().debug("Rule: dirList: ",a[o]),this.$=[a[o]];break;case 32:i.getLogger().debug("Rule: dirList: ",a[o-1],a[o]),this.$=[a[o-1]].concat(a[o]);break;case 33:i.getLogger().debug("Rule: nodeShapeNLabel: ",a[o-2],a[o-1],a[o]),this.$={typeStr:a[o-2]+a[o],label:a[o-1]};break;case 34:i.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",a[o-3],a[o-2]," #3:",a[o-1],a[o]),this.$={typeStr:a[o-3]+a[o],label:a[o-2],directions:a[o-1]};break;case 35:case 36:this.$={type:"classDef",id:a[o-1].trim(),css:a[o].trim()};break;case 37:this.$={type:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:this.$={type:"applyStyles",id:a[o-1].trim(),stylesStr:a[o].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:r,11:3,13:4,19:5,20:6,21:i,22:8,23:9,24:10,25:11,26:12,28:n,29:a,31:s,39:o,43:l,46:h},{8:[1,20]},t(c,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:r,21:i,28:n,29:a,31:s,39:o,43:l,46:h}),t(u,[2,16],{14:22,15:d,16:p}),t(u,[2,17]),t(u,[2,18]),t(u,[2,19]),t(u,[2,20]),t(u,[2,21]),t(u,[2,22]),t(g,[2,25],{27:[1,25]}),t(u,[2,26]),{19:26,26:12,31:s},{10:r,11:27,13:4,19:5,20:6,21:i,22:8,23:9,24:10,25:11,26:12,28:n,29:a,31:s,39:o,43:l,46:h},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(f,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(c,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},t(g,[2,24]),{10:r,11:37,13:4,14:22,15:d,16:p,19:5,20:6,21:i,22:8,23:9,24:10,25:11,26:12,28:n,29:a,31:s,39:o,43:l,46:h},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(f,[2,30]),{18:[1,43]},{18:[1,44]},t(g,[2,23]),{18:[1,45]},{30:[1,46]},t(u,[2,28]),t(u,[2,35]),t(u,[2,36]),t(u,[2,37]),t(u,[2,38]),{36:[1,47]},{33:48,34:m},{15:[1,50]},t(u,[2,27]),t(f,[2,33]),{38:[1,51]},{33:52,34:m,38:[2,31]},{31:[2,15]},t(f,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",h=0,c=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,T,k,w,C,E,S={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===x||"u"<typeof x)&&(x=v()),o[T]&&o[T][x]))||!k.length||!k[0]){var _,A=[];for(w in o[T])this.terminals_[w]&&2<w&&A.push("'"+this.terminals_[w]+"'");_=g.showPosition?"Parse error on line "+(h+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(c=g.yyleng,l=g.yytext,h=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],S.$=a[a.length-C],S._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(E=this.performAction.apply(S,[l,c,h,f.yy,k[1],a,s].concat(p)))<"u")return E;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),E=o[i[i.length-2]][i[i.length-1]],i.push(E);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:mt(function(e,t,r,i){switch(r){case 0:return e.getLogger().debug("Found block-beta"),10;case 1:return e.getLogger().debug("Found id-block"),29;case 2:return e.getLogger().debug("Found block"),10;case 3:e.getLogger().debug(".",t.yytext);break;case 4:e.getLogger().debug("_",t.yytext);break;case 5:return 5;case 6:return t.yytext=-1,28;case 7:return t.yytext=t.yytext.replace(/columns\s+/,""),e.getLogger().debug("COLUMNS (LEX)",t.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:e.getLogger().debug("LEX: POPPING STR:",t.yytext),this.popState();break;case 13:return e.getLogger().debug("LEX: STR end:",t.yytext),"STR";case 14:return t.yytext=t.yytext.replace(/space\:/,""),e.getLogger().debug("SPACE NUM (LEX)",t.yytext),21;case 15:return t.yytext="1",e.getLogger().debug("COLUMNS (LEX)",t.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:case 38:return this.popState(),e.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),e.getLogger().debug("Lex: ))"),"NODE_DEND";case 40:case 41:return this.popState(),e.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),e.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),e.getLogger().debug("Lex: -)"),"NODE_DEND";case 44:return this.popState(),e.getLogger().debug("Lex: (("),"NODE_DEND";case 45:return this.popState(),e.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),e.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),e.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),e.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),e.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),e.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),e.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),e.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return e.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return e.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return e.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return e.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 59:case 60:case 61:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 62:return e.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return e.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 64:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return e.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),e.getLogger().debug("LEX ARR START"),37;case 74:return e.getLogger().debug("Lex: NODE_ID",t.yytext),31;case 75:return e.getLogger().debug("Lex: EOF",t.yytext),8;case 76:case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:e.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:e.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return e.getLogger().debug("LEX: NODE_DESCR:",t.yytext),"NODE_DESCR";case 83:e.getLogger().debug("LEX POPPING"),this.popState();break;case 84:e.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (right): dir:",t.yytext),"DIR";case 86:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (left):",t.yytext),"DIR";case 87:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (x):",t.yytext),"DIR";case 88:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (y):",t.yytext),"DIR";case 89:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (up):",t.yytext),"DIR";case 90:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (down):",t.yytext),"DIR";case 91:return t.yytext="]>",e.getLogger().debug("Lex (ARROW_DIR end):",t.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 93:case 94:case 95:return e.getLogger().debug("Lex: LINK",t.yytext),15;case 96:case 97:case 98:return e.getLogger().debug("Lex: START_LINK",t.yytext),this.pushState("LLABEL"),16;case 99:this.pushState("md_string");break;case 100:return e.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 102:case 103:return this.popState(),e.getLogger().debug("Lex: LINK",t.yytext),15;case 104:return e.getLogger().debug("Lex: COLON",t.yytext),t.yytext=t.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}}};c.lexer=r,mt(e,"Parser"),(AFe=new((e.prototype=c).Parser=e)).parser=AFe,LFe=AFe});function NFe(e){switch(B.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return B.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 DFe(e){return"=="!==(B.debug("typeStr2Type",e),e)?"normal":"thick"}function MFe(e){switch(e.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}var OFe,BFe,PFe,$Fe,FFe,zFe,qFe,WFe,UFe,GFe,jFe,VFe,YFe,HFe,XFe,KFe,ZFe,QFe,JFe,eze,tze,rze,ize,nze,aze,sze,oze,lze,hze,cze,uze,dze,pze,gze,fze,mze,yze,vze,xze,bze,Tze,kze,wze,Cze=i(()=>{Sq(),Ei(),ju(),e(),ic(),Gu(),OFe=new Map,BFe=[],PFe=new Map,$Fe=P(),FFe=new Map,zFe="",qFe=mt(e=>I.sanitizeText(e,$Fe),"sanitizeText"),WFe=mt(function(e,t=""){let r=FFe.get(e);r||(r={id:e,styles:[],textStyles:[]},FFe.set(e,r)),t?.split(",").forEach(e=>{var t=e.replace(/([^;]*);/,"$1").trim();RegExp("color").exec(e)&&(e=t.replace("fill","bgFill").replace("color","fill"),r.textStyles.push(e)),r.styles.push(t)})},"addStyleClass"),UFe=mt(function(e,t=""){e=OFe.get(e),null!=t&&(e.styles=t.split(","))},"addStyle2Node"),GFe=mt(function(e,r){e.split(",").forEach(function(e){let t=OFe.get(e);void 0===t&&(e=e.trim(),t={id:e,type:"na",children:[]},OFe.set(e,t)),t.classes||(t.classes=[]),t.classes.push(r)})},"setCssClass"),jFe=mt((e,t)=>{var r,i=[],n=(e=e.flat()).find(e=>"column-setting"===e?.type)?.columns??-1;for(r of e)if("number"==typeof n&&0<n&&"column-setting"!==r.type&&"number"==typeof r.widthInColumns&&r.widthInColumns>n&&B.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width `+n),r.label&&(r.label=qFe(r.label)),"classDef"===r.type)WFe(r.id,r.css);else if("applyClass"===r.type)GFe(r.id,r?.styleClass??"");else if("applyStyles"===r.type)r?.stylesStr&&UFe(r.id,r?.stylesStr);else if("column-setting"===r.type)t.columns=r.columns??-1;else if("edge"===r.type){var a=(PFe.get(r.id)??0)+1;PFe.set(r.id,a),r.id=a+"-"+r.id,BFe.push(r)}else if(r.label||("composite"===r.type?r.label="":r.label=r.id),void 0===(a=OFe.get(r.id))?OFe.set(r.id,r):("na"!==r.type&&(a.type=r.type),r.label!==r.id&&(a.label=r.label)),r.children&&jFe(r.children,r),"space"===r.type){var s=r.width??1;for(let e=0;e<s;e++){var o=Eq(r);o.id=o.id+"-"+e,OFe.set(o.id,o),i.push(o)}}else void 0===a&&i.push(r);t.children=i},"populateBlockDatabase"),VFe=[],YFe={id:"root",type:"composite",children:[],columns:-1},HFe=mt(()=>{B.debug("Clear called"),Pc(),YFe={id:"root",type:"composite",children:[],columns:-1},OFe=new Map([["root",YFe]]),VFe=[],FFe=new Map,BFe=[],PFe=new Map,zFe=""},"clear"),mt(NFe,"typeStr2Type"),mt(DFe,"edgeTypeStr2Type"),mt(MFe,"edgeStrToEdgeData"),XFe=0,KFe=mt(()=>(XFe++,"id-"+Math.random().toString(36).substr(2,12)+"-"+XFe),"generateId"),ZFe=mt(e=>{YFe.children=e,jFe(e,YFe),VFe=YFe.children},"setHierarchy"),QFe=mt(e=>(e=OFe.get(e))?e.columns||(e.children?e.children.length:-1):-1,"getColumns"),JFe=mt(()=>[...OFe.values()],"getBlocksFlat"),eze=mt(()=>VFe||[],"getBlocks"),tze=mt(()=>BFe,"getEdges"),rze=mt(e=>OFe.get(e),"getBlock"),ize=mt(e=>{OFe.set(e.id,e)},"setBlock"),nze=mt(e=>{zFe=e},"setDiagramId"),aze=mt(()=>zFe,"getDiagramId"),oze=mt(()=>B,"getLogger"),sze=mt(function(){return FFe},"getClasses"),oze={getConfig:mt(()=>br().block,"getConfig"),typeStr2Type:NFe,edgeTypeStr2Type:DFe,edgeStrToEdgeData:MFe,getLogger:oze,getBlocksFlat:JFe,getBlocks:eze,getEdges:tze,setHierarchy:ZFe,getBlock:rze,setBlock:ize,getColumns:QFe,getClasses:sze,clear:HFe,generateId:KFe,setDiagramId:nze,getDiagramId:aze},lze=oze}),Eze=i(()=>{oi(),sde(),hze=mt((e,t)=>{var r=(n=ct)(e,"r"),i=n(e,"g"),n=n(e,"b");return lt(r,i,n,t)},"fade"),cze=mt(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 \`<p>\` 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: ${hze(e.mainBkg,.5)};
fill: ${hze(e.clusterBkg,.5)};
stroke: ${hze(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};
}
${Kue()}
`,"getStyles"),uze=cze}),Sze=i(()=>{e(),dze=mt((t,e,r,i)=>{e.forEach(e=>{kze[e](t,r,i)})},"insertMarkers"),pze=mt((e,t,r)=>{B.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"),gze=mt((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"),fze=mt((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"),mze=mt((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"),yze=mt((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"),vze=mt((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"),xze=mt((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"),bze=mt((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"),Tze=mt((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"),kze={extension:pze,composition:gze,aggregation:fze,dependency:mze,lollipop:yze,point:vze,circle:xze,cross:bze,barb:Tze},wze=dze});function _ze(e,t){if(0===e||!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);return e<0?{px:t,py:0}:1===e?{px:0,py:t}:{px:t%e,py:Math.floor(t/e)}}function Aze(s,o,l=0,h=0){if(B.debug("setBlockSizes abc95 (start)",s.id,s?.size?.x,"block width =",s?.size,"siblingWidth",l),s?.size?.width||(s.size={width:l,height:h,x:0,y:0}),0<s.children?.length){for(var c of s.children)Aze(c,o);var u,d,p,g,f=Dze(s),m=f.width;B.debug("setBlockSizes abc95 maxWidth of",s.id,":s children is ",m,u=f.height);for(d of s.children)d.size&&(B.debug(`abc95 Setting size of children of ${s.id} id=${d.id} ${m} ${u} `+JSON.stringify(d.size)),d.size.width=m*(d.widthInColumns??1)+Nze*((d.widthInColumns??1)-1),d.size.height=u,d.size.x=0,d.size.y=0,B.debug(`abc95 updating size of ${s.id} children child:${d.id} maxWidth:${m} maxHeight:`+u));for(p of s.children)Aze(p,o,m,u);let e=s.columns??-1,t=0;for(g of s.children)t+=g.widthInColumns??1;let r=s.children.length,i=(0<e&&e<t&&(r=e),Math.ceil(t/r)),n=r*(m+Nze)+Nze,a=i*(u+Nze)+Nze;if(n<l){B.debug(`Detected to small sibling: abc95 ${s.id} siblingWidth ${l} siblingHeight ${h} width `+n),n=l,a=h;var y,v=(l-r*Nze-Nze)/r,x=(h-i*Nze-Nze)/i;B.debug("Size indata abc88",s.id,"childWidth",v,"maxWidth",m),B.debug("Size indata abc88",s.id,"childHeight",x,"maxHeight",u),B.debug("Size indata abc88 xSize",r,"padding",Nze);for(y of s.children)y.size&&(y.size.width=v,y.size.height=x,y.size.x=0,y.size.y=0)}if(B.debug(`abc95 (finale calc) ${s.id} xSize ${r} ySize ${i} columns ${e}${s.children.length} width=`+Math.max(n,s.size?.width||0)),n<(s?.size?.width||0)&&(n=s?.size?.width||0,0<(f=0<e?Math.min(s.children.length,e):s.children.length))){var b,T=(n-f*Nze-Nze)/f;B.debug("abc95 (growing to fit) width",s.id,n,s.size?.width,T);for(b of s.children)b.size&&(b.size.width=T)}s.size={width:n,height:a,x:0,y:0}}B.debug("setBlockSizes abc94 (done)",s.id,s?.size?.x,s?.size?.width,s?.size?.y,s?.size?.height)}function Lze(n,a){B.debug(`abc85 layout blocks (=>layoutBlocks) ${n.id} x: ${n?.size?.x} y: ${n?.size?.y} width: `+n?.size?.width);var s=n.columns??-1;if(B.debug("layoutBlocks columns abc95",n.id,"=>",s,n),n.children&&0<n.children.length){var e=n?.children[0]?.size?.width??0,e=n.children.length*e+(n.children.length-1)*Nze,o=(B.debug("widthOfChildren 88",e,"posX"),new Map);{let t=0;for(var l of n.children)if(l.size){var h=_ze(s,t).py,c=o.get(h)??0;l.size.height>c&&o.set(h,l.size.height);let e=l?.widthInColumns??1;0<s&&(e=Math.min(e,s-t%s)),t+=e}}var u,d=new Map;{let e=0,t=[...o.keys()].sort((e,t)=>e-t);for(var p of t)d.set(p,e),e+=(o.get(p)??0)+Nze}let t=0,r=(B.debug("abc91 block?.size?.x",n.id,n?.size?.x),n?.size?.x?n?.size?.x+(-n?.size?.width/2||0):-Nze),i=0;for(u of n.children){var g=n;if(u.size){var f,{width:m,height:y}=u.size,{px:v,py:x}=_ze(s,t);x!=i&&(i=x,r=n?.size?.x?n?.size?.x+(-n?.size?.width/2||0):-Nze,B.debug("New row in layout for block",n.id," and child ",u.id,i)),B.debug(`abc89 layout blocks (child) id: ${u.id} Pos: ${t} (px, py) ${v},${x} (${g?.size?.x},${g?.size?.y}) parent: ${g.id} width: `+m+Nze),g.size&&(v=m/2,u.size.x=r+Nze+v,B.debug(`abc91 layout blocks (calc) px, pyid:${u.id} startingPos=X${r} new startingPosX${u.size.x} ${v} padding=${Nze} width=${m} halfWidth=${v} => x:${u.size.x} y:${u.size.y} ${u.widthInColumns} (width * (child?.w || 1)) / 2 `+m*(u?.widthInColumns??1)/2),r=u.size.x+v,f=d.get(x)??0,x=o.get(x)??y,u.size.y=g.size.y-g.size.height/2+f+x/2+Nze,B.debug(`abc88 layout blocks (calc) px, pyid:${u.id}startingPosX${r}${Nze}${v}=>x:${u.size.x}y:${u.size.y}${u.widthInColumns}(width * (child?.w || 1)) / 2`+m*(u?.widthInColumns??1)/2)),u.children&&Lze(u,a);let e=u?.widthInColumns??1;0<s&&(e=Math.min(e,s-t%s)),t+=e,B.debug("abc88 columnsPos",u,t)}}}B.debug(`layout blocks (<==layoutBlocks) ${n.id} x: ${n?.size?.x} y: ${n?.size?.y} width: `+n?.size?.width)}function Rze(e,{minX:t,minY:r,maxX:i,maxY:n}={minX:0,minY:0,maxX:0,maxY:0}){var a,s,o,l;if(e.size&&"root"!==e.id&&({x:a,y:s,width:o,height:l}=e.size,a-o/2<t&&(t=a-o/2),s-l/2<r&&(r=s-l/2),i<a+o/2&&(i=a+o/2),n<s+l/2)&&(n=s+l/2),e.children)for(var h of e.children)({minX:t,minY:r,maxX:i,maxY:n}=Rze(h,{minX:t,minY:r,maxX:i,maxY:n}));return{minX:t,minY:r,maxX:i,maxY:n}}function Ize(e){var t,r,i=e.getBlock("root");if(i)return Aze(i,e,0,0),Lze(i,e),B.debug("getBlocks",JSON.stringify(i,null,2)),{minX:e,minY:i,maxX:t,maxY:r}=Rze(i),{x:e,y:i,width:t-e,height:r-i}}var Nze,Dze,Mze,Oze,Bze,Pze,$ze,Fze=i(()=>{e(),ju(),Nze=P()?.block?.padding??8,mt(_ze,"calculateBlockPosition"),Dze=mt(e=>{let t=0,r=0;for(var i of e.children){var{width:n,height:a,x:s,y:o}=i.size??{width:0,height:0,x:0,y:0};B.debug("getMaxChildSize abc95 child:",i.id,"width:",n,"height:",a,"x:",s,"y:",o,i.type),"space"!==i.type&&(n>t&&(t=n/(i.widthInColumns??1)),a>r)&&(r=a)}return{width:t,height:r}},"getMaxChildSize"),mt(Aze,"setBlockSizes"),mt(Lze,"layoutBlocks"),mt(Rze,"findBounds"),mt(Ize,"layout")}),zze=i(()=>{Ei(),ju(),ER(),Mze=mt(async(e,t,r,i=!1,n=!1)=>{let a=t||"";"object"==typeof a&&(a=a[0]);var t=P(),s=Lr(t);return CR(e,a,{style:r,isTitle:i,useHtmlLabels:s,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},t)},"createLabel"),Oze=Mze}),qze=i(()=>{e(),Bze=mt((e,t,r,i,n)=>{t.arrowTypeStart&&$ze(e,"start",t.arrowTypeStart,r,i,n),t.arrowTypeEnd&&$ze(e,"end",t.arrowTypeEnd,r,i,n)},"addEdgeMarkers"),Pze={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},$ze=mt((e,t,r,i,n,a)=>{var s=Pze[r];s?e.attr("marker-"+t,`url(${i}#${n}_${a}-${s}${"start"===t?"Start":"End"})`):B.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function Wze(e,t){Lr(P())&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}var Uze,Gze,jze,Vze,Yze,Hze,Xze,Kze,Zze,Qze,Jze=i(()=>{e(),zze(),ER(),tB(),Sk(),ju(),Ei(),S7(),ic(),uB(),JO(),qze(),Uze={},Gze={},jze=mt(async(t,r)=>{var i=P(),n=Lr(i),a=(c=t.insert("g").attr("class","edgeLabel")).insert("g").attr("class","label"),e="markdown"===r.labelType,e=await CR(t,r.label,{style:r.labelStyle,useHtmlLabels:n,addSvgBackground:e,isNode:!1,markdown:e,width:e?void 0:Number.POSITIVE_INFINITY},i);a.node().appendChild(e);let s=e.getBBox(),o=s;n?(i=e.children[0],h=Q(e),s=i.getBoundingClientRect(),o=s,h.attr("width",s.width),h.attr("height",s.height)):(i=Q(e).select("text").node())&&"function"==typeof i.getBBox&&(o=i.getBBox()),a.attr("transform",XO(o,n)),Uze[r.id]=c,r.width=s.width,r.height=s.height;let l;if(r.startLabelLeft){var h=t.insert("g").attr("class","edgeTerminals"),i=h.insert("g").attr("class","inner"),a=await Oze(i,r.startLabelLeft,r.labelStyle);let e=(l=a).getBBox();n&&(c=a.children[0],a=Q(a),e=c.getBoundingClientRect(),a.attr("width",e.width),a.attr("height",e.height)),i.attr("transform",XO(e,n)),Gze[r.id]||(Gze[r.id]={}),Gze[r.id].startLeft=h,Wze(l,r.startLabelLeft)}if(r.startLabelRight){a=(c=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),i=await Oze(c,r.startLabelRight,r.labelStyle),l=i,a.node().appendChild(i);let e=i.getBBox();n&&(h=i.children[0],i=Q(i),e=h.getBoundingClientRect(),i.attr("width",e.width),i.attr("height",e.height)),a.attr("transform",XO(e,n)),Gze[r.id]||(Gze[r.id]={}),Gze[r.id].startRight=c,Wze(l,r.startLabelRight)}if(r.endLabelLeft){i=(h=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),a=await Oze(i,r.endLabelLeft,r.labelStyle);let e=(l=a).getBBox();n&&(c=a.children[0],u=Q(a),e=c.getBoundingClientRect(),u.attr("width",e.width),u.attr("height",e.height)),i.attr("transform",XO(e,n)),h.node().appendChild(a),Gze[r.id]||(Gze[r.id]={}),Gze[r.id].endLeft=h,Wze(l,r.endLabelLeft)}if(r.endLabelRight){var c,u=(c=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),i=await Oze(u,r.endLabelRight,r.labelStyle);let e=(l=i).getBBox();n&&(a=i.children[0],h=Q(i),e=a.getBoundingClientRect(),h.attr("width",e.width),h.attr("height",e.height)),u.attr("transform",XO(e,n)),c.node().appendChild(i),Gze[r.id]||(Gze[r.id]={}),Gze[r.id].endRight=c,Wze(l,r.endLabelRight)}return e},"insertEdgeLabel"),mt(Wze,"setTerminalWidth"),Vze=mt((i,n)=>{B.debug("Moving label abc88 ",i.id,i.label,Uze[i.id],n);var a,s=n.updatedPath||n.originalPath,o=P(),o=FO(o).subGraphTitleTotalMargin;if(i.label){let e=Uze[i.id],t=i.x,r=i.y;s&&(a=k7.calcLabelPosition(s),B.debug("Moving label "+i.label+" from (",t,",",r,") to (",a.x,",",a.y,") abc88"),n.updatedPath)&&(t=a.x,r=a.y),e.attr("transform",`translate(${t}, ${r+o/2})`)}if(i.startLabelLeft){let e=Gze[i.id].startLeft,t=i.x,r=i.y;s&&(n=k7.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_left",s),t=n.x,r=n.y),e.attr("transform",`translate(${t}, ${r})`)}if(i.startLabelRight){let e=Gze[i.id].startRight,t=i.x,r=i.y;s&&(a=k7.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_right",s),t=a.x,r=a.y),e.attr("transform",`translate(${t}, ${r})`)}if(i.endLabelLeft){let e=Gze[i.id].endLeft,t=i.x,r=i.y;s&&(o=k7.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_left",s),t=o.x,r=o.y),e.attr("transform",`translate(${t}, ${r})`)}if(i.endLabelRight){let e=Gze[i.id].endRight,t=i.x,r=i.y;s&&(n=k7.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_right",s),t=n.x,r=n.y),e.attr("transform",`translate(${t}, ${r})`)}},"positionEdgeLabel"),Yze=mt((e,t)=>{var r=e.x,i=e.y,r=Math.abs(t.x-r),t=Math.abs(t.y-i);return e.width/2<=r||e.height/2<=t},"outsideNode"),Hze=mt((e,i,n)=>{B.debug(`intersection calc abc89:
outsidePoint: ${JSON.stringify(i)}
insidePoint : ${JSON.stringify(n)}
node : x:${e.x} y:${e.y} w:${e.width} h:`+e.height);let a=e.x,t=e.y,r=Math.abs(a-n.x),s=e.width/2,o=n.x<i.x?s-r:s+r,l=e.height/2,h=Math.abs(i.y-n.y),c=Math.abs(i.x-n.x),u;if(Math.abs(t-i.y)*s>Math.abs(a-i.x)*l)return e=n.y<i.y?i.y-l-t:t-l-i.y,o=c*e/h,u={x:n.x<i.x?n.x+o:n.x-c+o,y:n.y<i.y?n.y+h-e:n.y-h+e},0===o&&(u.x=i.x,u.y=i.y),0===c&&(u.x=i.x),0===h&&(u.y=i.y),B.debug(`abc89 topp/bott calc, Q ${h}, q ${e}, R ${c}, r `+o,u),u;{let e=h*(o=n.x<i.x?i.x-s-a:a-s-i.x)/c,t=n.x<i.x?n.x+c-o:n.x-c+o,r=n.y<i.y?n.y+e:n.y-e;return B.debug(`sides calc abc89, Q ${h}, q ${e}, R ${c}, r `+o,{_x:t,_y:r}),0===o&&(t=i.x,r=i.y),0===c&&(t=i.x),0===h&&(r=i.y),{x:t,y:r}}},"intersection"),Xze=mt((e,i)=>{B.debug("abc88 cutPathAtIntersect",e,i);let n=[],a=e[0],s=!1;return e.forEach(e=>{if(Yze(i,e)||s)a=e,s||n.push(e);else{let t=Hze(i,a,e),r=!1;n.forEach(e=>{r=r||e.x===t.x&&e.y===t.y}),n.some(e=>e.x===t.x&&e.y===t.y)||n.push(t),s=!0}}),n},"cutPathAtIntersect"),Kze=mt(function(e,t,r,i,n,a,s){let o=r.points,l=(B.debug("abc88 InsertEdge: edge=",r,"e=",t),!1),h=a.node(t.v),c=a.node(t.w),u=(c?.intersect&&h?.intersect&&((o=o.slice(1,r.points.length-1)).unshift(h.intersect(o[0])),o.push(c.intersect(o[o.length-1]))),r.toCluster&&(B.debug("to cluster abc88",i[r.toCluster]),o=Xze(r.points,i[r.toCluster].node),l=!0),r.fromCluster&&(B.debug("from cluster abc88",i[r.fromCluster]),o=Xze(o.reverse(),i[r.fromCluster].node).reverse(),l=!0),o.filter(e=>!Number.isNaN(e.y))),d=z3,{x:p,y:g}=(!r.curve||"graph"!==n&&"flowchart"!==n||(d=r.curve),sB(r)),f=C3().x(p).y(g).curve(d),m;switch(r.thickness){case"normal":m="edge-thickness-normal";break;case"thick":case"invisible":m="edge-thickness-thick";break;default:m=""}switch(r.pattern){case"solid":m+=" edge-pattern-solid";break;case"dotted":m+=" edge-pattern-dotted";break;case"dashed":m+=" edge-pattern-dashed"}let y=e.append("path").attr("d",f(u)).attr("id",r.id).attr("class"," "+m+(r.classes?" "+r.classes:"")).attr("style",r.style),v="";return(P().flowchart.arrowMarkerAbsolute||P().state.arrowMarkerAbsolute)&&(v=Ph(!0)),Bze(y,r,v,s,n),a={},l&&(a.updatedPath=o),a.originalPath=r.points,a},"insertEdge")}),eqe=i(()=>{Zze=mt(e=>{var t,r=new Set;for(t of e)switch(t){case"x":r.add("right"),r.add("left");break;case"y":r.add("up"),r.add("down");break;default:r.add(t)}return r},"expandAndDeduplicateDirections"),Qze=mt((e,t,r)=>{var e=Zze(e),i=t.height+2*r.padding,n=i/2,t=t.width+2*n+r.padding,r=r.padding/2;return e.has("right")&&e.has("left")&&e.has("up")&&e.has("down")?[{x:0,y:0},{x:n,y:0},{x:t/2,y:2*r},{x:t-n,y:0},{x:t,y:0},{x:t,y:-i/3},{x:t+2*r,y:-i/2},{x:t,y:-2*i/3},{x:t,y:-i},{x:t-n,y:-i},{x:t/2,y:-i-2*r},{x:n,y:-i},{x:0,y:-i},{x:0,y:-2*i/3},{x:-2*r,y:-i/2},{x:0,y:-i/3}]:e.has("right")&&e.has("left")&&e.has("up")?[{x:n,y:0},{x:t-n,y:0},{x:t,y:-i/2},{x:t-n,y:-i},{x:n,y:-i},{x:0,y:-i/2}]:e.has("right")&&e.has("left")&&e.has("down")?[{x:0,y:0},{x:n,y:-i},{x:t-n,y:-i},{x:t,y:0}]:e.has("right")&&e.has("up")&&e.has("down")?[{x:0,y:0},{x:t,y:-n},{x:t,y:n-i},{x:0,y:-i}]:e.has("left")&&e.has("up")&&e.has("down")?[{x:t,y:0},{x:0,y:-n},{x:0,y:n-i},{x:t,y:-i}]:e.has("right")&&e.has("left")?[{x:n,y:0},{x:n,y:-r},{x:t-n,y:-r},{x:t-n,y:0},{x:t,y:-i/2},{x:t-n,y:-i},{x:t-n,y:r-i},{x:n,y:r-i},{x:n,y:-i},{x:0,y:-i/2}]:e.has("up")&&e.has("down")?[{x:t/2,y:0},{x:0,y:-r},{x:n,y:-r},{x:n,y:r-i},{x:0,y:r-i},{x:t/2,y:-i},{x:t,y:r-i},{x:t-n,y:r-i},{x:t-n,y:-r},{x:t,y:-r}]:e.has("right")&&e.has("up")?[{x:0,y:0},{x:t,y:-n},{x:0,y:-i}]:e.has("right")&&e.has("down")?[{x:0,y:0},{x:t,y:0},{x:0,y:-i}]:e.has("left")&&e.has("up")?[{x:t,y:0},{x:0,y:-n},{x:t,y:-i}]:e.has("left")&&e.has("down")?[{x:t,y:0},{x:0,y:0},{x:t,y:-i}]:e.has("right")?[{x:n,y:-r},{x:n,y:-r},{x:t-n,y:-r},{x:t-n,y:0},{x:t,y:-i/2},{x:t-n,y:-i},{x:t-n,y:r-i},{x:n,y:r-i},{x:n,y:r-i}]:e.has("left")?[{x:n,y:0},{x:n,y:-r},{x:t-n,y:-r},{x:t-n,y:r-i},{x:n,y:r-i},{x:n,y:-i},{x:0,y:-i/2}]:e.has("up")?[{x:n,y:-r},{x:n,y:r-i},{x:0,y:r-i},{x:t/2,y:-i},{x:t,y:r-i},{x:t-n,y:r-i},{x:t-n,y:-r}]:e.has("down")?[{x:t/2,y:0},{x:0,y:-r},{x:n,y:-r},{x:n,y:r-i},{x:t-n,y:r-i},{x:t-n,y:-r},{x:t,y:-r}]:[{x:0,y:0}]},"getArrowPoints")});function tqe(e,t){return e.intersect(t)}var rqe,iqe=i(()=>{mt(tqe,"intersectNode"),rqe=tqe});function nqe(e,t,r,i){var n=e.x,e=e.y,a=n-i.x,s=e-i.y,o=Math.sqrt(t*t*s*s+r*r*a*a),a=Math.abs(t*r*a/o),t=(i.x<n&&(a=-a),Math.abs(t*r*s/o));return{x:n+a,y:e+(t=i.y<e?-t:t)}}var aqe,sqe=i(()=>{mt(nqe,"intersectEllipse"),aqe=nqe});function oqe(e,t,r){return aqe(e,t,t,r)}var lqe,hqe=i(()=>{sqe(),mt(oqe,"intersectCircle"),lqe=oqe});function cqe(e,t,r,i){var n,a,s,o,l=t.y-e.y,h=e.x-t.x,c=t.x*e.y-e.x*t.y,u=l*r.x+h*r.y+c,d=l*i.x+h*i.y+c;if(!(0!=u&&0!=d&&0<u*d||(u=(n=i.y-r.y)*e.x+(a=r.x-i.x)*e.y+(s=i.x*r.y-r.x*i.y),d=n*t.x+a*t.y+s,0!=u&&0!==d&&0<u*d)||0==(o=l*a-n*h)))return e=Math.abs(o/2),{x:(r=h*s-a*c)<0?(r-e)/o:(r+e)/o,y:(r=n*c-l*s)<0?(r-e)/o:(r+e)/o}}function uqe(e,t){return 0<e*t}var dqe,pqe=i(()=>{mt(cqe,"intersectLine"),mt(uqe,"sameSign"),dqe=cqe});function gqe(e,t,i){var r=e.x,n=e.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof t.forEach?t.forEach(function(e){s=Math.min(s,e.x),o=Math.min(o,e.y)}):(s=Math.min(s,t.x),o=Math.min(o,t.y));for(var l=r-e.width/2-s,h=n-e.height/2-o,c=0;c<t.length;c++){var u=t[c],d=t[c<t.length-1?c+1:0];(u=dqe(e,i,{x:l+u.x,y:h+u.y},{x:l+d.x,y:h+d.y}))&&a.push(u)}return a.length?(1<a.length&&a.sort(function(e,t){var r=e.x-i.x,e=e.y-i.y,r=Math.sqrt(r*r+e*e),e=t.x-i.x,t=t.y-i.y;return r<(e=Math.sqrt(e*e+t*t))?-1:r===e?0:1}),a[0]):e}var fqe,mqe,yqe,vqe,xqe=i(()=>{pqe(),mt(fqe=gqe,"intersectPolygon")}),bqe=i(()=>{mqe=mt((e,t)=>{var r,i=e.x,n=e.y,a=t.x-i,t=t.y-n,s=e.width/2,e=e.height/2,e=Math.abs(t)*s>Math.abs(a)*e?(t<0&&(e=-e),r=0==t?0:e*a/t,e):(r=s=a<0?-s:s,0==a?0:s*t/a);return{x:i+r,y:n+e}},"intersectRect"),yqe=mqe}),Tqe=i(()=>{iqe(),hqe(),sqe(),xqe(),bqe(),vqe={node:rqe,circle:lqe,ellipse:aqe,polygon:fqe,rect:yqe}});function kqe(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(e){return e.x+","+e.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}var wqe,Cqe,Eqe,Sqe,_qe=i(()=>{zze(),ER(),ju(),Ei(),Sk(),ic(),S7(),_R(),wqe=mt(async(e,t,r,i)=>{var n=P(),a=t.useHtmlLabels||Lr(n),s=(s=r||"node default",e.insert("g").attr("class",s).attr("id",t.domId||t.id)),o=s.insert("g").attr("class","label").attr("style",t.labelStyle),l=void 0===t.labelText?"":"string"==typeof t.labelText?t.labelText:t.labelText[0];let h,c=(h="markdown"===t.labelType?CR(o,Ih(C7(l),n),{useHtmlLabels:a,width:t.width||n.flowchart.wrappingWidth,classes:"markdown-node-label"},n):await Oze(o,Ih(C7(l),n),t.labelStyle,!1,i)).getBBox(),u=t.padding/2;return Lr(n)&&(r=h.children[0],e=Q(h),await SR(r,l),c=r.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)),a?o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):o.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:s,bbox:c,halfPadding:u,label:o}},"labelHelper"),Cqe=mt((e,t)=>{t=t.node().getBBox(),e.width=t.width,e.height=t.height},"updateNodeBounds"),mt(kqe,"insertPolygonShape")}),Aqe=i(()=>{_qe(),e(),ju(),Ei(),Tqe(),Eqe=mt(async(e,t)=>{t.useHtmlLabels||Lr(P())||(t.centerLabel=!0);var{shapeSvg:e,bbox:r,halfPadding:i}=await wqe(e,t,"node "+t.classes,!0),n=(B.info("Classes = ",t.classes),e.insert("rect",":first-child"));return n.attr("rx",t.rx).attr("ry",t.ry).attr("x",-r.width/2-i).attr("y",-r.height/2-i).attr("width",r.width+t.padding).attr("height",r.height+t.padding),Cqe(t,n),t.intersect=function(e){return vqe.rect(t,e)},e},"note"),Sqe=Eqe});function Lqe(e,t,r,i){let n=[],a=mt(e=>{n.push(e,0)},"addBorder"),s=mt(e=>{n.push(0,e)},"skipBorder");(t.includes("t")?(B.debug("add top border"),a):s)(r),(t.includes("r")?(B.debug("add right border"),a):s)(i),(t.includes("b")?(B.debug("add bottom border"),a):s)(r),(t.includes("l")?(B.debug("add left border"),a):s)(i),e.attr("stroke-dasharray",n.join(" "))}var Rqe,Iqe,Nqe,Dqe,Mqe,Oqe,Bqe,Pqe,$qe,Fqe,zqe,qqe,Wqe,Uqe,Gqe,jqe,Vqe,Yqe,Hqe,Xqe,Kqe,Zqe,Qqe,Jqe,eWe,tWe,rWe,iWe,nWe,aWe=i(()=>{Sk(),ju(),Ei(),e(),eqe(),zze(),Tqe(),Aqe(),_qe(),Rqe=mt(e=>e?" "+e:"","formatClass"),Iqe=mt((e,t)=>`${t||"node default"}${Rqe(e.classes)} `+Rqe(e.class),"getClassesFromNode"),Nqe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await wqe(e,t,Iqe(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=n+a,o=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];return B.info("Question main (Circle)"),(e=kqe(r,s,s,o)).attr("style",t.style),Cqe(t,e),t.intersect=function(e){return B.warn("Intersect called"),vqe.polygon(t,o,e)},r},"question"),Dqe=mt((e,t)=>((e=e.insert("g").attr("class","node default").attr("id",t.domId||t.id)).insert("polygon",":first-child").attr("points",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map(function(e){return e.x+","+e.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(e){return vqe.circle(t,14,e)},e),"choice"),Mqe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await wqe(e,t,Iqe(t,void 0),!0),n=i.height+t.padding,a=n/4,s=i.width+2*a+t.padding,o=[{x:a,y:0},{x:s-a,y:0},{x:s,y:-n/2},{x:s-a,y:-n},{x:a,y:-n},{x:0,y:-n/2}],l=kqe(r,s,n,o);return l.attr("style",t.style),Cqe(t,l),t.intersect=function(e){return vqe.polygon(t,o,e)},r},"hexagon"),Oqe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await wqe(e,t,void 0,!0),n=i.height+2*t.padding,a=n/2,s=i.width+2*a+t.padding,o=Qze(t.directions,i,t),l=kqe(r,s,n,o);return l.attr("style",t.style),Cqe(t,l),t.intersect=function(e){return vqe.polygon(t,o,e)},r},"block_arrow"),Bqe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await wqe(e,t,Iqe(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 kqe(r,n,a,s).attr("style",t.style),t.width=n+a,t.height=a,t.intersect=function(e){return vqe.polygon(t,s,e)},r},"rect_left_inv_arrow"),Pqe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await wqe(e,t,Iqe(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}],o=kqe(r,n,a,s);return o.attr("style",t.style),Cqe(t,o),t.intersect=function(e){return vqe.polygon(t,s,e)},r},"lean_right"),$qe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await wqe(e,t,Iqe(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}],o=kqe(r,n,a,s);return o.attr("style",t.style),Cqe(t,o),t.intersect=function(e){return vqe.polygon(t,s,e)},r},"lean_left"),Fqe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await wqe(e,t,Iqe(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}],o=kqe(r,n,a,s);return o.attr("style",t.style),Cqe(t,o),t.intersect=function(e){return vqe.polygon(t,s,e)},r},"trapezoid"),zqe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await wqe(e,t,Iqe(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}],o=kqe(r,n,a,s);return o.attr("style",t.style),Cqe(t,o),t.intersect=function(e){return vqe.polygon(t,s,e)},r},"inv_trapezoid"),qqe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await wqe(e,t,Iqe(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}],o=kqe(r,n,a,s);return o.attr("style",t.style),Cqe(t,o),t.intersect=function(e){return vqe.polygon(t,s,e)},r},"rect_right_inv_arrow"),Wqe=mt(async(e,n)=>{let{shapeSvg:t,bbox:r}=await wqe(e,n,Iqe(n,void 0),!0),i=r.width+n.padding,a=i/2,s=a/(2.5+i/50),o=r.height+s+n.padding,l="M 0,"+s+" a "+a+","+s+" 0,0,0 "+i+" 0 a "+a+","+s+" 0,0,0 "+-i+" 0 l 0,"+o+" a "+a+","+s+" 0,0,0 "+i+" 0 l 0,"+-o,h=t.attr("label-offset-y",s).insert("path",":first-child").attr("style",n.style).attr("d",l).attr("transform","translate("+-i/2+","+-(o/2+s)+")");return Cqe(n,h),n.intersect=function(t){var r=vqe.rect(n,t),i=r.x-n.x;if(0!=a&&(Math.abs(i)<n.width/2||Math.abs(i)==n.width/2&&Math.abs(r.y-n.y)>n.height/2-s)){let e=s*s*(1-i*i/(a*a));0!=e&&(e=Math.sqrt(e)),e=s-e,0<t.y-n.y&&(e=-e),r.y+=e}return r},t},"cylinder"),Uqe=mt(async(e,t)=>{var{shapeSvg:e,bbox:r,halfPadding:i}=await wqe(e,t,"node "+t.classes+" "+t.class,!0),n=e.insert("rect",":first-child"),a=t.positioned?t.width:r.width+t.padding,s=t.positioned?t.height:r.height+t.padding,o=t.positioned?-a/2:-r.width/2-i,r=t.positioned?-s/2:-r.height/2-i;return n.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",o).attr("y",r).attr("width",a).attr("height",s),t.props&&(i=new Set(Object.keys(t.props)),t.props.borders&&(Lqe(n,t.props.borders,a,s),i.delete("borders")),i.forEach(e=>{B.warn("Unknown node property "+e)})),Cqe(t,n),t.intersect=function(e){return vqe.rect(t,e)},e},"rect"),Gqe=mt(async(e,t)=>{var{shapeSvg:e,bbox:r,halfPadding:i}=await wqe(e,t,"node "+t.classes,!0),n=e.insert("rect",":first-child"),a=t.positioned?t.width:r.width+t.padding,s=t.positioned?t.height:r.height+t.padding,o=t.positioned?-a/2:-r.width/2-i,r=t.positioned?-s/2:-r.height/2-i;return n.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",o).attr("y",r).attr("width",a).attr("height",s),t.props&&(i=new Set(Object.keys(t.props)),t.props.borders&&(Lqe(n,t.props.borders,a,s),i.delete("borders")),i.forEach(e=>{B.warn("Unknown node property "+e)})),Cqe(t,n),t.intersect=function(e){return vqe.rect(t,e)},e},"composite"),jqe=mt(async(e,t)=>{var r,e=(await wqe(e,t,"label",!0)).shapeSvg,i=(B.trace("Classes = ",t.class),e.insert("rect",":first-child"));return i.attr("width",0).attr("height",0),e.attr("class","label edgeLabel"),t.props&&(r=new Set(Object.keys(t.props)),t.props.borders&&(Lqe(i,t.props.borders,0,0),r.delete("borders")),r.forEach(e=>{B.warn("Unknown node property "+e)})),Cqe(t,i),t.intersect=function(e){return vqe.rect(t,e)},e},"labelRect"),mt(Lqe,"applyNodePropertyBorders"),Vqe=mt(async(e,t)=>{let r,i=(r=t.classes?"node "+t.classes:"node default",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"),o=t.labelText.flat?t.labelText.flat():t.labelText,l,h=(l="object"==typeof o?o[0]:o,B.info("Label text abc79",l,o,"object"==typeof o),await Oze(s,l,t.labelStyle,!0,!0)),c={width:0,height:0};Lr(P())&&(e=h.children[0],d=Q(h),c=e.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)),B.info("Text 2",o);var u,e=o.slice(1,o.length),d=h.getBBox(),e=await Oze(s,e.join?e.join("<br/>"):e,t.labelStyle,!0,!0),p=(Lr(P())&&(p=e.children[0],u=Q(e),c=p.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)),t.padding/2);return Q(e).attr("transform","translate( "+(c.width>d.width?0:(d.width-c.width)/2)+", "+(d.height+p+5)+")"),Q(h).attr("transform","translate( "+(c.width<d.width?0:-(d.width-c.width)/2)+", 0)"),c=s.node().getBBox(),s.attr("transform","translate("+-c.width/2+", "+(-c.height/2-p+3)+")"),n.attr("class","outer title-state").attr("x",-c.width/2-p).attr("y",-c.height/2-p).attr("width",c.width+t.padding).attr("height",c.height+t.padding),a.attr("class","divider").attr("x1",-c.width/2-p).attr("x2",c.width/2+p).attr("y1",-c.height/2-p+d.height+p).attr("y2",-c.height/2-p+d.height+p),Cqe(t,n),t.intersect=function(e){return vqe.rect(t,e)},i},"rectWithTitle"),Yqe=mt(async(e,t)=>{var{shapeSvg:e,bbox:r}=await wqe(e,t,Iqe(t,void 0),!0),i=r.height+t.padding,r=r.width+i/4+t.padding,r=e.insert("rect",":first-child").attr("style",t.style).attr("rx",i/2).attr("ry",i/2).attr("x",-r/2).attr("y",-i/2).attr("width",r).attr("height",i);return Cqe(t,r),t.intersect=function(e){return vqe.rect(t,e)},e},"stadium"),Hqe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await wqe(e,t,Iqe(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),B.info("Circle main"),Cqe(t,a),t.intersect=function(e){return B.info("Circle intersect",t,i.width/2+n,e),vqe.circle(t,i.width/2+n,e)},r},"circle"),Xqe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await wqe(e,t,Iqe(t,void 0),!0),a=r.insert("g",":first-child"),s=a.insert("circle"),o=a.insert("circle");return a.attr("class",t.class),s.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+n+5).attr("width",i.width+t.padding+10).attr("height",i.height+t.padding+10),o.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),B.info("DoubleCircle main"),Cqe(t,s),t.intersect=function(e){return B.info("DoubleCircle intersect",t,i.width/2+n+5,e),vqe.circle(t,i.width/2+n+5,e)},r},"doublecircle"),Kqe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await wqe(e,t,Iqe(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}],o=kqe(r,n,a,s);return o.attr("style",t.style),Cqe(t,o),t.intersect=function(e){return vqe.polygon(t,s,e)},r},"subroutine"),Zqe=mt((e,t)=>{var r=(e=e.insert("g").attr("class","node default").attr("id",t.domId||t.id)).insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Cqe(t,r),t.intersect=function(e){return vqe.circle(t,7,e)},e},"start"),Qqe=mt((e,t,r)=>{let i=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=70,a=10;return"LR"===r&&(n=10,a=70),e=i.append("rect").attr("x",-1*n/2).attr("y",-1*a/2).attr("width",n).attr("height",a).attr("class","fork-join"),Cqe(t,e),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(e){return vqe.rect(t,e)},i},"forkJoin"),Jqe=mt((e,t)=>{var r=(e=e.insert("g").attr("class","node default").attr("id",t.domId||t.id)).insert("circle",":first-child"),i=e.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Cqe(t,i),t.intersect=function(e){return vqe.circle(t,7,e)},e},"end"),eWe=mt(async(e,s)=>{let t=s.padding/2,r,i=(r=s.classes?"node "+s.classes:"node default",e.insert("g").attr("class",r).attr("id",s.domId||s.id)),n=i.insert("rect",":first-child"),a=i.insert("line"),o=i.insert("line"),l=0,h=4,c=i.insert("g").attr("class","label"),u=0,d=s.classData.annotations?.[0],p=s.classData.annotations[0]?"«"+s.classData.annotations[0]+"»":"",g=await Oze(c,p,s.labelStyle,!0,!0),f=g.getBBox(),m=(Lr(P())&&(e=g.children[0],y=Q(g),f=e.getBoundingClientRect(),y.attr("width",f.width),y.attr("height",f.height)),s.classData.annotations[0]&&(h+=f.height+4,l+=f.width),s.classData.label);var y;void 0!==s.classData.type&&""!==s.classData.type&&(Lr(P())?m+="&lt;"+s.classData.type+"&gt;":m+="<"+s.classData.type+">"),Q(e=await Oze(c,m,s.labelStyle,!0,!0)).attr("class","classTitle");let v=e.getBBox(),x=(Lr(P())&&(y=e.children[0],T=Q(e),v=y.getBoundingClientRect(),T.attr("width",v.width),T.attr("height",v.height)),h+=v.height+4,v.width>l&&(l=v.width),[]),b=(s.classData.members.forEach(async e=>{let t=e.getDisplayDetails(),r=t.displayText,i=(Lr(P())&&(r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;")),await Oze(c,r,t.cssStyle||s.labelStyle,!0,!0)),n=i.getBBox(),a;Lr(P())&&(e=i.children[0],a=Q(i),n=e.getBoundingClientRect(),a.attr("width",n.width),a.attr("height",n.height)),n.width>l&&(l=n.width),h+=n.height+4,x.push(i)}),h+=8,[]);s.classData.methods.forEach(async e=>{let t=e.getDisplayDetails(),r=t.displayText,i=(Lr(P())&&(r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;")),await Oze(c,r,t.cssStyle||s.labelStyle,!0,!0)),n=i.getBBox(),a;Lr(P())&&(e=i.children[0],a=Q(i),n=e.getBoundingClientRect(),a.attr("width",n.width),a.attr("height",n.height)),n.width>l&&(l=n.width),h+=n.height+4,b.push(i)}),h+=8,d&&(y=(l-f.width)/2,Q(g).attr("transform","translate( "+(-1*l/2+y)+", "+-1*h/2+")"),u=f.height+4);var T=(l-v.width)/2;return Q(e).attr("transform","translate( "+(-1*l/2+T)+", "+(-1*h/2+u)+")"),u+=v.height+4,a.attr("class","divider").attr("x1",-l/2-t).attr("x2",l/2+t).attr("y1",-h/2-t+8+u).attr("y2",-h/2-t+8+u),u+=8,x.forEach(e=>{Q(e).attr("transform","translate( "+-l/2+", "+(-1*h/2+u+4)+")"),e=e?.getBBox(),u+=(e?.height??0)+4}),u+=8,o.attr("class","divider").attr("x1",-l/2-t).attr("x2",l/2+t).attr("y1",-h/2-t+8+u).attr("y2",-h/2-t+8+u),u+=8,b.forEach(e=>{Q(e).attr("transform","translate( "+-l/2+", "+(-1*h/2+u)+")"),e=e?.getBBox(),u+=(e?.height??0)+4}),n.attr("style",s.style).attr("class","outer title-state").attr("x",-l/2-t).attr("y",-h/2-t).attr("width",l+s.padding).attr("height",h+s.padding),Cqe(s,n),s.intersect=function(e){return vqe.rect(s,e)},i},"class_box"),tWe={rhombus:Nqe,composite:Gqe,question:Nqe,rect:Uqe,labelRect:jqe,rectWithTitle:Vqe,choice:Dqe,circle:Hqe,doublecircle:Xqe,stadium:Yqe,hexagon:Mqe,block_arrow:Oqe,rect_left_inv_arrow:Bqe,lean_right:Pqe,lean_left:$qe,trapezoid:Fqe,inv_trapezoid:zqe,rect_right_inv_arrow:qqe,cylinder:Wqe,start:Zqe,end:Jqe,note:Sqe,subroutine:Kqe,fork:Qqe,join:Qqe,class_box:eWe},rWe={},iWe=mt(async(t,r,i)=>{let n,a;if(r.link){let e;"sandbox"===P().securityLevel?e="_top":r.linkTarget&&(e=r.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",r.link).attr("target",e),a=await tWe[r.shape](n,r,i)}else a=await tWe[r.shape](t,r,i),n=a;return r.tooltip&&a.attr("title",r.tooltip),r.class&&a.attr("class","node default "+r.class),rWe[r.id]=n,r.haveCallback&&rWe[r.id].attr("class",rWe[r.id].attr("class")+" clickable"),n},"insertNode"),nWe=mt(e=>{var t=rWe[e.id],r=(B.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")"),e.diff||0);return e.clusterNode?t.attr("transform","translate("+(e.x+r-e.width/2)+", "+(e.y-e.height/2-8)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),r},"positionNode")});function sWe(e,t,r=!1){let i=e,n="default",a=(0<(i?.classes?.length||0)&&(n=(i?.classes??[]).join(" ")),n+=" flowchart-label",0),s="",o;switch(i.type){case"round":a=5,s="rect";break;case"composite":a=0,s="composite",o=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"}var e=U_(i?.styles??[]),l=i.label,h=i.size??{width:0,height:0,x:0,y:0},t=t.getDiagramId();return{labelStyle:e.labelStyle,shape:s,labelText:l,rx:a,ry:a,class:n,style:e.style,id:i.id,domId:t?t+"-"+i.id:i.id,directions:i.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:r,intersect:void 0,type:i.type,padding:o??br()?.block?.padding??0}}async function oWe(e,t,r){var i;"group"!==(t=sWe(t,r,!1)).type&&(i=br(),i=(e=await iWe(e,t,{config:i})).node().getBBox(),(t=r.getBlock(t.id)).size={width:i.width,height:i.height,x:0,y:0,node:e},r.setBlock(t),e.remove())}async function lWe(e,t,r){var i=sWe(t,r,!0);"space"!==r.getBlock(i.id).type&&(r=br(),await iWe(e,i,{config:r}),t.intersect=i?.intersect,nWe(i))}async function hWe(e,t,r,i){for(var n of t)await i(e,n,r),n.children&&await hWe(e,n.children,r,i)}async function cWe(e,t,r){await hWe(e,t,r,oWe)}async function uWe(e,t,r){await hWe(e,t,r,lWe)}async function dWe(e,t,r,i,n){var a,s,o,l,h=new sH({multigraph:!0,compound:!0});h.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(a of r)a.size&&h.setNode(a.id,{width:a.size.width,height:a.size.height,intersect:a.intersect});for(s of t)s.start&&s.end&&(o=i.getBlock(s.start),l=i.getBlock(s.end),o?.size)&&l?.size&&(o=o.size,l=l.size,o=[{x:o.x,y:o.y},{x:o.x+(l.x-o.x)/2,y:o.y+(l.y-o.y)/2},{x:l.x,y:l.y}],l=n?n+"-"+s.id:s.id,Kze(e,{v:s.start,w:s.end,name:l},{...s,id:l,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:o,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",h,n),s.label)&&(await jze(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:o,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),Vze({...s,x:o[1].x,y:o[1].y},{originalPath:o}))}var pWe,gWe,fWe,mWe=i(()=>{lH(),Ei(),Jze(),aWe(),S7(),mt(sWe,"getNodeFromBlock"),mt(oWe,"calculateBlockSize"),mt(lWe,"insertBlockPositioned"),mt(hWe,"performOperations"),mt(cWe,"calculateBlockSizes"),mt(uWe,"insertBlocks"),mt(dWe,"insertEdges")}),yWe=i(()=>{Sk(),Ei(),Sze(),e(),Rc(),Fze(),mWe(),pWe=mt(function(e,t){return t.db.getClasses()},"getClasses"),gWe=mt(async function(e,t,r,i){var{securityLevel:n,block:a}=br(),s=i.db;s.setDiagramId(t);let o;"sandbox"===n&&(o=Q("#i"+t));var l=Q("sandbox"===n?o.nodes()[0].contentDocument.body:"body"),n="sandbox"===n?l.select(`[id="${t}"]`):Q(`[id="${t}"]`),l=(wze(n,["point","circle","cross"],i.type,t),s.getBlocks()),i=s.getBlocksFlat(),h=s.getEdges(),c=n.insert("g").attr("class","block"),u=(await cWe(c,l,s),Ize(s));await uWe(c,l,s),await dWe(c,h,i,s,t),u&&(l=u,c=Math.max(1,Math.round(l.width/l.height*.125)),h=l.height+c+10,i=l.width+10,s=a.useMaxWidth,xc(n,h,i,!!s),B.debug("Here Bounds",u,l),n.attr("viewBox",`${l.x-5} ${l.y-5} ${l.width+10} `+(l.height+10)))},"draw"),fWe={draw:gWe,getClasses:pWe}}),vWe={};sYe(vWe,{diagram:()=>xWe});var xWe,bWe,TWe,kWe,wWe,CWe,EWe,SWe,_We,AWe,LWe,RWe,IWe,NWe,DWe,MWe,OWe,BWe,PWe,$We=i(()=>{IFe(),Cze(),Eze(),yWe(),xWe={parser:LFe,db:lze,renderer:fWe,styles:uze}}),FWe=i(()=>{Ei(),wi(),Gu(),S7(),BSe(),bWe=new DSe(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",children:[]}]})),TWe=mt(()=>{bWe.reset(),Pc()},"clear"),kWe=mt(()=>bWe.records.stack[0],"getRoot"),wWe=mt(()=>bWe.records.cnt,"getCount"),CWe=ar.treeView,EWe=mt(()=>H_(CWe,br().treeView),"getConfig"),SWe=mt((e,t)=>{for(;e<=bWe.records.stack[bWe.records.stack.length-1].level;)bWe.records.stack.pop();t={id:bWe.records.cnt++,level:e,name:t,children:[]},bWe.records.stack[bWe.records.stack.length-1].children.push(t),bWe.records.stack.push(t)},"addNode"),_We={clear:TWe,addNode:SWe,getRoot:kWe,getCount:wWe,getConfig:EWe,getAccTitle:Fc,getAccDescription:qc,getDiagramTitle:Uc,setAccDescription:zc,setAccTitle:$c,setDiagramTitle:Wc}}),zWe=i(()=>{e(),MSe(),FWe(),RSe(),AWe=mt(e=>{ISe(e,_We),e.nodes.map(e=>_We.addNode(e.indent?parseInt(e.indent):0,e.name))},"populate"),LWe={parse:mt(async e=>{e=await SSe("treeView",e),B.debug(e),AWe(e)},"parse")}}),qWe=i(()=>{e(),cAe(),Rc(),RWe=mt((e,t,r,i,n)=>{var{height:a,width:s}=(i=i.append("text").text(r.name).attr("dominant-baseline","middle").attr("class","treeView-node-label")).node().getBBox(),a=a+2*n.paddingY,s=s+2*n.paddingX;i.attr("x",e+n.paddingX),i.attr("y",t+a/2),r.BBox={x:e,y:t,width:s,height:a}},"positionLabel"),IWe=mt((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"),NWe=mt((s,e,o)=>{let a=0,l=0,h=mt((e,t,r,i)=>{var i=i*(r.rowIndent+r.paddingX),{height:t,width:n}=(RWe(i,a,t,e,r),t.BBox);IWe(e,i-r.rowIndent,a+t/2,i,a+t/2,r.lineThickness),l=Math.max(l,i+n),a+=t},"drawNode"),c=mt((e,t=0)=>{h(s,e,o,t),e.children.forEach(e=>{c(e,t+1)});var r,{x:i,y:n,height:a}=e.BBox;e.children.length&&({y:e,height:r}=e.children[e.children.length-1].BBox,IWe(s,i+o.paddingX,n+a,i+o.paddingX,e+r/2+o.lineThickness/2,o.lineThickness))},"processNode");return c(e),{totalHeight:a,totalWidth:l}},"drawTree"),DWe=mt((e,t,r,i)=>{B.debug(`Rendering treeView diagram
`+e);var i=(e=i.db).getRoot(),e=e.getConfig(),{totalHeight:n,totalWidth:i}=((n=(t=nAe(t)).append("g")).attr("class","tree-view"),NWe(n,i,e));t.attr("viewBox",`-${e.lineThickness/2} 0 ${i} `+n),xc(t,n,i,e.useMaxWidth)},"draw"),MWe={draw:DWe}}),WWe=i(()=>{S7(),OWe={labelFontSize:"16px",labelColor:"black",lineColor:"black"},BWe=mt(({treeView:e})=>{var{labelFontSize:e,labelColor:t,lineColor:r}=H_(OWe,e);return`
.treeView-node-label {
font-size: ${e};
fill: ${t};
}
.treeView-node-line {
stroke: ${r};
}
`},"styles"),PWe=BWe}),UWe={};sYe(UWe,{diagram:()=>GWe});var GWe,jWe,VWe,YWe,HWe,XWe,KWe,ZWe,QWe,JWe,eUe,tUe,rUe,iUe,nUe,aUe,sUe,oUe,lUe,hUe,cUe,uUe,dUe,pUe,gUe,fUe,mUe,yUe,vUe,xUe,bUe,TUe=i(()=>{zWe(),FWe(),qWe(),WWe(),GWe={db:_We,renderer:MWe,parser:LWe,styles:PWe}}),kUe=i(()=>{jWe={L:"left",R:"right",T:"top",B:"bottom"},VWe={L:mt(e=>e+`,${e/2} 0,${e} 0,0`,"L"),R:mt(e=>`0,${e/2} ${e},0 ${e},`+e,"R"),T:mt(e=>`0,0 ${e},0 ${e/2},`+e,"T"),B:mt(e=>e/2+`,0 ${e},${e} 0,`+e,"B")},YWe={L:mt((e,t)=>e-t+2,"L"),R:mt((e,t)=>e-2,"R"),T:mt((e,t)=>e-t+2,"T"),B:mt((e,t)=>e-2,"B")},HWe=mt(function(e){return KWe(e)?"L"===e?"R":"L":"T"===e?"B":"T"},"getOppositeArchitectureDirection"),XWe=mt(function(e){return"L"===e||"R"===e||"T"===e||"B"===e},"isArchitectureDirection"),KWe=mt(function(e){return"L"===e||"R"===e},"isArchitectureDirectionX"),ZWe=mt(function(e){return"T"===e||"B"===e},"isArchitectureDirectionY"),QWe=mt(function(e,t){var r=KWe(e)&&ZWe(t),e=ZWe(e)&&KWe(t);return r||e},"isArchitectureDirectionXY"),JWe=mt(function(e){var t=e[0],e=e[1],r=KWe(t)&&ZWe(e),t=ZWe(t)&&KWe(e);return r||t},"isArchitecturePairXY"),eUe=mt(function(e){return"LL"!==e&&"RR"!==e&&"TT"!==e&&"BB"!==e},"isValidArchitectureDirectionPair"),tUe=mt(function(e,t){return eUe(e=""+e+t)?e:void 0},"getArchitectureDirectionPair"),rUe=mt(function([e,t],r){var i=r[0],r=r[1];return KWe(i)?ZWe(r)?[e+("L"===i?-1:1),t+("T"===r?1:-1)]:[e+("L"===i?-1:1),t]:KWe(r)?[e+("L"===r?1:-1),t+("T"===i?1:-1)]:[e,t+("T"===i?1:-1)]},"shiftPositionByArchitectureDirectionPair"),iUe=mt(function(e){return"LT"===e||"TL"===e?[1,1]:"BL"===e||"LB"===e?[1,-1]:"BR"===e||"RB"===e?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),nUe=mt(function(e,t){return QWe(e,t)?"bend":KWe(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),aUe=mt(function(e){return"service"===e.type},"isArchitectureService"),sUe=mt(function(e){return"junction"===e.type},"isArchitectureJunction"),oUe=mt(e=>e.data(),"edgeData"),lUe=mt(e=>e.data(),"nodeData")}),wUe=i(()=>{Ei(),wi(),S7(),Gu(),kUe(),hUe=ar.architecture,cUe=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=$c,this.getAccTitle=Fc,this.setDiagramTitle=Wc,this.getDiagramTitle=Uc,this.getAccDescription=qc,this.setAccDescription=zc,this.clear()}static{mt(this,"ArchitectureDB")}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",Pc()}addService({id:e,icon:t,in:r,title:i,iconText:n}){if(void 0!==this.registeredIds[e])throw new Error(`The service id [${e}] is already in use by another `+this.registeredIds[e]);if(void 0!==r){if(e===r)throw new Error(`The service [${e}] cannot be placed within itself`);if(void 0===this.registeredIds[r])throw new Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===this.registeredIds[r])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(aUe)}addJunction({id:e,in:t}){if(void 0!==this.registeredIds[e])throw new Error(`The junction id [${e}] is already in use by another `+this.registeredIds[e]);if(void 0!==t){if(e===t)throw new Error(`The junction [${e}] cannot be placed within itself`);if(void 0===this.registeredIds[t])throw new Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if("node"===this.registeredIds[t])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(sUe)}getNodes(){return Object.values(this.nodes)}getNode(e){return this.nodes[e]??null}addGroup({id:e,icon:t,in:r,title:i}){if(void 0!==this.registeredIds?.[e])throw new Error(`The group id [${e}] is already in use by another `+this.registeredIds[e]);if(void 0!==r){if(e===r)throw new Error(`The group [${e}] cannot be placed within itself`);if(void 0===this.registeredIds?.[r])throw new Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if("node"===this.registeredIds?.[r])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:o,title:l}){if(!XWe(r))throw new Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got `+String(r));if(!XWe(i))throw new Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got `+String(i));if(void 0===this.nodes[e]&&void 0===this.groups[e])throw new Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===this.nodes[t]&&void 0===this.groups[t])throw new Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);var h=this.nodes[e].in,c=this.nodes[t].in;if(s&&h&&c&&h==c)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(o&&h&&c&&h==c)throw new Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);this.edges.push({lhsId:e,lhsDir:r,lhsInto:n,lhsGroup:s,rhsId:t,rhsDir:i,rhsInto:a,rhsGroup:o,title:l}),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}getDataStructures(){if(void 0===this.dataStructures){let s={},o=Object.entries(this.nodes).reduce((e,[a,t])=>(e[a]=t.edges.reduce((e,t)=>{var r,i=this.getNode(t.lhsId)?.in,n=this.getNode(t.rhsId)?.in;return i&&n&&i!==n&&"bend"!==(r=nUe(t.lhsDir,t.rhsDir))&&(s[i]??={},s[i][n]=r,s[n]??={},s[n][i]=r),t.lhsId===a?(n=tUe(t.lhsDir,t.rhsDir))&&(e[n]=t.rhsId):(i=tUe(t.rhsDir,t.lhsDir))&&(e[i]=t.lhsId),e},{}),e),{}),r=Object.keys(o)[0],l={[r]:1},h=Object.keys(o).reduce((e,t)=>t===r?e:{...e,[t]:1},{}),e=mt(e=>{let n={[e]:[0,0]},a=[e];for(;0<a.length;){var t=a.shift();if(t){l[t]=1,delete h[t];let e=o[t],[r,i]=n[t];Object.entries(e).forEach(([e,t])=>{l[t]||(n[t]=rUe([r,i],e),a.push(t))})}}return n},"BFS"),t=[e(r)];for(;0<Object.keys(h).length;)t.push(e(Object.keys(h)[0]));this.dataStructures={adjList:o,spatialMaps:t,groupAlignments:s}}return this.dataStructures}setElementForId(e,t){this.elements[e]=t}getElementById(e){return this.elements[e]}getConfig(){return H_({...hUe,...br().architecture})}getConfigField(e){return this.getConfig()[e]}}}),CUe=i(()=>{RSe(),e(),MSe(),wUe(),uUe=mt((e,t)=>{ISe(e,t),e.groups.map(e=>t.addGroup(e)),e.services.map(e=>t.addService({...e,type:"service"})),e.junctions.map(e=>t.addJunction({...e,type:"junction"})),e.edges.map(e=>t.addEdge(e))},"populateDb"),dUe={parser:{yy:void 0},parse:mt(async e=>{var e=await SSe("architecture",e),t=(B.debug(e),dUe.parser?.yy);if(!(t instanceof cUe))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.");uUe(e,t)},"parse")}}),EUe=i(()=>{pUe=mt(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"),gUe=pUe}),SUe=tYe((r,i)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof r?r.layoutBase=t():e.layoutBase=t()},"webpackUniversalModuleDefinition")(r,function(){return r=[function(e,t,r){function i(){}mt(i,"LayoutConstants"),i.QUALITY=1,i.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,i.DEFAULT_INCREMENTAL=!1,i.DEFAULT_ANIMATION_ON_LAYOUT=!0,i.DEFAULT_ANIMATION_DURING_LAYOUT=!1,i.DEFAULT_ANIMATION_PERIOD=50,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,i.DEFAULT_GRAPH_MARGIN=15,i.NODE_DIMENSIONS_INCLUDE_LABELS=!1,i.SIMPLE_NODE_HALF_SIZE=(i.SIMPLE_NODE_SIZE=40)/2,i.EMPTY_COMPOUND_NODE_SIZE=40,i.MIN_EDGE_LENGTH=1,i.INITIAL_WORLD_BOUNDARY=(i.WORLD_BOUNDARY=1e6)/1e3,i.WORLD_CENTER_X=1200,i.WORLD_CENTER_Y=900,e.exports=i},function(e,t,r){var i,n=r(2),a=r(8),s=r(9);function o(e,t,r){n.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=e,this.target=t}for(i in mt(o,"LEdge"),o.prototype=Object.create(n.prototype),n)o[i]=n[i];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(e,t){for(var r=this.getOtherEnd(e),i=t.getGraphManager().getRoot();;){if(r.getOwner()==t)return r;if(r.getOwner()==i)break;r=r.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o},function(e,t,r){function i(e){this.vGraphObject=e}mt(i,"LGraphObject"),e.exports=i},function(e,t,r){var i,n=r(2),a=r(10),s=r(13),o=r(0),l=r(16),h=r(5);function c(e,t,r,i){n.call(this,i=null==r&&null==i?t:i),null!=e.graphManager&&(e=e.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=i,this.edges=[],this.graphManager=e,this.rect=null!=r&&null!=t?new s(t.x,t.y,r.width,r.height):new s}for(i in mt(c,"LNode"),c.prototype=Object.create(n.prototype),n)c[i]=n[i];c.prototype.getEdges=function(){return this.edges},c.prototype.getChild=function(){return this.child},c.prototype.getOwner=function(){return this.owner},c.prototype.getWidth=function(){return this.rect.width},c.prototype.setWidth=function(e){this.rect.width=e},c.prototype.getHeight=function(){return this.rect.height},c.prototype.setHeight=function(e){this.rect.height=e},c.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},c.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},c.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},c.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},c.prototype.getRect=function(){return this.rect},c.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},c.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},c.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},c.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},c.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},c.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},c.prototype.getEdgeListToNode=function(t){var r=[],i=this;return i.edges.forEach(function(e){if(e.target==t){if(e.source!=i)throw"Incorrect edge source!";r.push(e)}}),r},c.prototype.getEdgesBetween=function(t){var r=[],i=this;return i.edges.forEach(function(e){if(e.source!=i&&e.target!=i)throw"Incorrect edge source and/or target";e.target!=t&&e.source!=t||r.push(e)}),r},c.prototype.getNeighborsList=function(){var t=new Set,r=this;return r.edges.forEach(function(e){if(e.source==r)t.add(e.target);else{if(e.target!=r)throw"Incorrect incidency!";t.add(e.source)}}),t},c.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),r=0;r<e.length;r++)e[r].withChildren().forEach(function(e){t.add(e)});return t},c.prototype.getNoOfChildren=function(){var e=0;if(null==this.child)e=1;else for(var t=this.child.getNodes(),r=0;r<t.length;r++)e+=t[r].getNoOfChildren();return 0==e?1:e},c.prototype.getEstimatedSize=function(){if(this.estimatedSize==a.MIN_VALUE)throw"assert failed";return this.estimatedSize},c.prototype.calcEstimatedSize=function(){return null==this.child?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},c.prototype.scatter=function(){var e=-o.INITIAL_WORLD_BOUNDARY,t=o.INITIAL_WORLD_BOUNDARY,t=o.WORLD_CENTER_X+l.nextDouble()*(t-e)+e,e=-o.INITIAL_WORLD_BOUNDARY,r=o.INITIAL_WORLD_BOUNDARY,r=o.WORLD_CENTER_Y+l.nextDouble()*(r-e)+e;this.rect.x=t,this.rect.y=r},c.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";var e,t;0!=this.getChild().getNodes().length&&((t=this.getChild()).updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),o.NODE_DIMENSIONS_INCLUDE_LABELS)&&(e=t.getRight()-t.getLeft(),t=t.getBottom()-t.getTop(),this.labelWidth&&("left"==this.labelPosHorizontal?(this.rect.x-=this.labelWidth,this.setWidth(e+this.labelWidth)):"center"==this.labelPosHorizontal&&this.labelWidth>e?(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(e+this.labelWidth)),this.labelHeight)&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(t+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>t?(this.rect.y-=(this.labelHeight-t)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(t+this.labelHeight))},c.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},c.prototype.transform=function(e){(t=this.rect.x)>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY),(r=this.rect.y)>o.WORLD_BOUNDARY?r=o.WORLD_BOUNDARY:r<-o.WORLD_BOUNDARY&&(r=-o.WORLD_BOUNDARY);var t=new h(t,r),r=e.inverseTransformPoint(t);this.setLocation(r.x,r.y)},c.prototype.getLeft=function(){return this.rect.x},c.prototype.getRight=function(){return this.rect.x+this.rect.width},c.prototype.getTop=function(){return this.rect.y},c.prototype.getBottom=function(){return this.rect.y+this.rect.height},c.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},e.exports=c},function(e,t,r){var i,n=r(0);function a(){}for(i in mt(a,"FDLayoutConstants"),n)a[i]=n[i];a.MAX_ITERATIONS=2500,a.DEFAULT_EDGE_LENGTH=50,a.DEFAULT_SPRING_STRENGTH=.45,a.DEFAULT_REPULSION_STRENGTH=4500,a.DEFAULT_GRAVITY_STRENGTH=.4,a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,a.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,a.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,a.COOLING_ADAPTATION_FACTOR=.33,a.ADAPTATION_LOWER_NODE_LIMIT=1e3,a.ADAPTATION_UPPER_NODE_LIMIT=5e3,a.MAX_NODE_DISPLACEMENT=3*(a.MAX_NODE_DISPLACEMENT_INCREMENTAL=100),a.MIN_REPULSION_DIST=a.DEFAULT_EDGE_LENGTH/10,a.CONVERGENCE_CHECK_PERIOD=100,a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,a.MIN_EDGE_LENGTH=1,a.GRID_CALCULATION_CHECK_PERIOD=10,e.exports=a},function(e,t,r){function i(e,t){null==e&&null==t?(this.x=0,this.y=0):(this.x=e,this.y=t)}mt(i,"PointD"),i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.setX=function(e){this.x=e},i.prototype.setY=function(e){this.y=e},i.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},i.prototype.getCopy=function(){return new i(this.x,this.y)},i.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=i},function(e,t,r){var i,n=r(2),d=r(10),a=r(0),s=r(7),o=r(3),l=r(1),p=r(13),h=r(12),c=r(11);function u(e,t,r){n.call(this,r),this.estimatedSize=d.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,null!=t&&t instanceof s?this.graphManager=t:null!=t&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(i in mt(u,"LGraph"),u.prototype=Object.create(n.prototype),n)u[i]=n[i];u.prototype.getNodes=function(){return this.nodes},u.prototype.getEdges=function(){return this.edges},u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getParent=function(){return this.parent},u.prototype.getLeft=function(){return this.left},u.prototype.getRight=function(){return this.right},u.prototype.getTop=function(){return this.top},u.prototype.getBottom=function(){return this.bottom},u.prototype.isConnected=function(){return this.isConnected},u.prototype.add=function(e,t,r){if(null==t&&null==r){var i=e;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1<this.getNodes().indexOf(i))throw"Node already in graph!";return(i.owner=this).getNodes().push(i),i}if(i=e,!(-1<this.getNodes().indexOf(t)&&-1<this.getNodes().indexOf(r)))throw"Source or target not in graph!";if(t.owner!=r.owner||t.owner!=this)throw"Both owners must be this graph!";return t.owner!=r.owner?null:(i.source=t,i.target=r,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),r!=t&&r.edges.push(i),i)},u.prototype.remove=function(e){var t=e;if(e instanceof o){if(null==t)throw"Node is null!";if(null==t.owner||t.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var r,i=t.edges.slice(),n=i.length,a=0;a<n;a++)((r=i[a]).isInterGraph?this.graphManager:r.source.owner).remove(r);if(-1==(s=this.nodes.indexOf(t)))throw"Node not in owner node list!";this.nodes.splice(s,1)}else if(e instanceof l){if(null==(r=e))throw"Edge is null!";if(null==r.source||null==r.target)throw"Source and/or target is null!";if(null==r.source.owner||null==r.target.owner||r.source.owner!=this||r.target.owner!=this)throw"Source and/or target owner is invalid!";var s,t=r.source.edges.indexOf(r),e=r.target.edges.indexOf(r);if(!(-1<t&&-1<e))throw"Source and/or target doesn't know this edge!";if(r.source.edges.splice(t,1),r.target!=r.source&&r.target.edges.splice(e,1),-1==(s=r.source.owner.getEdges().indexOf(r)))throw"Not in owner's edge list!";r.source.owner.getEdges().splice(s,1)}},u.prototype.updateLeftTop=function(){for(var e,t=d.MAX_VALUE,r=d.MAX_VALUE,i=this.getNodes(),n=i.length,a=0;a<n;a++){var s,o=i[a];(s=o.getTop())<t&&(t=s),(s=o.getLeft())<r&&(r=s)}return t==d.MAX_VALUE?null:(e=null!=i[0].getParent().paddingLeft?i[0].getParent().paddingLeft:this.margin,this.left=r-e,this.top=t-e,new h(this.left,this.top))},u.prototype.updateBounds=function(e){for(var t,r,i=d.MAX_VALUE,n=-d.MAX_VALUE,a=d.MAX_VALUE,s=-d.MAX_VALUE,o=this.nodes,l=o.length,h=0;h<l;h++){var c=o[h];e&&null!=c.child&&c.updateBounds(),(t=c.getLeft())<i&&(i=t),n<(t=c.getRight())&&(n=t),(t=c.getTop())<a&&(a=t),s<(t=c.getBottom())&&(s=t)}var u=new p(i,a,n-i,s-a);i==d.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),r=null!=o[0].getParent().paddingLeft?o[0].getParent().paddingLeft:this.margin,this.left=u.x-r,this.right=u.x+u.width+r,this.top=u.y-r,this.bottom=u.y+u.height+r},u.calculateBounds=function(e){for(var t=d.MAX_VALUE,r=-d.MAX_VALUE,i=d.MAX_VALUE,n=-d.MAX_VALUE,a=e.length,s=0;s<a;s++){var o,l=e[s];(o=l.getLeft())<t&&(t=o),r<(o=l.getRight())&&(r=o),(o=l.getTop())<i&&(i=o),n<(o=l.getBottom())&&(n=o)}return new p(t,i,r-t,n-i)},u.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==d.MIN_VALUE)throw"assert failed";return this.estimatedSize},u.prototype.calcEstimatedSize=function(){for(var e=0,t=this.nodes,r=t.length,i=0;i<r;i++)e+=t[i].calcEstimatedSize();return this.estimatedSize=0==e?a.EMPTY_COMPOUND_NODE_SIZE:e/Math.sqrt(this.nodes.length),this.estimatedSize},u.prototype.updateConnected=function(){var t=this;if(0==this.nodes.length)this.isConnected=!0;else{var r,i=new c,n=new Set,e=this.nodes[0];for(e.withChildren().forEach(function(e){i.push(e),n.add(e)});0!==i.length;)for(var a,s,o=(a=(e=i.shift()).getEdges()).length,l=0;l<o;l++)null==(s=a[l].getOtherEndInGraph(e,this))||n.has(s)||s.withChildren().forEach(function(e){i.push(e),n.add(e)});this.isConnected=!1,n.size>=this.nodes.length&&(r=0,n.forEach(function(e){e.owner==t&&r++}),r==this.nodes.length)&&(this.isConnected=!0)}},e.exports=u},function(e,t,r){var h,c=r(1);function i(e){h=r(6),this.layout=e,this.graphs=[],this.edges=[]}mt(i,"LGraphManager"),i.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),e=this.add(e,t);return this.setRootGraph(e),this.rootGraph},i.prototype.add=function(e,t,r,i,n){if(null==r&&null==i&&null==n){if(null==e)throw"Graph is null!";if(null==t)throw"Parent node is null!";if(-1<this.graphs.indexOf(e))throw"Graph already in this graph mgr!";if(this.graphs.push(e),null!=e.parent)throw"Already has a parent!";if(null!=t.child)throw"Already has a child!";return(e.parent=t).child=e}if(n=r,r=e,e=(i=t).getOwner(),t=n.getOwner(),null==e||e.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==t||t.getGraphManager()!=this)throw"Target not in this graph mgr!";if(e==t)return r.isInterGraph=!1,e.add(r,i,n);if(r.isInterGraph=!0,r.source=i,r.target=n,-1<this.edges.indexOf(r))throw"Edge already in inter-graph edge list!";if(this.edges.push(r),null==r.source||null==r.target)throw"Edge source and/or target is null!";if(-1!=r.source.edges.indexOf(r)||-1!=r.target.edges.indexOf(r))throw"Edge already in source and/or target incidency list!";return r.source.edges.push(r),r.target.edges.push(r),r},i.prototype.remove=function(e){if(e instanceof h){var t=e;if(t.getGraphManager()!=this)throw"Graph not in this graph mgr";if(t!=this.rootGraph&&(null==t.parent||t.parent.graphManager!=this))throw"Invalid parent node!";for(var r,i=[],n=(i=i.concat(t.getEdges())).length,a=0;a<n;a++)r=i[a],t.remove(r);for(var s,o=[],n=(o=o.concat(t.getNodes())).length,a=0;a<n;a++)s=o[a],t.remove(s);t==this.rootGraph&&this.setRootGraph(null);var l=this.graphs.indexOf(t);this.graphs.splice(l,1),t.parent=null}else if(e instanceof c){if(null==(r=e))throw"Edge is null!";if(!r.isInterGraph)throw"Not an inter-graph edge!";if(null==r.source||null==r.target)throw"Source and/or target is null!";if(-1==r.source.edges.indexOf(r)||-1==r.target.edges.indexOf(r))throw"Source and/or target doesn't know this edge!";if(l=r.source.edges.indexOf(r),r.source.edges.splice(l,1),l=r.target.edges.indexOf(r),r.target.edges.splice(l,1),null==r.source.owner||null==r.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==r.source.owner.getGraphManager().edges.indexOf(r))throw"Not in owner graph manager's edge list!";l=r.source.owner.getGraphManager().edges.indexOf(r),r.source.owner.getGraphManager().edges.splice(l,1)}},i.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},i.prototype.getGraphs=function(){return this.graphs},i.prototype.getAllNodes=function(){if(null==this.allNodes){for(var e=[],t=this.getGraphs(),r=t.length,i=0;i<r;i++)e=e.concat(t[i].getNodes());this.allNodes=e}return this.allNodes},i.prototype.resetAllNodes=function(){this.allNodes=null},i.prototype.resetAllEdges=function(){this.allEdges=null},i.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},i.prototype.getAllEdges=function(){if(null==this.allEdges){for(var e=[],t=this.getGraphs(),r=(t.length,0);r<t.length;r++)e=e.concat(t[r].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},i.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},i.prototype.setAllNodesToApplyGravitation=function(e){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=e},i.prototype.getRoot=function(){return this.rootGraph},i.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";null==(this.rootGraph=e).parent&&(e.parent=this.layout.newNode("Root node"))},i.prototype.getLayout=function(){return this.layout},i.prototype.isOneAncestorOfOther=function(e,t){if(null==e||null==t)throw"assert failed";if(e==t)return!0;for(var r,i=e.getOwner();null!=(r=i.getParent());){if(r==t)return!0;if(null==(i=r.getOwner()))break}for(i=t.getOwner();null!=(r=i.getParent());){if(r==e)return!0;if(null==(i=r.getOwner()))break}return!1},i.prototype.calcLowestCommonAncestors=function(){for(var e,t,r,i,n,a=this.getAllEdges(),s=a.length,o=0;o<s;o++)if(t=(e=a[o]).source,r=e.target,e.lca=null,(e.sourceInLca=t)==(e.targetInLca=r))e.lca=t.getOwner();else{for(i=t.getOwner();null==e.lca;){for(n=(e.targetInLca=r).getOwner();null==e.lca;){if(n==i){e.lca=n;break}if(n==this.rootGraph)break;if(null!=e.lca)throw"assert failed";e.targetInLca=n.getParent(),n=e.targetInLca.getOwner()}if(i==this.rootGraph)break;null==e.lca&&(e.sourceInLca=i.getParent(),i=e.sourceInLca.getOwner())}if(null==e.lca)throw"assert failed"}},i.prototype.calcLowestCommonAncestor=function(e,t){if(e==t)return e.getOwner();for(var r=e.getOwner();null!=r;){for(var i=t.getOwner();null!=i;){if(i==r)return i;i=i.getParent().getOwner()}r=r.getParent().getOwner()}return r},i.prototype.calcInclusionTreeDepths=function(e,t){null==e&&null==t&&(e=this.rootGraph,t=1);for(var r,i=e.getNodes(),n=i.length,a=0;a<n;a++)(r=i[a]).inclusionTreeDepth=t,null!=r.child&&this.calcInclusionTreeDepths(r.child,t+1)},i.prototype.includesInvalidEdge=function(){for(var e,t=[],r=this.edges.length,i=0;i<r;i++)e=this.edges[i],this.isOneAncestorOfOther(e.source,e.target)&&t.push(e);for(i=0;i<t.length;i++)this.remove(t[i]);return!1},e.exports=i},function(e,t,r){var c=r(12);function i(){}mt(i,"IGeometry"),i.calcSeparationAmount=function(e,t,r,i){if(!e.intersects(t))throw"assert failed";var n=new Array(2),a=(this.decideDirectionsForOverlappingNodes(e,t,n),r[0]=Math.min(e.getRight(),t.getRight())-Math.max(e.x,t.x),r[1]=Math.min(e.getBottom(),t.getBottom())-Math.max(e.y,t.y),e.getX()<=t.getX()&&e.getRight()>=t.getRight()?r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom())),Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()))),t=(a=t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()?1:a)*r[0],e=r[1]/a;r[0]<e?e=r[0]:t=r[1],r[0]=-1*n[0]*(e/2+i),r[1]=-1*n[1]*(t/2+i)},i.decideDirectionsForOverlappingNodes=function(e,t,r){e.getCenterX()<t.getCenterX()?r[0]=-1:r[0]=1,e.getCenterY()<t.getCenterY()?r[1]=-1:r[1]=1},i.getIntersection2=function(e,t,r){var i=e.getCenterX(),n=e.getCenterY(),a=t.getCenterX(),s=t.getCenterY();if(e.intersects(t))return r[0]=i,r[1]=n,r[2]=a,r[3]=s,!0;var o=e.getX(),l=e.getY(),h=e.getRight(),c=e.getX(),u=e.getBottom(),d=e.getRight(),p=e.getWidthHalf(),g=e.getHeightHalf(),f=t.getX(),m=t.getY(),y=t.getRight(),v=t.getX(),x=t.getBottom(),b=t.getRight(),T=t.getWidthHalf(),k=t.getHeightHalf(),w=!1,C=!1;if(i===a){if(s<n)return r[0]=i,r[1]=l,r[2]=a,r[3]=x,!1;n<s&&(r[0]=i,r[1]=u,r[2]=a,r[3]=m)}else if(n===s){if(a<i)return r[0]=o,r[1]=n,r[2]=y,r[3]=s,!1;i<a&&(r[0]=h,r[1]=n,r[2]=f,r[3]=s)}else{var e=e.height/e.width,t=t.height/t.width,E=(s-n)/(a-i),S=void 0,_=void 0,A=void 0;if(-e==E?(a<i?(r[0]=c,r[1]=u):(r[0]=h,r[1]=l),w=!0):e==E&&(a<i?(r[0]=o,r[1]=l):(r[0]=d,r[1]=u),w=!0),-t==E?(i<a?(r[2]=v,r[3]=x):(r[2]=y,r[3]=m),C=!0):t==E&&(i<a?(r[2]=f,r[3]=m):(r[2]=b,r[3]=x),C=!0),w&&C)return!1;if(h=a<i?s<n?(S=this.getCardinalDirection(e,E,4),this.getCardinalDirection(t,E,2)):(S=this.getCardinalDirection(-e,E,3),this.getCardinalDirection(-t,E,1)):s<n?(S=this.getCardinalDirection(-e,E,1),this.getCardinalDirection(-t,E,3)):(S=this.getCardinalDirection(e,E,2),this.getCardinalDirection(t,E,4)),!w)switch(S){case 1:_=l,r[0]=i+-g/E,r[1]=_;break;case 2:_=n+p*E,r[0]=d,r[1]=_;break;case 3:_=u,r[0]=i+g/E,r[1]=_;break;case 4:_=n+-p*E,r[0]=c,r[1]=_}if(!C)switch(h){case 1:A=m,r[2]=a+-k/E,r[3]=A;break;case 2:A=s+T*E,r[2]=b,r[3]=A;break;case 3:A=x,r[2]=a+k/E,r[3]=A;break;case 4:A=s+-T*E,r[2]=v,r[3]=A}}return!1},i.getCardinalDirection=function(e,t,r){return t<e?r:1+r%4},i.getIntersection=function(e,t,r,i){var n,a,s,o,l,h;return null==i?this.getIntersection2(e,t,r):(n=e.x,a=t.x,l=r.x,o=a*(e=e.y)-n*(t=t.y),h=(s=i.x)*(r=r.y)-l*(i=i.y),0==(i=(t-=e)*(e=l-s)-(l=i-r)*(s=n-a))?null:new c((s*h-e*o)/i,(l*o-t*h)/i))},i.angleOfVector=function(e,t,r,i){var n=void 0;return e!==r?(n=Math.atan((i-t)/(r-e)),r<e?n+=Math.PI:i<t&&(n+=this.TWO_PI)):n=i<t?this.ONE_AND_HALF_PI:this.HALF_PI,n},i.doIntersect=function(e,t,r,i){var n=e.x,e=e.y,a=t.x,t=t.y,s=r.x,r=r.y,o=i.x,l=(a-n)*((i=i.y)-r)-(o-s)*(t-e);return 0!=l&&(t=((e-t)*(o-n)+(a-n)*(i-e))/l,0<(a=((i-r)*(o-n)+(s-o)*(i-e))/l))&&a<1&&0<t&&t<1},i.findCircleLineIntersections=function(e,t,r,i,n,a,s){var o=(r-e)*(r-e)+(i-t)*(i-t);return 0<=(r=2*((e-n)*(r-e)+(t-a)*(i-t)))*r-4*o*(i=(e-n)*(e-n)+(t-a)*(t-a)-s*s)?(e=(-r+Math.sqrt(r*r-4*o*i))/(2*o),n=(-r-Math.sqrt(r*r-4*o*i))/(2*o),0<=e&&e<=1?[e]:0<=n&&n<=1?[n]:null):null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,e.exports=i},function(e,t,r){function i(){}mt(i,"IMath"),i.sign=function(e){return 0<e?1:e<0?-1:0},i.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},i.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=i},function(e,t,r){function i(){}mt(i,"Integer"),i.MAX_VALUE=2147483647,i.MIN_VALUE=-2147483648,e.exports=i},function(e,t,r){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}mt(i,"defineProperties"),mt(n,"_classCallCheck");var a,s,o=mt(function(e){return{value:e,next:null,prev:null}},"nodeFrom"),l=mt(function(e,t,r,i){return null!==e?e.next=t:i.head=t,null!==r?r.prev=t:i.tail=t,t.prev=e,t.next=r,i.length++,t},"add"),h=mt(function(e,t){var r=e.prev,i=e.next;return null!==r?r.next=i:t.head=i,null!==i?i.prev=r:t.tail=r,e.prev=e.next=null,t.length--,e},"_remove");function c(e){var t=this;n(this,c),this.length=0,this.head=null,this.tail=null,e?.forEach(function(e){return t.push(e)})}mt(c,"LinkedList"),a=c,s=[{key:"size",value:mt(function(){return this.length},"size")},{key:"insertBefore",value:mt(function(e,t){return l(t.prev,o(e),t,this)},"insertBefore")},{key:"insertAfter",value:mt(function(e,t){return l(t,o(e),t.next,this)},"insertAfter")},{key:"insertNodeBefore",value:mt(function(e,t){return l(t.prev,e,t,this)},"insertNodeBefore")},{key:"insertNodeAfter",value:mt(function(e,t){return l(t,e,t.next,this)},"insertNodeAfter")},{key:"push",value:mt(function(e){return l(this.tail,o(e),null,this)},"push")},{key:"unshift",value:mt(function(e){return l(null,o(e),this.head,this)},"unshift")},{key:"remove",value:mt(function(e){return h(e,this)},"remove")},{key:"pop",value:mt(function(){return h(this.tail,this).value},"pop")},{key:"popNode",value:mt(function(){return h(this.tail,this)},"popNode")},{key:"shift",value:mt(function(){return h(this.head,this).value},"shift")},{key:"shiftNode",value:mt(function(){return h(this.head,this)},"shiftNode")},{key:"get_object_at",value:mt(function(e){if(e<=this.length()){for(var t=1,r=this.head;t<e;)r=r.next,t++;return r.value}},"get_object_at")},{key:"set_object_at",value:mt(function(e,t){if(e<=this.length()){for(var r=1,i=this.head;r<e;)i=i.next,r++;i.value=t}},"set_object_at")}],i(a.prototype,s),e.exports=c},function(e,t,r){function i(e,t,r){this.x=null,(this.y=null)==e&&null==t&&null==r?(this.x=0,this.y=0):"number"==typeof e&&"number"==typeof t&&null==r?(this.x=e,this.y=t):"Point"==e.constructor.name&&null==t&&null==r&&(this.x=(r=e).x,this.y=r.y)}mt(i,"Point"),i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.getLocation=function(){return new i(this.x,this.y)},i.prototype.setLocation=function(e,t,r){"Point"==e.constructor.name&&null==t&&null==r?this.setLocation((r=e).x,r.y):"number"==typeof e&&"number"==typeof t&&null==r&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},i.prototype.move=function(e,t){this.x=e,this.y=t},i.prototype.translate=function(e,t){this.x+=e,this.y+=t},i.prototype.equals=function(e){return"Point"==e.constructor.name?this.x==e.x&&this.y==e.y:this==e},i.prototype.toString=function(){return(new i).constructor.name+"[x="+this.x+",y="+this.y+"]"},e.exports=i},function(e,t,r){function i(e,t,r,i){this.x=0,this.y=0,this.width=0,this.height=0,null!=e&&null!=t&&null!=r&&null!=i&&(this.x=e,this.y=t,this.width=r,this.height=i)}mt(i,"RectangleD"),i.prototype.getX=function(){return this.x},i.prototype.setX=function(e){this.x=e},i.prototype.getY=function(){return this.y},i.prototype.setY=function(e){this.y=e},i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(e){this.width=e},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(e){this.height=e},i.prototype.getRight=function(){return this.x+this.width},i.prototype.getBottom=function(){return this.y+this.height},i.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},i.prototype.getCenterX=function(){return this.x+this.width/2},i.prototype.getMinX=function(){return this.getX()},i.prototype.getMaxX=function(){return this.getX()+this.width},i.prototype.getCenterY=function(){return this.y+this.height/2},i.prototype.getMinY=function(){return this.getY()},i.prototype.getMaxY=function(){return this.getY()+this.height},i.prototype.getWidthHalf=function(){return this.width/2},i.prototype.getHeightHalf=function(){return this.height/2},e.exports=i},function(e,t,r){var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function n(){}mt(n,"UniqueIDGeneretor"),n.lastID=0,n.createID=function(e){return n.isPrimitive(e)?e:(null==e.uniqueID&&(e.uniqueID=n.getString(),n.lastID++),e.uniqueID)},n.getString=function(e){return"Object#"+(null==e?n.lastID:e)},n.isPrimitive=function(e){var t="u"<typeof e?"undefined":i(e);return null==e||"object"!=t&&"function"!=t},e.exports=n},function(e,t,r){function g(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}mt(g,"_toConsumableArray");var i=r(0),n=r(7),a=r(3),s=r(1),o=r(6),l=r(5),h=r(17),c=r(29);function u(e){c.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new n(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=e&&(this.isRemoteUse=e)}mt(u,"Layout"),u.RANDOM_SEED=1,(u.prototype=Object.create(c.prototype)).getGraphManager=function(){return this.graphManager},u.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},u.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},u.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},u.prototype.newGraphManager=function(){var e=new n(this);return this.graphManager=e},u.prototype.newGraph=function(e){return new o(null,this.graphManager,e)},u.prototype.newNode=function(e){return new a(this.graphManager,e)},u.prototype.newEdge=function(e){return new s(null,null,e)},u.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},u.prototype.runLayout=function(){var e;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),e=!this.checkLayoutSuccess()&&this.layout(),"during"!==i.ANIMATE&&(e&&!this.isSubLayout&&this.doPostLayout(),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,e)},u.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},u.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var e=this.graphManager.getAllEdges(),t=0;t<e.length;t++)e[t];for(var r=this.graphManager.getRoot().getNodes(),t=0;t<r.length;t++)r[t];this.update(this.graphManager.getRoot())}},u.prototype.update=function(e){if(null==e)this.update2();else if(e instanceof a){var t=e;if(null!=t.getChild())for(var r=t.getChild().getNodes(),i=0;i<r.length;i++)update(r[i]);null!=t.vGraphObject&&t.vGraphObject.update(t)}else e instanceof s?null!=e.vGraphObject&&e.vGraphObject.update(e):e instanceof o&&null!=e.vGraphObject&&e.vGraphObject.update(e)},u.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},u.prototype.transform=function(e){if(null==e)this.transform(new l(0,0));else{var t=new h,r=this.graphManager.getRoot().updateLeftTop();if(null!=r){t.setWorldOrgX(e.x),t.setWorldOrgY(e.y),t.setDeviceOrgX(r.x),t.setDeviceOrgY(r.y);for(var i=this.getAllNodes(),n=0;n<i.length;n++)i[n].transform(t)}}},u.prototype.positionNodesRandomly=function(e){if(null==e)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var t,r,i=e.getNodes(),n=0;n<i.length;n++)null==(r=(t=i[n]).getChild())||0==r.getNodes().length?t.scatter():(this.positionNodesRandomly(r),t.updateBounds())},u.prototype.getFlatForest=function(){for(var e=[],t=!0,r=this.graphManager.getRoot().getNodes(),i=!0,n=0;n<r.length;n++)null!=r[n].getChild()&&(i=!1);if(i)for(var a=new Set,s=[],o=new Map,l=(l=[]).concat(r);0<l.length&&t;){for(s.push(l[0]);0<s.length&&t;){var h=s[0];s.splice(0,1),a.add(h);for(var c=h.getEdges(),n=0;n<c.length;n++){var u=c[n].getOtherEnd(h);if(o.get(h)!=u){if(a.has(u)){t=!1;break}s.push(u),o.set(u,h)}}}if(t){var d=[].concat(g(a));for(e.push(d),n=0;n<d.length;n++){var p=d[n];-1<(p=l.indexOf(p))&&l.splice(p,1)}a=new Set,o=new Map}else e=[]}return e},u.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],r=e.source,i=this.graphManager.calcLowestCommonAncestor(e.source,e.target),n=0;n<e.bendpoints.length;n++){var a=this.newNode(null),s=(a.setRect(new Point(0,0),new Dimension(1,1)),i.add(a),this.newEdge(null));this.graphManager.add(s,r,a),t.add(a),r=a}return s=this.newEdge(null),this.graphManager.add(s,r,e.target),this.edgeToDummyNodes.set(e,t),(e.isInterGraph()?this.graphManager:i).remove(e),t},u.prototype.createBendpointsFromDummyNodes=function(){for(var e=(e=[]).concat(this.graphManager.getAllEdges()),e=[].concat(g(this.edgeToDummyNodes.keys())).concat(e),t=0;t<e.length;t++){var r=e[t];if(0<r.bendpoints.length){for(var i=this.edgeToDummyNodes.get(r),n=0;n<i.length;n++){var a=i[n],s=new l(a.getCenterX(),a.getCenterY()),o=r.bendpoints.get(n);o.x=s.x,o.y=s.y,a.getOwner().remove(a)}this.graphManager.add(r,r.source,r.target)}}},u.transform=function(e,t,r,i){var n,a;return null!=r&&null!=i?(n=t,e<=50?n-=(t-t/r)/50*(50-e):n+=(t*i-t)/50*(e-50),n):(r=e<=50?(a=9*t/500,t/10):(a=9*t/50,-8*t),a*e+r)},u.findCenterOfTree=function(e){var t=(t=[]).concat(e),r=[],i=new Map,n=!1,a=null;1!=t.length&&2!=t.length||(n=!0,a=t[0]);for(var s=0;s<t.length;s++){var o=(h=t[s]).getNeighborsList().size;i.set(h,h.getNeighborsList().size),1==o&&r.push(h)}for(l=(l=[]).concat(r);!n;){[].concat(l);for(var l=[],s=0;s<t.length;s++){var h=t[s],c=t.indexOf(h);0<=c&&t.splice(c,1),h.getNeighborsList().forEach(function(e){var t;r.indexOf(e)<0&&(1==(t=i.get(e)-1)&&l.push(e),i.set(e,t))})}r=r.concat(l),1!=t.length&&2!=t.length||(n=!0,a=t[0])}return a},u.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=u},function(e,t,r){function i(){}mt(i,"RandomSeed"),i.seed=1,i.x=0,i.nextDouble=function(){return(i.x=1e4*Math.sin(i.seed++))-Math.floor(i.x)},e.exports=i},function(e,t,r){var i=r(5);function n(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}mt(n,"Transform"),n.prototype.getWorldOrgX=function(){return this.lworldOrgX},n.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},n.prototype.getWorldOrgY=function(){return this.lworldOrgY},n.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},n.prototype.getWorldExtX=function(){return this.lworldExtX},n.prototype.setWorldExtX=function(e){this.lworldExtX=e},n.prototype.getWorldExtY=function(){return this.lworldExtY},n.prototype.setWorldExtY=function(e){this.lworldExtY=e},n.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},n.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},n.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},n.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},n.prototype.getDeviceExtX=function(){return this.ldeviceExtX},n.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},n.prototype.getDeviceExtY=function(){return this.ldeviceExtY},n.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},n.prototype.transformX=function(e){var t=this.lworldExtX;return 0!=t?this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/t:0},n.prototype.transformY=function(e){var t=this.lworldExtY;return 0!=t?this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/t:0},n.prototype.inverseTransformX=function(e){var t=this.ldeviceExtX;return 0!=t?this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/t:0},n.prototype.inverseTransformY=function(e){var t=this.ldeviceExtY;return 0!=t?this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/t:0},n.prototype.inverseTransformPoint=function(e){return new i(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=n},function(e,t,r){function d(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}mt(d,"_toConsumableArray");var i,n=r(15),p=r(4),l=r(0),h=r(8),c=r(9);function a(){n.call(this),this.useSmartIdealEdgeLengthCalculation=p.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=p.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=p.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=p.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=p.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*p.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=p.MAX_ITERATIONS}for(i in mt(a,"FDLayout"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];a.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=p.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},a.prototype.calcIdealEdgeLengths=function(){for(var e,t,r,i,n,a,s=this.getGraphManager().getAllEdges(),o=0;o<s.length;o++)t=(e=s[o]).idealLength,e.isInterGraph&&(r=e.getSource(),i=e.getTarget(),n=e.getSourceInLca().getEstimatedSize(),a=e.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(e.idealLength+=n+a-2*l.SIMPLE_NODE_SIZE),n=e.getLca().getInclusionTreeDepth(),e.idealLength+=t*p.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(r.getInclusionTreeDepth()+i.getInclusionTreeDepth()-2*n))},a.prototype.initSpringEmbedder=function(){var e=this.getAllNodes().length;this.incremental?(e>p.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*p.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-p.ADAPTATION_LOWER_NODE_LIMIT)/(p.ADAPTATION_UPPER_NODE_LIMIT-p.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-p.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=p.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>p.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(p.COOLING_ADAPTATION_FACTOR,1-(e-p.ADAPTATION_LOWER_NODE_LIMIT)/(p.ADAPTATION_UPPER_NODE_LIMIT-p.ADAPTATION_LOWER_NODE_LIMIT)*(1-p.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=p.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*p.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var e,t=this.getAllEdges(),r=0;r<t.length;r++)e=t[r],this.calcSpringForce(e,e.idealLength)},a.prototype.calcRepulsionForces=function(){var e,t,r,i,n,a=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],s=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%p.GRID_CALCULATION_CHECK_PERIOD==1&&a&&this.updateGrid(),n=new Set,e=0;e<o.length;e++)r=o[e],this.calculateRepulsionForceOfANode(r,n,a,s),n.add(r);else for(e=0;e<o.length;e++)for(r=o[e],t=e+1;t<o.length;t++)i=o[t],r.getOwner()==i.getOwner()&&this.calcRepulsionForce(r,i)},a.prototype.calcGravitationalForces=function(){for(var e,t=this.getAllNodesToApplyGravitation(),r=0;r<t.length;r++)e=t[r],this.calcGravitationalForce(e)},a.prototype.moveNodes=function(){for(var e=this.getAllNodes(),t=0;t<e.length;t++)e[t].move()},a.prototype.calcSpringForce=function(e,t){var r,i,n=e.getSource(),a=e.getTarget();if(this.uniformLeafNodeSizes&&null==n.getChild()&&null==a.getChild())e.updateLengthSimple();else if(e.updateLength(),e.isOverlapingSourceAndTarget)return;0!=(r=e.getLength())&&(t=e.edgeElasticity*(r-t),i=e.lengthY/r*t,n.springForceX+=e=e.lengthX/r*t,n.springForceY+=i,a.springForceX-=e,a.springForceY-=i)},a.prototype.calcRepulsionForce=function(e,t){var r,i,n,a=e.getRect(),s=t.getRect(),o=new Array(2),l=new Array(4);a.intersects(s)?(h.calcSeparationAmount(a,s,o,p.DEFAULT_EDGE_LENGTH/2),i=2*o[0],n=2*o[1],o=e.noOfChildren*t.noOfChildren/(e.noOfChildren+t.noOfChildren),e.repulsionForceX-=o*i,e.repulsionForceY-=o*n,t.repulsionForceX+=o*i,t.repulsionForceY+=o*n):(o=this.uniformLeafNodeSizes&&null==e.getChild()&&null==t.getChild()?(r=s.getCenterX()-a.getCenterX(),s.getCenterY()-a.getCenterY()):(h.getIntersection(a,s,l),r=l[2]-l[0],l[3]-l[1]),a=(r=Math.abs(r)<p.MIN_REPULSION_DIST?c.sign(r)*p.MIN_REPULSION_DIST:r)*r+(o=Math.abs(o)<p.MIN_REPULSION_DIST?c.sign(o)*p.MIN_REPULSION_DIST:o)*o,s=Math.sqrt(a),n=(l=(e.nodeRepulsion/2+t.nodeRepulsion/2)*e.noOfChildren*t.noOfChildren/a)*o/s,e.repulsionForceX-=i=l*r/s,e.repulsionForceY-=n,t.repulsionForceX+=i,t.repulsionForceY+=n)},a.prototype.calcGravitationalForce=function(e){var t,r=e.getOwner(),i=(r.getRight()+r.getLeft())/2,n=(r.getTop()+r.getBottom())/2,i=e.getCenterX()-i,n=e.getCenterY()-n,a=Math.abs(i)+e.getWidth()/2,s=Math.abs(n)+e.getHeight()/2;e.getOwner()==this.graphManager.getRoot()?((t=r.getEstimatedSize()*this.gravityRangeFactor)<a||t<s)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*n):((t=r.getEstimatedSize()*this.compoundGravityRangeFactor)<a||t<s)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*n*this.compoundGravityConstant)},a.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,e||t},a.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},a.prototype.calcNoOfChildrenForAllNodes=function(){for(var e,t=this.graphManager.getAllNodes(),r=0;r<t.length;r++)(e=t[r]).noOfChildren=e.getNoOfChildren()},a.prototype.calcGrid=function(e){for(var t=parseInt(Math.ceil((e.getRight()-e.getLeft())/this.repulsionRange)),r=parseInt(Math.ceil((e.getBottom()-e.getTop())/this.repulsionRange)),i=new Array(t),n=0;n<t;n++)i[n]=new Array(r);for(n=0;n<t;n++)for(var a=0;a<r;a++)i[n][a]=new Array;return i},a.prototype.addNodeToGrid=function(e,t,r){for(var i=parseInt(Math.floor((e.getRect().x-t)/this.repulsionRange)),n=parseInt(Math.floor((e.getRect().width+e.getRect().x-t)/this.repulsionRange)),a=parseInt(Math.floor((e.getRect().y-r)/this.repulsionRange)),s=parseInt(Math.floor((e.getRect().height+e.getRect().y-r)/this.repulsionRange)),o=i;o<=n;o++)for(var l=a;l<=s;l++)this.grid[o][l].push(e),e.setGridCoordinates(i,n,a,s)},a.prototype.updateGrid=function(){var e,t,r=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),e=0;e<r.length;e++)t=r[e],this.addNodeToGrid(t,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},a.prototype.calculateRepulsionForceOfANode=function(e,t,r,i){if(this.totalIterations%p.GRID_CALCULATION_CHECK_PERIOD==1&&r||i){var n=new Set;e.surrounding=new Array;for(var a=this.grid,s=e.startX-1;s<e.finishX+2;s++)for(var o=e.startY-1;o<e.finishY+2;o++)if(!(s<0||o<0||s>=a.length||o>=a[0].length))for(var l=0;l<a[s][o].length;l++){var h,c,u=a[s][o][l];e.getOwner()!=u.getOwner()||e==u||t.has(u)||n.has(u)||(h=Math.abs(e.getCenterX()-u.getCenterX())-(e.getWidth()/2+u.getWidth()/2),c=Math.abs(e.getCenterY()-u.getCenterY())-(e.getHeight()/2+u.getHeight()/2),h<=this.repulsionRange&&c<=this.repulsionRange&&n.add(u))}e.surrounding=[].concat(d(n))}for(s=0;s<e.surrounding.length;s++)this.calcRepulsionForce(e,e.surrounding[s])},a.prototype.calcRepulsionRange=function(){return 0},e.exports=a},function(e,t,r){var i,n=r(1),a=r(4);function s(e,t,r){n.call(this,e,t,r),this.idealLength=a.DEFAULT_EDGE_LENGTH,this.edgeElasticity=a.DEFAULT_SPRING_STRENGTH}for(i in mt(s,"FDLayoutEdge"),s.prototype=Object.create(n.prototype),n)s[i]=n[i];e.exports=s},function(e,t,r){var i,n=r(3),a=r(4);function s(e,t,r,i){n.call(this,e,t,r,i),this.nodeRepulsion=a.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(i in mt(s,"FDLayoutNode"),s.prototype=Object.create(n.prototype),n)s[i]=n[i];s.prototype.setGridCoordinates=function(e,t,r,i){this.startX=e,this.finishX=t,this.startY=r,this.finishY=i},e.exports=s},function(e,t,r){function i(e,t){this.width=0,this.height=0,null!==e&&null!==t&&(this.height=t,this.width=e)}mt(i,"DimensionD"),i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(e){this.width=e},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(e){this.height=e},e.exports=i},function(e,t,r){var i=r(14);function n(){this.map={},this.keys=[]}mt(n,"HashMap"),n.prototype.put=function(e,t){var r=i.createID(e);this.contains(r)||(this.map[r]=t,this.keys.push(e))},n.prototype.contains=function(e){return i.createID(e),null!=this.map[e]},n.prototype.get=function(e){return e=i.createID(e),this.map[e]},n.prototype.keySet=function(){return this.keys},e.exports=n},function(e,t,r){var i=r(14);function n(){this.set={}}mt(n,"HashSet"),n.prototype.add=function(e){var t=i.createID(e);this.contains(t)||(this.set[t]=e)},n.prototype.remove=function(e){delete this.set[i.createID(e)]},n.prototype.clear=function(){this.set={}},n.prototype.contains=function(e){return this.set[i.createID(e)]==e},n.prototype.isEmpty=function(){return 0===this.size()},n.prototype.size=function(){return Object.keys(this.set).length},n.prototype.addAllTo=function(e){for(var t=Object.keys(this.set),r=t.length,i=0;i<r;i++)e.push(this.set[t[i]])},n.prototype.size=function(){return Object.keys(this.set).length},n.prototype.addAll=function(e){for(var t=e.length,r=0;r<t;r++){var i=e[r];this.add(i)}},e.exports=n},function(e,t,r){function i(){}mt(i,"Matrix"),i.multMat=function(e,t){for(var r=[],i=0;i<e.length;i++){r[i]=[];for(var n=0;n<t[0].length;n++)for(var a=r[i][n]=0;a<e[0].length;a++)r[i][n]+=e[i][a]*t[a][n]}return r},i.transpose=function(e){for(var t=[],r=0;r<e[0].length;r++){t[r]=[];for(var i=0;i<e.length;i++)t[r][i]=e[i][r]}return t},i.multCons=function(e,t){for(var r=[],i=0;i<e.length;i++)r[i]=e[i]*t;return r},i.minusOp=function(e,t){for(var r=[],i=0;i<e.length;i++)r[i]=e[i]-t[i];return r},i.dotProduct=function(e,t){for(var r=0,i=0;i<e.length;i++)r+=e[i]*t[i];return r},i.mag=function(e){return Math.sqrt(this.dotProduct(e,e))},i.normalize=function(e){for(var t=[],r=this.mag(e),i=0;i<e.length;i++)t[i]=e[i]/r;return t},i.multGamma=function(e){for(var t=[],r=0,i=0;i<e.length;i++)r+=e[i];r*=-1/e.length;for(var n=0;n<e.length;n++)t[n]=r+e[n];return t},i.multL=function(e,t,r){for(var i=[],n=[],a=[],s=0;s<t[0].length;s++){for(var o=0,l=0;l<t.length;l++)o+=-.5*t[l][s]*e[l];n[s]=o}for(var h=0;h<r.length;h++){for(var c=0,u=0;u<r.length;u++)c+=r[h][u]*n[u];a[h]=c}for(var d=0;d<t.length;d++){for(var p=0,g=0;g<t[0].length;g++)p+=t[d][g]*a[g];i[d]=p}return i},e.exports=i},function(e,t,r){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}mt(i,"defineProperties"),mt(n,"_classCallCheck");var a,s,o=r(11),r=(mt(l,"Quicksort"),a=l,s=[{key:"_quicksort",value:mt(function(e,t,r){var i;t<r&&(i=this._partition(e,t,r),this._quicksort(e,t,i),this._quicksort(e,i+1,r))},"_quicksort")},{key:"_partition",value:mt(function(e,t,r){for(var i=this._get(e,t),n=t,a=r;;){for(;this.compareFunction(i,this._get(e,a));)a--;for(;this.compareFunction(this._get(e,n),i);)n++;if(!(n<a))return a;this._swap(e,n,a),n++,a--}},"_partition")},{key:"_get",value:mt(function(e,t){return e instanceof o?e.get_object_at(t):e[t]},"_get")},{key:"_set",value:mt(function(e,t,r){e instanceof o?e.set_object_at(t,r):e[t]=r},"_set")},{key:"_swap",value:mt(function(e,t,r){var i=this._get(e,t);this._set(e,t,this._get(e,r)),this._set(e,r,i)},"_swap")},{key:"_defaultCompareFunction",value:mt(function(e,t){return e<t},"_defaultCompareFunction")}],i(a.prototype,s),l);function l(e,t){n(this,l),null===t&&void 0===t||(this.compareFunction=this._defaultCompareFunction),t=void 0,t=e instanceof o?e.size():e.length,this._quicksort(e,0,t-1)}e.exports=r},function(e,t,r){function Ae(){}mt(Ae,"SVD"),Ae.svd=function(e){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=e.length,this.n=e[0].length;var t,B=Math.min(this.m,this.n);this.s=(e=>{for(var t=[];0<e--;)t.push(0);return t})(Math.min(this.m+1,this.n)),this.U=(t=[this.m,B],mt(function e(t){if(0==t.length)return 0;for(var r=[],i=0;i<t[0];i++)r.push(e(t.slice(1)));return r},"allocate")(t)),this.V=(t=[this.n,this.n],mt(function e(t){if(0==t.length)return 0;for(var r=[],i=0;i<t[0];i++)r.push(e(t.slice(1)));return r},"allocate")(t));for(var P,$,F,r=(e=>{for(var t=[];0<e--;)t.push(0);return t})(this.n),z=(e=>{for(var t=[];0<e--;)t.push(0);return t})(this.m),i=Math.min(this.m-1,this.n),n=Math.max(0,Math.min(this.n-2,this.m)),a=0;a<Math.max(i,n);a++){if(a<i){this.s[a]=0;for(var q=a;q<this.m;q++)this.s[a]=Ae.hypot(this.s[a],e[q][a]);if(0!==this.s[a]){e[a][a]<0&&(this.s[a]=-this.s[a]);for(var W=a;W<this.m;W++)e[W][a]/=this.s[a];e[a][a]+=1}this.s[a]=-this.s[a]}for(var s=a+1;s<this.n;s++){if(F=0!==this.s[a],a<i&&F){for(var U=0,G=a;G<this.m;G++)U+=e[G][a]*e[G][s];for(var U=-U/e[a][a],j=a;j<this.m;j++)e[j][s]+=U*e[j][a]}r[s]=e[a][s]}if(a<i)for(var V=a;V<this.m;V++)this.U[V][a]=e[V][a];if(a<n){r[a]=0;for(var Y=a+1;Y<this.n;Y++)r[a]=Ae.hypot(r[a],r[Y]);if(0!==r[a]){r[a+1]<0&&(r[a]=-r[a]);for(var H=a+1;H<this.n;H++)r[H]/=r[a];r[a+1]+=1}if(r[a]=-r[a],P=a+1<this.m,$=0!==r[a],P&&$){for(var X=a+1;X<this.m;X++)z[X]=0;for(var K=a+1;K<this.n;K++)for(var Z=a+1;Z<this.m;Z++)z[Z]+=r[K]*e[Z][K];for(var Q=a+1;Q<this.n;Q++)for(var J=-r[Q]/r[a+1],ee=a+1;ee<this.m;ee++)e[ee][Q]+=J*z[ee]}for(var te=a+1;te<this.n;te++)this.V[te][a]=r[te]}}var o=Math.min(this.n,this.m+1);i<this.n&&(this.s[i]=e[i][i]),this.m<o&&(this.s[o-1]=0),n+1<o&&(r[n]=e[n][o-1]),r[o-1]=0;for(var l=i;l<B;l++){for(var re=0;re<this.m;re++)this.U[re][l]=0;this.U[l][l]=1}for(var h=i-1;0<=h;h--)if(0!==this.s[h]){for(var ie=h+1;ie<B;ie++){for(var ne=0,ae=h;ae<this.m;ae++)ne+=this.U[ae][h]*this.U[ae][ie];for(var ne=-ne/this.U[h][h],se=h;se<this.m;se++)this.U[se][ie]+=ne*this.U[se][h]}for(var oe=h;oe<this.m;oe++)this.U[oe][h]=-this.U[oe][h];this.U[h][h]=1+this.U[h][h];for(var le=0;le<h-1;le++)this.U[le][h]=0}else{for(var he=0;he<this.m;he++)this.U[he][h]=0;this.U[h][h]=1}for(var ce,c=this.n-1;0<=c;c--){if(ce=0!==r[c],c<n&&ce)for(var ue=c+1;ue<B;ue++){for(var de=0,pe=c+1;pe<this.n;pe++)de+=this.V[pe][c]*this.V[pe][ue];for(var de=-de/this.V[c+1][c],ge=c+1;ge<this.n;ge++)this.V[ge][ue]+=de*this.V[ge][c]}for(var fe=0;fe<this.n;fe++)this.V[fe][c]=0;this.V[c][c]=1}for(var me=o-1,ye=Math.pow(2,-52),ve=Math.pow(2,-966);0<o;){for(var u=void 0,d=void 0,u=o-2;-1<=u&&-1!==u;u--)if(Math.abs(r[u])<=ve+ye*(Math.abs(this.s[u])+Math.abs(this.s[u+1]))){r[u]=0;break}if(u===o-2)d=4;else{for(var p=void 0,p=o-1;u<=p&&p!==u;p--){var xe=(p!==o?Math.abs(r[p]):0)+(p!==u+1?Math.abs(r[p-1]):0);if(Math.abs(this.s[p])<=ve+ye*xe){this.s[p]=0;break}}p===u?d=3:p===o-1?d=1:(d=2,u=p)}switch(u++,d){case 1:var be=r[o-2];r[o-2]=0;for(var g=o-2;u<=g;g--){var f=Ae.hypot(this.s[g],be),Te=this.s[g]/f,ke=be/f;this.s[g]=f,g!==u&&(be=-ke*r[g-1],r[g-1]=Te*r[g-1]);for(var m=0;m<this.n;m++)f=Te*this.V[m][g]+ke*this.V[m][o-1],this.V[m][o-1]=-ke*this.V[m][g]+Te*this.V[m][o-1],this.V[m][g]=f}break;case 2:var we=r[u-1];r[u-1]=0;for(var y=u;y<o;y++){var v=Ae.hypot(this.s[y],we),Ce=this.s[y]/v,Ee=we/v;this.s[y]=v,we=-Ee*r[y],r[y]=Ce*r[y];for(var x=0;x<this.m;x++)v=Ce*this.U[x][y]+Ee*this.U[x][u-1],this.U[x][u-1]=-Ee*this.U[x][y]+Ce*this.U[x][u-1],this.U[x][y]=v}break;case 3:var b=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[o-1]),Math.abs(this.s[o-2])),Math.abs(r[o-2])),Math.abs(this.s[u])),Math.abs(r[u])),T=this.s[o-1]/b,k=this.s[o-2]/b,w=r[o-2]/b,Se=this.s[u]/b,b=r[u]/b,k=((k+T)*(k-T)+w*w)/2,w=T*w*(T*w),C=0;0==k&&0==w||(C=Math.sqrt(k*k+w),C=w/(k+(k<0?-C:C)));for(var E=(Se+T)*(Se-T)+C,S=Se*b,_=u;_<o-1;_++){var A=Ae.hypot(E,S),L=E/A,R=S/A;_!==u&&(r[_-1]=A),E=L*this.s[_]+R*r[_],r[_]=L*r[_]-R*this.s[_],S=R*this.s[_+1],this.s[_+1]=L*this.s[_+1];for(var I=0;I<this.n;I++)A=L*this.V[I][_]+R*this.V[I][_+1],this.V[I][_+1]=-R*this.V[I][_]+L*this.V[I][_+1],this.V[I][_]=A;if(L=E/(A=Ae.hypot(E,S)),R=S/A,this.s[_]=A,E=L*r[_]+R*this.s[_+1],this.s[_+1]=-R*r[_]+L*this.s[_+1],S=R*r[_+1],r[_+1]=L*r[_+1],_<this.m-1)for(var N=0;N<this.m;N++)A=L*this.U[N][_]+R*this.U[N][_+1],this.U[N][_+1]=-R*this.U[N][_]+L*this.U[N][_+1],this.U[N][_]=A}r[o-2]=E;break;case 4:if(this.s[u]<=0&&(this.s[u]=this.s[u]<0?-this.s[u]:0,1))for(var _e=0;_e<=me;_e++)this.V[_e][u]=-this.V[_e][u];for(;u<me&&!(this.s[u]>=this.s[u+1]);){var D=this.s[u];if(this.s[u]=this.s[u+1],this.s[u+1]=D,u<this.n-1)for(var M=0;M<this.n;M++)D=this.V[M][u+1],this.V[M][u+1]=this.V[M][u],this.V[M][u]=D;if(u<this.m-1)for(var O=0;O<this.m;O++)D=this.U[O][u+1],this.U[O][u+1]=this.U[O][u],this.U[O][u]=D;u++}o--}}return{U:this.U,V:this.V,S:this.s}},Ae.hypot=function(e,t){var r=void 0;return Math.abs(e)>Math.abs(t)?(r=t/e,Math.abs(e)*Math.sqrt(1+r*r)):0!=t?(r=e/t,Math.abs(t)*Math.sqrt(1+r*r)):0},e.exports=Ae},function(e,t,r){var i,n;function a(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:-1,n=4<arguments.length&&void 0!==arguments[4]?arguments[4]:-1;h(this,c),this.sequence1=e,this.sequence2=t,this.match_score=r,this.mismatch_penalty=i,this.gap_penalty=n,this.iMax=e.length+1,this.jMax=t.length+1,this.grid=new Array(this.iMax);for(var a=0;a<this.iMax;a++){this.grid[a]=new Array(this.jMax);for(var s=0;s<this.jMax;s++)this.grid[a][s]=0}this.tracebackGrid=new Array(this.iMax);for(var o=0;o<this.iMax;o++){this.tracebackGrid[o]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[o][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}mt(a,"defineProperties"),mt(h,"_classCallCheck"),mt(c,"NeedlemanWunsch"),i=c,n=[{key:"getScore",value:mt(function(){return this.score},"getScore")},{key:"getAlignments",value:mt(function(){return this.alignments},"getAlignments")},{key:"computeGrids",value:mt(function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var t=1;t<this.iMax;t++)this.grid[t][0]=this.grid[t-1][0]+this.gap_penalty,this.tracebackGrid[t][0]=[!1,!0,!1];for(var r=1;r<this.iMax;r++)for(var i=1;i<this.jMax;i++){var n=[this.sequence1[r-1]===this.sequence2[i-1]?this.grid[r-1][i-1]+this.match_score:this.grid[r-1][i-1]+this.mismatch_penalty,this.grid[r-1][i]+this.gap_penalty,this.grid[r][i-1]+this.gap_penalty],a=this.arrayAllMaxIndexes(n);this.grid[r][i]=n[a[0]],this.tracebackGrid[r][i]=[a.includes(0),a.includes(1),a.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]},"computeGrids")},{key:"alignmentTraceback",value:mt(function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});e[0];){var t=e[0],r=this.tracebackGrid[t.pos[0]][t.pos[1]];r[0]&&e.push({pos:[t.pos[0]-1,t.pos[1]-1],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),r[1]&&e.push({pos:[t.pos[0]-1,t.pos[1]],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:"-"+t.seq2}),r[2]&&e.push({pos:[t.pos[0],t.pos[1]-1],seq1:"-"+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),0===t.pos[0]&&0===t.pos[1]&&this.alignments.push({sequence1:t.seq1,sequence2:t.seq2}),e.shift()}return this.alignments},"alignmentTraceback")},{key:"getAllIndexes",value:mt(function(e,t){for(var r=[],i=-1;-1!==(i=e.indexOf(t,i+1));)r.push(i);return r},"getAllIndexes")},{key:"arrayAllMaxIndexes",value:mt(function(e){return this.getAllIndexes(e,Math.max.apply(null,e))},"arrayAllMaxIndexes")}],a(i.prototype,n),e.exports=c},function(e,t,r){var i=mt(function(){},"layoutBase");i.FDLayout=r(18),i.FDLayoutConstants=r(4),i.FDLayoutEdge=r(19),i.FDLayoutNode=r(20),i.DimensionD=r(21),i.HashMap=r(22),i.HashSet=r(23),i.IGeometry=r(8),i.IMath=r(9),i.Integer=r(10),i.Point=r(12),i.PointD=r(5),i.RandomSeed=r(16),i.RectangleD=r(13),i.Transform=r(17),i.UniqueIDGeneretor=r(14),i.Quicksort=r(25),i.LinkedList=r(11),i.LGraphObject=r(2),i.LGraph=r(6),i.LEdge=r(1),i.LGraphManager=r(7),i.LNode=r(3),i.Layout=r(15),i.LayoutConstants=r(0),i.NeedlemanWunsch=r(27),i.Matrix=r(24),i.SVD=r(26),e.exports=i},function(e,t,r){function i(){this.listeners=[]}mt(i,"Emitter");var n=i.prototype;n.addListener=function(e,t){this.listeners.push({event:e,callback:t})},n.removeListener=function(e,t){for(var r=this.listeners.length;0<=r;r--){var i=this.listeners[r];i.event===e&&i.callback===t&&this.listeners.splice(r,1)}},n.emit=function(e,t){for(var r=0;r<this.listeners.length;r++){var i=this.listeners[r];e===i.event&&i.callback(t)}},e.exports=i}],n={},mt(i,"__webpack_require__"),i.m=r,i.c=n,i.i=function(e){return e},i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},i.n=function(e){var t=e&&e.__esModule?mt(function(){return e.default},"getDefault"):mt(function(){return e},"getModuleExports");return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=28);function i(e){var t;return(n[e]||(t=n[e]={i:e,l:!1,exports:{}},r[e].call(t.exports,t,t.exports,i),t.l=!0,t)).exports}var r,n})}),_Ue=tYe((r,i)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t(SUe()):"function"==typeof define&&define.amd?define(["layout-base"],t):"object"==typeof r?r.coseBase=t(SUe()):e.coseBase=t(e.layoutBase)},"webpackUniversalModuleDefinition")(r,function(t){return i={45:(e,t,r)=>{var i={};i.layoutBase=r(551),i.CoSEConstants=r(806),i.CoSEEdge=r(767),i.CoSEGraph=r(880),i.CoSEGraphManager=r(578),i.CoSELayout=r(765),i.CoSENode=r(991),i.ConstraintHandler=r(902),e.exports=i},806:(e,t,r)=>{var i,n=r(551).FDLayoutConstants;function a(){}for(i in mt(a,"CoSEConstants"),n)a[i]=n[i];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,a.ENFORCE_CONSTRAINTS=!0,a.APPLY_LAYOUT=!0,a.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,a.TREE_REDUCTION_ON_INCREMENTAL=!0,a.PURE_INCREMENTAL=a.DEFAULT_INCREMENTAL,e.exports=a},767:(e,t,r)=>{var i,n=r(551).FDLayoutEdge;function a(e,t,r){n.call(this,e,t,r)}for(i in mt(a,"CoSEEdge"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];e.exports=a},880:(e,t,r)=>{var i,n=r(551).LGraph;function a(e,t,r){n.call(this,e,t,r)}for(i in mt(a,"CoSEGraph"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];e.exports=a},578:(e,t,r)=>{var i,n=r(551).LGraphManager;function a(e){n.call(this,e)}for(i in mt(a,"CoSEGraphManager"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];e.exports=a},765:(e,t,r)=>{var i,n=r(551).FDLayout,a=r(578),s=r(880),c=r(991),o=r(767),f=r(806),l=r(902),m=r(551).FDLayoutConstants,u=r(551).LayoutConstants,d=r(551).Point,p=r(551).PointD,h=r(551).DimensionD,g=r(551).Layout,y=r(551).Integer,v=r(551).IGeometry,x=r(551).LGraph,b=r(551).Transform,T=r(551).LinkedList;function k(){n.call(this),this.toBeTiled={},this.constraints={}}for(i in mt(k,"CoSELayout"),k.prototype=Object.create(n.prototype),n)k[i]=n[i];k.prototype.newGraphManager=function(){var e=new a(this);return this.graphManager=e},k.prototype.newGraph=function(e){return new s(null,this.graphManager,e)},k.prototype.newNode=function(e){return new c(this.graphManager,e)},k.prototype.newEdge=function(e){return new o(null,null,e)},k.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.isSubLayout||(f.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=f.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=f.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=m.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=m.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=m.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=m.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},k.prototype.initSpringEmbedder=function(){n.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/m.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},k.prototype.layout=function(){return u.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},k.prototype.classicLayout=function(){var e,t,r;return 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?f.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),t=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(e){return t.has(e)}),this.graphManager.setAllNodesToApplyGravitation(r)):0<(e=this.getFlatForest()).length?this.positionNodesRadially(e):(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),t=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(e){return t.has(e)}),this.graphManager.setAllNodesToApplyGravitation(r),this.positionNodesRandomly()),0<Object.keys(this.constraints).length&&(l.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),f.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},k.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(0<this.prunedNodesAll.length))return!0;this.isTreeGrowing=!0}if(this.totalIterations%m.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(0<this.prunedNodesAll.length))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(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))}var t;if(this.isTreeGrowing&&(this.growTreeIterations%10==0&&(0<this.prunedNodesAll.length?(this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation(),t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)}),this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),f.PURE_INCREMENTAL?this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL):(this.isTreeGrowing=!1,this.isGrowthFinished=!0)),this.growTreeIterations++),this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),f.PURE_INCREMENTAL?this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var e=!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(e,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},k.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},r=0;r<e.length;r++){var i=e[r].rect,n=e[r].id;t[n]={id:n,x:i.getCenterX(),y:i.getCenterY(),w:i.width,h:i.height}}return t},k.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var e=!1;if("during"===m.ANIMATE)this.emit("layoutstarted");else{for(;!e;)e=this.tick();this.graphManager.updateBounds()}},k.prototype.moveNodes=function(){for(var e=this.getAllNodes(),t=0;t<e.length;t++)e[t].calculateDisplacement();for(0<Object.keys(this.constraints).length&&this.updateDisplacements(),t=0;t<e.length;t++)e[t].move()},k.prototype.initConstraintVariables=function(){var s=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var e=this.graphManager.getAllNodes(),t=0;t<e.length;t++){var r=e[t];this.idToNodeMap.set(r.id,r)}var i=mt(function e(t){for(var r,i=t.getChild().getNodes(),n=0,a=0;a<i.length;a++)null==(r=i[a]).getChild()?s.fixedNodeSet.has(r.id)&&(n+=100):n+=e(r);return n},"calculateCompoundWeight");if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(e){s.fixedNodeSet.add(e.nodeId)});for(var n,e=this.graphManager.getAllNodes(),t=0;t<e.length;t++)null!=(r=e[t]).getChild()&&0<(n=i(r))&&(r.fixedNodeWeight=n)}if(this.constraints.relativePlacementConstraint){var a,o,l,h,c=new Map,u=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(e){s.fixedNodesOnHorizontal.add(e),s.fixedNodesOnVertical.add(e)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var d=this.constraints.alignmentConstraint.vertical,t=0;t<d.length;t++)this.dummyToNodeForVerticalAlignment.set("dummy"+t,[]),d[t].forEach(function(e){c.set(e,"dummy"+t),s.dummyToNodeForVerticalAlignment.get("dummy"+t).push(e),s.fixedNodeSet.has(e)&&s.fixedNodesOnHorizontal.add("dummy"+t)});if(this.constraints.alignmentConstraint.horizontal)for(var p=this.constraints.alignmentConstraint.horizontal,t=0;t<p.length;t++)this.dummyToNodeForHorizontalAlignment.set("dummy"+t,[]),p[t].forEach(function(e){u.set(e,"dummy"+t),s.dummyToNodeForHorizontalAlignment.get("dummy"+t).push(e),s.fixedNodeSet.has(e)&&s.fixedNodesOnVertical.add("dummy"+t)})}f.RELAX_MOVEMENT_ON_CONSTRAINTS?(this.shuffle=function(e){for(var t,r,i=e.length-1;i>=2*e.length/3;i--)t=Math.floor(Math.random()*(i+1)),r=e[i],e[i]=e[t],e[t]=r;return e},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(e){var t,r;e.left?(r=c.has(e.left)?c.get(e.left):e.left,t=c.has(e.right)?c.get(e.right):e.right,s.nodesInRelativeHorizontal.includes(r)||(s.nodesInRelativeHorizontal.push(r),s.nodeToRelativeConstraintMapHorizontal.set(r,[]),s.dummyToNodeForVerticalAlignment.has(r)?s.nodeToTempPositionMapHorizontal.set(r,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(r,s.idToNodeMap.get(r).getCenterX())),s.nodesInRelativeHorizontal.includes(t)||(s.nodesInRelativeHorizontal.push(t),s.nodeToRelativeConstraintMapHorizontal.set(t,[]),s.dummyToNodeForVerticalAlignment.has(t)?s.nodeToTempPositionMapHorizontal.set(t,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(t)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(t,s.idToNodeMap.get(t).getCenterX())),s.nodeToRelativeConstraintMapHorizontal.get(r).push({right:t,gap:e.gap}),s.nodeToRelativeConstraintMapHorizontal.get(t).push({left:r,gap:e.gap})):(t=u.has(e.top)?u.get(e.top):e.top,r=u.has(e.bottom)?u.get(e.bottom):e.bottom,s.nodesInRelativeVertical.includes(t)||(s.nodesInRelativeVertical.push(t),s.nodeToRelativeConstraintMapVertical.set(t,[]),s.dummyToNodeForHorizontalAlignment.has(t)?s.nodeToTempPositionMapVertical.set(t,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(t)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(t,s.idToNodeMap.get(t).getCenterY())),s.nodesInRelativeVertical.includes(r)||(s.nodesInRelativeVertical.push(r),s.nodeToRelativeConstraintMapVertical.set(r,[]),s.dummyToNodeForHorizontalAlignment.has(r)?s.nodeToTempPositionMapVertical.set(r,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(r)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(r,s.idToNodeMap.get(r).getCenterY())),s.nodeToRelativeConstraintMapVertical.get(t).push({bottom:r,gap:e.gap}),s.nodeToRelativeConstraintMapVertical.get(r).push({top:t,gap:e.gap}))})):(a=new Map,o=new Map,this.constraints.relativePlacementConstraint.forEach(function(e){var t,r;e.left?(r=c.has(e.left)?c.get(e.left):e.left,t=c.has(e.right)?c.get(e.right):e.right,a.has(r)?a.get(r).push(t):a.set(r,[t]),a.has(t)?a.get(t).push(r):a.set(t,[r])):(t=u.has(e.top)?u.get(e.top):e.top,r=u.has(e.bottom)?u.get(e.bottom):e.bottom,o.has(t)?o.get(t).push(r):o.set(t,[r]),o.has(r)?o.get(r).push(t):o.set(r,[t]))}),h=(l=mt(function(i,n){var a=[],s=[],o=new T,l=new Set,h=0;return i.forEach(function(e,t){if(!l.has(t)){for(a[h]=[],s[h]=!1,o.push(r=t),l.add(r),a[h].push(r);0!=o.length;){var r=o.shift();n.has(r)&&(s[h]=!0),i.get(r).forEach(function(e){l.has(e)||(o.push(e),l.add(e),a[h].push(e))})}h++}}),{components:a,isFixed:s}},"constructComponents"))(a,s.fixedNodesOnHorizontal),this.componentsOnHorizontal=h.components,this.fixedComponentsOnHorizontal=h.isFixed,h=l(o,s.fixedNodesOnVertical),this.componentsOnVertical=h.components,this.fixedComponentsOnVertical=h.isFixed)}},k.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(e){(e=n.idToNodeMap.get(e.nodeId)).displacementX=0,e.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var e=this.constraints.alignmentConstraint.vertical,t=0;t<e.length;t++){for(var r=0,i=0;i<e[t].length;i++){if(this.fixedNodeSet.has(e[t][i])){r=0;break}r+=this.idToNodeMap.get(e[t][i]).displacementX}for(var a=r/e[t].length,i=0;i<e[t].length;i++)this.idToNodeMap.get(e[t][i]).displacementX=a}if(this.constraints.alignmentConstraint.horizontal)for(var s=this.constraints.alignmentConstraint.horizontal,t=0;t<s.length;t++){for(var o=0,i=0;i<s[t].length;i++){if(this.fixedNodeSet.has(s[t][i])){o=0;break}o+=this.idToNodeMap.get(s[t][i]).displacementY}for(var l=o/s[t].length,i=0;i<s[t].length;i++)this.idToNodeMap.get(s[t][i]).displacementY=l}}if(this.constraints.relativePlacementConstraint)if(f.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(r){var i;n.fixedNodesOnHorizontal.has(r)||(i=0,i=(n.dummyToNodeForVerticalAlignment.has(r)?n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(r)[0]):n.idToNodeMap.get(r)).displacementX,n.nodeToRelativeConstraintMapHorizontal.get(r).forEach(function(e){var t;e.right?(t=n.nodeToTempPositionMapHorizontal.get(e.right)-n.nodeToTempPositionMapHorizontal.get(r)-i)<e.gap&&(i-=e.gap-t):(t=n.nodeToTempPositionMapHorizontal.get(r)-n.nodeToTempPositionMapHorizontal.get(e.left)+i)<e.gap&&(i+=e.gap-t)}),n.nodeToTempPositionMapHorizontal.set(r,n.nodeToTempPositionMapHorizontal.get(r)+i),n.dummyToNodeForVerticalAlignment.has(r)?n.dummyToNodeForVerticalAlignment.get(r).forEach(function(e){n.idToNodeMap.get(e).displacementX=i}):n.idToNodeMap.get(r).displacementX=i)}),this.nodesInRelativeVertical.forEach(function(r){var i;n.fixedNodesOnHorizontal.has(r)||(i=0,i=(n.dummyToNodeForHorizontalAlignment.has(r)?n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(r)[0]):n.idToNodeMap.get(r)).displacementY,n.nodeToRelativeConstraintMapVertical.get(r).forEach(function(e){var t;e.bottom?(t=n.nodeToTempPositionMapVertical.get(e.bottom)-n.nodeToTempPositionMapVertical.get(r)-i)<e.gap&&(i-=e.gap-t):(t=n.nodeToTempPositionMapVertical.get(r)-n.nodeToTempPositionMapVertical.get(e.top)+i)<e.gap&&(i+=e.gap-t)}),n.nodeToTempPositionMapVertical.set(r,n.nodeToTempPositionMapVertical.get(r)+i),n.dummyToNodeForHorizontalAlignment.has(r)?n.dummyToNodeForHorizontalAlignment.get(r).forEach(function(e){n.idToNodeMap.get(e).displacementY=i}):n.idToNodeMap.get(r).displacementY=i)});else{for(t=0;t<this.componentsOnHorizontal.length;t++){var h=this.componentsOnHorizontal[t];if(this.fixedComponentsOnHorizontal[t])for(i=0;i<h.length;i++)this.dummyToNodeForVerticalAlignment.has(h[i])?this.dummyToNodeForVerticalAlignment.get(h[i]).forEach(function(e){n.idToNodeMap.get(e).displacementX=0}):this.idToNodeMap.get(h[i]).displacementX=0;else{for(var c=0,u=0,i=0;i<h.length;i++)this.dummyToNodeForVerticalAlignment.has(h[i])?(c+=(p=this.dummyToNodeForVerticalAlignment.get(h[i])).length*this.idToNodeMap.get(p[0]).displacementX,u+=p.length):(c+=this.idToNodeMap.get(h[i]).displacementX,u++);for(var d=c/u,i=0;i<h.length;i++)this.dummyToNodeForVerticalAlignment.has(h[i])?this.dummyToNodeForVerticalAlignment.get(h[i]).forEach(function(e){n.idToNodeMap.get(e).displacementX=d}):this.idToNodeMap.get(h[i]).displacementX=d}}for(t=0;t<this.componentsOnVertical.length;t++)if(h=this.componentsOnVertical[t],this.fixedComponentsOnVertical[t])for(i=0;i<h.length;i++)this.dummyToNodeForHorizontalAlignment.has(h[i])?this.dummyToNodeForHorizontalAlignment.get(h[i]).forEach(function(e){n.idToNodeMap.get(e).displacementY=0}):this.idToNodeMap.get(h[i]).displacementY=0;else{for(var p,c=0,u=0,i=0;i<h.length;i++)this.dummyToNodeForHorizontalAlignment.has(h[i])?(c+=(p=this.dummyToNodeForHorizontalAlignment.get(h[i])).length*this.idToNodeMap.get(p[0]).displacementY,u+=p.length):(c+=this.idToNodeMap.get(h[i]).displacementY,u++);for(d=c/u,i=0;i<h.length;i++)this.dummyToNodeForHorizontalAlignment.has(h[i])?this.dummyToNodeForHorizontalAlignment.get(h[i]).forEach(function(e){n.idToNodeMap.get(e).displacementY=d}):this.idToNodeMap.get(h[i]).displacementY=d}}},k.prototype.calculateNodesToApplyGravitationTo=function(){for(var e,t=[],r=this.graphManager.getGraphs(),i=r.length,n=0;n<i;n++)(e=r[n]).updateConnected(),e.isConnected||(t=t.concat(e.getNodes()));return t},k.prototype.createBendpoints=function(){for(var e=(e=[]).concat(this.graphManager.getAllEdges()),t=new Set,r=0;r<e.length;r++){var i=e[r];if(!t.has(i)){var n=i.getSource(),a=i.getTarget();if(n==a)i.getBendpoints().push(new p),i.getBendpoints().push(new p),this.createDummyNodesForBendpoints(i),t.add(i);else{var s=(s=(s=[]).concat(n.getEdgeListToNode(a))).concat(a.getEdgeListToNode(n));if(!t.has(s[0])){if(1<s.length)for(var o=0;o<s.length;o++){var l=s[o];l.getBendpoints().push(new p),this.createDummyNodesForBendpoints(l)}s.forEach(function(e){t.add(e)})}}}if(t.size==e.length)break}},k.prototype.positionNodesRadially=function(e){for(var t=new d(0,0),r=Math.ceil(Math.sqrt(e.length)),i=0,n=0,a=0,s=new p(0,0),o=0;o<e.length;o++){o%r==0&&(n=i,(a=0)!=o&&(n+=f.DEFAULT_COMPONENT_SEPERATION),i=0);var l=e[o],h=g.findCenterOfTree(l);t.x=a,t.y=n,(s=k.radialLayout(l,h,t)).y>i&&(i=Math.floor(s.y)),a=Math.floor(s.x+f.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(u.WORLD_CENTER_X-s.x/2,u.WORLD_CENTER_Y-s.y/2))},k.radialLayout=function(e,t,r){var i=Math.max(this.maxDiagonalInTree(e),f.DEFAULT_RADIAL_SEPARATION),t=(k.branchRadialLayout(t,null,0,359,0,i),x.calculateBounds(e)),n=new b;n.setDeviceOrgX(t.getMinX()),n.setDeviceOrgY(t.getMinY()),n.setWorldOrgX(r.x),n.setWorldOrgY(r.y);for(var a=0;a<e.length;a++)e[a].transform(n);return i=new p(t.getMaxX(),t.getMaxY()),n.inverseTransformPoint(i)},k.branchRadialLayout=function(e,t,r,i,n,a){(s=(i-r+1)/2)<0&&(s+=180);var s=(s+r)%360*v.TWO_PI/360,o=(Math.cos(s),n*Math.cos(s)),s=n*Math.sin(s),l=(e.setCenter(o,s),[]),h=(l=l.concat(e.getEdges())).length;null!=t&&h--;for(var c=0,u=l.length,d=e.getEdgesBetween(t);1<d.length;){var p=d[0];d.splice(0,1),0<=(p=l.indexOf(p))&&l.splice(p,1),u--,h--}for(var o=null!=t?(l.indexOf(d[0])+1)%u:0,g=Math.abs(i-r)/h,f=o;c!=h;f=++f%u){var m=l[f].getOtherEnd(e);m!=t&&(k.branchRadialLayout(m,e,m=(r+c*g)%360,(m+g)%360,n+a,a),c++)}},k.maxDiagonalInTree=function(e){for(var t=y.MIN_VALUE,r=0;r<e.length;r++){var i=e[r].getDiagonal();t<i&&(t=i)}return t},k.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},k.prototype.groupZeroDegreeMembers=function(){var l=this,h={};this.memberGroups={},this.idToDummyNode={};for(var e=[],t=this.graphManager.getAllNodes(),r=0;r<t.length;r++){var i=(n=t[r]).getParent();0!==this.getNodeDegreeWithChildren(n)||null!=i.id&&this.getToBeTiled(i)||e.push(n)}for(r=0;r<e.length;r++){var n,a=(n=e[r]).getParent().id;"u"<typeof h[a]&&(h[a]=[]),h[a]=h[a].concat(n)}Object.keys(h).forEach(function(e){if(1<h[e].length){var t="DummyCompound_"+e,r=(l.memberGroups[t]=h[e],h[e][0].getParent()),i=new c(l.graphManager),n=(i.id=t,i.paddingLeft=r.paddingLeft||0,i.paddingRight=r.paddingRight||0,i.paddingBottom=r.paddingBottom||0,i.paddingTop=r.paddingTop||0,l.idToDummyNode[t]=i,l.getGraphManager().add(l.newGraph(),i)),a=r.getChild();a.add(i);for(var s=0;s<h[e].length;s++){var o=h[e][s];a.remove(o),n.add(o)}}})},k.prototype.clearCompounds=function(){var e={},t={};this.performDFSOnCompounds();for(var r=0;r<this.compoundOrder.length;r++)t[this.compoundOrder[r].id]=this.compoundOrder[r],e[this.compoundOrder[r].id]=[].concat(this.compoundOrder[r].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[r].getChild()),this.compoundOrder[r].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(e,t)},k.prototype.clearZeroDegreeMembers=function(){var i=this,n=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(e){var t,r=i.idToDummyNode[e];n[e]=i.tileNodes(i.memberGroups[e],r.paddingLeft+r.paddingRight),r.rect.width=n[e].width,r.rect.height=n[e].height,r.setCenter(n[e].centerX,n[e].centerY),r.labelMarginLeft=0,r.labelMarginTop=0,f.NODE_DIMENSIONS_INCLUDE_LABELS&&(e=r.rect.width,t=r.rect.height,r.labelWidth&&("left"==r.labelPosHorizontal?(r.rect.x-=r.labelWidth,r.setWidth(e+r.labelWidth),r.labelMarginLeft=r.labelWidth):"center"==r.labelPosHorizontal&&r.labelWidth>e?(r.rect.x-=(r.labelWidth-e)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-e)/2):"right"==r.labelPosHorizontal&&r.setWidth(e+r.labelWidth)),r.labelHeight)&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(t+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>t?(r.rect.y-=(r.labelHeight-t)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-t)/2):"bottom"==r.labelPosVertical&&r.setHeight(t+r.labelHeight))})},k.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;0<=e;e--){var t=this.compoundOrder[e],r=t.id;this.adjustLocations(this.tiledMemberPack[r],t.rect.x,t.rect.y,t.paddingLeft,t.paddingTop,t.labelMarginLeft,t.labelMarginTop)}},k.prototype.repopulateZeroDegreeMembers=function(){var i=this,n=this.tiledZeroDegreePack;Object.keys(n).forEach(function(e){var t=i.idToDummyNode[e],r=t.paddingLeft;i.adjustLocations(n[e],t.rect.x,t.rect.y,r,t.paddingTop,t.labelMarginLeft,t.labelMarginTop)})},k.prototype.getToBeTiled=function(e){var t=e.id;if(null!=this.toBeTiled[t])return this.toBeTiled[t];if(null==(e=e.getChild()))return this.toBeTiled[t]=!1;for(var r=e.getNodes(),i=0;i<r.length;i++){var n=r[i];if(0<this.getNodeDegree(n))return this.toBeTiled[t]=!1;if(null==n.getChild())this.toBeTiled[n.id]=!1;else if(!this.getToBeTiled(n))return this.toBeTiled[t]=!1}return this.toBeTiled[t]=!0},k.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),r=0,i=0;i<t.length;i++){var n=t[i];n.getSource().id!==n.getTarget().id&&(r+=1)}return r},k.prototype.getNodeDegreeWithChildren=function(e){var t=this.getNodeDegree(e);if(null!=e.getChild())for(var r=e.getChild().getNodes(),i=0;i<r.length;i++){var n=r[i];t+=this.getNodeDegreeWithChildren(n)}return t},k.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},k.prototype.fillCompexOrderByDFS=function(e){for(var t=0;t<e.length;t++){var r=e[t];null!=r.getChild()&&this.fillCompexOrderByDFS(r.getChild().getNodes()),this.getToBeTiled(r)&&this.compoundOrder.push(r)}},k.prototype.adjustLocations=function(e,t,r,i,n,a,s){r+=n+s;for(var o=t+=i+a,l=0;l<e.rows.length;l++){var h=e.rows[l];t=o;for(var c=0,u=0;u<h.length;u++){var d=h[u];d.rect.x=t,d.rect.y=r,t+=d.rect.width+e.horizontalPadding,d.rect.height>c&&(c=d.rect.height)}r+=c+e.verticalPadding}},k.prototype.tileCompoundMembers=function(i,n){var a=this;this.tiledMemberPack=[],Object.keys(i).forEach(function(e){var t,r=n[e];a.tiledMemberPack[e]=a.tileNodes(i[e],r.paddingLeft+r.paddingRight),r.rect.width=a.tiledMemberPack[e].width,r.rect.height=a.tiledMemberPack[e].height,r.setCenter(a.tiledMemberPack[e].centerX,a.tiledMemberPack[e].centerY),r.labelMarginLeft=0,r.labelMarginTop=0,f.NODE_DIMENSIONS_INCLUDE_LABELS&&(e=r.rect.width,t=r.rect.height,r.labelWidth&&("left"==r.labelPosHorizontal?(r.rect.x-=r.labelWidth,r.setWidth(e+r.labelWidth),r.labelMarginLeft=r.labelWidth):"center"==r.labelPosHorizontal&&r.labelWidth>e?(r.rect.x-=(r.labelWidth-e)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-e)/2):"right"==r.labelPosHorizontal&&r.setWidth(e+r.labelWidth)),r.labelHeight)&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(t+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>t?(r.rect.y-=(r.labelHeight-t)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-t)/2):"bottom"==r.labelPosVertical&&r.setHeight(t+r.labelHeight))})},k.prototype.tileNodes=function(e,t){var r=this.tileNodesByFavoringDim(e,t,!0),e=this.tileNodesByFavoringDim(e,t,!1),t=this.getOrgRatio(r);return this.getOrgRatio(e)<t?e:r},k.prototype.getOrgRatio=function(e){return(e=e.width/e.height)<1?1/e:e},k.prototype.calcIdealRowWidth=function(e,t){var r,i=f.TILING_PADDING_VERTICAL,n=f.TILING_PADDING_HORIZONTAL,a=e.length,s=0,o=0,l=0,e=(e.forEach(function(e){s+=e.getWidth(),o+=e.getHeight(),e.getWidth()>l&&(l=e.getWidth())}),s/a),h=o/a,h=Math.pow(i-n,2)+4*(e+n)*(h+i)*a,a=(n-i+Math.sqrt(h))/(2*(e+n));return t?(r=Math.ceil(a))==a&&r++:r=Math.floor(a),((i=r*(e+n)-n)<l?l:i)+2*n},k.prototype.tileNodesByFavoringDim=function(e,t,r){var i=f.TILING_PADDING_VERTICAL,n=f.TILING_PADDING_HORIZONTAL,a=f.TILING_COMPARE_BY,s={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:i,horizontalPadding:n,centerX:0,centerY:0},o=(a&&(s.idealRowWidth=this.calcIdealRowWidth(e,r)),mt(function(e){return e.rect.width*e.rect.height},"getNodeArea")),l=mt(function(e,t){return o(t)-o(e)},"areaCompareFcn");e.sort(function(e,t){var r=l;return s.idealRowWidth?(r=a)(e.id,t.id):r(e,t)});for(var h=0,c=0,u=0;u<e.length;u++)h+=(p=e[u]).getCenterX(),c+=p.getCenterY();for(s.centerX=h/e.length,s.centerY=c/e.length,u=0;u<e.length;u++){var d,p=e[u];0==s.rows.length?this.insertNodeToRow(s,p,0,t):this.canAddHorizontal(s,p.rect.width,p.rect.height)?(d=s.rows.length-1,s.idealRowWidth||(d=this.getShortestRowIndex(s)),this.insertNodeToRow(s,p,d,t)):this.insertNodeToRow(s,p,s.rows.length,t),this.shiftToLastRow(s)}return s},k.prototype.insertNodeToRow=function(e,t,r,i){r==e.rows.length&&(e.rows.push([]),e.rowWidth.push(i),e.rowHeight.push(0));var i=e.rowWidth[r]+t.rect.width,i=(0<e.rows[r].length&&(i+=e.horizontalPadding),e.rowWidth[r]=i,e.width<i&&(e.width=i),t.rect.height),n=(0<r&&(i+=e.verticalPadding),0);i>e.rowHeight[r]&&(n=e.rowHeight[r],e.rowHeight[r]=i,n=e.rowHeight[r]-n),e.height+=n,e.rows[r].push(t)},k.prototype.getShortestRowIndex=function(e){for(var t=-1,r=Number.MAX_VALUE,i=0;i<e.rows.length;i++)e.rowWidth[i]<r&&(t=i,r=e.rowWidth[i]);return t},k.prototype.getLongestRowIndex=function(e){for(var t=-1,r=Number.MIN_VALUE,i=0;i<e.rows.length;i++)e.rowWidth[i]>r&&(t=i,r=e.rowWidth[i]);return t},k.prototype.canAddHorizontal=function(e,t,r){var i,n,a;return e.idealRowWidth?(n=e.rows.length-1,e.rowWidth[n]+t+e.horizontalPadding<=e.idealRowWidth):(n=this.getShortestRowIndex(e))<0||(a=e.rowWidth[n])+e.horizontalPadding+t<=e.width||(i=0,e.rowHeight[n]<r&&0<n&&(i=r+e.verticalPadding-e.rowHeight[n]),n=t+e.horizontalPadding<=e.width-a?(e.height+i)/(a+t+e.horizontalPadding):(e.height+i)/e.width,i=r+e.verticalPadding,(n=n<1?1/n:n)<((a=e.width<t?(e.height+i)/t:(e.height+i)/e.width)<1?1/a:a))},k.prototype.shiftToLastRow=function(e){var t=this.getLongestRowIndex(e),r=e.rowWidth.length-1,i=e.rows[t],n=i[i.length-1],a=n.width+e.horizontalPadding;if(e.width-e.rowWidth[r]>a&&t!=r){i.splice(-1,1),e.rows[r].push(n),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[r]=e.rowWidth[r]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var s=Number.MIN_VALUE,o=0;o<i.length;o++)i[o].height>s&&(s=i[o].height);0<t&&(s+=e.verticalPadding),a=e.rowHeight[t]+e.rowHeight[r],e.rowHeight[t]=s,e.rowHeight[r]<n.height+e.verticalPadding&&(e.rowHeight[r]=n.height+e.verticalPadding),n=e.rowHeight[t]+e.rowHeight[r],e.height+=n-a,this.shiftToLastRow(e)}},k.prototype.tilingPreLayout=function(){f.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},k.prototype.tilingPostLayout=function(){f.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},k.prototype.reduceTrees=function(){for(var e=[],t=!0;t;){for(var r,i,n=this.graphManager.getAllNodes(),a=[],t=!1,s=0;s<n.length;s++)1!=(i=n[s]).getEdges().length||i.getEdges()[0].isInterGraph||null!=i.getChild()||(f.PURE_INCREMENTAL?(r=i.getEdges()[0].getOtherEnd(i),r=new h(i.getCenterX()-r.getCenterX(),i.getCenterY()-r.getCenterY()),a.push([i,i.getEdges()[0],i.getOwner(),r])):a.push([i,i.getEdges()[0],i.getOwner()]),t=!0);if(1==t){for(var o=[],l=0;l<a.length;l++)1==a[l][0].getEdges().length&&(o.push(a[l]),a[l][0].getOwner().remove(a[l][0]));e.push(o),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},k.prototype.growTree=function(e){for(var t,r=e[e.length-1],i=0;i<r.length;i++)t=r[i],this.findPlaceforPrunedNode(t),t[2].add(t[0]),t[2].add(t[1],t[1].source,t[1].target);e.splice(e.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},k.prototype.findPlaceforPrunedNode=function(e){var t=e[0],r=t==e[1].source?e[1].target:e[1].source;if(f.PURE_INCREMENTAL)t.setCenter(r.getCenterX()+e[3].getWidth(),r.getCenterY()+e[3].getHeight());else{var i=r.startX,n=r.finishX,a=r.startY,s=r.finishY,o=[0,0,0,0];if(0<a)for(var l=i;l<=n;l++)o[0]+=this.grid[l][a-1].length+this.grid[l][a].length-1;if(n<this.grid.length-1)for(l=a;l<=s;l++)o[1]+=this.grid[n+1][l].length+this.grid[n][l].length-1;if(s<this.grid[0].length-1)for(l=i;l<=n;l++)o[2]+=this.grid[l][s+1].length+this.grid[l][s].length-1;if(0<i)for(l=a;l<=s;l++)o[3]+=this.grid[i-1][l].length+this.grid[i][l].length-1;for(var h,c,u,d,p=y.MAX_VALUE,g=0;g<o.length;g++)o[g]<p?(p=o[g],h=1,c=g):o[g]==p&&h++;3==h&&0==p?0==o[0]&&0==o[1]&&0==o[2]?u=1:0==o[0]&&0==o[1]&&0==o[3]?u=0:0==o[0]&&0==o[2]&&0==o[3]?u=3:0==o[1]&&0==o[2]&&0==o[3]&&(u=2):u=2==h&&0==p?(d=Math.floor(2*Math.random()),0==o[0]&&0==o[1]?0==d?0:1:0==o[0]&&0==o[2]?0==d?0:2:0==o[0]&&0==o[3]?0==d?0:3:0==o[1]&&0==o[2]?0==d?1:2:0==o[1]&&0==o[3]?0==d?1:3:0==d?2:3):4==h&&0==p?d=Math.floor(4*Math.random()):c,0==u?t.setCenter(r.getCenterX(),r.getCenterY()-r.getHeight()/2-m.DEFAULT_EDGE_LENGTH-t.getHeight()/2):1==u?t.setCenter(r.getCenterX()+r.getWidth()/2+m.DEFAULT_EDGE_LENGTH+t.getWidth()/2,r.getCenterY()):2==u?t.setCenter(r.getCenterX(),r.getCenterY()+r.getHeight()/2+m.DEFAULT_EDGE_LENGTH+t.getHeight()/2):t.setCenter(r.getCenterX()-r.getWidth()/2-m.DEFAULT_EDGE_LENGTH-t.getWidth()/2,r.getCenterY())}},e.exports=k},991:(e,t,r)=>{var i,n=r(551).FDLayoutNode,a=r(551).IMath;function s(e,t,r,i){n.call(this,e,t,r,i)}for(i in mt(s,"CoSENode"),s.prototype=Object.create(n.prototype),n)s[i]=n[i];s.prototype.calculateDisplacement=function(){var e=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*a.sign(this.displacementY)),this.child&&0<this.child.getNodes().length&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},s.prototype.propogateDisplacementToChildren=function(e,t){for(var r,i=this.getChild().getNodes(),n=0;n<i.length;n++)null==(r=i[n]).getChild()?(r.displacementX+=e,r.displacementY+=t):r.propogateDisplacementToChildren(e,t)},s.prototype.move=function(){var e=this.graphManager.getLayout();null!=this.child&&0!=this.child.getNodes().length||(this.moveBy(this.displacementX,this.displacementY),e.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},s.prototype.setPred1=function(e){this.pred1=e},s.prototype.getPred1=function(){return pred1},s.prototype.getPred2=function(){return pred2},s.prototype.setNext=function(e){this.next=e},s.prototype.getNext=function(){return next},s.prototype.setProcessed=function(e){this.processed=e},s.prototype.isProcessed=function(){return processed},e.exports=s},902:(e,t,r)=>{function Be(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}mt(Be,"_toConsumableArray");var Pe=r(806),$e=r(551).LinkedList,Fe=r(551).Matrix,ze=r(551).SVD;function i(){}mt(i,"ConstraintHandler"),i.handleConstraints=function(e){var t={};t.fixedNodeConstraint=e.constraints.fixedNodeConstraint,t.alignmentConstraint=e.constraints.alignmentConstraint,t.relativePlacementConstraint=e.constraints.relativePlacementConstraint;for(var r=new Map,k=new Map,w=[],C=[],i=e.getAllNodes(),B=0,n=0;n<i.length;n++){var a=i[n];null==a.getChild()&&(k.set(a.id,B++),w.push(a.getCenterX()),C.push(a.getCenterY()),r.set(a.id,a))}t.relativePlacementConstraint&&t.relativePlacementConstraint.forEach(function(e){e.gap||0==e.gap||(e.left?e.gap=Pe.DEFAULT_EDGE_LENGTH+r.get(e.left).getWidth()/2+r.get(e.right).getWidth()/2:e.gap=Pe.DEFAULT_EDGE_LENGTH+r.get(e.top).getHeight()/2+r.get(e.bottom).getHeight()/2)});var s,P=mt(function(e,t){return{x:e.x-t.x,y:e.y-t.y}},"calculatePositionDiff"),o=mt(function(e){var t=0,r=0;return e.forEach(function(e){t+=w[k.get(e)],r+=C[k.get(e)]}),{x:t/e.size,y:r/e.size}},"calculateAvgPosition"),e=mt(function(e,x,c,b,t){function n(e,t){var r=new Set(e),i=!0,e=!1,n=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var o=a.value;r.add(o)}}catch(t){e=!0,n=t}finally{try{!i&&s.return&&s.return()}finally{if(e)throw n}}return r}mt(n,"setUnion");var a=new Map,T=(e.forEach(function(e,t){a.set(t,0)}),e.forEach(function(e,t){e.forEach(function(e){a.set(e.id,a.get(e.id)+1)})}),new Map),s=new Map,o=new $e;a.forEach(function(e,t){0==e?(o.push(t),c||("horizontal"==x?T.set(t,k.has(t)?w[k.get(t)]:b.get(t)):T.set(t,k.has(t)?C[k.get(t)]:b.get(t)))):T.set(t,Number.NEGATIVE_INFINITY),c&&s.set(t,new Set([t]))}),c&&t.forEach(function(e){var t,r,i=[];e.forEach(function(e){c.has(e)&&i.push(e)}),0<i.length?(t=0,i.forEach(function(e){"horizontal"==x?T.set(e,k.has(e)?w[k.get(e)]:b.get(e)):T.set(e,k.has(e)?C[k.get(e)]:b.get(e)),t+=T.get(e)}),t/=i.length,e.forEach(function(e){c.has(e)||T.set(e,t)})):(r=0,e.forEach(function(e){r+="horizontal"==x?k.has(e)?w[k.get(e)]:b.get(e):k.has(e)?C[k.get(e)]:b.get(e)}),r/=e.length,e.forEach(function(e){T.set(e,r)}))});for(var u,d,r=mt(function(){var i=o.shift();e.get(i).forEach(function(e){var t,r;T.get(e.id)<T.get(i)+e.gap&&(c&&c.has(e.id)?(r="horizontal"==x?k.has(e.id)?w[k.get(e.id)]:b.get(e.id):k.has(e.id)?C[k.get(e.id)]:b.get(e.id),T.set(e.id,r),r<T.get(i)+e.gap&&(t=T.get(i)+e.gap-r,s.get(i).forEach(function(e){T.set(e,T.get(e)-t)}))):T.set(e.id,T.get(i)+e.gap)),a.set(e.id,a.get(e.id)-1),0==a.get(e.id)&&o.push(e.id),c&&s.set(e.id,n(s.get(i),s.get(e.id)))})},"_loop");0!=o.length;)r();return c&&(u=new Set,e.forEach(function(e,t){0==e.length&&u.add(t)}),d=[],s.forEach(function(r,e){if(u.has(e)){var i,n,t=!1,a=!0,e=!1,s=void 0;try{for(var o,l=r[Symbol.iterator]();!(a=(o=l.next()).done);a=!0){var h=o.value;c.has(h)&&(t=!0)}}catch(t){e=!0,s=t}finally{try{!a&&l.return&&l.return()}finally{if(e)throw s}}t||(i=!1,n=void 0,d.forEach(function(e,t){e.has([].concat(Be(r))[0])&&(i=!0,n=t)}),i?r.forEach(function(e){d[n].add(e)}):d.push(new Set(r)))}}),d.forEach(function(e,t){var r=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY,s=!0,o=!1,l=void 0;try{for(var h,c=e[Symbol.iterator]();!(s=(h=c.next()).done);s=!0){var u=h.value,d="horizontal"==x?k.has(u)?w[k.get(u)]:b.get(u):k.has(u)?C[k.get(u)]:b.get(u),p=T.get(u);d<r&&(r=d),n<d&&(n=d),p<i&&(i=p),a<p&&(a=p)}}catch(e){o=!0,l=e}finally{try{!s&&c.return&&c.return()}finally{if(o)throw l}}var g=(r+n)/2-(i+a)/2,f=!0,o=!1,l=void 0;try{for(var m,y=e[Symbol.iterator]();!(f=(m=y.next()).done);f=!0){var v=m.value;T.set(v,T.get(v)+g)}}catch(e){o=!0,l=e}finally{try{!f&&y.return&&y.return()}finally{if(o)throw l}}})),T},"findAppropriatePositionForRelativePlacement"),l=mt(function(e){var t=0,r=0,i=0,n=0;if(e.forEach(function(e){e.left?0<=w[k.get(e.left)]-w[k.get(e.right)]?t++:r++:0<=C[k.get(e.top)]-C[k.get(e.bottom)]?i++:n++}),r<t&&n<i)for(var a=0;a<k.size;a++)w[a]=-1*w[a],C[a]=-1*C[a];else if(r<t)for(var s=0;s<k.size;s++)w[s]=-1*w[s];else if(n<i)for(var o=0;o<k.size;o++)C[o]=-1*C[o]},"applyReflectionForRelativePlacement"),$=mt(function(i){var n=[],a=new $e,s=new Set,o=0;return i.forEach(function(e,t){if(!s.has(t)){for(n[o]=[],a.push(r=t),s.add(r),n[o].push(r);0!=a.length;){var r=a.shift();i.get(r).forEach(function(e){s.has(e.id)||(a.push(e.id),s.add(e.id),n[o].push(e.id))})}o++}}),n},"findComponents"),F=mt(function(e){var r=new Map;return e.forEach(function(e,t){r.set(t,[])}),e.forEach(function(e,t){e.forEach(function(e){r.get(t).push(e),r.get(e.id).push({id:t,gap:e.gap,direction:e.direction})})}),r},"dagToUndirected"),z=mt(function(e){var r=new Map;return e.forEach(function(e,t){r.set(t,[])}),e.forEach(function(e,t){e.forEach(function(e){r.get(e.id).push({id:t,gap:e.gap,direction:e.direction})})}),r},"dagToReversed"),h=[],c=[],u=!1,d=!1,p=new Set,g=new Map,f=new Map,m=[];if(t.fixedNodeConstraint&&t.fixedNodeConstraint.forEach(function(e){p.add(e.nodeId)}),t.relativePlacementConstraint&&(t.relativePlacementConstraint.forEach(function(e){e.left?(g.has(e.left)?g.get(e.left).push({id:e.right,gap:e.gap,direction:"horizontal"}):g.set(e.left,[{id:e.right,gap:e.gap,direction:"horizontal"}]),g.has(e.right)||g.set(e.right,[])):(g.has(e.top)?g.get(e.top).push({id:e.bottom,gap:e.gap,direction:"vertical"}):g.set(e.top,[{id:e.bottom,gap:e.gap,direction:"vertical"}]),g.has(e.bottom)||g.set(e.bottom,[]))}),m=$(f=F(g))),Pe.TRANSFORM_ON_CONSTRAINT_HANDLING){if(t.fixedNodeConstraint&&1<t.fixedNodeConstraint.length)t.fixedNodeConstraint.forEach(function(e,t){h[t]=[e.position.x,e.position.y],c[t]=[w[k.get(e.nodeId)],C[k.get(e.nodeId)]]}),u=!0;else if(t.alignmentConstraint){var y=0;if(t.alignmentConstraint.vertical){for(var q=t.alignmentConstraint.vertical,W=mt(function(e){var t=new Set,r=(q[e].forEach(function(e){t.add(e)}),new Set([].concat(Be(t)).filter(function(e){return p.has(e)}))),i=0<r.size?w[k.get(r.values().next().value)]:o(t).x;q[e].forEach(function(e){h[y]=[i,C[k.get(e)]],c[y]=[w[k.get(e)],C[k.get(e)]],y++})},"_loop2"),U=0;U<q.length;U++)W(U);u=!0}if(t.alignmentConstraint.horizontal){for(var G=t.alignmentConstraint.horizontal,j=mt(function(e){var t=new Set,r=(G[e].forEach(function(e){t.add(e)}),new Set([].concat(Be(t)).filter(function(e){return p.has(e)}))),i=0<r.size?w[k.get(r.values().next().value)]:o(t).y;G[e].forEach(function(e){h[y]=[w[k.get(e)],i],c[y]=[w[k.get(e)],C[k.get(e)]],y++})},"_loop3"),V=0;V<G.length;V++)j(V);u=!0}t.relativePlacementConstraint&&(d=!0)}else if(t.relativePlacementConstraint){for(var v,x,b,Y,H,X=0,K=0,T=0;T<m.length;T++)m[T].length>X&&(X=m[T].length,K=T);X<f.size/2?(l(t.relativePlacementConstraint),d=u=!1):(v=new Map,x=new Map,b=[],m[K].forEach(function(t){g.get(t).forEach(function(e){"horizontal"==e.direction?(v.has(t)?v.get(t).push(e):v.set(t,[e]),v.has(e.id)||v.set(e.id,[]),b.push({left:t,right:e.id})):(x.has(t)?x.get(t).push(e):x.set(t,[e]),x.has(e.id)||x.set(e.id,[]),b.push({top:t,bottom:e.id}))})}),l(b),d=!1,Y=e(v,"horizontal"),H=e(x,"vertical"),m[K].forEach(function(e,t){c[t]=[w[k.get(e)],C[k.get(e)]],h[t]=[],Y.has(e)?h[t][0]=Y.get(e):h[t][0]=w[k.get(e)],H.has(e)?h[t][1]=H.get(e):h[t][1]=C[k.get(e)]}),u=!0)}if(u){for(var E=Fe.transpose(h),Z=Fe.transpose(c),S=0;S<E.length;S++)E[S]=Fe.multGamma(E[S]),Z[S]=Fe.multGamma(Z[S]);for(var f=Fe.multMat(E,Fe.transpose(Z)),u=ze.svd(f),_=Fe.multMat(u.V,Fe.transpose(u.U)),A=0;A<k.size;A++){var Q=[w[A],C[A]],J=[_[0][0],_[1][0]],ee=[_[0][1],_[1][1]];w[A]=Fe.dotProduct(Q,J),C[A]=Fe.dotProduct(Q,ee)}d&&l(t.relativePlacementConstraint)}}if(Pe.ENFORCE_CONSTRAINTS){if(t.fixedNodeConstraint&&0<t.fixedNodeConstraint.length&&(s={x:0,y:0},t.fixedNodeConstraint.forEach(function(e,t){var r={x:w[k.get(e.nodeId)],y:C[k.get(e.nodeId)]},e=e.position,e=P(e,r);s.x+=e.x,s.y+=e.y}),s.x/=t.fixedNodeConstraint.length,s.y/=t.fixedNodeConstraint.length,w.forEach(function(e,t){w[t]+=s.x}),C.forEach(function(e,t){C[t]+=s.y}),t.fixedNodeConstraint.forEach(function(e){w[k.get(e.nodeId)]=e.position.x,C[k.get(e.nodeId)]=e.position.y})),t.alignmentConstraint){if(t.alignmentConstraint.vertical)for(var te=t.alignmentConstraint.vertical,re=mt(function(e){var t=new Set,r=(te[e].forEach(function(e){t.add(e)}),0<(e=new Set([].concat(Be(t)).filter(function(e){return p.has(e)}))).size?w[k.get(e.values().next().value)]:o(t).x);t.forEach(function(e){p.has(e)||(w[k.get(e)]=r)})},"_loop4"),ie=0;ie<te.length;ie++)re(ie);if(t.alignmentConstraint.horizontal)for(var ne=t.alignmentConstraint.horizontal,ae=mt(function(e){var t=new Set,r=(ne[e].forEach(function(e){t.add(e)}),0<(e=new Set([].concat(Be(t)).filter(function(e){return p.has(e)}))).size?C[k.get(e.values().next().value)]:o(t).y);t.forEach(function(e){p.has(e)||(C[k.get(e)]=r)})},"_loop5"),se=0;se<ne.length;se++)ae(se)}if(t.relativePlacementConstraint){var L=new Map,R=new Map,I=new Map,N=new Map,oe=new Map,le=new Map,he=new Set,ce=new Set;if(p.forEach(function(e){he.add(e),ce.add(e)}),t.alignmentConstraint){if(t.alignmentConstraint.vertical)for(var ue=t.alignmentConstraint.vertical,de=mt(function(t){I.set("dummy"+t,[]),ue[t].forEach(function(e){L.set(e,"dummy"+t),I.get("dummy"+t).push(e),p.has(e)&&he.add("dummy"+t)}),oe.set("dummy"+t,w[k.get(ue[t][0])])},"_loop6"),pe=0;pe<ue.length;pe++)de(pe);if(t.alignmentConstraint.horizontal)for(var ge=t.alignmentConstraint.horizontal,fe=mt(function(t){N.set("dummy"+t,[]),ge[t].forEach(function(e){R.set(e,"dummy"+t),N.get("dummy"+t).push(e),p.has(e)&&ce.add("dummy"+t)}),le.set("dummy"+t,C[k.get(ge[t][0])])},"_loop7"),me=0;me<ge.length;me++)fe(me)}var D=new Map,M=new Map,ye=mt(function(i){g.get(i).forEach(function(e){var t=void 0,r=void 0;"horizontal"==e.direction?(t=L.get(i)?L.get(i):i,r=L.get(e.id)?{id:L.get(e.id),gap:e.gap,direction:e.direction}:e,D.has(t)?D.get(t).push(r):D.set(t,[r]),D.has(r.id)||D.set(r.id,[])):(t=R.get(i)?R.get(i):i,r=R.get(e.id)?{id:R.get(e.id),gap:e.gap,direction:e.direction}:e,M.has(t)?M.get(t).push(r):M.set(t,[r]),M.has(r.id)||M.set(r.id,[]))})},"_loop8"),ve=!0,f=!1,u=void 0;try{for(var xe,be=g.keys()[Symbol.iterator]();!(ve=(xe=be.next()).done);ve=!0)ye(xe.value)}catch(e){f=!0,u=e}finally{try{!ve&&be.return&&be.return()}finally{if(f)throw u}}var f=F(D),u=F(M),f=$(f),u=$(u),Te=z(D),ke=z(M),we=[],Ce=[],Ee=(f.forEach(function(e,t){we[t]=[],e.forEach(function(e){0==Te.get(e).length&&we[t].push(e)})}),u.forEach(function(e,t){Ce[t]=[],e.forEach(function(e){0==ke.get(e).length&&Ce[t].push(e)})}),e(D,"horizontal",he,oe,we)),Se=e(M,"vertical",ce,le,Ce),_e=mt(function(t){I.get(t)?I.get(t).forEach(function(e){w[k.get(e)]=Ee.get(t)}):w[k.get(t)]=Ee.get(t)},"_loop9"),Ae=!0,f=!1,u=void 0;try{for(var Le,Re=Ee.keys()[Symbol.iterator]();!(Ae=(Le=Re.next()).done);Ae=!0)_e(Le.value)}catch(e){f=!0,u=e}finally{try{!Ae&&Re.return&&Re.return()}finally{if(f)throw u}}var Ie=mt(function(t){N.get(t)?N.get(t).forEach(function(e){C[k.get(e)]=Se.get(t)}):C[k.get(t)]=Se.get(t)},"_loop10"),Ne=!0,f=!1,u=void 0;try{for(var De,Me=Se.keys()[Symbol.iterator]();!(Ne=(De=Me.next()).done);Ne=!0)Ie(De.value)}catch(e){f=!0,u=e}finally{try{!Ne&&Me.return&&Me.return()}finally{if(f)throw u}}}}for(var Oe=0;Oe<i.length;Oe++){var O=i[Oe];null==O.getChild()&&O.setCenter(w[k.get(O.id)],C[k.get(O.id)])}},e.exports=i},551:e=>{e.exports=t}},n={},mt(r,"__webpack_require__"),r(45);function r(e){var t=n[e];return void 0===t&&(t=n[e]={exports:{}},i[e](t,t.exports,r)),t.exports}var i,n})}),AUe=tYe((r,i)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t(_Ue()):"function"==typeof define&&define.amd?define(["cose-base"],t):"object"==typeof r?r.cytoscapeFcose=t(_Ue()):e.cytoscapeFcose=t(e.coseBase)},"webpackUniversalModuleDefinition")(r,function(t){return i={658:e=>{e.exports=null!=Object.assign?Object.assign.bind(Object):function(r){for(var e=arguments.length,t=Array(1<e?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];return t.forEach(function(t){Object.keys(t).forEach(function(e){return r[e]=t[e]})}),r}},548:(e,t,r)=>{mt(E,"sliceIterator");var i=r(140).layoutBase.LinkedList;function E(e,t){var r=[],i=!0,n=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(i=(s=o.next()).done)&&(r.push(s.value),!t||r.length!==t);i=!0);}catch(e){n=!0,a=e}finally{try{!i&&o.return&&o.return()}finally{if(n)throw a}}return r}e.exports=r={getTopMostNodes:function(e){for(var i={},t=0;t<e.length;t++)i[e[t].id()]=!0;return e.filter(function(e,t){for(var r=(e="number"==typeof e?t:e).parent()[0];null!=r;){if(i[r.id()])return!1;r=r.parent()[0]}return!0})},connectComponents:function(a,s,o,e){for(var l=new i,h=new Set,c=[],u=void 0,d=void 0,p=void 0,g=!1,f=1,m=[],y=[],t=mt(function(){var i=a.collection(),n=(y.push(i),o[0]),e=a.collection();e.merge(n).merge(n.descendants().intersection(s)),c.push(n),e.forEach(function(e){l.push(e),h.add(e),i.merge(e)});for(var t,r=mt(function(){n=l.shift();var t=a.collection();n.neighborhood().nodes().forEach(function(e){0<s.intersection(n.edgesWith(e)).length&&t.merge(e)});for(var e=0;e<t.length;e++){var r=t[e];null==(u=o.intersection(r.union(r.ancestors())))||h.has(u[0])||u.union(u.descendants()).forEach(function(e){l.push(e),h.add(e),i.merge(e),o.has(e)&&c.push(e)})}},"_loop2");0!=l.length;)r();i.forEach(function(e){s.intersection(e.connectedEdges()).forEach(function(e){i.has(e.source())&&i.has(e.target())&&i.merge(e)})}),(!(g=c.length==o.length||g)||1<f)&&(d=c[0],p=d.connectedEdges().length,c.forEach(function(e){e.connectedEdges().length<p&&(p=e.connectedEdges().length,d=e)}),m.push(d.id()),(t=a.collection()).merge(c[0]),c.forEach(function(e){t.merge(e)}),c=[],o=o.difference(t),f++)},"_loop");t(),!g;);return e&&0<m.length&&e.set("dummy"+(e.size+1),m),y},relocateComponent:function(e,n,t){if(!t.fixedNodeConstraint){var a=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY;if("draft"==t.quality){var r=!0,i=!1,h=void 0;try{for(var c,u=n.nodeIndexes[Symbol.iterator]();!(r=(c=u.next()).done);r=!0){var d,p,g,f,m,y=(e=>{if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return E(e,2);throw new TypeError("Invalid attempt to destructure non-iterable instance")})(c.value),v=y[0],x=y[1],b=t.cy.getElementById(v);b&&(d=b.boundingBox(),p=n.xCoords[x]-d.w/2,g=n.xCoords[x]+d.w/2,f=n.yCoords[x]-d.h/2,m=n.yCoords[x]+d.h/2,p<a&&(a=p),s<g&&(s=g),f<o&&(o=f),l<m)&&(l=m)}}catch(e){i=!0,h=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw h}}var T=e.x-(s+a)/2,k=e.y-(l+o)/2;n.xCoords=n.xCoords.map(function(e){return e+T}),n.yCoords=n.yCoords.map(function(e){return e+k})}else{Object.keys(n).forEach(function(e){var t=(e=n[e]).getRect().x,r=e.getRect().x+e.getRect().width,i=e.getRect().y,e=e.getRect().y+e.getRect().height;t<a&&(a=t),s<r&&(s=r),i<o&&(o=i),l<e&&(l=e)});var w=e.x-(s+a)/2,C=e.y-(l+o)/2;Object.keys(n).forEach(function(e){(e=n[e]).setCenter(e.getCenterX()+w,e.getCenterY()+C)})}}},calcBoundingBox:function(e,t,r,i){for(var n=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,l=e.descendants().not(":parent"),h=l.length,c=0;c<h;c++){var u,d=l[c];(u=t[i.get(d.id())]-d.width()/2)<n&&(n=u),a<(u=t[i.get(d.id())]+d.width()/2)&&(a=u),(u=r[i.get(d.id())]-d.height()/2)<s&&(s=u),o<(u=r[i.get(d.id())]+d.height()/2)&&(o=u)}return(e={}).topLeftX=n,e.topLeftY=s,e.width=a-n,e.height=o-s,e},calcParentsWithoutChildren:function(e,t){var r=e.collection();return t.nodes(":parent").forEach(function(e){var t=!1;e.children().forEach(function(e){"none"!=e.css("display")&&(t=!0)}),t||r.merge(e)}),r}}},816:(e,t,r)=>{var v=r(548),o=r(140).CoSELayout,x=r(140).CoSENode,b=r(140).layoutBase.PointD,T=r(140).layoutBase.DimensionD,l=r(140).layoutBase.LayoutConstants,u=r(140).layoutBase.FDLayoutConstants,k=r(140).CoSEConstants,r=mt(function(h,e){var t=h.cy,r=(n=h.eles).nodes(),i=n.edges(),d=void 0,p=void 0,g=void 0,f={},c=(h.randomize&&(d=e.nodeIndexes,p=e.xCoords,g=e.yCoords),mt(function(e){return"function"==typeof e},"isFn")),m=mt(function(e,t){return c(e)?e(t):e},"optFn"),y=v.calcParentsWithoutChildren(t,n),e=mt(function e(t,r,i,n){for(var a=r.length,s=0;s<a;s++){var o,l=r[s],h=null,c=void(0==l.intersection(y).length&&(h=l.children())),u=l.layoutDimensions({nodeDimensionsIncludeLabels:n.nodeDimensionsIncludeLabels});(c=null!=l.outerWidth()&&null!=l.outerHeight()?n.randomize?l.isParent()?(o=v.calcBoundingBox(l,p,g,d),0==l.intersection(y).length?t.add(new x(i.graphManager,new b(o.topLeftX,o.topLeftY),new T(o.width,o.height))):t.add(new x(i.graphManager,new b(o.topLeftX,o.topLeftY),new T(parseFloat(u.w),parseFloat(u.h))))):t.add(new x(i.graphManager,new b(p[d.get(l.id())]-u.w/2,g[d.get(l.id())]-u.h/2),new T(parseFloat(u.w),parseFloat(u.h)))):t.add(new x(i.graphManager,new b(l.position("x")-u.w/2,l.position("y")-u.h/2),new T(parseFloat(u.w),parseFloat(u.h)))):t.add(new x(this.graphManager))).id=l.data("id"),c.nodeRepulsion=m(n.nodeRepulsion,l),c.paddingLeft=parseInt(l.css("padding")),c.paddingTop=parseInt(l.css("padding")),c.paddingRight=parseInt(l.css("padding")),c.paddingBottom=parseInt(l.css("padding")),n.nodeDimensionsIncludeLabels&&(c.labelWidth=l.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,c.labelHeight=l.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,c.labelPosVertical=l.css("text-valign"),c.labelPosHorizontal=l.css("text-halign")),f[l.data("id")]=c,isNaN(c.rect.x)&&(c.rect.x=0),isNaN(c.rect.y)&&(c.rect.y=0),null!=h&&0<h.length&&e(i.getGraphManager().add(i.newGraph(),c),h,i,n)}},"processChildrenList"),t=mt(function(e,t,r){for(var i=0,n=0,a=0;a<r.length;a++){var s=r[a],o=f[s.data("source")],l=f[s.data("target")];o&&l&&o!==l&&0==o.getEdgesBetween(l).length&&((o=t.add(e.newEdge(),o,l)).id=s.id(),o.idealLength=m(h.idealEdgeLength,s),o.edgeElasticity=m(h.edgeElasticity,s),i+=o.idealLength,n++)}null!=h.idealEdgeLength&&(0<n?k.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=i/n:c(h.idealEdgeLength)?k.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=50:k.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=h.idealEdgeLength,k.MIN_REPULSION_DIST=u.MIN_REPULSION_DIST=u.DEFAULT_EDGE_LENGTH/10,k.DEFAULT_RADIAL_SEPARATION=u.DEFAULT_EDGE_LENGTH)},"processEdges"),n=mt(function(e,t){t.fixedNodeConstraint&&(e.constraints.fixedNodeConstraint=t.fixedNodeConstraint),t.alignmentConstraint&&(e.constraints.alignmentConstraint=t.alignmentConstraint),t.relativePlacementConstraint&&(e.constraints.relativePlacementConstraint=t.relativePlacementConstraint)},"processConstraints"),a=(null!=h.nestingFactor&&(k.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=h.nestingFactor),null!=h.gravity&&(k.DEFAULT_GRAVITY_STRENGTH=u.DEFAULT_GRAVITY_STRENGTH=h.gravity),null!=h.numIter&&(k.MAX_ITERATIONS=u.MAX_ITERATIONS=h.numIter),null!=h.gravityRange&&(k.DEFAULT_GRAVITY_RANGE_FACTOR=u.DEFAULT_GRAVITY_RANGE_FACTOR=h.gravityRange),null!=h.gravityCompound&&(k.DEFAULT_COMPOUND_GRAVITY_STRENGTH=u.DEFAULT_COMPOUND_GRAVITY_STRENGTH=h.gravityCompound),null!=h.gravityRangeCompound&&(k.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=h.gravityRangeCompound),null!=h.initialEnergyOnIncremental&&(k.DEFAULT_COOLING_FACTOR_INCREMENTAL=u.DEFAULT_COOLING_FACTOR_INCREMENTAL=h.initialEnergyOnIncremental),null!=h.tilingCompareBy&&(k.TILING_COMPARE_BY=h.tilingCompareBy),l.QUALITY="proof"==h.quality?2:0,k.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=h.nodeDimensionsIncludeLabels,k.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=!h.randomize,k.ANIMATE=u.ANIMATE=l.ANIMATE=h.animate,k.TILE=h.tile,k.TILING_PADDING_VERTICAL="function"==typeof h.tilingPaddingVertical?h.tilingPaddingVertical.call():h.tilingPaddingVertical,k.TILING_PADDING_HORIZONTAL="function"==typeof h.tilingPaddingHorizontal?h.tilingPaddingHorizontal.call():h.tilingPaddingHorizontal,k.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=!0,k.PURE_INCREMENTAL=!h.randomize,l.DEFAULT_UNIFORM_LEAF_NODE_SIZES=h.uniformNodeDimensions,"transformed"==h.step&&(k.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,k.ENFORCE_CONSTRAINTS=!1,k.APPLY_LAYOUT=!1),"enforced"==h.step&&(k.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,k.ENFORCE_CONSTRAINTS=!0,k.APPLY_LAYOUT=!1),"cose"==h.step&&(k.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,k.ENFORCE_CONSTRAINTS=!1,k.APPLY_LAYOUT=!0),"all"==h.step&&(h.randomize?k.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:k.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,k.ENFORCE_CONSTRAINTS=!0,k.APPLY_LAYOUT=!0),h.fixedNodeConstraint||h.alignmentConstraint||h.relativePlacementConstraint?k.TREE_REDUCTION_ON_INCREMENTAL=!1:k.TREE_REDUCTION_ON_INCREMENTAL=!0,new o),s=a.newGraphManager();return e(s.addRoot(),v.getTopMostNodes(r),a,h),t(a,s,i),n(a,h),a.runLayout(),f},"coseLayout");e.exports={coseLayout:r}},212:(e,t,r)=>{function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}mt(i,"defineProperties"),mt(n,"_classCallCheck");var a,s,o=r(658),b=r(548),T=r(657).spectralLayout,k=r(816).coseLayout,l=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:mt(function(e){return 4500},"nodeRepulsion"),idealEdgeLength:mt(function(e){return 50},"idealEdgeLength"),edgeElasticity:mt(function(e){return.45},"edgeElasticity"),nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:mt(function(){},"ready"),stop:mt(function(){},"stop")}),r=(mt(h,"Layout"),a=h,s=[{key:"run",value:mt(function(){var c=this.options,e=c.cy,t=c.eles,u=[],d=[],r=void 0,i=[],n=(!c.fixedNodeConstraint||Array.isArray(c.fixedNodeConstraint)&&0!=c.fixedNodeConstraint.length||(c.fixedNodeConstraint=void 0),!c.alignmentConstraint||(!c.alignmentConstraint.vertical||Array.isArray(c.alignmentConstraint.vertical)&&0!=c.alignmentConstraint.vertical.length||(c.alignmentConstraint.vertical=void 0),!c.alignmentConstraint.horizontal)||Array.isArray(c.alignmentConstraint.horizontal)&&0!=c.alignmentConstraint.horizontal.length||(c.alignmentConstraint.horizontal=void 0),!c.relativePlacementConstraint||Array.isArray(c.relativePlacementConstraint)&&0!=c.relativePlacementConstraint.length||(c.relativePlacementConstraint=void 0),void((c.fixedNodeConstraint||c.alignmentConstraint||c.relativePlacementConstraint)&&(c.tile=!1,c.packComponents=!1))),a=!1;if(e.layoutUtilities&&c.packComponents&&(n=(n=e.layoutUtilities("get"))||e.layoutUtilities(),a=!0),0<t.nodes().length)if(a){if(a=b.getTopMostNodes(c.eles.nodes()),(r=b.connectComponents(e,c.eles,a)).forEach(function(e){e=e.boundingBox(),i.push({x:e.x1+e.w/2,y:e.y1+e.h/2})}),c.randomize&&r.forEach(function(e){c.eles=e,u.push(T(c))}),"default"==c.quality||"proof"==c.quality){var s=e.collection();if(c.tile){var a=new Map,o=0,l={nodeIndexes:a,xCoords:[],yCoords:[]},h=[];if(r.forEach(function(r,e){0==r.edges().length&&(r.nodes().forEach(function(e,t){s.merge(r.nodes()[t]),e.isParent()||(l.nodeIndexes.set(r.nodes()[t].id(),o++),l.xCoords.push(r.nodes()[0].position().x),l.yCoords.push(r.nodes()[0].position().y))}),h.push(e))}),1<s.length){a=s.boundingBox(),i.push({x:a.x1+a.w/2,y:a.y1+a.h/2}),r.push(s),u.push(l);for(var p=h.length-1;0<=p;p--)r.splice(h[p],1),u.splice(h[p],1),i.splice(h[p],1)}}r.forEach(function(e,t){c.eles=e,d.push(k(c,u[t])),b.relocateComponent(i[t],d[t],c)})}else r.forEach(function(e,t){b.relocateComponent(i[t],u[t],c)});var g,f,m,y,v=new Set;1<r.length&&(g=[],f=t.filter(function(e){return"none"==e.css("display")}),r.forEach(function(e,o){var l,r,h=void 0;"draft"==c.quality&&(h=u[o].nodeIndexes),0<e.nodes().not(f).length&&(l={edges:[],nodes:[]},e.nodes().not(f).forEach(function(e){var t;"draft"==c.quality?e.isParent()?(t=b.calcBoundingBox(e,u[o].xCoords,u[o].yCoords,h),l.nodes.push({x:t.topLeftX,y:t.topLeftY,width:t.width,height:t.height})):(r=h.get(e.id()),l.nodes.push({x:u[o].xCoords[r]-e.boundingbox().w/2,y:u[o].yCoords[r]-e.boundingbox().h/2,width:e.boundingbox().w,height:e.boundingbox().h})):d[o][e.id()]&&l.nodes.push({x:d[o][e.id()].getLeft(),y:d[o][e.id()].getTop(),width:d[o][e.id()].getWidth(),height:d[o][e.id()].getHeight()})}),e.edges().forEach(function(e){var t,r,i,n,a,s=e.source(),e=e.target();"none"!=s.css("display")&&"none"!=e.css("display")&&("draft"==c.quality?(t=h.get(s.id()),r=h.get(e.id()),i=[],n=[],s.isParent()?(a=b.calcBoundingBox(s,u[o].xCoords,u[o].yCoords,h),i.push(a.topLeftX+a.width/2),i.push(a.topLeftY+a.height/2)):(i.push(u[o].xCoords[t]),i.push(u[o].yCoords[t])),e.isParent()?(a=b.calcBoundingBox(e,u[o].xCoords,u[o].yCoords,h),n.push(a.topLeftX+a.width/2),n.push(a.topLeftY+a.height/2)):(n.push(u[o].xCoords[r]),n.push(u[o].yCoords[r])),l.edges.push({startX:i[0],startY:i[1],endX:n[0],endY:n[1]})):d[o][s.id()]&&d[o][e.id()]&&l.edges.push({startX:d[o][s.id()].getCenterX(),startY:d[o][s.id()].getCenterY(),endX:d[o][e.id()].getCenterX(),endY:d[o][e.id()].getCenterY()}))}),0<l.nodes.length)&&(g.push(l),v.add(o))}),m=n.packComponents(g,c.randomize).shifts,"draft"==c.quality?u.forEach(function(e,t){var r=e.xCoords.map(function(e){return e+m[t].dx}),i=e.yCoords.map(function(e){return e+m[t].dy});e.xCoords=r,e.yCoords=i}):(y=0,v.forEach(function(t){Object.keys(d[t]).forEach(function(e){(e=d[t][e]).setCenter(e.getCenterX()+m[y].dx,e.getCenterY()+m[y].dy)}),y++})))}else a=c.eles.boundingBox(),i.push({x:a.x1+a.w/2,y:a.y1+a.h/2}),c.randomize&&(n=T(c),u.push(n)),"default"==c.quality||"proof"==c.quality?(d.push(k(c,u[0])),b.relocateComponent(i[0],d[0],c)):b.relocateComponent(i[0],u[0],c);var x=mt(function(r,e){var t,i,n,a;return"default"==c.quality||"proof"==c.quality?(i=t=void 0,n=(r="number"==typeof r?e:r).data("id"),d.forEach(function(e){n in e&&(t={x:e[n].getRect().getCenterX(),y:e[n].getRect().getCenterY()},i=e[n])}),c.nodeDimensionsIncludeLabels&&(i.labelWidth&&("left"==i.labelPosHorizontal?t.x+=i.labelWidth/2:"right"==i.labelPosHorizontal&&(t.x-=i.labelWidth/2)),i.labelHeight)&&("top"==i.labelPosVertical?t.y+=i.labelHeight/2:"bottom"==i.labelPosVertical&&(t.y-=i.labelHeight/2)),{x:(t=null==t?{x:r.position("x"),y:r.position("y")}:t).x,y:t.y}):(a=void 0,u.forEach(function(e){var t=e.nodeIndexes.get(r.id());null!=t&&(a={x:e.xCoords[t],y:e.yCoords[t]})}),{x:(a=null==a?{x:r.position("x"),y:r.position("y")}:a).x,y:a.y})},"getPositions");"default"==c.quality||"proof"==c.quality||c.randomize?(a=b.calcParentsWithoutChildren(e,t),n=t.filter(function(e){return"none"==e.css("display")}),c.eles=t.not(n),t.nodes().not(":parent").not(n).layoutPositions(this,c,x),0<a.length&&a.forEach(function(e){e.position(x(e))})):console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")},"run")}],i(a.prototype,s),h);function h(e){n(this,h),this.options=o({},l,e)}e.exports=r},657:(e,t,r)=>{var q=r(548),W=r(140).layoutBase.Matrix,U=r(140).layoutBase.SVD,r=mt(function(e){var n=e.cy,a=e.eles,t=a.nodes(),r=a.nodes(":parent"),s=new Map,m=new Map,o=new Map,y=[],g=[],f=[],c=[],v=[],x=[],u=[],b=[],T=void 0,k=e.piTol,i=e.samplingType,w=e.nodeSeparation,d=void 0,B=mt(function(){for(var e=0,t=!1;e<d;){for(var r=Math.floor(Math.random()*T),t=!1,i=0;i<e;i++)if(c[i]==r){t=!0;break}t||(c[e]=r,e++)}},"randomSampleCR"),p=mt(function(e,t,r){for(var i,n=[],a=0,s=0,o=[],l=0,h=1,c=0;c<T;c++)o[c]=1e8;for(o[n[s]=e]=0;a<=s;){for(var u=n[a++],d=y[u],p=0;p<d.length;p++)1e8==o[i=m.get(d[p])]&&(o[i]=o[u]+1,n[++s]=i);x[u][t]=o[u]*w}if(r){for(var g=0;g<T;g++)x[g][t]<v[g]&&(v[g]=x[g][t]);for(var f=0;f<T;f++)l<v[f]&&(l=v[f],h=f)}return h},"BFS"),l=mt(function(e){var t=void 0;if(e){for(var t=Math.floor(Math.random()*T),r=0;r<T;r++)v[r]=1e8;for(var i=0;i<d;i++)t=p(c[i]=t,i,e)}else{B();for(var n=0;n<d;n++)p(c[n],n,e,!1)}for(var a=0;a<T;a++)for(var s=0;s<d;s++)x[a][s]*=x[a][s];for(var o=0;o<d;o++)u[o]=[];for(var l=0;l<d;l++)for(var h=0;h<d;h++)u[l][h]=x[c[h]][l]},"allBFS"),P=mt(function(){for(var e=(r=U.svd(u)).S,t=r.U,r=r.V,i=e[0]*e[0]*e[0],n=[],a=0;a<d;a++){n[a]=[];for(var s=0;s<d;s++)n[a][s]=0,a==s&&(n[a][s]=e[a]/(e[a]*e[a]+i/(e[a]*e[a])))}b=W.multMat(W.multMat(r,n),W.transpose(t))},"sample"),$=mt(function(){for(var e=void 0,t=void 0,r=[],i=[],n=[],a=[],s=0;s<T;s++)r[s]=Math.random(),i[s]=Math.random();for(var r=W.normalize(r),i=W.normalize(i),o=1e-9,l=1e-9,h=void 0;;){for(var c=0;c<T;c++)n[c]=r[c];if(r=W.multGamma(W.multL(W.multGamma(n),x,b)),e=W.dotProduct(n,r),r=W.normalize(r),o=W.dotProduct(n,r),(h=Math.abs(o/l))<=1+k&&1<=h)break;l=o}for(var u=0;u<T;u++)n[u]=r[u];for(l=1e-9;;){for(var d=0;d<T;d++)a[d]=i[d];if(a=W.minusOp(a,W.multCons(n,W.dotProduct(n,a))),i=W.multGamma(W.multL(W.multGamma(a),x,b)),t=W.dotProduct(a,i),i=W.normalize(i),o=W.dotProduct(a,i),(h=Math.abs(o/l))<=1+k&&1<=h)break;l=o}for(var p=0;p<T;p++)a[p]=i[p];g=W.multCons(n,Math.sqrt(Math.abs(e))),f=W.multCons(a,Math.sqrt(Math.abs(t)))},"powerIteration");q.connectComponents(n,a,q.getTopMostNodes(t),s),r.forEach(function(e){q.connectComponents(n,a,q.getTopMostNodes(e.descendants().intersection(a)),s)});for(var h=0,C=0;C<t.length;C++)t[C].isParent()||m.set(t[C].id(),h++);var E=!0,S=!1,_=void 0;try{for(var A,L=s.keys()[Symbol.iterator]();!(E=(A=L.next()).done);E=!0){var F=A.value;m.set(F,h++)}}catch(e){S=!0,_=e}finally{try{!E&&L.return&&L.return()}finally{if(S)throw _}}for(var R=0;R<m.size;R++)y[R]=[];r.forEach(function(e){for(var t=e.children().intersection(a);0==t.nodes(":childless").length;)t=t.nodes()[0].children().intersection(a);var r=0,i=t.nodes(":childless")[0].connectedEdges().length;t.nodes(":childless").forEach(function(e,t){e.connectedEdges().length<i&&(i=e.connectedEdges().length,r=t)}),o.set(e.id(),t.nodes(":childless")[r].id())}),t.forEach(function(t){var r=t.isParent()?m.get(o.get(t.id())):m.get(t.id());t.neighborhood().nodes().forEach(function(e){0<a.intersection(t.edgesWith(e)).length&&(e.isParent()?y[r].push(o.get(e.id())):y[r].push(e.id()))})});var z=mt(function(t){var r,i=m.get(t);s.get(t).forEach(function(e){r=n.getElementById(e).isParent()?o.get(e):e,y[i].push(r),y[m.get(r)].push(t)})},"_loop"),I=!0,S=!1,_=void 0;try{for(var N,D=s.keys()[Symbol.iterator]();!(I=(N=D.next()).done);I=!0)z(N.value)}catch(e){S=!0,_=e}finally{try{!I&&D.return&&D.return()}finally{if(S)throw _}}if(2<(T=m.size)){for(var d=T<e.sampleSize?T:e.sampleSize,M=0;M<T;M++)x[M]=[];for(var O=0;O<d;O++)b[O]=[];"draft"==e.quality||"all"==e.step?(l(i),P(),$()):m.forEach(function(e,t){g.push(n.getElementById(t).position("x")),f.push(n.getElementById(t).position("y"))})}else r=m.keys(),_=(S=n.getElementById(r.next().value)).position(),l=S.outerWidth(),g.push(_.x),f.push(_.y),2==T&&(i=n.getElementById(r.next().value).outerWidth(),g.push(_.x+l/2+i/2+e.idealEdgeLength),f.push(_.y));return{nodeIndexes:m,xCoords:g,yCoords:f}},"spectralLayout");e.exports={spectralLayout:r}},579:(e,t,r)=>{var i=r(212),r=mt(function(e){e&&e("layout","fcose",i)},"register");typeof cytoscape<"u"&&r(cytoscape),e.exports=r},140:e=>{e.exports=t}},n={},mt(r,"__webpack_require__"),r(579);function r(e){var t=n[e];return void 0===t&&(t=n[e]={exports:{}},i[e](t,t.exports,r)),t.exports}var i,n})}),LUe=i(()=>{nc(),fUe=mt(e=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${e}</g>`,"wrapIcon"),mUe={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:fUe('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:fUe('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:fUe('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:fUe('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:fUe('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:Kh,blank:{body:fUe("")}}}}),RUe=i(()=>{ju(),ER(),nc(),ic(),LUe(),kUe(),S7(),yUe=mt(async function(T,e,k,w){let C=k.getConfigField("padding"),t=k.getConfigField("iconSize"),E=t/2,S=t/6,_=S/2;await Promise.all(e.edges().map(async e=>{let{source:t,sourceDir:r,sourceArrow:i,sourceGroup:n,target:a,targetDir:s,targetArrow:o,targetGroup:l,label:h}=oUe(e),{x:c,y:u}=e[0].sourceEndpoint(),{x:d,y:p}=e[0].midpoint(),{x:g,y:f}=e[0].targetEndpoint(),m=C+4;var y,v,x,b;n&&(KWe(r)?c+="L"===r?-m:m:u+="T"===r?-m:m+18),l&&(KWe(s)?g+="L"===s?-m:m:f+="T"===s?-m:m+18),n||"junction"!==k.getNode(t)?.type||(KWe(r)?c+="L"===r?E:-E:u+="T"===r?E:-E),l||"junction"!==k.getNode(a)?.type||(KWe(s)?g+="L"===s?E:-E:f+="T"===s?E:-E),e[0]._private.rscratch&&((e=T.insert("g")).insert("path").attr("d",`M ${c},${u} L ${d},${p} L${g},${f} `).attr("class","edge").attr("id",w+"-"+E7(t,a,{prefix:"L"})),i&&(b=KWe(r)?YWe[r](c,S):c-_,y=ZWe(r)?YWe[r](u,S):u-_,e.insert("polygon").attr("points",VWe[r](S)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),o&&(b=KWe(s)?YWe[s](g,S):g-_,y=ZWe(s)?YWe[s](f,S):f-_,e.insert("polygon").attr("points",VWe[s](S)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),h)&&(v=0,v="X"==(x=QWe(r,s)?"XY":KWe(r)?"X":"Y")?Math.abs(c-g):"Y"==x?Math.abs(u-f)/1.5:Math.abs(c-g)/2,b=e.append("g"),await CR(b,h,{useHtmlLabels:!1,width:v,classes:"architecture-service-label"},P()),b.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"==x?b.attr("transform","translate("+d+", "+p+")"):"Y"==x?b.attr("transform","translate("+d+", "+p+") rotate(-90)"):"XY"==x&&(y=tUe(r,s))&&JWe(y)&&(e=b.node().getBoundingClientRect(),[y,v]=iUe(y),b.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*y*v*45})`),x=b.node().getBoundingClientRect(),b.attr("transform",`
translate(${d}, ${p-e.height/2})
translate(${y*x.width/2}, ${v*x.height/2})
rotate(${-1*y*v*45}, 0, ${e.height/2})
`)))}))},"drawEdges"),vUe=mt(async function(h,e,c,u){let d=.75*c.getConfigField("padding"),p=c.getConfigField("fontSize"),g=c.getConfigField("iconSize")/2;await Promise.all(e.nodes().map(async i=>{var n=lUe(i);if("group"===n.type){var{h:i,w:a,x1:s,y1:o}=i.boundingBox(),l=h.append("rect");l.attr("id",u+"-group-"+n.id).attr("x",s+g).attr("y",o+g).attr("width",a).attr("height",i).attr("class","node-bkg");let e=h.append("g"),t=s,r=o;n.icon&&((i=e.append("g")).html(`<g>${await rc(n.icon,{height:d,width:d,fallbackPrefix:mUe.prefix})}</g>`),i.attr("transform","translate("+(t+g+1)+", "+(r+g+1)+")"),t+=d,r+=p/2-1-2),n.label&&(s=e.append("g"),await CR(s,n.label,{useHtmlLabels:!1,width:a,classes:"architecture-service-label"},P()),s.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),s.attr("transform","translate("+(t+g+4)+", "+(r+g+2)+")")),c.setElementForId(n.id,l)}}))},"drawGroups"),xUe=mt(async function(e,t,r,i){var n,a=P();for(n of r){var s=t.append("g"),o=e.getConfigField("iconSize"),l=(n.title&&(l=s.append("g"),await CR(l,n.title,{useHtmlLabels:!1,width:1.5*o,classes:"architecture-service-label"},a),l.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),l.attr("transform","translate("+o/2+", "+o+")")),s.append("g")),{width:h,height:c}=(n.icon?l.html(`<g>${await rc(n.icon,{height:o,width:o,fallbackPrefix:mUe.prefix})}</g>`):n.iconText?(l.html(`<g>${await rc("blank",{height:o,width:o,fallbackPrefix:mUe.prefix})}</g>`),h=l.append("g").append("foreignObject").attr("width",o).attr("height",o).append("div").attr("class","node-icon-text").attr("style",`height: ${o}px;`).append("div").html(Ih(n.iconText,a)),c=parseInt(window.getComputedStyle(h.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16,h.attr("style",`-webkit-line-clamp: ${Math.floor((o-2)/c)};`)):l.append("path").attr("class","node-bkg").attr("id",i+"-node-"+n.id).attr("d",`M0,${o} V5 Q0,0 5,0 H${o-5} Q${o},0 ${o},5 V${o} Z`),s.attr("id",i+"-service-"+n.id).attr("class","architecture-service"),s.node().getBBox());n.width=h,n.height=c,e.setElementForId(n.id,s)}return 0},"drawServices"),bUe=mt(function(n,a,e,s){e.forEach(e=>{var t=a.append("g"),r=n.getConfigField("iconSize"),{width:r,height:i}=(t.append("g").append("rect").attr("id",s+"-node-"+e.id).attr("fill-opacity","0").attr("width",r).attr("height",r),t.attr("class","architecture-junction"),t._groups[0][0].getBBox());t.width=r,t.height=i,n.setElementForId(e.id,t)})},"drawJunctions")});function IUe(e,t,r){e.forEach(e=>{t.add({group:"nodes",data:{type:"service",id:e.id,icon:e.icon,label:e.title,parent:e.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-service"})})}function NUe(e,t,r){e.forEach(e=>{t.add({group:"nodes",data:{type:"junction",id:e.id,parent:e.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-junction"})})}function DUe(r,e){e.nodes().map(e=>{var t=lUe(e);"group"!==t.type&&(t.x=e.position().x,t.y=e.position().y,r.getElementById(t.id).attr("transform","translate("+(t.x||0)+","+(t.y||0)+")"))})}function MUe(e,t){e.forEach(e=>{t.add({group:"nodes",data:{type:"group",id:e.id,icon:e.icon,label:e.title,parent:e.in},classes:"node-group"})})}function OUe(e,c){e.forEach(e=>{var{lhsId:t,rhsId:r,lhsInto:i,lhsGroup:n,rhsInto:a,lhsDir:s,rhsDir:o,rhsGroup:l,title:h}=e,e=QWe(e.lhsDir,e.rhsDir)?"segments":"straight";c.add({group:"edges",data:{id:t+"-"+r,label:h,source:t,sourceDir:s,sourceArrow:i,sourceGroup:n,sourceEndpoint:"L"===s?"0 50%":"R"===s?"100% 50%":"T"===s?"50% 0":"50% 100%",target:r,targetDir:o,targetArrow:a,targetGroup:l,targetEndpoint:"L"===o?"0 50%":"R"===o?"100% 50%":"T"===o?"50% 0":"50% 100%"},classes:e})})}function BUe(s,e,u){let t=mt((e,c)=>Object.entries(e).reduce((r,[i,e])=>{let n=0,a=Object.entries(e);if(1===a.length)r[i]=a[0][1];else for(let t=0;t<a.length-1;t++)for(let e=t+1;e<a.length;e++){var[s,o]=a[t],[l,h]=a[e];u[s]?.[l]===c||"default"===s||"default"===l?(r[i]??=[],r[i]=[...r[i],...o,...h]):(r[i+"-"+n++]=o,r[i+"-"+n++]=h)}return r},{}),"flattenAlignments"),r=e.map(e=>{let n={},a={};return Object.entries(e).forEach(([e,[t,r]])=>{var i=s.getNode(e)?.in??"default";n[r]??={},n[r][i]??=[],n[r][i].push(e),a[t]??={},a[t][i]??=[],a[t][i].push(e)}),{horiz:Object.values(t(n,"horizontal")).filter(e=>1<e.length),vert:Object.values(t(a,"vertical")).filter(e=>1<e.length)}}),[i,n]=r.reduce(([e,t],{horiz:r,vert:i})=>[[...e,...r],[...t,...i]],[[],[]]);return{horizontal:i,vertical:n}}function PUe(e,l){let h=[],c=mt(e=>e[0]+","+e[1],"posToStr"),u=mt(e=>e.split(",").map(e=>parseInt(e)),"strToPos");return e.forEach(e=>{let a=Object.fromEntries(Object.entries(e).map(([e,t])=>[c(t),e])),s=[c([0,0])],o={},t={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;0<s.length;){var r=s.shift();if(r){o[r]=1;let n=a[r];if(n){let i=u(r);Object.entries(t).forEach(([e,t])=>{var t=c([i[0]+t[0],i[1]+t[1]]),r=a[t];r&&!o[t]&&(s.push(t),h.push({[jWe[e]]:r,[jWe[HWe(e)]]:n,gap:1.5*l.getConfigField("iconSize")}))})}}}}),h}function $Ue(n,a,l,h,c,{spatialMaps:u,groupAlignments:d}){return new Promise(t=>{let e=Q("body").append("div").attr("id","cy").attr("style","display:none"),s=yue({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":c.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:c.getConfigField("padding")+"px"}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}}),r=(e.remove(),MUe(l,s),IUe(n,s,c),NUe(a,s,c),OUe(h,s),BUe(c,u,d)),i=PUe(u,c),o=s.layout({name:"fcose",quality:"proof",randomize:c.getConfigField("randomize"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(e){var[e,t]=e.connectedNodes();return(e=lUe(e).parent)===lUe(t).parent?1.5*c.getConfigField("iconSize"):.5*c.getConfigField("iconSize")},edgeElasticity(e){var[e,t]=e.connectedNodes();return(e=lUe(e).parent)===lUe(t).parent?.45:.001},alignmentConstraint:r,relativePlacementConstraint:i});o.one("layoutstop",()=>{function e(e,t,r,i){var{x:e,y:n}=e,{x:t,y:a}=t,s=(i-n+(e-r)*(n-a)/(e-t))/Math.sqrt(1+Math.pow((n-a)/(e-t),2)),o=Math.sqrt(Math.pow(i-n,2)+Math.pow(r-e,2)-Math.pow(s,2));o/=Math.sqrt(Math.pow(t-e,2)+Math.pow(a-n,2));let l=(t-e)*(i-n)-(a-n)*(r-e);switch(!0){case 0<=l:l=1;break;case l<0:l=-1}let h=(t-e)*(r-e)+(a-n)*(i-n);switch(!0){case 0<=h:h=1;break;case h<0:h=-1}return{distances:Math.abs(s)*l,weights:o*=h}}mt(e,"getSegmentWeights"),s.startBatch();for(var t of Object.values(s.edges())){var r,i,n,a;t.data?.()&&({x:n,y:i}=t.source().position(),{x:a,y:r}=t.target().position(),n!==a)&&i!==r&&(n=t.sourceEndpoint(),a=t.targetEndpoint(),i=oUe(t).sourceDir,[r,i]=ZWe(i)?[n.x,a.y]:[a.x,n.y],{weights:n,distances:a}=e(n,a,r,i),t.style("segment-distances",a),t.style("segment-weights",n))}s.endBatch(),o.run()}),o.run(),s.ready(e=>{B.info("Ready",e),t(s)})})}var FUe,zUe,qUe=i(()=>{vue(),FUe=U(AUe(),1),Sk(),e(),nc(),cAe(),Rc(),LUe(),kUe(),RUe(),Jh([{name:mUe.prefix,icons:mUe}]),yue.use(FUe.default),mt(IUe,"addServices"),mt(NUe,"addJunctions"),mt(DUe,"positionNodes"),mt(MUe,"addGroups"),mt(OUe,"addEdges"),mt(BUe,"getAlignments"),mt(PUe,"getRelativeConstraints"),mt($Ue,"layoutArchitecture"),FUe=mt(async(e,t,r,i)=>{(i=i.db).setDiagramId(t);var n=i.getServices(),a=i.getJunctions(),s=i.getGroups(),o=i.getEdges(),l=i.getDataStructures(),h=nAe(t),c=h.append("g"),u=(c.attr("class","architecture-edges"),(d=h.append("g")).attr("class","architecture-services"),h.append("g")),d=(u.attr("class","architecture-groups"),await xUe(i,d,n,t),bUe(i,d,a,t),await $Ue(n,a,s,o,i,l));await yUe(c,d,i,t),await vUe(u,d,i,t),DUe(i,d),bc(void 0,h,i.getConfigField("padding"),i.getConfigField("useMaxWidth"))},"draw"),zUe={draw:FUe}}),WUe={};sYe(WUe,{diagram:()=>UUe});var UUe,GUe,jUe,VUe,YUe,HUe,XUe,KUe,ZUe,QUe,JUe,eGe,tGe,rGe,iGe,nGe,aGe,sGe,oGe,lGe,hGe,cGe,uGe=i(()=>{CUe(),wUe(),EUe(),qUe(),UUe={parser:dUe,get db(){return new cUe},renderer:zUe,styles:gUe}}),dGe=i(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,4],i=[1,14],n=[1,12],a=[1,13],s=[6,7,8],o=[1,20],l=[1,18],h=[1,19],c=[6,7,11],u=[1,6,13,14],d=[1,23],p=[1,24],g=[1,6,7,11,13,14],r={trace:mt(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:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 6:case 7:return i;case 15:i.addNode(a[o-1].length,a[o].trim());break;case 16:i.addNode(0,a[o].trim())}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:r},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:r},{6:i,7:[1,10],9:9,12:11,13:n,14:a},t(s,[2,3]),{1:[2,2]},t(s,[2,4]),t(s,[2,5]),{1:[2,6],6:i,12:15,13:n,14:a},{6:i,9:16,12:11,13:n,14:a},{6:o,7:l,10:17,11:h},t(c,[2,18],{14:[1,21]}),t(c,[2,16]),t(c,[2,17]),{6:o,7:l,10:22,11:h},{1:[2,7],6:i,12:15,13:n,14:a},t(u,[2,14],{7:d,11:p}),t(g,[2,8]),t(g,[2,9]),t(g,[2,10]),t(c,[2,15]),t(u,[2,13],{7:d,11:p}),t(g,[2,11]),t(g,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",h=0,c=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,T,k,w,C,E,S={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===x||"u"<typeof x)&&(x=v()),o[T]&&o[T][x]))||!k.length||!k[0]){var _,A=[];for(w in o[T])this.terminals_[w]&&2<w&&A.push("'"+this.terminals_[w]+"'");_=g.showPosition?"Parse error on line "+(h+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(c=g.yyleng,l=g.yytext,h=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],S.$=a[a.length-C],S._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(E=this.performAction.apply(S,[l,c,h,f.yy,k[1],a,s].concat(p)))<"u")return E;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),E=o[i[i.length-2]][i[i.length-1]],i.push(E);break;case 3:return!0}}return!0},"parse")},s={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){case 0:return 6;case 1: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}}};r.lexer=s,mt(e,"Parser"),(GUe=new((e.prototype=r).Parser=e)).parser=GUe,jUe=GUe}),pGe=i(()=>{ju(),ic(),Gu(),VUe=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{mt(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,Pc()}getRoot(){return this.root}addNode(t,r){if(r=I.sanitizeText(r,P()),this.root){this.baseLevel??=t;let e=t-this.baseLevel+1;for(e<=0&&(e=1);1<this.stack.length&&this.stack[this.stack.length-1].level>=e;)this.stack.pop();this.stack[this.stack.length-1].node.children.push(t={text:r,children:[]}),this.stack.push({level:e,node:t})}else this.root={text:r,children:[]},this.stack=[{level:0,node:this.root}],Wc(r)}getAccTitle(){return Fc()}setAccTitle(e){$c(e)}getAccDescription(){return qc()}setAccDescription(e){zc(e)}getDiagramTitle(){return Uc()}setDiagramTitle(e){Wc(e)}}}),gGe=i(()=>{ju(),cAe(),Rc(),S7(),mN(),KUe=82*Math.PI/180,YUe=Math.cos(KUe),HUe=Math.sin(KUe),XUe=mt((e,t,r)=>{var i=e.node().getBBox(),n=i.width+2*t,a=i.height+2*t;xc(e,a,n,r),e.attr("viewBox",`${i.x-t} ${i.y-t} ${n} `+a)},"applyPaddedViewBox"),KUe=mt((e,t,r,i)=>{if(i=i.db.getRoot()){var{look:c,handDrawnSeed:u,themeVariables:d}=a=P(),p=T7(a.fontSize)[0]??14,c="handDrawn"===c,g=i.children??[],n=a.ishikawa?.diagramPadding??20,a=a.ishikawa?.useMaxWidth??!1,s=nAe(t),f=s.append("g").attr("class","ishikawa"),m=(y=c?fN.svg(s.node()):void 0)?{roughSvg:y,seed:u??0,lineColor:d?.lineColor??"#333",fillColor:d?.mainBkg??"#fff"}:void 0,y="ishikawa-arrow-"+t;c||f.append("defs").append("marker").attr("id",y).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 o=0,l,h=c?void 0:oGe(f,o,250,o,250,"ishikawa-spine");if(QUe(f,o,250,i.text,p,m),g.length){o-=20;let e=g.filter((e,t)=>t%2==0),t=g.filter((e,t)=>t%2==1),r=ZUe(e),i=ZUe(t),n=r.total+i.total,a=250,s=250;0<n&&(a=Math.max(75,r.total/n*500),s=Math.max(75,i.total/n*500));var u=2*p,v=(a=Math.max(a,r.max*u),s=Math.max(s,i.max*u),l=Math.max(a,250),h&&h.attr("y1",l).attr("y2",l),f.select(".ishikawa-head-group").attr("transform",`translate(0,${l})`),Math.ceil(g.length/2));for(let e=0;e<v;e++){var x,b,T,k=f.append("g").attr("class","ishikawa-pair");for([x,b,T]of[[g[2*e],-1,a],[g[2*e+1],1,s]])x&&rGe(k,x,o,l,b,T,p,m);o=k.selectAll("text").nodes().reduce((e,t)=>Math.min(e,t.getBBox().x),1/0)}c?oGe(f,o,l,0,l,"ishikawa-spine",m):(h.attr("x1",o),d=`url(#${y})`,f.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",d))}else c&&oGe(f,o,250,o,250,"ishikawa-spine",m);XUe(s,n,a)}},"draw"),ZUe=mt(e=>{let r=mt(e=>e.children.reduce((e,t)=>e+1+r(t),0),"countDescendants");return e.reduce((e,t)=>(t=r(t),e.total+=t,e.max=Math.max(e.max,t),e),{total:0,max:0})},"sideStats"),QUe=mt((t,e,r,i,n,a)=>{var s=Math.max(6,Math.floor(110/(.6*n))),t=t.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${e},${r})`),r=(e=aGe(t,nGe(i,s),0,0,"ishikawa-head-label","start",n)).node().getBBox(),i=Math.max(60,r.width+6),n=`M 0 ${-(s=Math.max(40,2*r.height+40))/2} L 0 ${s/2} Q ${2.4*i} 0 0 ${-s/2} Z`;if(a){let e=a.roughSvg.path(n,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});t.insert(()=>e,":first-child").attr("class","ishikawa-head")}else t.insert("path",":first-child").attr("class","ishikawa-head").attr("d",n);e.attr("transform",`translate(${(i-r.width)/2-r.x+3},${-r.y-r.height/2})`)},"drawHead"),JUe=mt((e,s)=>{let o=[],l=[],h=mt((e,t,r)=>{var i;for(i of-1===s?[...e].reverse():e){var n=o.length,a=i.children??[];o.push({depth:r,text:nGe(i.text,15),parentIndex:t,childCount:a.length}),r%2==0?(l.push(n),a.length&&h(a,n,r+1)):(a.length&&h(a,n,r+1),l.push(n))}},"walk");return h(e,-1,2),{entries:o,yOrder:l}},"flattenTree"),eGe=mt((t,r,e,i,n,a,s)=>{if(t=t.append("g").attr("class","ishikawa-label-group"),r=aGe(t,r,e,i+11*n,"ishikawa-label cause","middle",a).node().getBBox(),s){let e=s.roughSvg.rectangle(r.x-20,r.y-2,r.width+40,r.height+4,{roughness:1.5,seed:s.seed,fill:s.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:s.lineColor,strokeWidth:2});t.insert(()=>e,":first-child").attr("class","ishikawa-label-box")}else t.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",r.x-20).attr("y",r.y-2).attr("width",r.width+40).attr("height",r.height+4)},"drawCauseLabel"),tGe=mt((l,h,c,u,d,p)=>{var g=Math.sqrt(u*u+d*d);if(0!==g){let e=u/g,t=d/g,r=6*-t,i=6*e,n=h,a=c,s=`M ${n} ${a} L ${n-6*e*2+r} ${a-6*t*2+i} L ${n-6*e*2-r} ${a-6*t*2-i} Z`,o=p.roughSvg.path(s,{roughness:1,seed:p.seed,fill:p.lineColor,fillStyle:"solid",stroke:p.lineColor,strokeWidth:1});l.append(()=>o)}},"drawArrowMarker"),rGe=mt((s,e,t,r,i,n,o,l)=>{var a=e.children??[],n=n*(a.length?1:.2),h=HUe*n*i,c=r+h;if(oGe(s,t,r,n=t+-YUe*n,c,"ishikawa-branch",l),l&&tGe(s,t,r,t-n,r-c,l),eGe(s,e.text,n,c,i,o,l),a.length){var u,d,{entries:e,yOrder:p}=JUe(a,i),g=e.length,f=new Array(g);for([u,d]of p.entries())f[d]=r+(u+1)/(g+1)*h;var m,y,v,x=new Map,b=(x.set(-1,{x0:t,y0:r,x1:n,y1:c,childCount:a.length,childrenDrawn:0}),-YUe),T=HUe*i,k=i<0?"ishikawa-label up":"ishikawa-label down";for([m,y]of e.entries()){let e=f[m],t=x.get(y.parentIndex),r=s.append("g").attr("class","ishikawa-sub-group"),i=0,n=0,a=0;y.depth%2==0?(v=t.y1-t.y0,i=sGe(t.x0,t.x1,v?(e-t.y0)/v:.5),n=e,a=i-(0<y.childCount?60+5*y.childCount:30),oGe(r,i,e,a,e,"ishikawa-sub-branch",l),l&&tGe(r,i,e,1,0,l),aGe(r,y.text,a,e,"ishikawa-label align","end",o)):(v=t.childrenDrawn++,i=sGe(t.x0,t.x1,(t.childCount-v)/(t.childCount+1)),n=t.y0,a=i+b*((e-n)/T),oGe(r,i,n,a,e,"ishikawa-sub-branch",l),l&&tGe(r,i,n,i-a,n-e,l),aGe(r,y.text,a,e,k,"end",o)),0<y.childCount&&x.set(m,{x0:i,y0:n,x1:a,y1:e,childCount:y.childCount,childrenDrawn:0})}}},"drawBranch"),iGe=mt(e=>e.split(/<br\s*\/?>|\n/),"splitLines"),nGe=mt((e,t)=>{if(e.length<=t)return e;var r,i=[];for(r of e.split(/\s+/)){var n=i.length-1;0<=n&&i[n].length+1+r.length<=t?i[n]+=" "+r:i.push(r)}return i.join(`
`)},"wrapText"),aGe=mt((e,t,r,i,n,a,s)=>{var o,l,t=iGe(t),h=1.05*s,c=e.append("text").attr("class",n).attr("text-anchor",a).attr("x",r).attr("y",i-(t.length-1)*h/2);for([o,l]of t.entries())c.append("tspan").attr("x",r).attr("dy",0===o?0:h).text(l);return c},"drawMultilineText"),sGe=mt((e,t,r)=>e+(t-e)*r,"lerp"),oGe=mt((t,r,i,n,a,s,o)=>{if(!o)return t.append("line").attr("class",s).attr("x1",r).attr("y1",i).attr("x2",n).attr("y2",a);{let e=o.roughSvg.line(r,i,n,a,{roughness:1.5,seed:o.seed,stroke:o.lineColor,strokeWidth:2});t.append(()=>e).attr("class",s)}},"drawLine"),lGe={draw:KUe}}),fGe=i(()=>{hGe=mt(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"),cGe=hGe}),mGe={};sYe(mGe,{diagram:()=>yGe});var yGe,vGe,xGe,bGe=i(()=>{dGe(),pGe(),gGe(),fGe(),yGe={parser:jUe,get db(){return new VUe},renderer:lGe,styles:cGe}}),TGe=i(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[5,8],i=[7,8,11,12,17,19,22,24],n=[1,17],a=[1,18],s=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],o=[1,31],l=[1,39],h=[7,8,11,12,17,19,22,24,27],c=[1,57],u=[1,56],d=[1,58],p=[1,59],g=[1,60],f=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],r={trace:mt(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:mt(function(e,t,r,i,n,a,s){var o,l=a.length-1;switch(n){case 1:return a[l-1];case 2:case 3:case 4:this.$=[];break;case 5:a[l-1].push(a[l]),this.$=a[l-1];break;case 6:this.$=[];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:this.$=a[l];break;case 8:i.setDiagramTitle(a[l].substr(6)),this.$=a[l].substr(6);break;case 9:i.addSubsetData([a[l]],void 0,void 0),i.setIndentMode&&i.setIndentMode(!0);break;case 10:i.addSubsetData([a[l-1]],a[l],void 0),i.setIndentMode&&i.setIndentMode(!0);break;case 11:i.addSubsetData([a[l-2]],void 0,parseFloat(a[l])),i.setIndentMode&&i.setIndentMode(!0);break;case 12:i.addSubsetData([a[l-3]],a[l-2],parseFloat(a[l])),i.setIndentMode&&i.setIndentMode(!0);break;case 13:if(a[l].length<2)throw new Error("union requires multiple identifiers");i.validateUnionIdentifiers&&i.validateUnionIdentifiers(a[l]),i.addSubsetData(a[l],void 0,void 0),i.setIndentMode&&i.setIndentMode(!0);break;case 14:if(a[l-1].length<2)throw new Error("union requires multiple identifiers");i.validateUnionIdentifiers&&i.validateUnionIdentifiers(a[l-1]),i.addSubsetData(a[l-1],a[l],void 0),i.setIndentMode&&i.setIndentMode(!0);break;case 15:if(a[l-2].length<2)throw new Error("union requires multiple identifiers");i.validateUnionIdentifiers&&i.validateUnionIdentifiers(a[l-2]),i.addSubsetData(a[l-2],void 0,parseFloat(a[l])),i.setIndentMode&&i.setIndentMode(!0);break;case 16:if(a[l-3].length<2)throw new Error("union requires multiple identifiers");i.validateUnionIdentifiers&&i.validateUnionIdentifiers(a[l-3]),i.addSubsetData(a[l-3],a[l-2],parseFloat(a[l])),i.setIndentMode&&i.setIndentMode(!0);break;case 17:case 18:case 19:i.addTextData(a[l-1],a[l],void 0);break;case 20:case 21:i.addTextData(a[l-2],a[l-1],a[l]);break;case 23:i.addStyleData(a[l-1],a[l]);break;case 24:case 25:case 26:if(!(o=i.getCurrentSets()))throw new Error("text requires set");i.addTextData(o,a[l],void 0);break;case 27:case 28:if(!(o=i.getCurrentSets()))throw new Error("text requires set");i.addTextData(o,a[l-1],a[l]);break;case 29:case 41:this.$=[a[l]];break;case 30:case 42:this.$=[...a[l-2],a[l]];break;case 31:this.$=[a[l-2],a[l]];break;case 33:this.$=a[l].join(" ");break;case 34:this.$=[a[l]];break;case 35:a[l-1].push(a[l]),this.$=a[l-1];break;case 43:case 44:this.$=a[l]}},"anonymous"),table:[t(r,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},t(i,[2,4],{6:5}),t(r,[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]},t(i,[2,5]),t(i,[2,6]),t(i,[2,7]),t(i,[2,8]),{13:16,20:n,21:a},{13:20,18:19,20:n,21:a},{13:20,18:21,20:n,21:a},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:n,21:a},t(i,[2,9],{14:[1,27],15:[1,28]}),t(s,[2,43]),t(s,[2,44]),t(i,[2,13],{14:[1,29],15:[1,30],27:o}),t(s,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:o},t(i,[2,22]),t(i,[2,24],{14:[1,35]}),t(i,[2,25],{14:[1,36]}),t(i,[2,26]),{20:l,25:37,26:38,27:o},t(i,[2,10],{15:[1,40]}),{16:[1,41]},t(i,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:n,21:a},t(i,[2,17],{14:[1,45]}),t(i,[2,18],{14:[1,46]}),t(i,[2,19]),t(i,[2,27]),t(i,[2,28]),t(i,[2,23],{27:[1,47]}),t(h,[2,29]),{15:[1,48]},{16:[1,49]},t(i,[2,11]),{16:[1,50]},t(i,[2,15]),t(s,[2,42]),t(i,[2,20]),t(i,[2,21]),{20:l,26:51},{16:c,20:u,21:[1,53],28:52,29:54,30:55,31:d,32:p,33:g},t(i,[2,12]),t(i,[2,16]),t(h,[2,30]),t(h,[2,31]),t(h,[2,32]),t(h,[2,33],{30:61,16:c,20:u,31:d,32:p,33:g}),t(f,[2,34]),t(f,[2,36]),t(f,[2,37]),t(f,[2,38]),t(f,[2,39]),t(f,[2,40]),t(f,[2,35])],defaultActions:{6:[2,1]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",h=0,c=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(s.push(m),g.options&&g.options.ranges);function v(){var e=n.pop()||g.lex()||d;return"number"!=typeof e&&(e instanceof Array&&(e=(n=e).pop()),e=r.symbols_[e]||e),e}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,mt(function(e){i.length=i.length-2*e,a.length=a.length-e,s.length=s.length-e},"popStack"),mt(v,"lex");for(var x,b,T,k,w,C,E,S={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===x||"u"<typeof x)&&(x=v()),o[T]&&o[T][x]))||!k.length||!k[0]){var _,A=[];for(w in o[T])this.terminals_[w]&&2<w&&A.push("'"+this.terminals_[w]+"'");_=g.showPosition?"Parse error on line "+(h+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+x);switch(k[0]){case 1:i.push(x),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),x=null,b?(x=b,b=null):(c=g.yyleng,l=g.yytext,h=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],S.$=a[a.length-C],S._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(E=this.performAction.apply(S,[l,c,h,f.yy,k[1],a,s].concat(p)))<"u")return E;C&&(i=i.slice(0,-1*C*2),a=a.slice(0,-1*C),s=s.slice(0,-1*C)),i.push(this.productions_[k[1]][0]),a.push(S.$),s.push(S._$),E=o[i[i.length-2]][i[i.length-1]],i.push(E);break;case 3:return!0}}return!0},"parse")},o={EOF:1,parseError:mt(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:mt(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:mt(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:mt(function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g),e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),i=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===e.length?this.yylloc.first_column:0)+e[e.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:mt(function(){return this._more=!0,this},"more"),reject:mt(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:mt(function(e){this.unput(this.match.slice(e))},"less"),pastInput:mt(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:mt(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:mt(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
`+t+"^"},"showPosition"),test_match:mt(function(e,t){var r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(i.yylloc.range=this.yylloc.range.slice(0)),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:mt(function(){if(this.done)return this.EOF;var e,t,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!t||r[0].length>t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:mt(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:mt(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:mt(function(e){this.begin(e)},"pushState"),stateStackSize:mt(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:mt(function(e,t,r,i){switch(r){case 0:case 1:case 2:break;case 3:if(e.getIndentMode&&e.getIndentMode())return e.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 4:break;case 5:e.setIndentMode&&e.setIndentMode(!1),this.begin("INITIAL"),this.unput(t.yytext);break;case 6:return this.begin("bol"),8;case 7: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(!e.consumeIndentText)return 19;e.consumeIndentText=!1;break;case 15:return 24;case 16:return t.yytext=t.yytext.slice(2,-2),14;case 17:return t.yytext=t.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}}};r.lexer=o,mt(e,"Parser"),(vGe=new((e.prototype=r).Parser=e)).parser=vGe,xGe=vGe});function kGe(){return H_(WGe,br().venn)}var wGe,CGe,EGe,SGe,_Ge,AGe,LGe,RGe,IGe,NGe,DGe,MGe,OGe,BGe,PGe,$Ge,FGe,zGe,qGe,WGe,UGe,GGe,jGe,VGe,YGe=i(()=>{S7(),Ei(),Gu(),wi(),wGe=[],CGe=[],EGe=[],SGe=new Set,AGe=!1,LGe=mt((e,t,r)=>{var i=BGe(e).sort(),r=r??10/Math.pow(e.length,2);1===(_Ge=i).length&&SGe.add(i[0]),wGe.push({sets:i,size:r,label:t?IGe(t):void 0})},"addSubsetData"),RGe=mt(()=>wGe,"getSubsetData"),IGe=mt(e=>2<=(e=e.trim()).length&&e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e,"normalizeText"),NGe=mt(e=>e&&IGe(e),"normalizeStyleValue"),DGe=mt((e,t,r)=>{t=IGe(t),CGe.push({sets:BGe(e).sort(),id:t,label:r?IGe(r):void 0})},"addTextData"),MGe=mt((e,t)=>{var r,i,e=BGe(e).sort(),n={};for([r,i]of t)n[r]=NGe(i)??i;EGe.push({targets:e,styles:n})},"addStyleData"),OGe=mt(()=>EGe,"getStyleData"),BGe=mt(e=>e.map(e=>IGe(e)),"normalizeIdentifierList"),PGe=mt(e=>{if(0<(e=BGe(e).filter(e=>!SGe.has(e))).length)throw new Error("unknown set identifier: "+e.join(", "))},"validateUnionIdentifiers"),$Ge=mt(()=>CGe,"getTextData"),FGe=mt(()=>_Ge,"getCurrentSets"),zGe=mt(()=>AGe,"getIndentMode"),qGe=mt(e=>{AGe=e},"setIndentMode"),WGe=ar.venn,mt(kGe,"getConfig"),UGe=mt(()=>{Pc(),wGe.length=0,CGe.length=0,EGe.length=0,SGe.clear(),_Ge=void 0,AGe=!1},"customClear"),GGe={getConfig:kGe,clear:UGe,setAccTitle:$c,getAccTitle:Fc,setDiagramTitle:Wc,getDiagramTitle:Uc,getAccDescription:qc,setAccDescription:zc,addSubsetData:LGe,getSubsetData:RGe,addTextData:DGe,addStyleData:MGe,validateUnionIdentifiers:PGe,getTextData:$Ge,getStyleData:OGe,getCurrentSets:FGe,getIndentMode:zGe,setIndentMode:qGe}}),HGe=i(()=>{jGe=mt(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"),VGe=jGe});function XGe(c,e){let t=ZGe(c),r=t.filter(e=>KGe(e,c)),i=0,n=0,a=[];if(1<r.length){var s=rje(r);for(let e=0;e<r.length;++e){var o=r[e];o.angle=Math.atan2(o.x-s.x,o.y-s.y)}r.sort((e,t)=>t.angle-e.angle);let h=r[r.length-1];for(let e=0;e<r.length;++e){var u=r[e];n+=(h.x+u.x)*(u.y-h.y);let o={x:(u.x+h.x)/2,y:(u.y+h.y)/2},l=null;for(let s=0;s<u.parentIndex.length;++s)if(h.parentIndex.includes(u.parentIndex[s])){let e=c[u.parentIndex[s]],t=Math.atan2(u.x-e.x,u.y-e.y),r=Math.atan2(h.x-e.x,h.y-e.y),i=r-t,n=(i<0&&(i+=2*Math.PI),r-i/2),a=JGe(o,{x:e.x+e.radius*Math.sin(n),y:e.y+e.radius*Math.cos(n)});a>2*e.radius&&(a=2*e.radius),(null==l||l.width>a)&&(l={circle:e,width:a,p1:u,p2:h,large:a>e.radius,sweep:!0})}null!=l&&(a.push(l),i+=QGe(l.circle.radius,l.width),h=u)}}else{let t=c[0];for(let e=1;e<c.length;++e)c[e].radius<t.radius&&(t=c[e]);let r=!1;for(let e=0;e<c.length;++e)if(JGe(c[e],t)>Math.abs(t.radius-c[e].radius)){r=!0;break}r?i=n=0:(i=t.radius*t.radius*Math.PI,a.push({circle:t,p1:{x:t.x,y:t.y+t.radius},p2:{x:t.x-1e-10,y:t.y+t.radius},width:2*t.radius,large:!0,sweep:!0}))}return n/=2,e&&(e.area=i+n,e.arcArea=i,e.polygonArea=n,e.arcs=a,e.innerPoints=r,e.intersectionPoints=t),i+n}function KGe(t,e){return e.every(e=>JGe(t,e)<e.radius+1e-10)}function ZGe(r){var i,n=[];for(let t=0;t<r.length;++t)for(let e=t+1;e<r.length;++e)for(i of tje(r[t],r[e]))i.parentIndex=[t,e],n.push(i);return n}function QGe(e,t){return e*e*Math.acos(1-t/e)-(e-t)*Math.sqrt(t*(2*e-t))}function JGe(e,t){return Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))}function eje(e,t,r){var i;return e+t<=r?0:r<=Math.abs(e-t)?Math.PI*Math.min(e,t)*Math.min(e,t):(i=t-(r*r-e*e+t*t)/(2*r),QGe(e,e-(r*r-t*t+e*e)/(2*r))+QGe(t,i))}function tje(e,t){var r,i,n=JGe(e,t),a=e.radius,s=t.radius;return a+s<=n||n<=Math.abs(a-s)?[]:(s=(a*a-s*s+n*n)/(2*n),a=Math.sqrt(a*a-s*s),[{x:(r=e.x+s*(t.x-e.x)/n)+(i=a/n*-(t.y-e.y)),y:(s=e.y+s*(t.y-e.y)/n)-(a=a/n*-(t.x-e.x))},{x:r-i,y:s+a}])}function rje(e){var t,r={x:0,y:0};for(t of e)r.x+=t.x,r.y+=t.y;return r.x/=e.length,r.y/=e.length,r}function ije(t,r,e,i){let n=(i=i||{}).maxIterations||100,a=i.tolerance||1e-10,s=t(r),o=t(e),l=e-r;if(0<s*o)throw"Initial bisect points must have opposite signs";if(0===s)return r;if(0===o)return e;for(let e=0;e<n;++e){var h=r+(l/=2),c=t(h);if(0<=c*s&&(r=h),Math.abs(l)<a||0===c)return h}return r+l}function nje(t){var r=new Array(t);for(let e=0;e<t;++e)r[e]=0;return r}function aje(e,t){return nje(e).map(()=>nje(t))}function sje(t,r){let i=0;for(let e=0;e<t.length;++e)i+=t[e]*r[e];return i}function oje(e){return Math.sqrt(sje(e,e))}function lje(t,r,i){for(let e=0;e<r.length;++e)t[e]=r[e]*i}function hje(t,r,i,n,a){for(let e=0;e<t.length;++e)t[e]=r*i[e]+n*a[e]}function cje(t,r,i){let n=(i=i||{}).maxIterations||200*r.length,a=i.nonZeroDelta||1.05,s=i.zeroDelta||.001,o=i.minErrorDelta||1e-6,l=i.minErrorDelta||1e-5,h=void 0!==i.rho?i.rho:1,c=void 0!==i.chi?i.chi:2,u=void 0!==i.psi?i.psi:-.5,d=void 0!==i.sigma?i.sigma:.5,p,g=r.length,f=new Array(g+1);f[0]=r,f[0].fx=t(r);for(let e=f[0].id=0;e<g;++e){var m=r.slice();m[e]=m[e]?m[e]*a:s,f[e+1]=m,f[e+1].fx=t(m),f[e+1].id=e+1}function y(t){for(let e=0;e<t.length;e++)f[g][e]=t[e];f[g].fx=t.fx}mt(y,"updateSimplex");var v=mt((e,t)=>e.fx-t.fx,"sortOrder"),x=r.slice(),b=r.slice(),T=r.slice(),k=r.slice();for(let e=0;e<n;++e){f.sort(v),i.history&&((w=f.map(e=>{var t=e.slice();return t.fx=e.fx,t.id=e.id,t})).sort((e,t)=>e.id-t.id),i.history.push({x:f[0].slice(),fx:f[0].fx,simplex:w}));for(let e=p=0;e<g;++e)p=Math.max(p,Math.abs(f[0][e]-f[1][e]));if(Math.abs(f[0].fx-f[g].fx)<o&&p<l)break;for(let t=0;t<g;++t){for(let e=x[t]=0;e<g;++e)x[t]+=f[e][t];x[t]/=g}var w=f[g];if(hje(b,1+h,x,-h,w),b.fx=t(b),b.fx<f[0].fx)hje(k,1+c,x,-c,w),k.fx=t(k),k.fx<b.fx?y(k):y(b);else if(b.fx>=f[g-1].fx){let e=!1;if(b.fx>w.fx?(hje(T,1+u,x,-u,w),T.fx=t(T),T.fx<w.fx?y(T):e=!0):(hje(T,1-u*h,x,u*h,w),T.fx=t(T),T.fx<b.fx?y(T):e=!0),e){if(1<=d)break;for(let e=1;e<f.length;++e)hje(f[e],1-d,f[0],d,f[e]),f[e].fx=t(f[e])}}else y(b)}return f.sort(v),{fx:f[0].fx,x:f[0]}}function uje(n,a,s,o,l,h,c){let u=s.fx,d=sje(s.fxprime,a),p=u,t=u,g=d,r=0;function i(t,r,i){for(let e=0;e<16;++e)if(l=(t+r)/2,hje(o.x,1,s.x,l,a),p=o.fx=n(o.x,o.fxprime),g=sje(o.fxprime,a),p>u+h*l*d||p>=i)r=l;else{if(Math.abs(g)<=-c*d)return l;0<=g*(r-t)&&(r=t),t=l,i=p}return 0}l=l||1,h=h||1e-6,c=c||.1,mt(i,"zoom");for(let e=0;e<10;++e){if(hje(o.x,1,s.x,l,a),p=o.fx=n(o.x,o.fxprime),g=sje(o.fxprime,a),p>u+h*l*d||e&&p>=t)return i(r,l,t);if(Math.abs(g)<=-c*d)return l;if(0<=g)return i(l,r,p);t=p,r=l,l*=2}return l}function dje(t,e,r){let i={x:e.slice(),fx:0,fxprime:e.slice()},n={x:e.slice(),fx:0,fxprime:e.slice()},a=e.slice(),s,o,l=1,h;h=(r=r||{}).maxIterations||20*e.length,i.fx=t(i.x,i.fxprime),lje(s=i.fxprime.slice(),i.fxprime,-1);for(let e=0;e<h;++e){var c;if(l=uje(t,s,i,n,l),r.history&&r.history.push({x:i.x.slice(),fx:i.fx,fxprime:i.fxprime.slice(),alpha:l}),l?(hje(a,1,n.fxprime,-1,i.fxprime),c=sje(i.fxprime,i.fxprime),hje(s,Math.max(0,sje(a,n.fxprime)/c),s,-1,n.fxprime),o=i,i=n,n=o):lje(s,i.fxprime,-1),oje(i.fxprime)<=1e-5)break}return r.history&&r.history.push({x:i.x.slice(),fx:i.fx,fxprime:i.fxprime.slice(),alpha:l}),i}function pje(e,t={}){t.maxIterations=t.maxIterations||500;let r=t.initialLayout||vje,n=t.lossFunction||Tje,a=fje(e,t),s=r(a,t),o=Object.keys(s),i=[];for(var l of o)i.push(s[l].x),i.push(s[l].y);var h=cje(t=>{var r={};for(let e=0;e<o.length;++e){var i=o[e];r[i]={x:t[2*e],y:t[2*e+1],radius:s[i].radius}}return n(r,a)},i,t).x;for(let e=0;e<o.length;++e){var c=o[e];s[c].x=h[2*e],s[c].y=h[2*e+1]}return s}function gje(t,r,i){return Math.min(t,r)*Math.min(t,r)*Math.PI<=i+Wje?Math.abs(t-r):ije(e=>eje(t,r,e)-i,0,t+r)}function fje(e,t={}){var t=t.distinct,r=e.map(e=>Object.assign({},e));function i(e){return e.join(";")}if(mt(i,"toKey"),t){var n,a,s=new Map;for(n of r)for(let t=0;t<n.sets.length;t++){var o=String(n.sets[t]);s.set(o,n.size+(s.get(o)||0));for(let e=t+1;e<n.sets.length;e++){var l=o+";"+(h=String(n.sets[e])),h=h+";"+o;s.set(l,n.size+(s.get(l)||0)),s.set(h,n.size+(s.get(h)||0))}}for(a of r)a.sets.length<3&&(a.size=s.get(i(a.sets)))}var c,u,d,p=[],g=new Set;for(c of r)1===c.sets.length?p.push(c.sets[0]):2===c.sets.length&&(u=c.sets[0],d=c.sets[1],g.add(i(c.sets)),g.add(i([d,u])));p.sort((e,t)=>e===t?0:e<t?-1:1);for(let t=0;t<p.length;++t){var f=p[t];for(let e=t+1;e<p.length;++e){var m=p[e];g.has(i([f,m]))||r.push({sets:[f,m],size:0})}}return r}function mje(e,a,s){let o=aje(a.length,a.length),l=aje(a.length,a.length);return e.filter(e=>2===e.sets.length).forEach(e=>{var t=s[e.sets[0]],r=s[e.sets[1]],i=gje(Math.sqrt(a[t].size/Math.PI),Math.sqrt(a[r].size/Math.PI),e.size);o[t][r]=o[r][t]=i;let n=0;e.size+1e-10>=Math.min(a[t].size,a[r].size)?n=1:e.size<=1e-10&&(n=-1),l[t][r]=l[r][t]=n}),{distances:o,constraints:l}}function yje(r,i,n,a){for(let e=0;e<i.length;++e)i[e]=0;let s=0;for(let t=0;t<n.length;++t){var o=r[2*t],l=r[2*t+1];for(let e=t+1;e<n.length;++e){var h=r[2*e],c=r[2*e+1],u=n[t][e],d=a[t][e],p=(h-o)*(h-o)+(c-l)*(c-l),g=Math.sqrt(p),p=p-u*u;0<d&&g<=u||d<0&&u<=g||(s+=2*p*p,i[2*t]+=4*p*(o-h),i[2*t+1]+=4*p*(l-c),i[2*e]+=4*p*(h-o),i[2*e+1]+=4*p*(c-l))}}return s}function vje(e,t={}){var r=bje(e,t),i=t.lossFunction||Tje;return 8<=e.length&&i(t=xje(e,t),e)+1e-8<i(r,e)?t:r}function xje(e,t={}){var r,i=t.restarts||10,n=[],a={};for(r of e)1===r.sets.length&&(a[r.sets[0]]=n.length,n.push(r));let{distances:s,constraints:o}=mje(e,n,a),l=oje(s.map(oje))/s.length,h=(s=s.map(e=>e.map(e=>e/l)),mt((e,t)=>yje(e,t,s,o),"obj")),c=null;for(let e=0;e<i;++e){var u=dje(h,nje(2*s.length).map(Math.random),t);(!c||u.fx<c.fx)&&(c=u)}var d=c.x,p={};for(let e=0;e<n.length;++e){var g=n[e];p[g.sets[0]]={x:d[2*e]*l,y:d[2*e+1]*l,radius:Math.sqrt(g.size/Math.PI)}}if(t.history)for(var f of t.history)lje(f.x,l);return p}function bje(i,e){let n=e&&e.lossFunction?e.lossFunction:Tje,a={},s={};for(var t of i){var r;1===t.sets.length&&(r=t.sets[0],a[r]={x:1e10,y:1e10,rowid:a.length,size:t.size,radius:Math.sqrt(t.size/Math.PI)},s[r]=[])}for(var o of i=i.filter(e=>2===e.sets.length)){let e=null!=o.weight?o.weight:1,t=o.sets[0],r=o.sets[1];o.size+Wje>=Math.min(a[t].size,a[r].size)&&(e=0),s[t].push({set:r,size:o.size,weight:e}),s[r].push({set:t,size:o.size,weight:e})}let l=[];function h(e,t){return t.size-e.size}Object.keys(s).forEach(t=>{let r=0;for(let e=0;e<s[t].length;++e)r+=s[t][e].size*s[t][e].weight;l.push({set:t,size:r})}),mt(h,"sortOrder"),l.sort(h);let c={};function u(e){return e.set in c}function d(e,t){a[t].x=e.x,a[t].y=e.y,c[t]=!0}mt(u,"isPositioned"),mt(d,"positionSet"),d({x:0,y:0},l[0].set);for(let r=1;r<l.length;++r){var p=l[r].set,g=s[p].filter(u),f=a[p];if(g.sort(h),0===g.length)throw"ERROR: missing pairwise overlap information";for(var m,y=[],v=0;v<g.length;++v){var x=a[g[v].set],b=gje(f.radius,x.radius,g[v].size);y.push({x:x.x+b,y:x.y}),y.push({x:x.x-b,y:x.y}),y.push({y:x.y+b,x:x.x}),y.push({y:x.y-b,x:x.x});for(let e=v+1;e<g.length;++e){var T=a[g[e].set],k=gje(f.radius,T.radius,g[e].size),T=tje({x:x.x,y:x.y,radius:b},{x:T.x,y:T.y,radius:k});y.push(...T)}}let e=1e50,t=y[0];for(m of y){a[p].x=m.x,a[p].y=m.y;var w=n(a,i);w<e&&(e=w,t=m)}d(t,p)}return a}function Tje(t,e){let r=0;for(var i of e){var n,a;1!==i.sets.length&&(n=2===i.sets.length?(a=t[i.sets[0]],n=t[i.sets[1]],eje(a.radius,n.radius,JGe(a,n))):XGe(i.sets.map(e=>t[e])),a=null!=i.weight?i.weight:1,r+=a*(n-i.size)*(n-i.size))}return r}function kje(t,e){let r=0;for(var i of e){var n,a,s;1!==i.sets.length&&(n=2===i.sets.length?(a=t[i.sets[0]],s=t[i.sets[1]],eje(a.radius,s.radius,JGe(a,s))):XGe(i.sets.map(e=>t[e])),a=null!=i.weight?i.weight:1,s=Math.log((n+1)/(i.size+1)),r+=a*s*s)}return r}function wje(t,r,e){if(null==e?t.sort((e,t)=>t.radius-e.radius):t.sort(e),0<t.length){var i,n=t[0].x,a=t[0].y;for(i of t)i.x-=n,i.y-=a}if(2===t.length&&JGe(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),1<t.length){var s,e=Math.atan2(t[1].x,t[1].y)-r,o=Math.cos(e),l=Math.sin(e);for(s of t){var h=s.x,c=s.y;s.x=o*h-l*c,s.y=l*h+o*c}}if(2<t.length){let e=Math.atan2(t[2].x,t[2].y)-r;for(;e<0;)e+=2*Math.PI;for(;e>2*Math.PI;)e-=2*Math.PI;if(e>Math.PI){var u,d=t[1].y/(1e-10+t[1].x);for(u of t){var p=(u.x+d*u.y)/(1+d*d);u.x=2*p-u.x,u.y=2*p*d-u.y}}}}function Cje(r){function i(e){return e.parent!==e&&(e.parent=i(e.parent)),e.parent}function n(e,t){e=i(e),t=i(t),e.parent=t}r.forEach(e=>{e.parent=e}),mt(i,"find"),mt(n,"union");for(let t=0;t<r.length;++t)for(let e=t+1;e<r.length;++e){var a=r[t].radius+r[e].radius;JGe(r[t],r[e])+1e-10<a&&n(r[e],r[t])}var t=new Map;for(let e=0;e<r.length;++e){var s=i(r[e]).parent.setid;t.has(s)||t.set(s,[]),t.get(s).push(r[e])}return r.forEach(e=>{delete e.parent}),Array.from(t.values())}function Eje(e){var t=mt(r=>({max:e.reduce((e,t)=>Math.max(e,t[r]+t.radius),Number.NEGATIVE_INFINITY),min:e.reduce((e,t)=>Math.min(e,t[r]-t.radius),Number.POSITIVE_INFINITY)}),"minMax");return{xRange:t("x"),yRange:t("y")}}function Sje(e,t,r){null==t&&(t=Math.PI/2);let o=Lje(e).map(e=>Object.assign({},e)),i=Cje(o);for(var n of i){wje(n,t,r);var a=Eje(n);n.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),n.bounds=a}i.sort((e,t)=>t.size-e.size);let l=(o=i[0]).bounds,h=(l.xRange.max-l.xRange.min)/50;function s(i,n,a){if(i){let e=i.bounds,t,r;var s;n?t=l.xRange.max-e.xRange.min+h:(t=l.xRange.max-e.xRange.max,(n=(e.xRange.max-e.xRange.min)/2-(l.xRange.max-l.xRange.min)/2)<0&&(t+=n)),a?r=l.yRange.max-e.yRange.min+h:(r=l.yRange.max-e.yRange.max,(n=(e.yRange.max-e.yRange.min)/2-(l.yRange.max-l.yRange.min)/2)<0&&(r+=n));for(s of i)s.x+=t,s.y+=r,o.push(s)}}mt(s,"addCluster");let c=1;for(;c<i.length;)s(i[c],!0,!1),s(i[c+1],!1,!0),s(i[c+2],!0,!0),c+=3,l=Eje(o);return Aje(o)}function _je(e,t,r,i,n){var a=Lje(e);t-=2*i,r-=2*i;let{xRange:s,yRange:o}=Eje(a);if(s.max===s.min||o.max===o.min)return console.log("not scaling solution: zero size detected"),e;let l,h,c=(h=n?(e=2*Math.sqrt(n/Math.PI),l=t/e,r/e):(l=t/(s.max-s.min),r/(o.max-o.min)),Math.min(h,l)),u=(t-(s.max-s.min)*c)/2,d=(r-(o.max-o.min)*c)/2;return Aje(a.map(e=>({radius:c*e.radius,x:i+u+(e.x-s.min)*c,y:i+d+(e.y-o.min)*c,setid:e.setid})))}function Aje(e){var t,r={};for(t of e)r[t.setid]=t;return r}function Lje(t){return Object.keys(t).map(e=>Object.assign(t[e],{setid:e}))}function Rje(y={}){let v=!1,x=600,b=350,T=15,k=1e3,w=Math.PI/2,C=!0,E=null,S=!0,_=!0,A=null,L=null,R=!1,I=null,N=!(!y||!y.symmetricalTextCentre)&&y.symmetricalTextCentre,t={},r=y&&y.colourScheme?y.colourScheme:y&&y.colorScheme?y.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],i=0,D=mt(function(e){return e in t?t[e]:(e=t[e]=r[i],(i+=1)>=r.length&&(i=0),e)},"colours"),M=pje,O=Tje;function n(e){let t=e.datum(),r=new Set,i=(t.forEach(e=>{0==e.size&&1==e.sets.length&&r.add(e.sets[0])}),t=t.filter(e=>!e.sets.some(e=>r.has(e))),{}),n={};if(0<t.length){let e=M(t,{lossFunction:O,distinct:R});C&&(e=Sje(e,w,L)),i=_je(e,x,b,T,E),n=Oje(i,t,N)}let a={};function s(e){return e.sets in a?a[e.sets]:1==e.sets.length?""+e.sets[0]:void 0}t.forEach(e=>{e.label&&(a[e.sets]=e.label)}),mt(s,"label"),e.selectAll("svg").data([i]).enter().append("svg");var o=e.select("svg");v?o.attr("viewBox",`0 0 ${x} `+b):o.attr("width",x).attr("height",b);let l={},h=!1;function c(e){return r=>zje(e.sets.map(e=>{var t=l[e],e=i[e],t=t||{x:x/2,y:b/2,radius:1},e=e||{x:x/2,y:b/2,radius:1};return{x:t.x*(1-r)+e.x*r,y:t.y*(1-r)+e.y*r,radius:t.radius*(1-r)+e.radius*r}}),I)}o.selectAll(".venn-area path").each(function(e){var t=this.getAttribute("d");1==e.sets.length&&t&&!R&&(h=!0,l[e.sets[0]]=Pje(t))}),mt(c,"pathTween");var u=(o=o.selectAll(".venn-area").data(t,e=>e.sets)).enter().append("g").attr("class",e=>"venn-area venn-"+(1==e.sets.length?"circle":"intersection")+(e.colour||e.color?" venn-coloured":"")).attr("data-venn-sets",e=>e.sets.join("_")),d=u.append("path"),p=u.append("text").attr("class","label").text(e=>s(e)).attr("text-anchor","middle").attr("dy",".35em").attr("x",x/2).attr("y",b/2);function g(e){return"function"==typeof e.transition?e.transition("venn").duration(k):e}_&&(d.style("fill-opacity","0").filter(e=>1==e.sets.length).style("fill",e=>e.colour||e.color||D(e.sets)).style("fill-opacity",".25"),p.style("fill",e=>e.colour||e.color?"#FFF":y.textFill||(1==e.sets.length?D(e.sets):"#444"))),mt(g,"asTransition");let f=e;h&&"function"==typeof f.transition?(f=g(e)).selectAll("path").attrTween("d",c):f.selectAll("path").attr("d",e=>zje(e.sets.map(e=>i[e])),I);var d=f.selectAll("text").filter(e=>e.sets in n).text(e=>s(e)).attr("x",e=>Math.floor(n[e.sets].x)).attr("y",e=>Math.floor(n[e.sets].y)),e=(S&&(h?"on"in d?d.on("end",Ije(i,s)):d.each("end",Ije(i,s)):d.each(Ije(i,s))),g(o.exit()).remove()),m=("function"==typeof o.transition&&e.selectAll("path").attrTween("d",c),e.selectAll("text").attr("x",x/2).attr("y",b/2));return null!==A&&(p.style("font-size","0px"),d.style("font-size",A),m.style("font-size","0px")),{circles:i,textCentres:n,nodes:o,enter:u,update:f,exit:e}}return mt(n,"chart"),n.wrap=function(e){return arguments.length?(S=e,n):S},n.useViewBox=function(){return v=!0,n},n.width=function(e){return arguments.length?(x=e,n):x},n.height=function(e){return arguments.length?(b=e,n):b},n.padding=function(e){return arguments.length?(T=e,n):T},n.distinct=function(e){return arguments.length?(R=e,n):R},n.colours=function(e){return arguments.length?(D=e,n):D},n.colors=function(e){return arguments.length?(D=e,n):D},n.fontSize=function(e){return arguments.length?(A=e,n):A},n.round=function(e){return arguments.length?(I=e,n):I},n.duration=function(e){return arguments.length?(k=e,n):k},n.layoutFunction=function(e){return arguments.length?(M=e,n):M},n.normalize=function(e){return arguments.length?(C=e,n):C},n.scaleToFit=function(e){return arguments.length?(E=e,n):E},n.styled=function(e){return arguments.length?(_=e,n):_},n.orientation=function(e){return arguments.length?(w=e,n):w},n.orientationOrder=function(e){return arguments.length?(L=e,n):L},n.lossFunction=function(e){return arguments.length?(O="default"===e?Tje:"logRatio"===e?kje:e,n):O},n}function Ije(m,y){return function(e){let r=this,t=m[e.sets[0]].radius||50,i=y(e)||"",n=i.split(/\s+/).reverse(),a=(i.length+n.length)/3,s=n.pop(),o=[s],l=0,h=(r.textContent=null,[]);function c(e){var t=r.ownerDocument.createElementNS(r.namespaceURI,"tspan");return t.textContent=e,h.push(t),r.append(t),t}mt(c,"append");let u=c(s);for(;s=n.pop();){o.push(s);var d=o.join(" ");(u.textContent=d).length>a&&u.getComputedTextLength()>t&&(o.pop(),u.textContent=o.join(" "),o=[s],u=c(s),l++)}let p=.35-1.1*l/2,g=r.getAttribute("x"),f=r.getAttribute("y");h.forEach((e,t)=>{e.setAttribute("x",g),e.setAttribute("y",f),e.setAttribute("dy",p+1.1*t+"em")})}}function Nje(t,r,i){let n=r[0].radius-JGe(r[0],t);for(let e=1;e<r.length;++e){var a=r[e].radius-JGe(r[e],t);a<=n&&(n=a)}for(let e=0;e<i.length;++e){var s=JGe(i[e],t)-i[e].radius;s<=n&&(n=s)}return n}function Dje(t,r,e){var i,n,a,s=[];for(i of t)s.push({x:i.x,y:i.y}),s.push({x:i.x+i.radius/2,y:i.y}),s.push({x:i.x-i.radius/2,y:i.y}),s.push({x:i.x,y:i.y+i.radius/2}),s.push({x:i.x,y:i.y-i.radius/2});let o=s[0],l=Nje(s[0],t,r);for(let e=1;e<s.length;++e){var h=Nje(s[e],t,r);h>=l&&(o=s[e],l=h)}let c=cje(e=>-1*Nje({x:e[0],y:e[1]},t,r),[o.x,o.y],{maxIterations:500,minErrorDelta:1e-10}).x,u={x:e?0:c[0],y:c[1]},d=!0;for(n of t)if(JGe(u,n)>n.radius){d=!1;break}for(a of r)if(JGe(u,a)<a.radius){d=!1;break}return d?u:1==t.length?{x:t[0].x,y:t[0].y}:(XGe(t,e={}),0===e.arcs.length?{x:0,y:-1e3,disjoint:!0}:1==e.arcs.length?{x:e.arcs[0].circle.x,y:e.arcs[0].circle.y}:r.length?Dje(t,[]):rje(e.arcs.map(e=>e.p1)))}function Mje(r){var e,i={},n=Object.keys(r);for(e of n)i[e]=[];for(let t=0;t<n.length;t++){var a=n[t],s=r[a];for(let e=t+1;e<n.length;++e){var o=n[e],l=r[o],h=JGe(s,l);h+l.radius<=s.radius+1e-10?i[o].push(a):h+s.radius<=l.radius+1e-10&&i[a].push(o)}}return i}function Oje(t,r,i){var n={},a=Mje(t);for(let e=0;e<r.length;++e){var s=r[e].sets,o={},l={};for(let e=0;e<s.length;++e){o[s[e]]=!0;var h=a[s[e]];for(let e=0;e<h.length;++e)l[h[e]]=!0}var c,u=[],d=[];for(c in t)c in o?u.push(t[c]):c in l||d.push(t[c]);var p=Dje(u,d,i);(n[s]=p).disjoint&&0<r[e].size&&console.log("WARNING: area "+s+" not represented on screen")}return n}function Bje(e,t,r){var i=[];return i.push(`
M`,e,t),i.push(`
m`,-r,0),i.push(`
a`,r,r,0,1,0,2*r,0),i.push(`
a`,r,r,0,1,0,2*-r,0),i.join(" ")}function Pje(e){return e=e.split(" "),{x:Number.parseFloat(e[1]),y:Number.parseFloat(e[2]),radius:-Number.parseFloat(e[4])}}function $je(e){return 0===e.length?[]:(XGe(e,e={}),e.arcs)}function Fje(e,t){if(0===e.length)return"M 0 0";let r=Math.pow(10,t||0),i=null!=t?e=>Math.round(e*r)/r:e=>e;if(1==e.length)return t=e[0].circle,Bje(i(t.x),i(t.y),i(t.radius));var n,a=[`
M`,i(e[0].p2.x),i(e[0].p2.y)];for(n of e){var s=i(n.circle.radius);a.push(`
A`,s,s,0,n.large?1:0,n.sweep?1:0,i(n.p1.x),i(n.p1.y))}return a.join(" ")}function zje(e,t){return Fje($je(e),t)}function qje(e,t={}){let{lossFunction:r,layoutFunction:i=pje,normalize:n=!0,orientation:a=Math.PI/2,orientationOrder:s,width:o=600,height:l=350,padding:h=15,scaleToFit:c=!1,symmetricalTextCentre:u=!1,distinct:d,round:p=2}=t,g=i(e,{lossFunction:"default"!==r&&r?"logRatio"===r?kje:r:Tje,distinct:d}),f=_je(n?Sje(g,a,s):g,o,l,h,c),m=Oje(f,e,u),y=new Map(Object.keys(f).map(e=>[e,{set:e,x:f[e].x,y:f[e].y,radius:f[e].radius}])),v=e.map(e=>{var t=e.sets.map(e=>y.get(e)),r=$je(t);return{circles:t,arcs:r,path:Fje(r,p),area:e,has:new Set(e.sets)}});function x(e){let r="";for(let t of v)t.has.size>e.length&&e.every(e=>t.has.has(e))&&(r+=" "+t.path);return r}return mt(x,"genDistinctPath"),v.map(({circles:e,arcs:t,path:r,area:i})=>({data:i,text:m[i.sets],circles:e,arcs:t,path:r,distinctPath:r+x(i.sets)}))}var Wje,Uje=i(()=>{mt(XGe,"intersectionArea"),mt(KGe,"containedInCircles"),mt(ZGe,"getIntersectionPoints"),mt(QGe,"circleArea"),mt(JGe,"distance"),mt(eje,"circleOverlap"),mt(tje,"circleCircleIntersection"),mt(rje,"getCenter"),mt(ije,"bisect"),mt(nje,"zeros"),mt(aje,"zerosM"),mt(sje,"dot"),mt(oje,"norm2"),mt(lje,"scale"),mt(hje,"weightedSum"),mt(cje,"nelderMead"),mt(uje,"wolfeLineSearch"),mt(dje,"conjugateGradient"),mt(pje,"venn"),Wje=1e-10,mt(gje,"distanceFromIntersectArea"),mt(fje,"addMissingAreas"),mt(mje,"getDistanceMatrices"),mt(yje,"constrainedMDSGradient"),mt(vje,"bestInitialLayout"),mt(xje,"constrainedMDSLayout"),mt(bje,"greedyLayout"),mt(Tje,"lossFunction"),mt(kje,"logRatioLossFunction"),mt(wje,"orientateCircles"),mt(Cje,"disjointCluster"),mt(Eje,"getBoundingBox"),mt(Sje,"normalizeSolution"),mt(_je,"scaleSolution"),mt(Aje,"toObjectNotation"),mt(Lje,"fromObjectNotation"),mt(Rje,"VennDiagram"),mt(Ije,"wrapText"),mt(Nje,"circleMargin"),mt(Dje,"computeTextCentre"),mt(Mje,"getOverlappingCircles"),mt(Oje,"computeTextCentres"),mt(Bje,"circlePath"),mt(Pje,"circleFromPath"),mt($je,"intersectionAreaArcs"),mt(Fje,"arcsToPath"),mt(zje,"intersectionAreaPath"),mt(qje,"layout")});function Gje(e){var t,r=new Map;for(t of e){var i=t.targets.join("|"),n=r.get(i);n?Object.assign(n,t.styles):r.set(i,{...t.styles})}return r}function jje(e){return e.join("|")}function Vje(e,t,r,i,a,s){var n,o,l,h=e?.useDebugLayout??!1,c=r.select("svg").append("g").attr("class","venn-text-nodes"),u=new Map;for(n of i){var d=jje(n.sets),p=u.get(d);p?p.push(n):u.set(d,[n])}for([o,l]of u.entries())if((x=t.get(o))?.text){let t=x.text.x,r=x.text.y,e=Math.min(...x.circles.map(e=>e.radius)),i=Math.min(...x.circles.map(e=>e.radius-Math.hypot(t-e.x,r-e.y))),n=Number.isFinite(i)?Math.max(0,i):0;0===n&&Number.isFinite(e)&&(n=.6*e);var g,f,m=c.append("g").attr("class","venn-text-area").attr("font-size",40*a+"px"),y=(h&&m.append("circle").attr("class","venn-text-debug-circle").attr("cx",t).attr("cy",r).attr("r",n).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*a).attr("stroke-dasharray",6*a+" "+4*a),Math.max(80*a,2*n*.95)),v=Math.max(60*a,2*n*.95),x=(x.data.label&&0<x.data.label.length?Math.min(32*a,.25*n):0)+(l.length<=2?30*a:0),b=t-y/2,T=r-v/2+x,k=Math.max(1,Math.ceil(Math.sqrt(l.length))),w=y/k,C=v/Math.max(1,Math.ceil(l.length/k));for([g,f]of l.entries()){var E=b+w*(.5+(_=g%k)),S=T+C*((A=Math.floor(g/k))+.5),_=(h&&m.append("rect").attr("class","venn-text-debug-cell").attr("x",b+w*_).attr("y",T+C*A).attr("width",w).attr("height",C).attr("fill","none").attr("stroke","teal").attr("stroke-width",+a).attr("stroke-dasharray",4*a+" "+3*a),.9*w),A=.9*C,E=m.append("foreignObject").attr("class","venn-text-node-fo").attr("width",_).attr("height",A).attr("x",E-_/2).attr("y",S-A/2).attr("overflow","visible"),_=s.get(f.id)?.color,S=E.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(f.label??f.id);_&&S.style("color",_)}}}var Yje,Hje,Xje=i(()=>{Sk(),oi(),Ei(),cAe(),Uje(),Rc(),mN(),mt(Gje,"buildStyleByKey"),Yje=mt((e,t,r,i)=>{let n=i.db,a=n.getConfig?.(),{themeVariables:l,look:s,handDrawnSeed:h}=br(),c="handDrawn"===s,u=[l.venn1,l.venn2,l.venn3,l.venn4,l.venn5,l.venn6,l.venn7,l.venn8].filter(Boolean),o=n.getDiagramTitle?.(),d=n.getSubsetData(),p=n.getTextData(),g=Gje(n.getStyleData()),f=a?.width??800,m=a?.height??450,y=f/1600,v=o?48*y:0,x=l.primaryTextColor??l.textColor,b=nAe(t);b.attr("viewBox",`0 0 ${f} `+m),o&&b.append("text").text(o).attr("class","venn-title").attr("font-size",32*y+"px").attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*y).style("fill",l.vennTitleTextColor||l.titleColor);var T,i=Q(document.createElement("div")),t=Rje().width(f).height(m-v);i.datum(d).call(t);let k=c?fN.svg(i.select("svg").node()):void 0,w=qje(d,{width:f,height:m-v,padding:a?.padding??15}),C=new Map;for(T of w){var E=jje([...T.data.sets].sort());C.set(E,T)}0<p.length&&Vje(a,C,i,p,y,g);let S=vt(l.background||"#f4f4f4");i.selectAll(".venn-circle").each(function(e,t){var r=Q(this),e=jje([...e.sets].sort()),i=g.get(e),n=i?.fill||u[t%u.length]||l.primaryColor,a=(r.classed("venn-set-"+t%8,!0),i?.["fill-opacity"]??.1),s=i?.stroke||n,o=i?.["stroke-width"]||""+5*y,t=(c&&k?(e=C.get(e))&&0<e.circles.length&&(e=e.circles[0],e=k.circle(e.x,e.y,2*e.radius,{roughness:.7,seed:h,fill:Ct(n,.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:60*t-41,stroke:s,strokeWidth:parseFloat(String(o))}),r.select("path").remove(),r.node()?.insertBefore(e,r.select("text").node())):r.select("path").style("fill",n).style("fill-opacity",a).style("stroke",s).style("stroke-width",o).style("stroke-opacity",.95),i?.color||(S?L:R)(n,30));r.select("text").style("font-size",48*y+"px").style("fill",t)}),c&&k?i.selectAll(".venn-intersection").each(function(e){var t,r,i=Q(this),e=jje([...e.sets].sort()),n=(e=g.get(e))?.fill;n?(r=(t=i.select("path")).attr("d"))&&(r=k.path(r,{roughness:.7,seed:h,fill:Ct(n,.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),(n=t.node())?.parentNode?.insertBefore(r,n),t.remove()):i.select("path").style("fill-opacity",0),i.select("text").style("font-size",48*y+"px").style("fill",e?.color??l.vennSetTextColor??x)}):(i.selectAll(".venn-intersection text").style("font-size",48*y+"px").style("fill",e=>(e=jje([...e.sets].sort()),g.get(e)?.color??l.vennSetTextColor??x)),i.selectAll(".venn-intersection path").style("fill-opacity",e=>(e=jje([...e.sets].sort()),g.get(e)?.fill?1:0)).style("fill",e=>(e=jje([...e.sets].sort()),g.get(e)?.fill??"transparent")));var _=b.append("g").attr("transform",`translate(0, ${v})`);if((t=i.select("svg").node())&&"childNodes"in t)for(var A of[...t.childNodes])_.node()?.appendChild(A);xc(b,m,f,a?.useMaxWidth??!0)},"draw"),mt(jje,"stableSetsKey"),mt(Vje,"renderTextNodes"),Hje={draw:Yje}}),Kje={};sYe(Kje,{diagram:()=>Zje});var Zje,Qje,Jje=i(()=>{TGe(),YGe(),HGe(),Xje(),Zje={parser:xGe,db:GGe,renderer:Hje,styles:VGe}}),eVe=i(()=>{wi(),Ei(),S7(),hI(),Gu(),Qje=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=$c,this.getAccTitle=Fc,this.setDiagramTitle=Wc,this.getDiagramTitle=Uc,this.getAccDescription=qc,this.setAccDescription=zc}static{mt(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){var e=ar,t=br();return H_({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),0===t&&(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,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");i&&i.forEach(e=>{iI(e)&&(r?.textStyles?r.textStyles.push(e):r.textStyles=[e]),r?.styles?r.styles.push(e):r.styles=[e]}),this.classes.set(e,r)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){Pc(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}}});function tVe(e){if(!e.length)return[];let i=[],n=[];return e.forEach(e=>{var t,r={name:e.name,children:"Leaf"===e.type?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=e.cssCompiledStyles),"Leaf"===e.type&&void 0!==e.value&&(r.value=e.value);0<n.length&&n[n.length-1].level>=e.level;)n.pop();0===n.length?i.push(r):(t=n[n.length-1].node).children?t.children.push(r):t.children=[r],"Leaf"!==e.type&&n.push({node:r,level:e.level})}),i}var rVe,iVe,nVe,aVe,sVe,oVe,lVe,hVe,cVe,uVe=i(()=>{mt(tVe,"buildHierarchy")}),dVe=i(()=>{RSe(),e(),MSe(),uVe(),eVe(),rVe=mt((e,i)=>{ISe(e,i);var t,r,n=[];for(t of e.TreemapRows??[])"ClassDefStatement"===t.$type&&i.addClass(t.className??"",t.styleText??"");for(r of e.TreemapRows??[]){var a,s,o,l=r.item;l&&(o=r.indent?parseInt(r.indent):0,a=iVe(l),s=0<(s=l.classSelector?i.getStylesForClass(l.classSelector):[]).length?s:void 0,o={level:o,name:a,type:l.$type,value:l.value,classSelector:l.classSelector,cssCompiledStyles:s},n.push(o))}let h=tVe(n),c=mt((e,t)=>{for(var r of e)i.addNode(r,t),r.children&&0<r.children.length&&c(r.children,t+1)},"addNodesRecursively");c(h,0)},"populate"),iVe=mt(e=>e.name?String(e.name):"","getItemName"),nVe={parser:{yy:void 0},parse:mt(async e=>{try{var t=await SSe("treemap",e),r=(B.debug("Treemap AST:",t),nVe.parser?.yy);if(!(r instanceof Qje))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.");rVe(t,r)}catch(e){throw B.error("Error parsing treemap:",e),e}},"parse")}}),pVe=i(()=>{cAe(),rde(),Rc(),Sk(),hI(),Ei(),e(),aVe=mt((e,a,t,s)=>{let r=s.db,o=r.getConfig(),l=o.padding??10,h=r.getDiagramTitle(),c=r.getRoot(),u=br().themeVariables;if(c){var s=h?30:0,d=nAe(a),p=o.nodeWidth?10*o.nodeWidth:960,g=o.nodeHeight?10*o.nodeHeight:500,f=p,m=g+s;d.attr("viewBox",`0 0 ${f} `+m),xc(d,m,f,o.useMaxWidth);let r;try{var y=o.valueFormat||",";if("$0,0"===y)r=mt(e=>"$"+Cv(",")(e),"valueFormat");else if(y.startsWith("$")&&y.includes(",")){let e=/\.\d+/.exec(y),t=e?e[0]:"";r=mt(e=>"$"+Cv(","+t)(e),"valueFormat")}else if(y.startsWith("$")){let t=y.substring(1);r=mt(e=>"$"+Cv(t||"")(e),"valueFormat")}else r=Cv(y)}catch(e){B.error("Error creating format function:",e),r=Cv(",")}let t=Fx().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]),i=Fx().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]),n=Fx().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]);h&&d.append("text").attr("x",f/2).attr("y",s/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h),m=d.append("g").attr("transform",`translate(0, ${s})`).attr("class","treemapContainer"),y=hx(c).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),s=(f=Nx().size([p,g]).paddingTop(e=>e.children&&0<e.children.length?35:0).paddingInner(l).paddingLeft(e=>e.children&&0<e.children.length?10:0).paddingRight(e=>e.children&&0<e.children.length?10:0).paddingBottom(e=>e.children&&0<e.children.length?10:0).round(!0)(y)).descendants().filter(e=>e.children&&0<e.children.length),(p=m.selectAll(".treemapSection").data(s).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`)).append("rect").attr("width",e=>e.x1-e.x0).attr("height",25).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>0===e.depth?"display: none;":""),p.append("clipPath").attr("id",(e,t)=>`clip-section-${a}-`+t).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",25),p.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>"treemapSection section"+t).attr("fill",e=>t(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>i(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>0===e.depth?"display: none;":(e=ee({cssCompiledStyles:e.data.cssCompiledStyles})).nodeStyles+";"+e.borderStyles.join(";")),p.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",12.5).attr("dominant-baseline","middle").text(e=>0===e.depth?"":e.data.name).attr("font-weight","bold").attr("style",e=>0===e.depth?"display: none;":"dominant-baseline: middle; font-size: 12px; fill:"+n(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+ee({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).each(function(e){if(0!==e.depth){var t=Q(this),r=e.data.name,i=(t.text(r),e.x1-e.x0),e=!1!==o.showValues&&e.value?i-10-30-10-6:i-6-6,n=Math.max(15,e),a=t.node();if(a.getComputedTextLength()>n){let e=r;for(;0<e.length;){if(0===(e=r.substring(0,e.length-1)).length){t.text("..."),a.getComputedTextLength()>n&&t.text("");break}if(t.text(e+"..."),a.getComputedTextLength()<=n)break}}}}),!1!==o.showValues&&p.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",12.5).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?r(e.value):"").attr("font-style","italic").attr("style",e=>0===e.depth?"display: none;":"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+n(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+ee({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")),g=f.leaves(),(y=m.selectAll(".treemapLeafGroup").data(g).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?" "+e.data.classSelector:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`)).append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?t(e.parent.data.name):t(e.data.name)).attr("style",e=>ee({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?t(e.parent.data.name):t(e.data.name)).attr("stroke-width",3),y.append("clipPath").attr("id",(e,t)=>`clip-${a}-`+t).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),y.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>"text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+n(e.data.name)+";"+ee({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,t)=>`url(#clip-${a}-${t})`).text(e=>e.data.name).each(function(e){var i=Q(this),t=e.x1-e.x0,e=e.y1-e.y0,n=i.node(),a=t-8,s=e-8;if(a<10||s<10)i.style("display","none");else{let e=parseInt(i.style("font-size"),10);for(;n.getComputedTextLength()>a&&8<e;)e--,i.style("font-size",e+"px");let t=Math.max(6,Math.min(28,Math.round(.6*e))),r=e+2+t;for(;r>s&&8<e&&(e--,!((t=Math.max(6,Math.min(28,Math.round(.6*e))))<6&&8===e));)i.style("font-size",e+"px"),r=e+2+t,t<=6&&r;i.style("font-size",e+"px"),(n.getComputedTextLength()>a||e<8||s<e)&&i.style("display","none")}}),!1!==o.showValues&&y.append("text").attr("class","treemapValue").attr("x",e=>(e.x1-e.x0)/2).attr("y",function(e){return(e.y1-e.y0)/2}).attr("style",e=>"text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+n(e.data.name)+";"+ee({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,t)=>`url(#clip-${a}-${t})`).text(e=>e.value?r(e.value):"").each(function(e){var t,r,i=Q(this),n=this.parentNode;!n||(n=Q(n).select(".treemapLabel")).empty()||"none"===n.style("display")||(n=parseFloat(n.style("font-size")),t=Math.max(6,Math.min(28,Math.round(.6*n))),i.style("font-size",t+"px"),n=(e.y1-e.y0)/2+n/2+2,i.attr("y",n),r=e.x1-e.x0,e=e.y1-e.y0-4,r-=8,i.node().getComputedTextLength()>r)||e<n+t||t<6?i.style("display","none"):i.style("display",null)}),s=o.diagramPadding??8,zue(d,s,"flowchart",o?.useMaxWidth||!1)}},"draw"),sVe=mt(function(e,t){return t.db.getClasses()},"getClasses"),oVe={draw:aVe,getClasses:sVe}}),gVe=i(()=>{S7(),di(),Ei(),lVe={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},hVe=mt(({treemap:e}={})=>{var t=H_(Pt(),br().themeVariables),r=(e=H_(lVe,e)).titleColor??t.titleColor,i=e.labelColor??t.textColor,t=e.valueColor??t.textColor;return`
.treemapNode.section {
stroke: ${e.sectionStrokeColor};
stroke-width: ${e.sectionStrokeWidth};
fill: ${e.sectionFillColor};
}
.treemapNode.leaf {
stroke: ${e.leafStrokeColor};
stroke-width: ${e.leafStrokeWidth};
fill: ${e.leafFillColor};
}
.treemapLabel {
fill: ${i};
font-size: ${e.labelFontSize};
}
.treemapValue {
fill: ${t};
font-size: ${e.valueFontSize};
}
.treemapTitle {
fill: ${r};
font-size: ${e.titleFontSize};
}
`},"getStyles"),cVe=hVe}),fVe={};sYe(fVe,{diagram:()=>mVe});var mVe,yVe,vVe,xVe,bVe,TVe,kVe,wVe,CVe=i(()=>{eVe(),dVe(),pVe(),gVe(),mVe={parser:nVe,get db(){return new Qje},renderer:oVe,styles:cVe}}),EVe=i(()=>{RSe(),e(),MSe(),yVe=mt((e,t)=>{var r=e<=1?100*e:e;if(r<0||100<r)throw new Error(t+" must be between 0-1 (decimal) or 0-100 (percentage). Received: "+e);return r},"toPercent"),vVe=mt((e,t,r)=>({x:yVe(t,r+" evolution"),y:yVe(e,r+" visibility")}),"toCoordinates"),xVe=mt(e=>{if(e)return"+<>"===e?"bidirectional":"+<"===e?"backward":"+>"===e?"forward":void 0},"getFlowFromPort"),bVe=mt(e=>{var t;return e?.startsWith("+")?(t=/^\+'([^']*)'/.exec(e)?.[1],e.includes("<>")?{flow:"bidirectional",label:t}:e.includes("<")?{flow:"backward",label:t}:e.includes(">")?{flow:"forward",label:t}:{label:t}):{}},"extractFlowFromArrow"),TVe=mt((e,o)=>{var t,r;ISe(e,o),e.size&&o.setSize(e.size.width,e.size.height),e.evolution&&(t=e.evolution.stages.map(e=>e.secondName?e.name.trim()+" / "+e.secondName.trim():e.name.trim()),r=e.evolution.stages.filter(e=>void 0!==e.boundary).map(e=>e.boundary),o.updateAxes({stages:t,stageBoundaries:r})),e.anchors.forEach(e=>{var t=vVe(e.visibility,e.evolution,`Anchor "${e.name}"`);o.addNode(e.name,e.name,t.x,t.y,"anchor")}),e.components.forEach(e=>{var t=vVe(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,i=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,n=e.decorator?.strategy;o.addNode(e.name,e.name,t.x,t.y,"component",r,i,e.inertia,n)}),e.notes.forEach(e=>{var t=vVe(e.visibility,e.evolution,`Note "${e.text}"`);o.addNote(e.text,t.x,t.y)}),e.pipelines.forEach(a=>{var e=o.getNode(a.parent);if(!e||"number"!=typeof e.y)throw new Error(`Pipeline "${a.parent}" must reference an existing component with coordinates.`);let s=e.y;o.startPipeline(a.parent),a.components.forEach(e=>{var t=a.parent+"_"+e.name,r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,i=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,n=yVe(e.evolution,`Pipeline component "${e.name}" evolution`);o.addNode(t,e.name,n,s,"pipeline-component",r,i),o.addPipelineComponent(a.parent,t)})}),e.links.forEach(e=>{let t=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-.")),r=xVe(e.fromPort)??xVe(e.toPort),{flow:i,label:n}=bVe(e.arrow);!r&&i&&(r=i);var a=e.linkLabel;o.addLink(e.from,e.to,t,n??a,r)}),e.evolves.forEach(e=>{var t,r=o.getNode(e.component);void 0!==r?.y&&(t=yVe(e.target,`Evolve target for "${e.component}"`),o.addTrend(e.component,t,r.y))}),0<e.annotations.length&&(t=e.annotations[0],r=vVe(t.x,t.y,"Annotations box"),o.setAnnotationsBox(r.x,r.y)),e.annotation.forEach(e=>{var t=vVe(e.x,e.y,"Annotation "+e.number);o.addAnnotation(e.number,[{x:t.x,y:t.y}],e.text)}),e.accelerators.forEach(e=>{var t=vVe(e.x,e.y,`Accelerator "${e.name}"`);o.addAccelerator(e.name,t.x,t.y)}),e.deaccelerators.forEach(e=>{var t=vVe(e.x,e.y,`Deaccelerator "${e.name}"`);o.addDeaccelerator(e.name,t.x,t.y)})},"populateDb"),kVe={parser:{yy:void 0},parse:mt(async e=>{var e=await SSe("wardley",e),t=(B.debug(e),kVe.parser?.yy);if(!t||"function"!=typeof t.addNode)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.");TVe(e,t)},"parse")}}),SVe=i(()=>{wVe=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{mt(this,"WardleyBuilder")}addNode(e){var t={...t=this.nodes.get(e.id)??{id:e.id,label:e.label},...e,className:e.className??t.className,labelOffsetX:e.labelOffsetX??t.labelOffsetX,labelOffsetY:e.labelOffsetY??t.labelOffsetY};this.nodes.set(e.id,t)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]}),(e=this.nodes.get(e))&&(e.isPipelineParent=!0)}addPipelineComponent(e,t){(e=this.pipelines.get(e))&&e.componentIds.push(t),(e=this.nodes.get(t))&&(e.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)}build(){var e,t=[];for(e of this.nodes.values()){if("number"!=typeof e.x||"number"!=typeof e.y)throw new Error(`Node "${e.label}" is missing coordinates`);t.push(e)}return{nodes:t,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}}});function _Ve(e){var t=P();return Ih(e.trim(),t)}function AVe(){return P()["wardley-beta"]}function LVe(e,t,r,i,n,a,s,o,l){GVe.addNode({id:e,label:_Ve(t),x:r,y:i,className:n,labelOffsetX:a,labelOffsetY:s,inertia:o,sourceStrategy:l})}function RVe(e,t,r=!1,i,n){GVe.addLink({source:e,target:t,dashed:r,label:i,flow:n})}function IVe(e,t,r){GVe.addTrend({nodeId:e,targetX:t,targetY:r})}function NVe(e,t,r){GVe.addAnnotation({number:e,coordinates:t,text:r?_Ve(r):void 0})}function DVe(e,t,r){GVe.addNote({text:_Ve(e),x:t,y:r})}function MVe(e,t,r){GVe.addAccelerator({name:_Ve(e),x:t,y:r})}function OVe(e,t,r){GVe.addDeaccelerator({name:_Ve(e),x:t,y:r})}function BVe(e,t){GVe.setAnnotationsBox(e,t)}function PVe(e,t){GVe.setSize(e,t)}function $Ve(e){GVe.startPipeline(e)}function FVe(e,t){GVe.addPipelineComponent(e,t)}function zVe(e){var t={};e.xLabel&&(t.xLabel=_Ve(e.xLabel)),e.yLabel&&(t.yLabel=_Ve(e.yLabel)),e.stages&&(t.stages=e.stages.map(e=>_Ve(e))),e.stageBoundaries&&(t.stageBoundaries=e.stageBoundaries),GVe.setAxes(t)}function qVe(e){return GVe.getNode(e)}function WVe(){return GVe.build()}function UVe(){GVe.clear(),Pc()}var GVe,jVe,VVe,YVe,HVe,XVe,KVe,ZVe=i(()=>{ju(),ic(),Gu(),SVe(),GVe=new wVe,mt(_Ve,"textSanitizer"),mt(AVe,"getConfig"),mt(LVe,"addNode"),mt(RVe,"addLink"),mt(IVe,"addTrend"),mt(NVe,"addAnnotation"),mt(DVe,"addNote"),mt(MVe,"addAccelerator"),mt(OVe,"addDeaccelerator"),mt(BVe,"setAnnotationsBox"),mt(PVe,"setSize"),mt($Ve,"startPipeline"),mt(FVe,"addPipelineComponent"),mt(zVe,"updateAxes"),mt(qVe,"getNode"),mt(WVe,"getWardleyData"),mt(UVe,"clear"),jVe={getConfig:AVe,addNode:LVe,addLink:RVe,addTrend:IVe,addAnnotation:NVe,addNote:DVe,addAccelerator:MVe,addDeaccelerator:OVe,setAnnotationsBox:BVe,setSize:PVe,startPipeline:$Ve,addPipelineComponent:FVe,updateAxes:zVe,getNode:qVe,getWardleyData:WVe,clear:UVe,setAccTitle:$c,getAccTitle:Fc,setDiagramTitle:Wc,getDiagramTitle:Uc,getAccDescription:qc,setAccDescription:zc}}),QVe=i(()=>{ju(),e(),cAe(),Rc(),VVe=["Genesis","Custom Built","Product","Commodity"],YVe=mt(()=>{var e=P().themeVariables;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"),HVe=mt(()=>{var e=P()["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"),XVe=mt((t,r,e,l)=>{B.debug(`Rendering Wardley map
`+t);let d=HVe(),p=YVe(),g=1.6*d.nodeRadius,i=l.db,f=i.getWardleyData(),n=i.getDiagramTitle(),h=f.size?.width??d.width,c=f.size?.height??d.height,a=nAe(r),s=(a.selectAll("*").remove(),xc(a,c,h,d.useMaxWidth),a.attr("viewBox",`0 0 ${h} `+c),t=a.append("g").attr("class","wardley-map"),(l=a.append("defs")).append("marker").attr("id","arrow-"+r).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",p.evolutionStroke).attr("stroke","none"),l.append("marker").attr("id","link-arrow-end-"+r).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",p.linkStroke).attr("stroke","none"),l.append("marker").attr("id","link-arrow-start-"+r).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",p.linkStroke).attr("stroke","none"),t.append("rect").attr("class","wardley-background").attr("width",h).attr("height",c).attr("fill",p.backgroundColor),h-2*d.padding),o=c-2*d.padding,u=(n&&t.append("text").attr("class","wardley-title").attr("x",h/2).attr("y",d.padding/2).attr("fill",p.axisTextColor).attr("font-size",1.05*d.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(n),mt(e=>d.padding+e/100*s,"projectX")),m=mt(e=>c-d.padding-e/100*o,"projectY"),y=t.append("g").attr("class","wardley-axes");y.append("line").attr("x1",d.padding).attr("x2",h-d.padding).attr("y1",c-d.padding).attr("y2",c-d.padding).attr("stroke",p.axisColor).attr("stroke-width",1),y.append("line").attr("x1",d.padding).attr("x2",d.padding).attr("y1",d.padding).attr("y2",c-d.padding).attr("stroke",p.axisColor).attr("stroke-width",1);var l=f.axes.xLabel??"Evolution",v=f.axes.yLabel??"Visibility";if(y.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",d.padding+s/2).attr("y",c-d.padding/4).attr("fill",p.axisTextColor).attr("font-size",d.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(l),y.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",d.padding/3).attr("y",d.padding+o/2).attr("fill",p.axisTextColor).attr("font-size",d.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${d.padding/3} ${d.padding+o/2})`).text(v),0<(l=f.axes.stages&&0<f.axes.stages.length?f.axes.stages:VVe).length){let n=t.append("g").attr("class","wardley-stages"),e=f.axes.stageBoundaries,a=[];if(e&&e.length===l.length){let t=0;e.forEach(e=>{a.push({start:t,end:e}),t=e})}else{let r=1/l.length;l.forEach((e,t)=>{a.push({start:t*r,end:(t+1)*r})})}l.forEach((e,t)=>{var r=a[t],i=d.padding+r.start*s,r=(i+(d.padding+r.end*s))/2;0<t&&n.append("line").attr("x1",i).attr("x2",i).attr("y1",d.padding).attr("y2",c-d.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),n.append("text").attr("class","wardley-stage-label").attr("x",r).attr("y",c-d.padding/1.5).attr("fill",p.axisTextColor).attr("font-size",d.axisFontSize-2).attr("text-anchor","middle").text(e)})}if(d.showGrid){var x=t.append("g").attr("class","wardley-grid");for(let e=1;e<4;e++){var b=e/4,T=d.padding+s*b;x.append("line").attr("x1",T).attr("x2",T).attr("y1",d.padding).attr("y2",c-d.padding).attr("stroke",p.gridColor).attr("stroke-dasharray","2 6"),x.append("line").attr("x1",d.padding).attr("x2",h-d.padding).attr("y1",c-d.padding-o*b).attr("y2",c-d.padding-o*b).attr("stroke",p.gridColor).attr("stroke-dasharray","2 6")}}let k=new Map;if(f.nodes.forEach(e=>{k.set(e.id,{x:u(e.x),y:m(e.y),node:e})}),0<f.pipelines.length){let c=t.append("g").attr("class","wardley-pipelines"),u=t.append("g").attr("class","wardley-pipeline-links");f.pipelines.forEach(e=>{if(0!==e.componentIds.length){var n,a,s,o=e.componentIds.map(t=>({id:t,pos:k.get(t),node:f.nodes.find(e=>e.id===t)})).filter(e=>e.pos&&e.node).sort((e,t)=>e.node.x-t.node.x);for(let e=0;e<o.length-1;e++){var l=o[e],h=o[e+1];u.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",l.pos.x).attr("y1",l.pos.y).attr("x2",h.pos.x).attr("y2",h.pos.y).attr("stroke",p.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let t=1/0,r=-1/0,i=0;e.componentIds.forEach(e=>{(e=k.get(e))&&(t=Math.min(t,e.x),r=Math.max(r,e.x),i=e.y)}),t!==1/0&&r!==-1/0&&(n=4*d.nodeRadius,a=i-n/2,(e=k.get(e.nodeId))&&(s=(t+r)/2,e.x=s,e.y=a-g/6),c.append("rect").attr("class","wardley-pipeline-box").attr("x",t-15).attr("y",a).attr("width",r-t+30).attr("height",n).attr("fill","none").attr("stroke",p.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4))}})}let w=t.append("g").attr("class","wardley-links"),C=new Map,E=(f.pipelines.forEach(e=>{C.set(e.nodeId,new Set(e.componentIds))}),v=f.links.filter(e=>!(!k.has(e.source)||!k.has(e.target)||C.get(e.target)?.has(e.source))),w.selectAll("line").data(v).enter().append("line").attr("class",e=>"wardley-link"+(e.dashed?" wardley-link--dashed":"")).attr("x1",t=>{var e=k.get(t.source),r=k.get(t.target),i=f.nodes.find(e=>e.id===t.source).isPipelineParent?g/Math.sqrt(2):d.nodeRadius,n=r.x-e.x,r=r.y-e.y,r=Math.sqrt(n*n+r*r);return e.x+n/r*i}).attr("y1",t=>{var e=k.get(t.source),r=k.get(t.target),i=f.nodes.find(e=>e.id===t.source).isPipelineParent?g/Math.sqrt(2):d.nodeRadius,n=r.x-e.x,r=r.y-e.y,n=Math.sqrt(n*n+r*r);return e.y+r/n*i}).attr("x2",t=>{var e=k.get(t.source),r=k.get(t.target),i=f.nodes.find(e=>e.id===t.target).isPipelineParent?g/Math.sqrt(2):d.nodeRadius,n=e.x-r.x,e=e.y-r.y,e=Math.sqrt(n*n+e*e);return r.x+n/e*i}).attr("y2",t=>{var e=k.get(t.source),r=k.get(t.target),i=f.nodes.find(e=>e.id===t.target).isPipelineParent?g/Math.sqrt(2):d.nodeRadius,n=e.x-r.x,e=e.y-r.y,n=Math.sqrt(n*n+e*e);return r.y+e/n*i}).attr("stroke",p.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",e=>e.dashed?"6 6":null).attr("marker-end",e=>"forward"===e.flow||"bidirectional"===e.flow?`url(#link-arrow-end-${r})`:null).attr("marker-start",e=>"backward"===e.flow||"bidirectional"===e.flow?`url(#link-arrow-start-${r})`:null),w.selectAll("text").data(v.filter(e=>e.label)).enter().append("text").attr("class","wardley-link-label").attr("x",e=>{var t=k.get(e.source),e=k.get(e.target),r=(t.x+e.x)/2,i=e.y-t.y,e=e.x-t.x;return r+i/Math.sqrt(e*e+i*i)*8}).attr("y",e=>{var t=k.get(e.source),e=k.get(e.target),r=(t.y+e.y)/2,i=e.x-t.x,e=e.y-t.y;return r+-i/Math.sqrt(i*i+e*e)*8}).attr("fill",p.axisTextColor).attr("font-size",d.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",e=>{let t=k.get(e.source),r=k.get(e.target),i=(t.x+r.x)/2,n=(t.y+r.y)/2,a=r.x-t.x,s=r.y-t.y,o=Math.sqrt(a*a+s*s),l=s/o,h=-a/o,c=i+8*l,u=n+8*h,d=180*Math.atan2(s,a)/Math.PI;return(90<d||d<-90)&&(d+=180),`rotate(${d} ${c} ${u})`}).text(e=>e.label),l=t.append("g").attr("class","wardley-trends"),v=f.trends.map(e=>{var t,r,i,n,a=k.get(e.nodeId);return a?(t=u(e.targetX),e=m(e.targetY),r=t-a.x,i=e-a.y,n=Math.sqrt(r*r+i*i),{origin:a,targetX:t,targetY:e,adjustedX2:(a=d.nodeRadius+2)<n?t-r/n*a:t,adjustedY2:a<n?e-i/n*a:e}):null}).filter(e=>null!==e),l.selectAll("line").data(v).enter().append("line").attr("class","wardley-trend").attr("x1",e=>e.origin.x).attr("y1",e=>e.origin.y).attr("x2",e=>e.adjustedX2).attr("y2",e=>e.adjustedY2).attr("stroke",p.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${r})`),(l=t.append("g").attr("class","wardley-nodes").selectAll("g").data(f.nodes).enter().append("g").attr("class",e=>["wardley-node",e.className?"wardley-node--"+e.className:""].filter(Boolean).join(" "))).filter(e=>"outsource"===e.sourceStrategy).append("circle").attr("class","wardley-outsource-overlay").attr("cx",e=>k.get(e.id).x).attr("cy",e=>k.get(e.id).y).attr("r",2*d.nodeRadius).attr("fill","#666").attr("stroke",p.componentStroke).attr("stroke-width",1),l.filter(e=>"buy"===e.sourceStrategy).append("circle").attr("class","wardley-buy-overlay").attr("cx",e=>k.get(e.id).x).attr("cy",e=>k.get(e.id).y).attr("r",2*d.nodeRadius).attr("fill","#ccc").attr("stroke",p.componentStroke).attr("stroke-width",1),l.filter(e=>"build"===e.sourceStrategy).append("circle").attr("class","wardley-build-overlay").attr("cx",e=>k.get(e.id).x).attr("cy",e=>k.get(e.id).y).attr("r",2*d.nodeRadius).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1),(v=l.filter(e=>"market"===e.sourceStrategy)).append("circle").attr("class","wardley-market-overlay").attr("cx",e=>k.get(e.id).x).attr("cy",e=>k.get(e.id).y).attr("r",2*d.nodeRadius).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",1),l.filter(e=>!e.isPipelineParent&&"market"!==e.sourceStrategy&&"anchor"!==e.className).append("circle").attr("cx",e=>k.get(e.id).x).attr("cy",e=>k.get(e.id).y).attr("r",d.nodeRadius).attr("fill",p.componentFill).attr("stroke",p.componentStroke).attr("stroke-width",1),.7*d.nodeRadius),S=1.2*d.nodeRadius;if(v.append("line").attr("class","wardley-market-line").attr("x1",e=>k.get(e.id).x).attr("y1",e=>k.get(e.id).y-S).attr("x2",e=>k.get(e.id).x-S*Math.cos(Math.PI/6)).attr("y2",e=>k.get(e.id).y+S*Math.sin(Math.PI/6)).attr("stroke",p.componentStroke).attr("stroke-width",1),v.append("line").attr("class","wardley-market-line").attr("x1",e=>k.get(e.id).x-S*Math.cos(Math.PI/6)).attr("y1",e=>k.get(e.id).y+S*Math.sin(Math.PI/6)).attr("x2",e=>k.get(e.id).x+S*Math.cos(Math.PI/6)).attr("y2",e=>k.get(e.id).y+S*Math.sin(Math.PI/6)).attr("stroke",p.componentStroke).attr("stroke-width",1),v.append("line").attr("class","wardley-market-line").attr("x1",e=>k.get(e.id).x+S*Math.cos(Math.PI/6)).attr("y1",e=>k.get(e.id).y+S*Math.sin(Math.PI/6)).attr("x2",e=>k.get(e.id).x).attr("y2",e=>k.get(e.id).y-S).attr("stroke",p.componentStroke).attr("stroke-width",1),v.append("circle").attr("class","wardley-market-dot").attr("cx",e=>k.get(e.id).x).attr("cy",e=>k.get(e.id).y-S).attr("r",E).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",2),v.append("circle").attr("class","wardley-market-dot").attr("cx",e=>k.get(e.id).x-S*Math.cos(Math.PI/6)).attr("cy",e=>k.get(e.id).y+S*Math.sin(Math.PI/6)).attr("r",E).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",2),v.append("circle").attr("class","wardley-market-dot").attr("cx",e=>k.get(e.id).x+S*Math.cos(Math.PI/6)).attr("cy",e=>k.get(e.id).y+S*Math.sin(Math.PI/6)).attr("r",E).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",2),l.filter(e=>!0===e.isPipelineParent).append("rect").attr("x",e=>k.get(e.id).x-g/2).attr("y",e=>k.get(e.id).y-g/2).attr("width",g).attr("height",g).attr("fill",p.componentFill).attr("stroke",p.componentStroke).attr("stroke-width",1),l.filter(e=>!0===e.inertia).append("line").attr("class","wardley-inertia").attr("x1",e=>{let t=k.get(e.id),r=e.isPipelineParent?g/2+15:d.nodeRadius+15;return e.sourceStrategy&&(r+=d.nodeRadius+10),t.x+r}).attr("y1",e=>{var t=k.get(e.id),e=e.isPipelineParent?g:2*d.nodeRadius;return t.y-e/2}).attr("x2",e=>{let t=k.get(e.id),r=e.isPipelineParent?g/2+15:d.nodeRadius+15;return e.sourceStrategy&&(r+=d.nodeRadius+10),t.x+r}).attr("y2",e=>{var t=k.get(e.id),e=e.isPipelineParent?g:2*d.nodeRadius;return t.y+e/2}).attr("stroke",p.componentStroke).attr("stroke-width",6),l.append("text").attr("x",e=>{var t=k.get(e.id);if("anchor"===e.className)return void 0!==e.labelOffsetX?t.x+e.labelOffsetX:t.x;let r=d.nodeLabelOffset;return e.sourceStrategy&&void 0===e.labelOffsetX&&(r+=10),e=e.labelOffsetX??r,t.x+e}).attr("y",e=>{var t=k.get(e.id);if("anchor"===e.className)return void 0!==e.labelOffsetY?t.y+e.labelOffsetY:t.y-3;let r=-d.nodeLabelOffset;return e.sourceStrategy&&void 0===e.labelOffsetY&&(r-=10),e=e.labelOffsetY??r,t.y+e}).attr("class","wardley-node-label").attr("fill",e=>"evolved"===e.className?p.evolutionStroke:"anchor"===e.className?"#000":p.componentLabelColor).attr("font-size",d.labelFontSize).attr("font-weight",e=>"anchor"===e.className?"bold":"normal").attr("text-anchor",e=>"anchor"===e.className?"middle":"start").attr("dominant-baseline",e=>"anchor"===e.className?"middle":"auto").text(e=>e.label),0<f.annotations.length){let i=t.append("g").attr("class","wardley-annotations");if(f.annotations.forEach(r=>{var t=r.coordinates.map(e=>({x:u(e.x),y:m(e.y)}));if(1<t.length)for(let e=0;e<t.length-1;e++)i.append("line").attr("class","wardley-annotation-line").attr("x1",t[e].x).attr("y1",t[e].y).attr("x2",t[e+1].x).attr("y2",t[e+1].y).attr("stroke",p.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");t.forEach(e=>{var t=i.append("g").attr("class","wardley-annotation");t.append("circle").attr("cx",e.x).attr("cy",e.y).attr("r",10).attr("fill","white").attr("stroke",p.axisColor).attr("stroke-width",1.5),t.append("text").attr("x",e.x).attr("y",e.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",p.axisTextColor).attr("font-weight","bold").text(r.number)})}),f.annotationsBox){let n=u(f.annotationsBox.x),a=m(f.annotationsBox.y),s=i.append("g").attr("class","wardley-annotations-box"),e=[...f.annotations].filter(e=>e.text).sort((e,t)=>e.number-t.number),o=[];if(e.forEach((e,t)=>{t=s.append("text").attr("x",n+10).attr("y",a+10+16*(t+1)).attr("font-size",11).attr("fill",p.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(e.number+". "+e.text),o.push(t)}),0<o.length){let r=0,i=0;o.forEach(e=>{var t=(e=e.node()).getComputedTextLength(),t=(r=Math.max(r,t),e.getBBox());i=Math.max(i,t.height)});var v=r+20+105,l=16*e.length+20+i/2,_=d.padding,A=h-d.padding-v,L=d.padding,R=c-d.padding-l;n=Math.max(_,Math.min(n,A)),a=Math.max(L,Math.min(a,R)),o.forEach((e,t)=>{e.attr("x",n+10).attr("y",a+10+16*(t+1))}),s.insert("rect","text").attr("x",n).attr("y",a).attr("width",v).attr("height",l).attr("fill","white").attr("stroke",p.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(0<f.notes.length){let i=t.append("g").attr("class","wardley-notes");f.notes.forEach(e=>{var t=u(e.x),r=m(e.y);i.append("text").attr("x",t).attr("y",r).attr("text-anchor","start").attr("font-size",11).attr("fill",p.axisTextColor).attr("font-weight","bold").text(e.text)})}if(0<f.accelerators.length){let n=t.append("g").attr("class","wardley-accelerators");f.accelerators.forEach(e=>{var t=u(e.x),r=m(e.y),i=`
M ${t} ${r-15}
L ${t+60-20} ${r-15}
L ${t+60-20} ${r-15-8}
L ${t+60} ${r}
L ${t+60-20} ${r+15+8}
L ${t+60-20} ${r+15}
L ${t} ${r+15}
Z
`;n.append("path").attr("d",i).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",1),n.append("text").attr("x",t+30).attr("y",r+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",p.axisTextColor).attr("font-weight","bold").text(e.name)})}if(0<f.deaccelerators.length){let n=t.append("g").attr("class","wardley-deaccelerators");f.deaccelerators.forEach(e=>{var t=u(e.x),r=m(e.y),i=`
M ${t+60} ${r-15}
L ${t+20} ${r-15}
L ${t+20} ${r-15-8}
L ${t} ${r}
L ${t+20} ${r+15+8}
L ${t+20} ${r+15}
L ${t+60} ${r+15}
Z
`;n.append("path").attr("d",i).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",1),n.append("text").attr("x",t+30).attr("y",r+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",p.axisTextColor).attr("font-weight","bold").text(e.name)})}},"draw"),KVe={draw:XVe}}),JVe={};sYe(JVe,{diagram:()=>eYe});var eYe,tYe,rYe=i(()=>{EVe(),ZVe(),QVe(),eYe={parser:kVe,db:jVe,renderer:KVe,styles:mt(()=>"","styles")}}),iYe=(sYe(tYe={},{default:()=>TXe}),nc(),Ec(),Ac(),{id:"c4",detector:mt(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),loader:mt(async()=>({id:"c4",diagram:(await Promise.resolve().then(()=>(J7(),Z7))).diagram}),"loader")}),nYe={id:"flowchart",detector:mt((e,t)=>"dagre-wrapper"!==t?.flowchart?.defaultRenderer&&"elk"!==t?.flowchart?.defaultRenderer&&/^\s*graph/.test(e),"detector"),loader:mt(async()=>({id:"flowchart",diagram:(await Promise.resolve().then(()=>(pde(),lde))).diagram}),"loader")},aYe="flowchart-v2",i=mt((e,t)=>"dagre-d3"!==t?.flowchart?.defaultRenderer&&("elk"===t?.flowchart?.defaultRenderer&&(t.layout="elk"),!(!/^\s*graph/.test(e)||"dagre-wrapper"!==t?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(e)),"detector"),sYe=mt(async()=>{var e=(await Promise.resolve().then(()=>(pde(),lde))).diagram;return{id:aYe,diagram:e}},"loader"),oYe={id:aYe,detector:i,loader:sYe},lYe={id:"er",detector:mt(e=>/^\s*erDiagram/.test(e),"detector"),loader:mt(async()=>({id:"er",diagram:(await Promise.resolve().then(()=>(_de(),Ede))).diagram}),"loader")},hYe={id:"gitGraph",detector:mt(e=>/^\s*gitGraph/.test(e),"detector"),loader:mt(async()=>({id:"gitGraph",diagram:(await Promise.resolve().then(()=>(p7e(),h7e))).diagram}),"loader")},cYe={id:"gantt",detector:mt(e=>/^\s*gantt/.test(e),"detector"),loader:mt(async()=>({id:"gantt",diagram:(await Promise.resolve().then(()=>(oAe(),Q8e))).diagram}),"loader")},uYe={id:"info",detector:mt(e=>/^\s*info/.test(e),"detector"),loader:mt(async()=>({id:"info",diagram:(await Promise.resolve().then(()=>(NAe(),dAe))).diagram}),"loader")},dYe={id:"pie",detector:mt(e=>/^\s*pie/.test(e),"detector"),loader:mt(async()=>({id:"pie",diagram:(await Promise.resolve().then(()=>(UAe(),PAe))).diagram}),"loader")},pYe="quadrantChart",i=mt(e=>/^\s*quadrantChart/.test(e),"detector"),sYe=mt(async()=>{var e=(await Promise.resolve().then(()=>(C9e(),b9e))).diagram;return{id:pYe,diagram:e}},"loader"),gYe={id:pYe,detector:i,loader:sYe},fYe={id:"xychart",detector:mt(e=>/^\s*xychart(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"xychart",diagram:(await Promise.resolve().then(()=>(WLe(),MLe))).diagram}),"loader")},mYe="requirement",i=mt(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),sYe=mt(async()=>{var e=(await Promise.resolve().then(()=>(QRe(),XLe))).diagram;return{id:mYe,diagram:e}},"loader"),yYe={id:mYe,detector:i,loader:sYe},vYe={id:"sequence",detector:mt(e=>/^\s*sequenceDiagram/.test(e),"detector"),loader:mt(async()=>({id:"sequence",diagram:(await Promise.resolve().then(()=>(YIe(),IIe))).diagram}),"loader")},xYe={id:"class",detector:mt((e,t)=>"dagre-wrapper"!==t?.class?.defaultRenderer&&/^\s*classDiagram/.test(e),"detector"),loader:mt(async()=>({id:"class",diagram:(await Promise.resolve().then(()=>(tNe(),JIe))).diagram}),"loader")},bYe="classDiagram",i=mt((e,t)=>!(!/^\s*classDiagram/.test(e)||"dagre-wrapper"!==t?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(e),"detector"),sYe=mt(async()=>{var e=(await Promise.resolve().then(()=>(FNe(),rNe))).diagram;return{id:bYe,diagram:e}},"loader"),TYe={id:bYe,detector:i,loader:sYe},kYe={id:"state",detector:mt((e,t)=>"dagre-wrapper"!==t?.state?.defaultRenderer&&/^\s*stateDiagram/.test(e),"detector"),loader:mt(async()=>({id:"state",diagram:(await Promise.resolve().then(()=>(PDe(),ODe))).diagram}),"loader")},wYe="stateDiagram",i=mt((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&"dagre-wrapper"===t?.state?.defaultRenderer),"detector"),sYe=mt(async()=>{var e=(await Promise.resolve().then(()=>(mMe(),$De))).diagram;return{id:wYe,diagram:e}},"loader"),CYe={id:wYe,detector:i,loader:sYe},EYe={id:"journey",detector:mt(e=>/^\s*journey/.test(e),"detector"),loader:mt(async()=>({id:"journey",diagram:(await Promise.resolve().then(()=>($Me(),MMe))).diagram}),"loader")},SYe=(e(),cAe(),Rc(),i={draw:mt((e,t,r)=>{B.debug(`rendering svg for syntax error
`);var i=(t=nAe(t)).append("g");t.attr("viewBox","0 0 2412 512"),xc(t,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+r)},"draw")}),_Ye={db:{},renderer:i,parser:{parse:mt(()=>{},"parse")}},AYe="flowchart-elk",sYe=mt((e,t={})=>!!(/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&"elk"===t?.flowchart?.defaultRenderer)&&(t.layout="elk",!0),"detector"),i=mt(async()=>{var e=(await Promise.resolve().then(()=>(pde(),lde))).diagram;return{id:AYe,diagram:e}},"loader"),LYe={id:AYe,detector:sYe,loader:i},RYe={id:"timeline",detector:mt(e=>/^\s*timeline/.test(e),"detector"),loader:mt(async()=>({id:"timeline",diagram:(await Promise.resolve().then(()=>(VOe(),qOe))).diagram}),"loader")},IYe={id:"mindmap",detector:mt(e=>/^\s*mindmap/.test(e),"detector"),loader:mt(async()=>({id:"mindmap",diagram:(await Promise.resolve().then(()=>(YBe(),TBe))).diagram}),"loader")},NYe={id:"kanban",detector:mt(e=>/^\s*kanban/.test(e),"detector"),loader:mt(async()=>({id:"kanban",diagram:(await Promise.resolve().then(()=>(gPe(),QBe))).diagram}),"loader")},DYe={id:"sankey",detector:mt(e=>/^\s*sankey(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"sankey",diagram:(await Promise.resolve().then(()=>(z$e(),_$e))).diagram}),"loader")},MYe={id:"packet",detector:mt(e=>/^\s*packet(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"packet",diagram:(await Promise.resolve().then(()=>(hFe(),j$e))).diagram}),"loader")},OYe={id:"radar",detector:mt(e=>/^\s*radar-beta/.test(e),"detector"),loader:mt(async()=>({id:"radar",diagram:(await Promise.resolve().then(()=>(RFe(),SFe))).diagram}),"loader")},BYe={id:"block",detector:mt(e=>/^\s*block(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"block",diagram:(await Promise.resolve().then(()=>($We(),vWe))).diagram}),"loader")},PYe={id:"treeView",detector:mt(e=>/^\s*treeView-beta/.test(e),"detector"),loader:mt(async()=>({id:"treeView",diagram:(await Promise.resolve().then(()=>(TUe(),UWe))).diagram}),"loader")},$Ye="architecture",sYe=mt(e=>/^\s*architecture/.test(e),"detector"),i=mt(async()=>{var e=(await Promise.resolve().then(()=>(uGe(),WUe))).diagram;return{id:$Ye,diagram:e}},"loader"),FYe={id:$Ye,detector:sYe,loader:i},zYe={id:"ishikawa",detector:mt(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),loader:mt(async()=>({id:"ishikawa",diagram:(await Promise.resolve().then(()=>(bGe(),mGe))).diagram}),"loader")},qYe={id:"venn",detector:mt(e=>/^\s*venn-beta/.test(e),"detector"),loader:mt(async()=>({id:"venn",diagram:(await Promise.resolve().then(()=>(Jje(),Kje))).diagram}),"loader")},WYe=(Ac(),ju(),{id:"treemap",detector:mt(e=>/^\s*treemap/.test(e),"detector"),loader:mt(async()=>({id:"treemap",diagram:(await Promise.resolve().then(()=>(CVe(),fVe))).diagram}),"loader")}),UYe="wardley-beta",sYe=mt(e=>/^\s*wardley-beta/i.test(e),"detector"),i=mt(async()=>{var e=(await Promise.resolve().then(()=>(rYe(),JVe))).diagram;return{id:UYe,diagram:e}},"loader"),GYe={id:UYe,detector:sYe,loader:i},jYe=!1,VYe=mt(()=>{jYe||(jYe=!0,Qc("error",_Ye,e=>"error"===e.toLowerCase().trim()),Qc("---",{db:{clear:mt(()=>{},"clear")},styles:{},renderer:{draw:mt(()=>{},"draw")},parser:{parse:mt(()=>{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:mt(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),dc(LYe,IYe,FYe),dc(iYe,NYe,TYe,xYe,lYe,cYe,uYe,dYe,yYe,vYe,oYe,nYe,RYe,hYe,CYe,kYe,EYe,gYe,DYe,MYe,fYe,BYe,PYe,OYe,zYe,WYe,qYe,GYe))},"addDiagrams"),YYe=(e(),Ac(),ju(),mt(async()=>{B.debug("Loading registered diagrams");var e=(await Promise.allSettled(Object.entries(cc).map(async([e,{detector:t,loader:r}])=>{if(r)try{Jc(e)}catch{try{var{diagram:i,id:n}=await r();Qc(n,i,t)}catch(t){throw B.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete cc[e],t}}}))).filter(e=>"rejected"===e.status);if(0<e.length){B.error(`Failed to load ${e.length} external diagrams`);for(var t of e)B.error(t);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams")),HYe=(e(),Sk(),"comm"),XYe="rule",KYe="decl",ZYe=Math.abs,QYe=String.fromCharCode;function JYe(e){return e.trim()}function eHe(e,t,r){return e.replace(t,r)}function tHe(e,t,r){return e.indexOf(t,r)}function rHe(e,t){return 0|e.charCodeAt(t)}function iHe(e,t,r){return e.slice(t,r)}function nHe(e){return e.length}function aHe(e){return e.length}function sHe(e,t){return t.push(e),e}mt(JYe,"trim"),mt(eHe,"replace"),mt(tHe,"indexof"),mt(rHe,"charat"),mt(iHe,"substr"),mt(nHe,"strlen"),mt(aHe,"sizeof"),mt(sHe,"append");var oHe=1,lHe=1,hHe=0,cHe=0,uHe=0,dHe="";function pHe(e,t,r,i,n,a,s,o){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:oHe,column:lHe,length:s,return:"",siblings:o}}function gHe(){return uHe=0<cHe?rHe(dHe,--cHe):0,lHe--,10===uHe&&(lHe=1,oHe--),uHe}function fHe(){return uHe=cHe<hHe?rHe(dHe,cHe++):0,lHe++,10===uHe&&(lHe=1,oHe++),uHe}function mHe(){return rHe(dHe,cHe)}function yHe(e,t){return iHe(dHe,e,t)}function vHe(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function xHe(e){return oHe=lHe=1,hHe=nHe(dHe=e),cHe=0,[]}function bHe(e){return dHe="",e}function THe(e){return JYe(yHe(cHe-1,CHe(91===e?e+2:40===e?e+1:e)))}function kHe(e){for(;(uHe=mHe())&&uHe<33;)fHe();return 2<vHe(e)||3<vHe(uHe)?"":" "}function wHe(e,t){for(;--t&&fHe()&&!(uHe<48||102<uHe||57<uHe&&uHe<65||70<uHe&&uHe<97););return yHe(e,cHe+(t<6&&32==mHe()&&32==fHe()))}function CHe(e){for(;fHe();)switch(uHe){case e:return cHe;case 34:case 39:34!==e&&39!==e&&CHe(uHe);break;case 40:41===e&&CHe(e);break;case 92:fHe()}return cHe}function EHe(e,t){for(;fHe()&&e+uHe!==57&&(e+uHe!==84||47!==mHe()););return"/*"+yHe(t,cHe-1)+"*"+QYe(47===e?e:fHe())}function SHe(e){for(;!vHe(mHe());)fHe();return yHe(e,cHe)}function _He(e){return bHe(AHe("",null,null,null,[""],e=xHe(e),0,[0],e))}function AHe(e,t,r,i,n,a,s,o,l){for(var h,c,u,d=0,p=0,g=s,f=0,m=0,y=1,v=1,x=1,b=0,T="",k=n,w=T;v;)switch(h=b,b=fHe()){case 40:if(108!=h&&58==rHe(w,g-1)){-1!=tHe(w+=eHe(THe(b),"&","&\f"),"&\f",ZYe(d?o[d-1]:0))&&(x=-1);break}case 34:case 39:case 91:w+=THe(b);break;case 9:case 10:case 13:case 32:w+=kHe(h);break;case 92:w+=wHe(cHe-1,7);continue;case 47:switch(mHe()){case 42:case 47:sHe(RHe(EHe(fHe(),cHe),t,r,l),l),5!=vHe(h||1)&&5!=vHe(mHe()||1)||!nHe(w)||" "===iHe(w,-1,void 0)||(w+=" ");break;default:w+="/"}break;case 123*y:o[d++]=nHe(w)*x;case 125*y:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+p:-1==x&&(w=eHe(w,/\f/g,"")),0<m&&(nHe(w)-g||0===y&&47===h)&&sHe(32<m?IHe(w+";",i,r,g-1,l):IHe(eHe(w," ","")+";",i,r,g-2,l),l);break;case 59:w+=";";default:if(sHe(u=LHe(w,t,r,d,p,n,o,T,k=[],c=[],g,a),a),123===b)if(0===p)AHe(w,t,u,u,k,a,g,o,c);else{switch(f){case 99:if(110===rHe(w,3))break;case 108:if(97===rHe(w,2))break;default:p=0;case 100:case 109:case 115:}p?AHe(e,u,u,i&&sHe(LHe(e,u,u,0,0,n,o,T,n,k=[],g,c),c),n,c,g,o,i?k:c):AHe(w,u,u,u,[""],c,0,o,c)}}d=p=m=0,y=x=1,T=w="",g=s;break;case 58:g=1+nHe(w),m=h;default:if(y<1)if(123==b)--y;else if(125==b&&0==y++&&125==gHe())continue;switch(w+=QYe(b),b*y){case 38:x=0<p?1:(w+="\f",-1);break;case 44:o[d++]=(nHe(w)-1)*x,x=1;break;case 64:45===mHe()&&(w+=THe(fHe())),f=mHe(),p=g=nHe(T=w+=SHe(cHe)),b++;break;case 45:45===h&&2==nHe(w)&&(y=0)}}return a}function LHe(e,t,r,i,n,a,s,o,l,h,c,u){for(var d,p=n-1,g=0===n?a:[""],f=aHe(g),m=0,y=0;m<i;++m)for(var v,x=0,b=iHe(e,p+1,p=ZYe(d=s[m]));x<f;++x)(v=JYe(0<d?g[x]+" "+b:eHe(b,/&\f/g,g[x])))&&(l[y++]=v);return pHe(e,t,r,0===n?XYe:o,l,h,c,u)}function RHe(e,t,r,i){return pHe(e,t,r,HYe,QYe(uHe),iHe(e,2,-2),0,i)}function IHe(e,t,r,i,n){return pHe(e,t,r,KYe,iHe(e,0,i),iHe(e,i+1,-1),i,n)}function NHe(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function DHe(e,t,r,i){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case KYe:return e.return=e.return||e.value;case HYe:return"";case"@keyframes":return e.return=e.value+"{"+NHe(e.children,i)+"}";case XYe:if(!nHe(e.value=e.props.join(",")))return""}return nHe(r=NHe(e.children,i))?e.return=e.value+"{"+r+"}":""}function MHe(e,t){e.attr("role","graphics-document document"),""!==t&&e.attr("aria-roledescription",t)}function OHe(e,t,r,i){var n;void 0!==e.insert&&(r&&(e.attr("aria-describedby",n="chart-desc-"+i),e.insert("desc",":first-child").attr("id",n).text(r)),t)&&(e.attr("aria-labelledby",n="chart-title-"+i),e.insert("title",":first-child").attr("id",n).text(t))}mt(pHe,"node"),mt(function(){return uHe},"char"),mt(gHe,"prev"),mt(fHe,"next"),mt(mHe,"peek"),mt(function(){return cHe},"caret"),mt(yHe,"slice"),mt(vHe,"token"),mt(xHe,"alloc"),mt(bHe,"dealloc"),mt(THe,"delimit"),mt(kHe,"whitespace"),mt(wHe,"escaping"),mt(CHe,"delimiter"),mt(EHe,"commenter"),mt(SHe,"identifier"),mt(_He,"compile"),mt(AHe,"parse"),mt(LHe,"ruleset"),mt(RHe,"comment"),mt(IHe,"declaration"),mt(NHe,"serialize"),mt(DHe,"stringify"),Rn(),Rj(),mt(MHe,"setA11yDiagramInfo"),mt(OHe,"addSVGa11yTitleDescription"),Nr(),Ei(),Ei(),Ei(),ju(),Ac(),_c(),S7();var BHe=class kXe{constructor(e,t,r,i,n){this.type=e,this.text=t,this.db=r,this.parser=i,this.renderer=n}static{mt(this,"Diagram")}static async fromText(e,t={}){var r=br(),i=uc(e,r);e=w7(e)+`
`;try{Jc(i)}catch{if(!(n=gc(i)))throw new hc(`Diagram ${i} not found.`);var{id:n,diagram:a}=await n();Qc(n,a)}var{db:n,parser:a,renderer:s,init:o}=Jc(i);return a.parser&&(a.parser.yy=n),n.clear?.(),o?.(r),t.title&&n.setDiagramTitle?.(t.title),await a.parse(e),new kXe(i,e,n,a,s)}async render(e,t){await this.renderer.draw(this.text,e,t,this)}getParser(){return this.parser}getType(){return this.type}},PHe=(ic(),[]),$He=mt(()=>{PHe.forEach(e=>{e()}),PHe=[]},"attachFunctions"),FHe=(e(),mt(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments"));function zHe(e){var t,r,i=e.match(sc);return i?(r={},(t="object"!=typeof(t=oL(i[1],{schema:sL})??{})||Array.isArray(t)?{}:t).displayMode&&(r.displayMode=t.displayMode.toString()),t.title&&(r.title=t.title.toString()),t.config&&(r.config=t.config),{text:e.slice(i[0].length),metadata:r}):{text:e,metadata:{}}}Sc(),lL(),mt(zHe,"extractFrontMatter"),S7();var qHe=mt(e=>e.replace(/\r\n?/g,`
`).replace(/<(\w+)([^>]*)>/g,(e,t,r)=>"<"+t+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),WHe=mt(e=>{var{text:e,metadata:t}=zHe(e),{displayMode:t,title:r,config:i={}}=t;return t&&(i.gantt||(i.gantt={}),i.gantt.displayMode=t),{title:r,config:i,text:e}},"processFrontmatter"),UHe=mt(e=>{var t=k7.detectInit(e)??{},r=k7.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:e})=>"wrap"===e):"wrap"===r?.type&&(t.wrap=!0),{text:i7(e),directive:t}},"processDirectives");function GHe(e){var t=qHe(e),t=WHe(t),r=UHe(t.text),i=H_(t.config,r.directive);return{code:e=FHe(r.text),title:t.title,config:i}}function jHe(e){return e=(new TextEncoder).encode(e),e=Array.from(e,e=>String.fromCodePoint(e)).join(""),btoa(e)}mt(GHe,"preprocessDiagram"),Ic(),Ti(),S7(),mt(jHe,"toBase64");var VHe=["foreignobject"],YHe=["dominant-baseline"];function HHe(e){return e=GHe(e),wr(),kr(e.config??{}),e}async function XHe(e,t){VYe();try{var{code:r,config:i}=HHe(e);return{diagramType:(await aXe(r)).type,config:i}}catch(e){if(t?.suppressErrors)return!1;throw e}}mt(HHe,"processAndSetConfigs"),mt(XHe,"parse");var KHe=mt((e,t,r=[])=>`
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),ZHe=mt((t,r=new Map)=>{let i="";if(void 0!==t.themeCSS&&(i+=`
`+t.themeCSS),void 0!==t.fontFamily&&(i+=`
:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(i+=`
:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),r instanceof Map){let e=Lr(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];r.forEach(t=>{Lj(t.styles)||e.forEach(e=>{i+=KHe(t.id,e,t.styles)}),Lj(t.textStyles)||(i+=KHe(t.id,"tspan",(t?.textStyles||[]).map(e=>e.replace("color","fill"))))})}return i},"createCssStyles"),QHe=mt((e,t,r,i)=>(r=ZHe(e,r),NHe(_He(i+`{${Cc(t,r,{...e.themeVariables,theme:e.theme,look:e.look},i)}}`),DHe)),"createUserStyles"),JHe=mt((e="",t,r)=>{let i=e;return r||t||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=(i=C7(i)).replace(/<br>/g,"<br/>")},"cleanUpSvgCode"),eXe=mt((e="",t)=>`<iframe style="width:100%;height:${t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${jHe(`<body style="margin:0">${e}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">
The "iframe" tag is not supported by your browser.
</iframe>`,"putIntoIFrame"),tXe=mt((e,t,r,i,n)=>{var a=e.append("div"),r=(a.attr("id",r),i&&a.attr("style",i),a.append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg"));return n&&r.attr("xmlns:xlink",n),r.append("g"),e},"appendDivSvgG");function rXe(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}mt(rXe,"sandboxedIframe");var iXe=mt((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),sYe=mt(async function(e,t,r){VYe();var i=HHe(t),n=(t=i.code,br());B.debug(n),t.length>(n?.maxTextSize??5e4)&&(t="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let a="#"+e,s="i"+e,o="#"+s,l="d"+e,h="#"+l,c=mt(()=>{var e=Q(d?o:h).node();e&&"remove"in e&&e.remove()},"removeTempElements"),u=Q("body"),d="sandbox"===n.securityLevel,p="loose"===n.securityLevel,g=n.fontFamily;void 0!==r?(r&&(r.innerHTML=""),d?(y=rXe(Q(r),s),(u=Q(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=Q(r),tXe(u,e,l,"font-family: "+g,"http://www.w3.org/1999/xlink")):(iXe(document,e,l,s),d?(y=rXe(Q("body"),s),(u=Q(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=Q("body"),tXe(u,e,l));let f,m;try{f=await BHe.fromText(t,{title:i.title})}catch(r){if(n.suppressErrorRendering)throw c(),r;f=await BHe.fromText("error"),m=r}var r=u.select(h).node(),y=f.type,r=(i=r.firstChild).firstChild,v=f.renderer.getClasses?.(t,f),v=QHe(n,y,v,a),x=document.createElement("style");x.innerHTML=v,i.insertBefore(x,r);try{await f.renderer.draw(t,e,"11.14.0",f)}catch(r){throw n.suppressErrorRendering?c():SYe.draw(t,e,"11.14.0"),r}sXe(y,u.select(h+" svg"),f.db.getAccTitle?.(),f.db.getAccDescription?.()),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let b=u.select(h).node().innerHTML;if(B.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),b=JHe(b,d,hr(n.arrowMarkerAbsolute)),d?(v=u.select(h+" svg").node(),b=eXe(b,v)):p||(b=Ln.sanitize(b,{ADD_TAGS:VHe,ADD_ATTR:YHe,HTML_INTEGRATION_POINTS:{foreignobject:!0}})),$He(),m)throw m;return c(),{diagramType:y,svg:b,bindFunctions:f.db.bindFunctions}},"render");function nXe(e={}){(e=Le({},e))?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),mr(e),e?.theme&&e.theme in er?e.themeVariables=er[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=er.default.getThemeVariables(e.themeVariables)),e="object"==typeof e?fr(e):vr(),Ne(e.logLevel),VYe()}mt(nXe,"initialize");var aXe=mt((e,t={})=>(e=GHe(e).code,BHe.fromText(e,t)),"getDiagramFromText");function sXe(e,t,r,i){MHe(t,e),OHe(t,r,i,t.attr("id"))}mt(sXe,"addA11yInfo");var oXe=Object.freeze({render:sYe,parse:XHe,getDiagramFromText:aXe,initialize:nXe,getConfig:br,setConfig:xr,getSiteConfig:vr,updateSiteConfig:yr,reset:mt(()=>{wr()},"reset"),globalReset:mt(()=>{wr(lr)},"globalReset"),defaultConfig:lr}),lXe=(Ne(br().logLevel),wr(br()),tde(),S7(),mt((e,t,r)=>{B.warn(e),Y_(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")),hXe=mt(async function(t={querySelector:".mermaid"}){try{await cXe(t)}catch(e){if(Y_(e)&&B.error(e.str),bXe.parseError&&bXe.parseError(e),!t.suppressErrors)throw B.error("Use the suppressErrors option to suppress these errors"),e}},"run"),cXe=mt(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){var i=oXe.getConfig();B.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else{if(!t)throw new Error("Nodes and querySelector are both undefined");n=document.querySelectorAll(t)}B.debug(`Found ${n.length} diagrams`),void 0!==i?.startOnLoad&&(B.debug("Start On Load: "+i?.startOnLoad),oXe.updateSiteConfig({startOnLoad:i?.startOnLoad}));var a,s=new k7.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed),o=[];for(a of Array.from(n))if(B.info("Rendering diagram: "+a.id),!a.getAttribute("data-processed")){a.setAttribute("data-processed","true");var l="mermaid-"+s.next(),h=a.innerHTML,c=(h=ac(k7.entityDecode(h)).trim().replace(/<br\s*\/?>/gi,"<br/>"),k7.detectInit(h));c&&B.debug("Detected early reinit: ",c);try{var{svg:u,bindFunctions:d}=await vXe(l,h,a);a.innerHTML=u,e&&await e(l),d&&d(a)}catch(e){lXe(e,o,bXe.parseError)}}if(0<o.length)throw o[0]},"runThrowsErrors"),uXe=mt(function(e){oXe.initialize(e)},"initialize"),i=mt(async function(e,t,r){B.warn("mermaid.init is deprecated. Please use run instead."),e&&uXe(e),e={postRenderCallback:r,querySelector:".mermaid"},"string"==typeof t?e.querySelector=t:t&&(t instanceof HTMLElement?e.nodes=[t]:e.nodes=t),await hXe(e)},"init"),sYe=mt(async(e,{lazyLoad:t=!0}={})=>{VYe(),dc(...e),!1===t&&await YYe()},"registerExternalDiagrams"),dXe=mt(function(){bXe.startOnLoad&&oXe.getConfig().startOnLoad&&bXe.run().catch(e=>B.error("Mermaid failed to initialize",e))},"contentLoaded"),pXe=(typeof document<"u"&&window.addEventListener("load",dXe,!1),mt(function(e){bXe.parseError=e},"setParseErrorHandler")),gXe=[],fXe=!1,mXe=mt(async()=>{if(!fXe){for(fXe=!0;0<gXe.length;){var e=gXe.shift();if(e)try{await e()}catch(e){B.error("Error executing queue",e)}}fXe=!1}},"executeQueue"),yXe=mt(async(a,s)=>new Promise((i,n)=>{var e=mt(()=>new Promise((t,r)=>{oXe.parse(a,s).then(e=>{t(e),i(e)},e=>{B.error("Error parsing",e),bXe.parseError?.(e),r(e),n(e)})}),"performCall");gXe.push(e),mXe().catch(n)}),"parse"),vXe=mt((a,s,o)=>new Promise((i,n)=>{var e=mt(()=>new Promise((t,r)=>{oXe.render(a,s,o).then(e=>{t(e),i(e)},e=>{B.error("Error parsing",e),bXe.parseError?.(e),r(e),n(e)})}),"performCall");gXe.push(e),mXe().catch(n)}),"render"),xXe=mt(()=>Object.keys(cc).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),bXe={startOnLoad:!0,mermaidAPI:oXe,parse:yXe,render:vXe,init:i,run:hXe,registerExternalDiagrams:sYe,registerLayoutLoaders:Pue,initialize:uXe,parseError:void 0,contentLoaded:dXe,setParseErrorHandler:pXe,detectType:uc,registerIconPacks:Jh,getRegisteredDiagramsMetadata:xXe},TXe=bXe;return G(tYe)})(),globalThis.mermaid=globalThis.__esbuild_esm_mermaid_nm.mermaid.default;