mirror of
https://github.com/welpo/tabi.git
synced 2026-05-31 09:07:34 +02:00
3349 lines
3.1 MiB
3349 lines
3.1 MiB
var __esbuild_esm_mermaid_nm;(__esbuild_esm_mermaid_nm||={}).mermaid=(()=>{var i,s,b,x,T,k,w,S,E=Object.create,_=Object.defineProperty,A=Object.getOwnPropertyDescriptor,N=Object.getOwnPropertyNames,D=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty,mt=(e,t)=>_(e,"name",{value:t,configurable:!0}),O=(t,r,i,n)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let e of N(r))M.call(t,e)||e===i||_(t,e,{get:()=>r[e],enumerable:!(n=A(r,e))||n.enumerable});return t},j=(e,t,r)=>(r=null!=e?E(D(e)):{},O(!t&&e&&e.__esModule?r:_(r,"default",{value:e,enumerable:!0}),e)),W=(r=(e,t)=>()=>t=e?e(e=0):t)(()=>{i=Object.freeze({left:0,top:0,width:16,height:16}),s=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),b=Object.freeze({...i,...s}),x=Object.freeze({...b,body:"",hidden:!1})}),U=r(()=>{W(),T=Object.freeze({width:null,height:null}),k=Object.freeze({...T,...s})}),G=r(()=>{w=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&&!S(n)?null:n):1<(n=(e=a[0]).split("-")).length?(a={provider:i,prefix:n.shift(),name:n.join("-")},t&&!S(a)?null:a):r&&""===i&&(n={provider:i,prefix:"",name:e},!t||S(n,r))?n:null},"stringToIcon"),S=mt((e,t)=>!!e&&!(!(t&&""===e.prefix||e.prefix)||!e.name),"validateIconName")});function V(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 Y=r(()=>{mt(V,"mergeIconTransformations")});function H(e,t){var r,i=V(e,t);for(r in x)r in s?r in e&&!(r in i)&&(i[r]=s[r]):r in t?i[r]=t[r]:r in e&&(i[r]=e[r]);return i}var te=r(()=>{W(),Y(),mt(H,"mergeIconData")});function re(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 ie=r(()=>{mt(re,"getIconsTree")});function ne(e,t,r){let i=e.icons,n=e.aliases||Object.create(null),a={};function s(e){a=H(i[e]||n[e],a)}return mt(s,"parse"),s(t),r.forEach(s),H(e,a)}function ae(e,t){var r;return e.icons[t]?ne(e,t,[]):(r=re(e,[t])[t])?ne(e,t,r):null}var se=r(()=>{te(),ie(),mt(ne,"internalGetIconData"),mt(ae,"getIconData")});function oe(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(le);if(null===n||!n.length)return e;let a=[],s=n.shift(),o=ce.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 le,ce,ue=r(()=>{le=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ce=/^-?[0-9.]*[0-9]+[0-9.]*$/g,mt(oe,"calculateSize")});function de(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 pe(e,t){return e?"<defs>"+e+"</defs>"+t:t}function ge(e,t,r){return pe((e=de(e)).defs,t+e.content+r)}var fe=r(()=>{mt(de,"splitSVGDefs"),mt(pe,"mergeDefsAndContent"),mt(ge,"wrapSVGContent")});function me(e,t){let r={...b,...e},i={...k,...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=ge(o,'<g transform="'+t.join(" ")+'">',"</g>"))}),i.width),a=i.height,l=s.width,c=s.height,h,u,d=(null===n?(u=null===a?"1em":"auto"===a?c:a,h=oe(u,l/c)):(h="auto"===n?l:n,u=null===a?oe(h,c/l):"auto"===a?c:a),{}),p=mt((e,t)=>{ye(t)||(d[e]=t.toString())},"setAttr");return p("width",h),p("height",u),e=[s.left,s.top,l,c],d.viewBox=e.join(" "),{attributes:d,viewBox:e,body:o}}var ye,ve=r(()=>{W(),U(),ue(),fe(),ye=mt(e=>"unset"===e||"undefined"===e||"none"===e,"isUnsetKeyword"),mt(me,"iconToSVG")});function be(i,n=Te){for(var e,t=[];e=xe.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+(ke++).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 xe,Te,ke,we=r(()=>{xe=/\sid="(\S+)"/g,Te="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),ke=0,mt(be,"replaceIDs")});function Ce(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 Se,Ee,_e,Ae,P,Re,Le,Ie,Ne,De,Me,Oe,Pe,Be,$e,Fe,ze,qe,je,We,Ue,Ge,Ve,Ye,He,Xe,Ke,Ze,Qe,Je,et,tt,rt,it,nt,at,st,ot,lt,ct,ht,ut,dt,pt,gt,ft,bt,R,xt,L,Tt,kt,wt,n,Ct,St,Et,a,_t,At,Rt,Lt,It,Nt,Dt,Mt,Ot,Pt,Bt,$t,Ft,zt,qt,jt,Wt,Ut,Gt,Vt,Yt,Ht,Xt,Kt,Zt,Qt,Jt,er,tr,rr,ir,nr,ar,sr,or,lr,cr,hr,ur,dr,pr,gr,fr,mr,yr,vr,br,xr,Tr,kr,wr,Cr,Sr,Er,_r,Ar=r(()=>{mt(Ce,"iconToHTML")}),Rr=r(()=>{G(),se(),ve(),we(),Ar()}),Lr=r(()=>{Se=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=>Se(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]=Se(t[e],r[e],{depth:i-1,clobber:n}))}),t)},"assignWithDepth"),Ee=Se}),Ir=(qat=(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+)?$/,b=/\[([^\]]+)]|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"),c=mt(function(e){return e instanceof k||!(!e||!e[a])},"S"),h=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"),x=mt(function(e,t){return c(e)?e.clone():((t="object"==typeof t?t:{}).date=e,t.args=arguments,new k(t))},"O"),T=r,k=(T.l=h,T.i=c,T.w=function(e,t){return x(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=x(e),this.startOf(t)<=e&&e<=this.endOf(t)},e.isAfter=function(e,t){return x(e)<this.startOf(t)},e.isBefore=function(e,t){return this.endOf(t)<x(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,c="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 h=(s<(h=this.$locale().weekStart||0)?s+7:s)-h;return n(i?l-h:l+(6-h),o);case g:case v:return a(c+"Hours",0);case p:return a(c+"Minutes",1);case d:return a(c+"Seconds",2);case u:return a(c+"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=x(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,c,h,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,c=mt(function(e,t,r,i){return e&&(e[t]||e(d,n))||r[t].slice(0,i)},"h"),h=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(b,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 c(p.monthsShort,s,l,3);case"MMMM":return c(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 c(p.weekdaysMin,d.$W,o,2);case"ddd":return c(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 h(1);case"hh":return h(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=x(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=h(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=h(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[a]=!0}return x.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])}}),x.extend=function(e,t){return e.$i||(e(t,k,x),e.$i=!0),x},x.locale=h,x.isDayjs=c,x.unix=function(e){return x(1e3*e)},x.en=l[o],x.Ls=l,x.p={},x}"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=r(()=>{_e=j(Ir(),1),Ae={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},P={trace:mt(()=>{},"trace"),debug:mt(()=>{},"debug"),info:mt(()=>{},"info"),warn:mt(()=>{},"warn"),error:mt(()=>{},"error"),fatal:mt(()=>{},"fatal")},Re=mt(function(e="fatal"){let t=Ae.fatal;"string"==typeof e?e.toLowerCase()in Ae&&(t=Ae[e]):"number"==typeof e&&(t=e),P.trace=()=>{},P.debug=()=>{},P.info=()=>{},P.warn=()=>{},P.error=()=>{},P.fatal=()=>{},t<=Ae.fatal&&(P.fatal=console.error?console.error.bind(console,Le("FATAL"),"color: orange"):console.log.bind(console,"[35m",Le("FATAL"))),t<=Ae.error&&(P.error=console.error?console.error.bind(console,Le("ERROR"),"color: orange"):console.log.bind(console,"[31m",Le("ERROR"))),t<=Ae.warn&&(P.warn=console.warn?console.warn.bind(console,Le("WARN"),"color: orange"):console.log.bind(console,"[33m",Le("WARN"))),t<=Ae.info&&(P.info=console.info?console.info.bind(console,Le("INFO"),"color: lightblue"):console.log.bind(console,"[34m",Le("INFO"))),t<=Ae.debug&&(P.debug=console.debug?console.debug.bind(console,Le("DEBUG"),"color: lightgreen"):console.log.bind(console,"[32m",Le("DEBUG"))),t<=Ae.trace&&(P.trace=console.debug?console.debug.bind(console,Le("TRACE"),"color: lightgreen"):console.log.bind(console,"[32m",Le("TRACE")))},"setLogLevel"),Le=mt(e=>`%c${(0,_e.default)().format("ss.SSS")} : ${e} : `,"format")}),Nr=r(()=>{Ie={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*Ie.hue2rgb(a,n,e+.3333333333333333);case"g":return 255*Ie.hue2rgb(a,n,e);case"b":return 255*Ie.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")},Ne=Ie}),Dr=r(()=>{De={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")},Me=De}),Mr=r(()=>{Oe={dec2hex:mt(e=>1<(e=Math.round(e).toString(16)).length?e:"0"+e,"dec2hex")},Pe=Oe}),Or=r(()=>{Nr(),Dr(),Mr(),Be={channel:Ne,lang:Me,unit:Pe}}),Pr=r(()=>{Or(),$e={};for(let e=0;e<=255;e++)$e[e]=Be.unit.dec2hex(e);Fe={ALL:0,RGB:1,HSL:2}}),Br=r(()=>{Pr(),ze=class{static{mt(this,"Type")}constructor(){this.type=Fe.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=Fe.ALL}is(e){return this.type===e}},qe=ze}),$r=r(()=>{Or(),Br(),Pr(),je=class{static{mt(this,"Channels")}constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new qe}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=Fe.ALL,this}_ensureHSL(){var e=this.data,{h:t,s:r,l:i}=e;void 0===t&&(e.h=Be.channel.rgb2hsl(e,"h")),void 0===r&&(e.s=Be.channel.rgb2hsl(e,"s")),void 0===i&&(e.l=Be.channel.rgb2hsl(e,"l"))}_ensureRGB(){var e=this.data,{r:t,g:r,b:i}=e;void 0===t&&(e.r=Be.channel.hsl2rgb(e,"r")),void 0===r&&(e.g=Be.channel.hsl2rgb(e,"g")),void 0===i&&(e.b=Be.channel.hsl2rgb(e,"b"))}get r(){var e=this.data,t=e.r;return this.type.is(Fe.HSL)||void 0===t?(this._ensureHSL(),Be.channel.hsl2rgb(e,"r")):t}get g(){var e=this.data,t=e.g;return this.type.is(Fe.HSL)||void 0===t?(this._ensureHSL(),Be.channel.hsl2rgb(e,"g")):t}get b(){var e=this.data,t=e.b;return this.type.is(Fe.HSL)||void 0===t?(this._ensureHSL(),Be.channel.hsl2rgb(e,"b")):t}get h(){var e=this.data,t=e.h;return this.type.is(Fe.RGB)||void 0===t?(this._ensureRGB(),Be.channel.rgb2hsl(e,"h")):t}get s(){var e=this.data,t=e.s;return this.type.is(Fe.RGB)||void 0===t?(this._ensureRGB(),Be.channel.rgb2hsl(e,"s")):t}get l(){var e=this.data,t=e.l;return this.type.is(Fe.RGB)||void 0===t?(this._ensureRGB(),Be.channel.rgb2hsl(e,"l")):t}get a(){return this.data.a}set r(e){this.type.set(Fe.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(Fe.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(Fe.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(Fe.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(Fe.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(Fe.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}},We=je}),Fr=r(()=>{$r(),Ue=new We({r:0,g:0,b:0,a:0},"transparent"),Ge=Ue}),zr=r(()=>{Fr(),Pr(),Ve={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(Ve.re);if(s)return s=s[1],t=parseInt(s,16),s=s.length,Ge.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?"#"+$e[Math.round(e)]+$e[Math.round(t)]+$e[Math.round(r)]+$e[Math.round(255*i)]:"#"+$e[Math.round(e)]+$e[Math.round(t)]+$e[Math.round(r)]},"stringify")},Ye=Ve}),qr=r(()=>{Or(),Fr(),He={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(He.hueRe)){var[,t,r]=r;switch(r){case"grad":return Be.channel.clamp.h(.9*parseFloat(t));case"rad":return Be.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return Be.channel.clamp.h(360*parseFloat(t))}}return Be.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(He.re)))return[,a,t,r,i,n]=a,Ge.set({h:He._hue2deg(a),s:Be.channel.clamp.s(parseFloat(t)),l:Be.channel.clamp.l(parseFloat(r)),a:i?Be.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(${Be.lang.round(e)}, ${Be.lang.round(t)}%, ${Be.lang.round(r)}%, ${i})`:`hsl(${Be.lang.round(e)}, ${Be.lang.round(t)}%, ${Be.lang.round(r)}%)`},"stringify")},Xe=He}),jr=r(()=>{zr(),Ke={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=Ke.colors[e])return Ye.parse(e)},"parse"),stringify:mt(e=>{var t,r=Ye.stringify(e);for(t in Ke.colors)if(Ke.colors[t]===r)return t},"stringify")},Ze=Ke}),Wr=r(()=>{Or(),Fr(),Qe={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(Qe.re)))return[,l,t,r,i,n,a,s,o]=l,Ge.set({r:Be.channel.clamp.r(t?2.55*parseFloat(l):parseFloat(l)),g:Be.channel.clamp.g(i?2.55*parseFloat(r):parseFloat(r)),b:Be.channel.clamp.b(a?2.55*parseFloat(n):parseFloat(n)),a:s?Be.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(${Be.lang.round(e)}, ${Be.lang.round(t)}, ${Be.lang.round(r)}, ${Be.lang.round(i)})`:`rgb(${Be.lang.round(e)}, ${Be.lang.round(t)}, ${Be.lang.round(r)})`},"stringify")},Je=Qe}),Ur=r(()=>{zr(),qr(),jr(),Wr(),Pr(),et={format:{keyword:Ze,hex:Ye,rgb:Je,rgba:Je,hsl:Xe,hsla:Xe},parse:mt(e=>{if("string"!=typeof e)return e;var t=Ye.parse(e)||Je.parse(e)||Xe.parse(e)||Ze.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(Fe.HSL)||void 0===e.data.r?Xe:e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Je:Ye).stringify(e),"stringify")},tt=et}),Gr=r(()=>{Or(),Ur(),rt=mt((e,t)=>{var r,i=tt.parse(e);for(r in t)i[r]=Be.channel.clamp[r](t[r]);return tt.stringify(i)},"change"),it=rt}),Vr=r(()=>{Or(),Fr(),Ur(),Gr(),nt=mt((e,t,r=0,i=1)=>"number"!=typeof e?it(e,{a:t}):(e=Ge.set({r:Be.channel.clamp.r(e),g:Be.channel.clamp.g(t),b:Be.channel.clamp.b(r),a:Be.channel.clamp.a(i)}),tt.stringify(e)),"rgba"),at=nt}),Yr=r(()=>{Or(),Ur(),st=mt((e,t)=>Be.lang.round(tt.parse(e)[t]),"channel"),ot=st}),Hr=r(()=>{Or(),Ur(),lt=mt(e=>{var{r:e,g:t,b:r}=tt.parse(e),e=.2126*Be.channel.toLinear(e)+.7152*Be.channel.toLinear(t)+.0722*Be.channel.toLinear(r);return Be.lang.round(e)},"luminance"),ct=lt}),Xr=r(()=>{Hr(),ht=mt(e=>.5<=ct(e),"isLight"),ut=ht}),Kr=r(()=>{Xr(),dt=mt(e=>!ut(e),"isDark"),pt=dt}),Zr=r(()=>{Or(),Ur(),gt=mt((e,t,r)=>{var i=(e=tt.parse(e))[t];return i!==(r=Be.channel.clamp[t](i+r))&&(e[t]=r),tt.stringify(e)},"adjustChannel"),ft=gt}),Qr=r(()=>{Zr(),bt=mt((e,t)=>ft(e,"l",t),"lighten"),R=bt}),Jr=r(()=>{Zr(),xt=mt((e,t)=>ft(e,"l",-t),"darken"),L=xt}),ei=r(()=>{Zr(),Tt=mt((e,t)=>ft(e,"a",-t),"transparentize"),kt=Tt}),ti=r(()=>{Ur(),Gr(),wt=mt((e,t)=>{var r,i=tt.parse(e),n={};for(r in t)t[r]&&(n[r]=i[r]+t[r]);return it(e,n)},"adjust"),n=wt}),ri=r(()=>{Ur(),Vr(),Ct=mt((e,t,r=50)=>{var{r:e,g:i,b:n,a}=tt.parse(e),{r:t,g:s,b:o,a:l}=tt.parse(t),c=2*(r/=100)-1,h=a-l;return at(e*(c=(1+(c*h==-1?c:(c+h)/(1+c*h)))/2)+t*(h=1-c),i*c+s*h,n*c+o*h,a*r+l*(1-r))},"mix"),St=Ct}),ii=r(()=>{Ur(),ri(),Et=mt((e,t=100)=>{var r=tt.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,St(r,e,t)},"invert"),a=Et}),ni=r(()=>{Vr(),Yr(),Kr(),Qr(),Jr(),ei(),ti(),ii()}),ai=r(()=>{ni()}),si=r(()=>{_t="#ffffff",At="#f2f2f2"}),oi=r(()=>{ai(),Rt=mt((e,t)=>n(e,t?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder")}),li=r(()=>{ai(),si(),oi(),Lt=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||Rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Rt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Rt(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?L(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||L(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||R(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||L(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||L(this.mainBkg,10)):(this.rowOdd=this.rowOdd||R(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||R(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]=L(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=L(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]||R(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||L(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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},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||pt(this.quadrant1Fill)?R:L)(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?L(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=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.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.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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||_t,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||At,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]}))}},It=mt(e=>{var t=new Lt;return t.calculate(e),t},"getThemeVariables")}),ci=r(()=>{ai(),oi(),Nt=class{static{mt(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=n(this.primaryColor,{h:-160}),this.primaryBorderColor=a(this.background),this.secondaryBorderColor=Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rt(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=R(a("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=at(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=L("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=L(this.sectionBkgColor,10),this.taskBorderColor=at(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=at(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||R(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||L(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=R(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=R(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=R(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]||R(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)]??R(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||pt(this.quadrant1Fill)?R:L)(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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},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?L(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=R(this.secondaryColor,20),this.git1=R(this.pie2||this.secondaryColor,20),this.git2=R(this.pie3||this.tertiaryColor,20),this.git3=R(this.pie4||n(this.primaryColor,{h:-30}),20),this.git4=R(this.pie5||n(this.primaryColor,{h:-60}),20),this.git5=R(this.pie6||n(this.primaryColor,{h:-90}),10),this.git6=R(this.pie7||n(this.primaryColor,{h:60}),10),this.git7=R(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.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||R("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||R("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||R("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||R("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||R(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||R(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||R(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||R(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]}))}},Dt=mt(e=>{var t=new Nt;return t.calculate(e),t},"getThemeVariables")}),hi=r(()=>{ai(),oi(),si(),Mt=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=Rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rt(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=Rt(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=at(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||L(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||L(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=L(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||L(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||R(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||R(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||pt(this.quadrant1Fill)?R:L)(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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},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=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.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.gitInv0=this.gitInv0||L(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||_t,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||At}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]}))}},Ot=mt(e=>{var t=new Mt;return t.calculate(e),t},"getThemeVariables")}),ui=r(()=>{ai(),si(),oi(),Pt=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=R("#cde498",10),this.primaryBorderColor=Rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rt(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=L(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||L(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||L(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=L(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||L(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||R(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||R(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||pt(this.quadrant1Fill)?R:L)(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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},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=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.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.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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||_t,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||At}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]}))}},Bt=mt(e=>{var t=new Pt;return t.calculate(e),t},"getThemeVariables")}),di=r(()=>{ai(),oi(),si(),$t=class{static{mt(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=R(this.contrast,55),this.background="#ffffff",this.tertiaryColor=n(this.primaryColor,{h:-160}),this.primaryBorderColor=Rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rt(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||R(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=R(this.contrast,55),this.border2=this.contrast,this.actorBorder=R(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]||R(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||L(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=R(this.contrast,30),this.sectionBkgColor2=R(this.contrast,30),this.taskBorderColor=L(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=R(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=L(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||pt(this.quadrant1Fill)?R:L)(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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},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=L(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||_t,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||At}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")}),pi=r(()=>{ai(),oi(),si(),zt=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=Rt(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||Rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Rt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Rt(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?L(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||L(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||R(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]=L(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=L(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]||R(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||L(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||pt(this.quadrant1Fill)?R:L)(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?L(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=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.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.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||_t,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||At}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")}),gi=r(()=>{ai(),oi(),si(),jt=class{static{mt(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=n(this.primaryColor,{h:-160}),this.primaryBorderColor=a(this.background),this.secondaryBorderColor=Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rt(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=R(a("#323D47"),10),this.border1="#ccc",this.border2=at(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||Rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Rt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Rt(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?L(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||L(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||R(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]=L(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=L(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]||R(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||L(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||pt(this.quadrant1Fill)?R:L)(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?L(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=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.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.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||_t,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||At}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]}))}},Wt=mt(e=>{var t=new jt;return t.calculate(e),t},"getThemeVariables")}),fi=r(()=>{ai(),oi(),si(),Ut=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=Rt("#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||Rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Rt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Rt(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?L(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||L(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||R(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]=L(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=L(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]||R(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||L(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||pt(this.quadrant1Fill)?R:L)(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?L(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=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.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.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||_t,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||At}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]}))}},Gt=mt(e=>{var t=new Ut;return t.calculate(e),t},"getThemeVariables")}),mi=r(()=>{ai(),oi(),si(),Vt=class{static{mt(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=n(this.primaryColor,{h:-160}),this.primaryBorderColor=a(this.background),this.secondaryBorderColor=Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rt(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=R(a("#323D47"),10),this.border1="#ccc",this.border2=at(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||Rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Rt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Rt(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?L(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||L(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||R(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]=L(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=L(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]||R(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||L(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||pt(this.quadrant1Fill)?R:L)(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?L(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=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.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.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||_t,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||At}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")}),yi=r(()=>{ai(),oi(),si(),Ht=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=Rt(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||Rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Rt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Rt(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?L(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||L(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||R(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]||R(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||L(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||pt(this.quadrant1Fill)?R:L)(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?L(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=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.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.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||_t,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||At}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")}),vi=r(()=>{ai(),oi(),si(),Kt=class{static{mt(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=n(this.primaryColor,{h:-160}),this.primaryBorderColor=a(this.background),this.secondaryBorderColor=Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rt(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=R(a("#323D47"),10),this.border1="#ccc",this.border2=at(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||Rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Rt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Rt(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?L(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||L(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||R(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]||R(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||L(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=L(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||pt(this.quadrant1Fill)?R:L)(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?L(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=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.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.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||_t,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||At}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=r(()=>{li(),ci(),hi(),ui(),di(),pi(),gi(),fi(),mi(),yi(),vi(),Qt={base:{getThemeVariables:It},dark:{getThemeVariables:Dt},default:{getThemeVariables:Ot},forest:{getThemeVariables:Bt},neutral:{getThemeVariables:Ft},neo:{getThemeVariables:qt},"neo-dark":{getThemeVariables:Wt},redux:{getThemeVariables:Gt},"redux-dark":{getThemeVariables:Yt},"redux-color":{getThemeVariables:Xt},"redux-dark-color":{getThemeVariables:Zt}}}),xi=r(()=>{Jt={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,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},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:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},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}}),Ti=r(()=>{bi(),xi(),er={...Jt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Qt.default.getThemeVariables(),sequence:{...Jt.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,hierarchicalNamespaces:!0},gantt:{...Jt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Jt.c4,useWidth:void 0,personFont:mt(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Jt.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:{...Jt.pie,useWidth:984},xyChart:{...Jt.xyChart,useWidth:void 0},requirement:{...Jt.requirement,useWidth:void 0},packet:{...Jt.packet},eventmodeling:{...Jt.eventmodeling},treeView:{...Jt.treeView,useWidth:void 0},radar:{...Jt.radar},ishikawa:{...Jt.ishikawa},sankey:{...Jt.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Jt.venn}},tr=mt((r,i="")=>Object.keys(r).reduce((e,t)=>Array.isArray(r[t])?e:"object"==typeof r[t]&&null!==r[t]?[...e,i+t,...tr(r[t],"")]:[...e,i+t],[]),"keyify"),rr=new Set(tr(er,"")),ir=er}),ki=r(()=>{Ti(),e(),nr=mt(e=>{if(P.debug("sanitizeDirective called with",e),"object"==typeof e&&null!=e)if(Array.isArray(e))e.forEach(e=>nr(e));else{for(var t of Object.keys(e)){var r;if(P.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!rr.has(t)||null==e[t])P.debug("sanitize deleting key: ",t),delete e[t];else if("object"==typeof e[t])if("nodeColors"===t){var i,n=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(i of Object.keys(e[t]))"string"==typeof e[t][i]&&n.test(e[t][i])||(P.debug("sanitize deleting invalid color:",i,e[t][i]),delete e[t][i])}else P.debug("sanitizing object",t),nr(e[t]);else for(r of["themeCSS","fontFamily","altFontFamily"])t.includes(r)&&(P.debug("sanitizing css option",t),e[t]=ar(e[t]))}if(e.themeVariables)for(var a of Object.keys(e.themeVariables)){var s=e.themeVariables[a];s?.match&&!s.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[a]="")}P.debug("After sanitization",e)}},"sanitizeDirective"),ar=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")}),wi=r(()=>{Lr(),e(),bi(),Ti(),ki(),sr=Object.freeze(ir),or=mt(e=>!(!1===e||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),lr=Ee({},sr),hr=[],ur=Ee({},sr),dr=mt((e,t)=>{let r=Ee({},e),i={};for(var n of t)br(n),i=Ee(i,n);return r=Ee(r,i),i.theme&&i.theme in Qt&&(e=Ee({},cr),t=Ee(e.themeVariables||{},i.themeVariables),r.theme)&&r.theme in Qt&&(r.themeVariables=Qt[r.theme].getThemeVariables(t)),Sr(ur=r),ur},"updateCurrentConfig"),pr=mt(e=>(lr=Ee({},sr),lr=Ee(lr,e),e.theme&&Qt[e.theme]&&(lr.themeVariables=Qt[e.theme].getThemeVariables(e.themeVariables)),dr(lr,hr),lr),"setSiteConfig"),gr=mt(e=>{cr=Ee({},e)},"saveConfigFromInitialize"),fr=mt(e=>(lr=Ee(lr,e),dr(lr,hr),lr),"updateSiteConfig"),mr=mt(()=>Ee({},lr),"getSiteConfig"),yr=mt(e=>(Sr(e),Ee(ur,e),vr()),"setConfig"),vr=mt(()=>Ee({},ur),"getConfig"),br=mt(t=>{t&&(["secure",...lr.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(P.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]&&br(t[e])}))},"sanitize"),xr=mt(e=>{nr(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),hr.push(e),dr(lr,hr)},"addDirective"),Tr=mt((e=lr)=>{dr(e,hr=[])},"reset"),kr={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."},wr={},Cr=mt(e=>{wr[e]||(P.warn(kr[e]),wr[e]=!0)},"issueWarning"),Sr=mt(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Cr("LAZY_LOAD_DEPRECATED")},"checkConfig"),Er=mt(()=>{let e={};cr&&(e=Ee(e,cr));for(var t of hr)e=Ee(e,t);return e},"getUserDefinedConfig"),_r=mt(e=>(null!=e.flowchart?.htmlLabels&&Cr("FLOWCHART_HTML_LABELS_DEPRECATED"),or(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels")});function Ci(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 $i(n,e,r)}}function Si(i){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Fi(i,t)}}function Ei(t,r){var i,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:Gi;Ni&&Ni(t,null);let a=r.length;for(;a--;){let e=r[a];"string"==typeof e&&(i=n(e))!==e&&(Di(r)||(r[a]=i),e=i),t[e]=!0}return t}function _i(t){for(let e=0;e<t.length;e++)Zi(t,e)||(t[e]=null);return t}function Ai(e){var t,r,i=Bi(null);for([t,r]of Ii(e))Zi(e,t)&&(Array.isArray(r)?i[t]=_i(r):r&&"object"==typeof r&&r.constructor===Object?i[t]=Ai(r):i[t]=r);return i}function Ri(e,t){for(;null!==e;){var r=Oi(e,t);if(r){if(r.get)return Ci(r.get);if("function"==typeof r.value)return Ci(r.value)}e=Mi(e)}function i(){return null}return mt(i,"fallbackValue"),i}function Li(){let e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Cn(),d=mt(e=>Li(e),"DOMPurify");if(d.version="3.4.0",d.removed=[],!e||!e.document||e.document.nodeType!==wn.document||!e.Element)return d.isSupported=!1,d;let n=e.document,P=n,B=P.currentScript,{DocumentFragment:$,HTMLTemplateElement:F,Node:z,Element:q,NodeFilter:t,NamedNodeMap:j=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:W,DOMParser:U,trustedTypes:p}=e,r=q.prototype,G=Ri(r,"cloneNode"),V=Ri(r,"remove"),Y=Ri(r,"nextSibling"),H=Ri(r,"childNodes"),s=Ri(r,"parentNode");var X;"function"==typeof F&&(X=n.createElement("template")).content&&X.content.ownerDocument&&(n=X.content.ownerDocument);let g,c="",{implementation:K,createNodeIterator:Z,createDocumentFragment:Q,getElementsByTagName:J}=n,ee=P.importNode,f=En(),{MUSTACHE_EXPR:m,ERB_EXPR:y,TMPLIT_EXPR:v,DATA_ATTR:te,ARIA_ATTR:re,IS_SCRIPT_OR_DATA:ie,ATTR_WHITESPACE:ne,CUSTOM_ELEMENT:ae}=(d.isSupported="function"==typeof Ii&&"function"==typeof s&&K&&void 0!==K.createHTMLDocument,kn),se=kn.IS_ALLOWED_URI,h=null,oe=Ei({},[...en,...tn,...rn,...an,...on]),b=null,le=Ei({},[...ln,...cn,...hn,...un]),o=Object.seal(Bi(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,i=null,l=Object.seal(Bi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ce=!0,he=!0,ue=!1,de=!0,x=!1,T=!0,k=!1,pe=!1,ge=!1,w=!1,C=!1,S=!1,fe=!0,me=!1,ye=!0,E=!1,a,_=null,ve=Ei({},["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"]),be=null,xe=Ei({},["audio","video","img","source","image","track"]),Te=null,ke=Ei({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),we="http://www.w3.org/1998/Math/MathML",Ce="http://www.w3.org/2000/svg",A="http://www.w3.org/1999/xhtml",R=A,Se=!1,Ee=null,_e=Ei({},[we,Ce,A],Vi),Ae=Ei({},["mi","mo","mn","ms","mtext"]),Re=Ei({},["annotation-xml"]),Le=Ei({},["title","style","font","a","script"]),L=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=Ai(e&&"object"==typeof e?e:{}),L=-1===Ie.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,I="application/xhtml+xml"===L?Vi:Gi,h=Zi(e,"ALLOWED_TAGS")?Ei({},e.ALLOWED_TAGS,I):oe,b=Zi(e,"ALLOWED_ATTR")?Ei({},e.ALLOWED_ATTR,I):le,Ee=Zi(e,"ALLOWED_NAMESPACES")?Ei({},e.ALLOWED_NAMESPACES,Vi):_e,Te=Zi(e,"ADD_URI_SAFE_ATTR")?Ei(Ai(ke),e.ADD_URI_SAFE_ATTR,I):ke,be=Zi(e,"ADD_DATA_URI_TAGS")?Ei(Ai(xe),e.ADD_DATA_URI_TAGS,I):xe,_=Zi(e,"FORBID_CONTENTS")?Ei({},e.FORBID_CONTENTS,I):ve,u=Zi(e,"FORBID_TAGS")?Ei({},e.FORBID_TAGS,I):Ai({}),i=Zi(e,"FORBID_ATTR")?Ei({},e.FORBID_ATTR,I):Ai({}),a=!!Zi(e,"USE_PROFILES")&&e.USE_PROFILES,ce=!1!==e.ALLOW_ARIA_ATTR,he=!1!==e.ALLOW_DATA_ATTR,ue=e.ALLOW_UNKNOWN_PROTOCOLS||!1,de=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,x=e.SAFE_FOR_TEMPLATES||!1,T=!1!==e.SAFE_FOR_XML,k=e.WHOLE_DOCUMENT||!1,w=e.RETURN_DOM||!1,C=e.RETURN_DOM_FRAGMENT||!1,S=e.RETURN_TRUSTED_TYPE||!1,ge=e.FORCE_BODY||!1,fe=!1!==e.SANITIZE_DOM,me=e.SANITIZE_NAMED_PROPS||!1,ye=!1!==e.KEEP_CONTENT,E=e.IN_PLACE||!1,se=e.ALLOWED_URI_REGEXP||yn,R=e.NAMESPACE||A,Ae=e.MATHML_TEXT_INTEGRATION_POINTS||Ae,Re=e.HTML_INTEGRATION_POINTS||Re,o=e.CUSTOM_ELEMENT_HANDLING||Bi(null),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),x&&(he=!1),C&&(w=!0),a&&(h=Ei({},on),b=Bi(null),!0===a.html&&(Ei(h,en),Ei(b,ln)),!0===a.svg&&(Ei(h,tn),Ei(b,cn),Ei(b,un)),!0===a.svgFilters&&(Ei(h,rn),Ei(b,cn),Ei(b,un)),!0===a.mathMl)&&(Ei(h,an),Ei(b,hn),Ei(b,un)),l.tagCheck=null,l.attributeCheck=null,e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?l.tagCheck=e.ADD_TAGS:Ei(h=h===oe?Ai(h):h,e.ADD_TAGS,I)),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?l.attributeCheck=e.ADD_ATTR:Ei(b=b===le?Ai(b):b,e.ADD_ATTR,I)),e.ADD_URI_SAFE_ATTR&&Ei(Te,e.ADD_URI_SAFE_ATTR,I),e.FORBID_CONTENTS&&Ei(_=_===ve?Ai(_):_,e.FORBID_CONTENTS,I),e.ADD_FORBID_CONTENTS&&Ei(_=_===ve?Ai(_):_,e.ADD_FORBID_CONTENTS,I),ye&&(h["#text"]=!0),k&&Ei(h,["html","head","body"]),h.table&&(Ei(h,["tbody"]),delete u.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Ji('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Ji('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=e.TRUSTED_TYPES_POLICY,c=g.createHTML("")}else null!==(g=void 0===g?Sn(p,B):g)&&"string"==typeof c&&(c=g.createHTML(""));Pi&&Pi(e),N=e}},"_parseConfig"),Oe=Ei({},[...tn,...rn,...nn]),Pe=Ei({},[...an,...sn]),Be=mt(function(e){let t=s(e);t&&t.tagName||(t={namespaceURI:R,tagName:"template"});var r=Gi(e.tagName),i=Gi(t.tagName);return!!Ee[e.namespaceURI]&&(e.namespaceURI===Ce?t.namespaceURI===A?"svg"===r:t.namespaceURI===we?"svg"===r&&("annotation-xml"===i||Ae[i]):!!Oe[r]:e.namespaceURI===we?t.namespaceURI===A?"math"===r:t.namespaceURI===Ce?"math"===r&&Re[i]:!!Pe[r]:e.namespaceURI===A?!(t.namespaceURI===Ce&&!Re[i]||t.namespaceURI===we&&!Ae[i]||Pe[r])&&(Le[r]||!Oe[r]):!("application/xhtml+xml"!==L||!Ee[e.namespaceURI]))},"_checkValidNamespace"),D=mt(function(e){Wi(d.removed,{element:e});try{s(e).removeChild(e)}catch{V(e)}},"_forceRemove"),M=mt(function(e,t){try{Wi(d.removed,{attribute:t.getAttributeNode(e),from:t})}catch{Wi(d.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(w||C)try{D(t)}catch{}else try{t.setAttribute(e,"")}catch{}},"_removeAttribute"),$e=mt(function(e){let t=null,r=null;ge?e="<remove></remove>"+e:(i=Yi(e,/^[\r\n\t ]+/),r=i&&i[0]),"application/xhtml+xml"===L&&R===A&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var i=g?g.createHTML(e):e;if(R===A)try{t=(new U).parseFromString(i,L)}catch{}if(!t||!t.documentElement){t=K.createDocument(R,"template",null);try{t.documentElement.innerHTML=Se?c:i}catch{}}return i=t.body||t.documentElement,e&&r&&i.insertBefore(n.createTextNode(r),i.childNodes[0]||null),R===A?J.call(t,k?"html":"body")[0]:k?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 W&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof j)||"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){zi(e,e=>{e.call(d,t,r,N)})}mt(O,"_executeHooks");let je=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:h}),!(T&&t.hasChildNodes()&&!qe(t.firstElementChild)&&Qi(/<[/\w!]/g,t.innerHTML)&&Qi(/<[/\w!]/g,t.textContent)||T&&t.namespaceURI===A&&"style"===e&&qe(t.firstElementChild)||t.nodeType===wn.progressingInstruction||T&&t.nodeType===wn.comment&&Qi(/<[/\w]/g,t.data))){if(!u[e]&&(l.tagCheck instanceof Function&&l.tagCheck(e)||h[e]))return t instanceof q&&!Be(t)||("noscript"===e||"noembed"===e||"noframes"===e)&&Qi(/<\/no(script|embed|frames)/i,t.innerHTML)?(D(t),!0):(x&&t.nodeType===wn.text&&(r=t.textContent,zi([m,y,v],e=>{r=Hi(r,e," ")}),t.textContent!==r)&&(Wi(d.removed,{element:t.cloneNode()}),t.textContent=r),O(f.afterSanitizeElements,t,null),!1);if(!u[e]&&Ue(e)&&(o.tagNameCheck instanceof RegExp&&Qi(o.tagNameCheck,e)||o.tagNameCheck instanceof Function&&o.tagNameCheck(e)))return!1;if(ye&&!_[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=G(n[e],!0);a.__removalCount=(t.__removalCount||0)+1,i.insertBefore(a,Y(t))}}}}return D(t),!0},"_sanitizeElements"),We=mt(function(e,t,r){if(i[t]||fe&&("id"===t||"name"===t)&&(r in n||r in Ne))return!1;if((!he||i[t]||!Qi(te,t))&&!(ce&&Qi(re,t)||l.attributeCheck instanceof Function&&l.attributeCheck(t,e)))if(!b[t]||i[t]){if(!(Ue(e)&&(o.tagNameCheck instanceof RegExp&&Qi(o.tagNameCheck,e)||o.tagNameCheck instanceof Function&&o.tagNameCheck(e))&&(o.attributeNameCheck instanceof RegExp&&Qi(o.attributeNameCheck,t)||o.attributeNameCheck instanceof Function&&o.attributeNameCheck(t,e))||"is"===t&&o.allowCustomizedBuiltInElements&&(o.tagNameCheck instanceof RegExp&&Qi(o.tagNameCheck,r)||o.tagNameCheck instanceof Function&&o.tagNameCheck(r))))return!1}else if(!Te[t]&&!Qi(se,Hi(r,ne,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Xi(r,"data:")||!be[e])&&(!ue||Qi(ie,Hi(r,ne,"")))&&r)return!1;return!0},"_isValidAttribute"),Ue=mt(function(e){return"annotation-xml"!==e&&Yi(e,ae)},"_isBasicCustomElement"),Ge=mt(function(c){O(f.beforeSanitizeAttributes,c,null);var h=c.attributes;if(h&&!ze(c)){let o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:b,forceKeepAttr:void 0},l=h.length;for(;l--;){let e=h[l],{name:t,namespaceURI:r,value:i}=e,n=I(t),a=i,s="value"===t?a:Ki(a);if(o.attrName=n,o.attrValue=s,o.keepAttr=!0,o.forceKeepAttr=void 0,O(f.uponSanitizeAttribute,c,o),s=o.attrValue,!me||"id"!==n&&"name"!==n||(M(t,c),s="user-content-"+s),T&&Qi(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,s))M(t,c);else if("attributename"===n&&Yi(s,"href"))M(t,c);else if(!o.forceKeepAttr)if(o.keepAttr)if(!de&&Qi(/\/>/i,s))M(t,c);else{x&&zi([m,y,v],e=>{s=Hi(s,e," ")});var u=I(c.nodeName);if(We(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?c.setAttributeNS(r,t,s):c.setAttribute(t,s),ze(c)?D(c):ji(d.removed)}catch{M(t,c)}}else M(t,c)}else M(t,c)}O(f.afterSanitizeAttributes,c,null)}},"_sanitizeAttributes"),Ve=mt(function(e){var t,r=Fe(e);for(O(f.beforeSanitizeShadowDOM,e,null);t=r.nextNode();)O(f.uponSanitizeShadowNode,t,null),je(t),Ge(t),t.content instanceof $&&Ve(t.content);O(f.afterSanitizeShadowDOM,e,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=(Se=!e)?"\x3c!--\x3e":e)&&!qe(e)){if("function"!=typeof e.toString)throw Ji("toString is not a function");if("string"!=typeof(e=e.toString()))throw Ji("dirty is not a string, aborting")}if(!d.isSupported)return e;if(pe||Me(t),d.removed=[],E="string"!=typeof e&&E){if(e.nodeName){var s=I(e.nodeName);if(!h[s]||u[s])throw Ji("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===wn.element&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!w&&!x&&!k&&-1===e.indexOf("<"))return g&&S?g.createHTML(e):e;if(!(r=$e(e)))return w?null:S?c:""}r&&ge&&D(r.firstChild);for(var o=Fe(E?e:r);n=o.nextNode();)je(n),Ge(n),n.content instanceof $&&Ve(n.content);if(E)return e;if(w){if(x){r.normalize();let t=r.innerHTML;zi([m,y,v],e=>{t=Hi(t,e," ")}),r.innerHTML=t}if(C)for(a=Q.call(r.ownerDocument);r.firstChild;)a.appendChild(r.firstChild);else a=r;return a=b.shadowroot||b.shadowrootmode?ee.call(P,a,!0):a}let l=k?r.outerHTML:r.innerHTML;return k&&h["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&Qi(xn,r.ownerDocument.doctype.name)&&(l="<!DOCTYPE "+r.ownerDocument.doctype.name+`>
|
||
`+l),x&&zi([m,y,v],e=>{l=Hi(l,e," ")}),g&&S?g.createHTML(l):l},d.setConfig=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};Me(e),pe=!0},d.clearConfig=function(){N=null,pe=!1},d.isValidAttribute=function(e,t,r){return N||Me({}),e=I(e),t=I(t),We(e,t,r)},d.addHook=function(e,t){"function"==typeof t&&Wi(f[e],t)},d.removeHook=function(e,t){return void 0!==t?-1===(t=qi(f[e],t))?void 0:Ui(f[e],t,1)[0]:ji(f[e])},d.removeHooks=function(e){f[e]=[]},d.removeAllHooks=function(){f=En()},d}var Ii,Ni,Di,Mi,Oi,Pi,Bi,$i,Fi,zi,qi,ji,Wi,Ui,Gi,Vi,Yi,Hi,Xi,Ki,Zi,Qi,Ji,en,tn,rn,nn,an,sn,on,ln,cn,hn,un,dn,pn,gn,fn,mn,yn,vn,bn,xn,Tn,kn,wn,Cn,Sn,En,_n,An=r(()=>{({entries:Ii,setPrototypeOf:Ni,isFrozen:Di,getPrototypeOf:Mi,getOwnPropertyDescriptor:Oi}=Object),{freeze:Pi,seal:Tn,create:Bi}=Object,{apply:$i,construct:Fi}=typeof Reflect<"u"&&Reflect,Pi=Pi||mt(function(e){return e},"freeze"),Tn=Tn||mt(function(e){return e},"seal"),$i=$i||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"),Fi=Fi||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"),zi=Ci(Array.prototype.forEach),qi=Ci(Array.prototype.lastIndexOf),ji=Ci(Array.prototype.pop),Wi=Ci(Array.prototype.push),Ui=Ci(Array.prototype.splice),Gi=Ci(String.prototype.toLowerCase),Vi=Ci(String.prototype.toString),Yi=Ci(String.prototype.match),Hi=Ci(String.prototype.replace),Xi=Ci(String.prototype.indexOf),Ki=Ci(String.prototype.trim),Zi=Ci(Object.prototype.hasOwnProperty),Qi=Ci(RegExp.prototype.test),Ji=Si(TypeError),mt(Ci,"unapply"),mt(Si,"unconstruct"),mt(Ei,"addToSet"),mt(_i,"cleanArray"),mt(Ai,"clone"),mt(Ri,"lookupGetter"),en=Pi(["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"]),tn=Pi(["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"]),rn=Pi(["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"]),nn=Pi(["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"]),an=Pi(["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"]),sn=Pi(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),on=Pi(["#text"]),ln=Pi(["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"]),cn=Pi(["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"]),hn=Pi(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),un=Pi(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),dn=Tn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),pn=Tn(/<%[\w\W]*|[\w\W]*%>/gm),gn=Tn(/\$\{[\w\W]*/gm),fn=Tn(/^data-[\-\w.\u00B7-\uFFFF]+$/),mn=Tn(/^aria-[\-\w]+$/),yn=Tn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),vn=Tn(/^(?:\w+script|data):/i),bn=Tn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),xn=Tn(/^html$/i),Tn=Tn(/^[a-z][.\w]*(-[.\w]+)+$/i),kn=Object.freeze({__proto__:null,ARIA_ATTR:mn,ATTR_WHITESPACE:bn,CUSTOM_ELEMENT:Tn,DATA_ATTR:fn,DOCTYPE_NAME:xn,ERB_EXPR:pn,IS_ALLOWED_URI:yn,IS_SCRIPT_OR_DATA:vn,MUSTACHE_EXPR:dn,TMPLIT_EXPR:gn}),wn={element:1,text:3,progressingInstruction:7,comment:8,document:9},Cn=mt(function(){return"u"<typeof window?null:window},"getGlobal"),Sn=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"),En=mt(function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},"_createHooksMap"),mt(Li,"createDOMPurify"),_n=Li()}),Rn={};function Ln(e){return String(e).replace(ha,e=>ca[e])}function In(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 Nn(e){for(var t=0;t<Ca.length;t++)for(var r=Ca[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 Dn(e){for(var t=0;t<Sa.length;t+=2)if(Sa[t]<=e&&e<=Sa[t+1])return!0;return!1}function Mn(e,t){$a[e]=t}function On(e,t,r){if(!$a[t])throw new Error("Font metrics not found for font: "+t+".");var i=e.charCodeAt(0),n=$a[t][i];if(!n&&e[0]in za&&(i=za[e[0]].charCodeAt(0),n=$a[t][i]),n=!n&&"text"===r&&Dn(i)?$a[t][77]:n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}function Pn(e){var t=5<=e?0:3<=e?1:2;if(!qa[t]){var r,i=qa[t]={cssEmPerMu:Fa.quad[t]/18};for(r in Fa)Fa.hasOwnProperty(r)&&(i[r]=Fa[r][t])}return qa[t]}function Bn(e){if(e instanceof as)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function $n(e){if(e instanceof ts)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}function t(e,t,r,i,n,a){us[e][n]={font:t,group:r,replace:i},a&&i&&(us[e][i]=us[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)Hs[t[o]]=s;e&&(n&&(Xs[e]=n),a)&&(Ks[e]=a)}function Fn(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 zn(e,t){return e=Js(["base"],e,t),(t=Js(["strut"])).style.height=K(e.height+e.depth),e.depth&&(t.style.verticalAlign=K(-e.depth)),e.children.unshift(t),e}function qn(e,t){var r,i=null,n=(1===e.length&&"tag"===e[0].type&&(i=e[0].tag,e=e[0].body),no(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 c=!1;l<n.length-1&&n[l+1].hasClass("mspace")&&!n[l+1].hasClass("newline");)l++,o.push(n[l]),n[l].hasClass("nobreak")&&(c=!0);c||(s.push(zn(o,t)),o=[])}else n[l].hasClass("newline")&&(o.pop(),0<o.length&&(s.push(zn(o,t)),o=[]),s.push(n[l]));return 0<o.length&&s.push(zn(o,t)),i?((a=zn(no(i,t,!0))).classes=["tag"],s.push(a)):r&&s.push(r),(e=Js(["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 jn(e){return new Ba(e)}function Wn(e){var t;return!!e&&("mi"===e.type&&1===e.children.length?(t=e.children[0])instanceof po&&"."===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 po&&","===t.text)}function Un(e,t,r,i,n){return r=1===(e=yo(e,r)).length&&e[0]instanceof uo&&["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 Gn(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 Vn(e){var t=Yn(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 Yn(e){return e&&("atom"===e.type||hs.hasOwnProperty(e.type))?e:null}function Hn(e,t){var r=no(e.body,t,!0);return Io([e.mclass],r,t)}function Xn(e,t){var r,t=yo(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 Kn(e,t,r){var i=Do[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 Zn(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=Mo(),l=0;l<s.length;l++)if(Oo(s[l])){i.push(o);var c=Vn(s[l+=1]).text,h=new Array(2);if(h[0]={type:"ordgroup",mode:"math",body:[]},h[1]={type:"ordgroup",mode:"math",body:[]},!(-1<"=|.".indexOf(c))){if(!(-1<"<>AV".indexOf(c)))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(Po(s[p],c)){d=!1,l=p;break}if(Oo(s[p]))throw new X("Missing a "+c+" character to complete a CD arrow.",s[p]);h[u].body.push(s[p])}if(d)throw new X("Missing a "+c+" character to complete a CD arrow.",s[l])}}var g=Kn(c,h,e);i.push({type:"styling",body:[g],mode:"math",style:"display"}),o=Mo()}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 Qn(e,t){var r=Yn(e);if(r&&dl.includes(r.text))return r;throw new X(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Jn(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}function ea(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)pl[t[o]]=s;n&&(Xs[e]=n),a&&(Ks[e]=a)}function l(e,t){gl[e]=t}function ta(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 ra(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function ia(e,t,r){var{hskipBeforeAndAfter:t,addJot:i,cols:n,arraystretch:a,colSeparationType:s,autoTag:o,singleRow:l,emptySingleRow:c,maxNumCols:h,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 b(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new oa("\\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(b,"endRow"),v(),m.push(ta(e));;){var x=e.parseExpression(!1,l?"\\end":"\\\\"),T=(e.gullet.endGroup(),e.gullet.beginGroup(),x={type:"ordgroup",mode:e.mode,body:x},r&&(x={type:"styling",mode:e.mode,style:r,body:[x]}),p.push(x),e.fetch().text);if("&"===T){if(h&&p.length===h){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){b(),1===p.length&&"styling"===x.type&&0===x.body[0].body.length&&(1<g.length||!c)&&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(),x=void 0," "!==e.gullet.future().text&&(x=e.parseSizeGroup(!0)),f.push(x?x.value:null),b(),m.push(ta(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 na(e){return"d"===e.slice(0,1)?"display":"text"}function aa(e,t,r){for(var i=no(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)}(Vat=(e,t)=>{for(var r in t)_(e,r,{get:t[r],enumerable:!0})})(Rn,{ParseError:()=>X,SETTINGS_SCHEMA:()=>ga,__defineFunction:()=>o,__defineMacro:()=>l,__defineSymbol:()=>t,__domTree:()=>xc,__parse:()=>fc,__renderToDomTree:()=>yc,__renderToHTMLTree:()=>vc,__setFontMetrics:()=>Mn,default:()=>Tc,render:()=>pc,renderToString:()=>gc,version:()=>bc});var sa,oa,X,la,ca,ha,ua,da,pa,ga,fa,ma,ya,va,ba,xa,Ta,ka,wa,Ca,Sa,Ea,_a,Aa,Ra,La,Ia,Na,Da,Ma,Oa,Pa,Ba,$a,Fa,za,qa,ja,Wa,Ua,Ga,Va,Ya,Ha,Xa,K,Ka,Za,Qa,Ja,es,ts,rs,is,ns,as,ss,os,ls,cs,hs,us,h,u,d,ds,p,ps,gs,fs,ms,ys,vs,bs,xs,Ts,ks,ws,Cs,Ss,Es,_s,As,Rs,Ls,Is,Ns,Ds,Ms,Os,Ps,Bs,$s,Fs,zs,qs,js,Ws,Us,Gs,Z,Vs,Ys,Hs,Xs,Ks,Zs,Qs,Js,eo,to,ro,io,no,ao,so,oo,lo,co,ho,uo,po,C,go,fo,mo,yo,vo,bo,xo,To,ko,wo,Co,So,Eo,_o,Ao,Ro,Lo,Io,No,Do,Mo,Oo,Po,Bo,$o,Fo,zo,qo,jo,Wo,Uo,Go,Vo,Yo,Ho,Xo,Ko,Zo,Qo,Jo,el,tl,rl,il,nl,al,sl,ol,ll,cl,hl,ul,dl,pl,gl,fl,ml,yl,g,vl,bl,xl,Tl,kl,wl,Cl,f,Sl,El,_l,Al,Rl,Ll,Il,Nl,Dl,Ml,Ol,Pl,Bl,$l,Fl,zl,ql,jl,Wl,Ul,Gl,Vl,Yl,Hl,m,Xl,Kl,Zl,Ql,Jl,ec,tc,rc,ic,nc,ac,sc,oc,lc,cc,hc,uc,dc,pc,gc,fc,mc,yc,vc,bc,xc,Tc,kc=r(()=>{for(sa=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}},oa=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,sa.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,Ll=mt(function(e,t){return void 0===e?t:e},"deflt"),la=/([A-Z])/g,f=mt(function(e){return e.replace(la,"-$1").toLowerCase()},"hyphenate"),ca={"&":"&",">":">","<":"<",'"':""","'":"'"},ha=/[&><"']/g,mt(Ln,"escape"),ua=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"),nc=mt(function(e){return"mathord"===(e=ua(e)).type||"textord"===e.type||"atom"===e.type},"isCharacterBox"),da=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]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e))?":"===e[2]&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?e[1].toLowerCase():null:"_relative"},"protocolFromUrl"),pa={deflt:Ll,escape:Ln,hyphenate:f,getBaseElem:ua,isCharacterBox:nc,protocolFromUrl:g},ga={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(In,"getDefaultValue"),fa=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||{},ga){var r;ga.hasOwnProperty(t)&&(r=ga[t],this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:In(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=pa.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}return!!("function"==typeof this.trust?this.trust(e):this.trust)}},Ll=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 ma[ya[this.id]]}sub(){return ma[va[this.id]]}fracNum(){return ma[ba[this.id]]}fracDen(){return ma[xa[this.id]]}cramp(){return ma[Ta[this.id]]}text(){return ma[ka[this.id]]}isTight(){return 2<=this.size}},ma=[new Ll(0,0,!1),new Ll(1,0,!0),new Ll(2,1,!1),new Ll(3,1,!0),new Ll(4,2,!1),new Ll(5,2,!0),new Ll(6,3,!1),new Ll(7,3,!0)],ya=[4,5,4,5,6,7,6,7],va=[5,5,5,5,7,7,7,7],ba=[2,3,4,5,6,7,6,7],xa=[3,3,5,5,7,7,7,7],Ta=[1,1,3,3,5,5,7,7],ka=[0,1,2,3,2,3,2,3],wa={DISPLAY:ma[0],TEXT:ma[2],SCRIPT:ma[4],SCRIPTSCRIPT:ma[6]},Ca=[{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(Nn,"scriptFromCodepoint"),Sa=[],Ca.forEach(e=>e.blocks.forEach(e=>Sa.push(...e))),mt(Dn,"supportedCodepoint"),Ea=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"),_a=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"),Aa=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"),Ra=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"),La=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"),Ia=mt(function(e){return"M400000 "+e+" H0 L"+e/2+" 0 l65 45 L145 "+(e-80)+" H400000z"},"phasePath"),Na=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"),Da=mt(function(e,t,r){t*=1e3;var i="";switch(e){case"sqrtMain":i=Ea(t,80);break;case"sqrtSize1":i=_a(t,80);break;case"sqrtSize2":i=Aa(t,80);break;case"sqrtSize3":i=Ra(t,80);break;case"sqrtSize4":i=La(t,80);break;case"sqrtTall":i=Na(t,80,r)}return i},"sqrtPath"),Ma=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"),Oa={doubleleftarrow:`M262 157
|
||
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
||
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
||
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
||
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
||
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
||
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
||
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
||
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
||
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
||
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
||
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
||
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
||
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
||
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
||
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
||
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
||
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
||
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
||
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
||
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
||
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
||
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
||
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
||
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
||
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
||
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
||
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
||
435 0h399565z`,leftgroupunder:`M400000 262
|
||
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
||
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
||
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
||
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
||
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
||
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
||
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
||
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
||
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
||
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
||
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
||
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
||
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
||
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
||
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
||
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
||
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
||
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
|
||
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
|
||
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
||
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
||
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
||
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
|
||
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
|
||
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
||
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
||
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
||
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
||
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
||
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
||
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
||
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
||
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
||
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
||
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
||
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
||
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
||
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
||
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
||
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
||
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
||
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
||
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
||
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
||
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
||
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
||
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
||
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
||
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
||
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
||
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
||
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
||
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
||
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
||
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
||
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
||
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
||
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
||
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
||
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
||
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
||
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
||
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
||
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
||
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
||
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
||
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
||
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
||
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
||
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
||
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
||
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
||
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
|
||
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
||
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
||
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
||
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
||
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
||
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
||
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
||
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
||
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
||
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
||
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
||
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
||
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
||
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
||
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
||
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
||
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
||
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
||
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
||
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
||
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
||
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
||
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
||
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
||
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
||
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
||
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
||
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
||
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
||
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
||
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
||
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
||
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
||
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
||
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
||
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
||
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
||
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
||
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
||
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
||
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
||
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
||
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
||
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
||
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
||
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
||
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
||
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
||
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
||
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
||
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
||
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
||
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
||
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
||
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
||
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
||
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
||
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
||
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
||
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
||
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
||
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
||
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
||
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
||
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
||
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
||
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
||
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
||
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
||
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
||
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
||
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
||
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
||
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Pa=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"),Ba=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("")}},$a={"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]}},Fa={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]},za={"Å":"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(Mn,"setFontMetrics"),mt(On,"getCharacterMetrics"),qa={},mt(Pn,"getGlobalMetrics"),ja=[[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]],Wa=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ua=mt(function(e,t){return t.size<2?e:ja[e-1][t.size-1]},"sizeAtStyle"),(Ga=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=Wa[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:Ua(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:Wa[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Ua(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=Pn(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}).BASESIZE=6,Va={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},Ya={ex:!0,em:!0,mu:!0},Ha=mt(function(e){return(e="string"!=typeof e?e.unit:e)in Va||e in Ya||"ex"===e},"validUnit"),Xa=mt(function(e,t){var r;if(e.unit in Va)r=Va[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"),Ka=mt(function(e){return e.filter(e=>e).join(" ")},"createClass"),Za=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"),Qa=mt(function(e){var t,r,i=document.createElement(e);for(t in i.className=Ka(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"),Ja=/[\s"'>/=\x00-\x1f]/,es=mt(function(e){var t,r,i="<"+e,n=(this.classes.length&&(i+=' class="'+pa.escape(Ka(this.classes))+'"'),"");for(t in this.style)this.style.hasOwnProperty(t)&&(n+=pa.hyphenate(t)+":"+this.style[t]+";");for(r in n&&(i+=' style="'+pa.escape(n)+'"'),this.attributes)if(this.attributes.hasOwnProperty(r)){if(Ja.test(r))throw new X("Invalid attribute name '"+r+"'");i+=" "+r+'="'+pa.escape(this.attributes[r])+'"'}i+=">";for(var a=0;a<this.children.length;a++)i+=this.children[a].toMarkup();return i+"</"+e+">"},"toMarkup"),ts=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,Za.call(this,e,r,i),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Qa.call(this,"span")}toMarkup(){return es.call(this,"span")}},rs=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,Za.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 Qa.call(this,"a")}toMarkup(){return es.call(this,"a")}},is=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="'+pa.escape(this.src)+'" alt="'+pa.escape(this.alt)+'"',r="";for(e in this.style)this.style.hasOwnProperty(e)&&(r+=pa.hyphenate(e)+":"+this.style[e]+";");return r&&(t+=' style="'+pa.escape(r)+'"'),t+"'/>"}},ns={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"},as=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=Nn(this.text.charCodeAt(0)))&&this.classes.push(e+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=ns[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=Ka(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="')+pa.escape(Ka(this.classes))+'"'),"");for(e in 0<this.italic&&(i+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(e)&&(i+=pa.hyphenate(e)+":"+this.style[e]+";");i&&(t=!0,r+=' style="'+pa.escape(i)+'"');var n=pa.escape(this.text);return t?(r+=">")+n+"</span>":n}},ss=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+'="'+pa.escape(this.attributes[e])+'"');t+=">";for(var r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t+"</svg>"}},os=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",Oa[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+pa.escape(this.alternate)+'"/>':'<path d="'+pa.escape(Oa[this.pathName])+'"/>'}},ls=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+'="'+pa.escape(this.attributes[e])+'"');return t+"/>"}},mt(Bn,"assertSymbolDomNode"),mt($n,"assertSpan"),cs={bin:1,close:1,inner:1,open:1,punct:1,rel:1},hs={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},us={math:{},text:{}},mt(t,"defineSymbol"),u="text",f="ams",nc="accent-token",g="bin",Ll="close",Pl="inner",ds="mathord",ic="op-token",Tl="open",Ml="punct",xl="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,Ml,".","\\ldotp"),t(h,d,Ml,"⋅","\\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,Ll,"⎱","\\rmoustache",!0),t(h,d,Tl,"⎰","\\lmoustache",!0),t(h,d,Ll,"⟯","\\rgroup",!0),t(h,d,Tl,"⟮","\\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,Tl,"┌","\\@ulcorner",!0),t(h,f,Ll,"┐","\\@urcorner",!0),t(h,f,Tl,"└","\\@llcorner",!0),t(h,f,Ll,"┘","\\@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,ds,"α","\\alpha",!0),t(h,d,ds,"β","\\beta",!0),t(h,d,ds,"γ","\\gamma",!0),t(h,d,ds,"δ","\\delta",!0),t(h,d,ds,"ϵ","\\epsilon",!0),t(h,d,ds,"ζ","\\zeta",!0),t(h,d,ds,"η","\\eta",!0),t(h,d,ds,"θ","\\theta",!0),t(h,d,ds,"ι","\\iota",!0),t(h,d,ds,"κ","\\kappa",!0),t(h,d,ds,"λ","\\lambda",!0),t(h,d,ds,"μ","\\mu",!0),t(h,d,ds,"ν","\\nu",!0),t(h,d,ds,"ξ","\\xi",!0),t(h,d,ds,"ο","\\omicron",!0),t(h,d,ds,"π","\\pi",!0),t(h,d,ds,"ρ","\\rho",!0),t(h,d,ds,"σ","\\sigma",!0),t(h,d,ds,"τ","\\tau",!0),t(h,d,ds,"υ","\\upsilon",!0),t(h,d,ds,"ϕ","\\phi",!0),t(h,d,ds,"χ","\\chi",!0),t(h,d,ds,"ψ","\\psi",!0),t(h,d,ds,"ω","\\omega",!0),t(h,d,ds,"ε","\\varepsilon",!0),t(h,d,ds,"ϑ","\\vartheta",!0),t(h,d,ds,"ϖ","\\varpi",!0),t(h,d,ds,"ϱ","\\varrho",!0),t(h,d,ds,"ς","\\varsigma",!0),t(h,d,ds,"φ","\\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,Tl,"⟨","\\langle",!0),t(h,d,Tl,"∣","\\lvert"),t(h,d,Tl,"∥","\\lVert"),t(h,d,Ll,"?","?"),t(h,d,Ll,"!","!"),t(h,d,Ll,"⟩","\\rangle",!0),t(h,d,Ll,"∣","\\rvert"),t(h,d,Ll,"∥","\\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,xl," ","\\ "),t(h,d,xl," ","\\space"),t(h,d,xl," ","\\nobreakspace"),t(u,d,xl," ","\\ "),t(u,d,xl," "," "),t(u,d,xl," ","\\space"),t(u,d,xl," ","\\nobreakspace"),t(h,d,xl,null,"\\nobreak"),t(h,d,xl,null,"\\allowbreak"),t(h,d,Ml,",",","),t(h,d,Ml,";",";"),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,Tl,"{","\\{"),t(u,d,p,"{","\\{"),t(u,d,p,"{","\\textbraceleft"),t(h,d,Ll,"}","\\}"),t(u,d,p,"}","\\}"),t(u,d,p,"}","\\textbraceright"),t(h,d,Tl,"{","\\lbrace"),t(h,d,Ll,"}","\\rbrace"),t(h,d,Tl,"[","\\lbrack",!0),t(u,d,p,"[","\\lbrack",!0),t(h,d,Ll,"]","\\rbrack",!0),t(u,d,p,"]","\\rbrack",!0),t(h,d,Tl,"(","\\lparen",!0),t(h,d,Ll,")","\\rparen",!0),t(u,d,p,"<","\\textless",!0),t(u,d,p,">","\\textgreater",!0),t(h,d,Tl,"⌊","\\lfloor",!0),t(h,d,Ll,"⌋","\\rfloor",!0),t(h,d,Tl,"⌈","\\lceil",!0),t(h,d,Ll,"⌉","\\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,ic,"∐","\\coprod"),t(h,d,ic,"⋁","\\bigvee"),t(h,d,ic,"⋀","\\bigwedge"),t(h,d,ic,"⨄","\\biguplus"),t(h,d,ic,"⋂","\\bigcap"),t(h,d,ic,"⋃","\\bigcup"),t(h,d,ic,"∫","\\int"),t(h,d,ic,"∫","\\intop"),t(h,d,ic,"∬","\\iint"),t(h,d,ic,"∭","\\iiint"),t(h,d,ic,"∏","\\prod"),t(h,d,ic,"∑","\\sum"),t(h,d,ic,"⨂","\\bigotimes"),t(h,d,ic,"⨁","\\bigoplus"),t(h,d,ic,"⨀","\\bigodot"),t(h,d,ic,"∮","\\oint"),t(h,d,ic,"∯","\\oiint"),t(h,d,ic,"∰","\\oiiint"),t(h,d,ic,"⨆","\\bigsqcup"),t(h,d,ic,"∫","\\smallint"),t(u,d,Pl,"…","\\textellipsis"),t(h,d,Pl,"…","\\mathellipsis"),t(u,d,Pl,"…","\\ldots",!0),t(h,d,Pl,"…","\\ldots",!0),t(h,d,Pl,"⋯","\\@cdots",!0),t(h,d,Pl,"⋱","\\ddots",!0),t(h,d,p,"⋮","\\varvdots"),t(u,d,p,"⋮","\\varvdots"),t(h,d,nc,"ˊ","\\acute"),t(h,d,nc,"ˋ","\\grave"),t(h,d,nc,"¨","\\ddot"),t(h,d,nc,"~","\\tilde"),t(h,d,nc,"ˉ","\\bar"),t(h,d,nc,"˘","\\breve"),t(h,d,nc,"ˇ","\\check"),t(h,d,nc,"^","\\hat"),t(h,d,nc,"⃗","\\vec"),t(h,d,nc,"˙","\\dot"),t(h,d,nc,"˚","\\mathring"),t(h,d,ds,"","\\@imath"),t(h,d,ds,"","\\@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,nc,"ˊ","\\'"),t(u,d,nc,"ˋ","\\`"),t(u,d,nc,"ˆ","\\^"),t(u,d,nc,"˜","\\~"),t(u,d,nc,"ˉ","\\="),t(u,d,nc,"˘","\\u"),t(u,d,nc,"˙","\\."),t(u,d,nc,"¸","\\c"),t(u,d,nc,"˚","\\r"),t(u,d,nc,"ˇ","\\v"),t(u,d,nc,"¨",'\\"'),t(u,d,nc,"˝","\\H"),t(u,d,nc,"◯","\\textcircled"),ps={"--":!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"),gs='0123456789/@."',ms=0;ms<gs.length;ms++)fs=gs.charAt(ms),t(h,d,p,fs,fs);for(ys='0123456789!@*()-=+";:?/.,',bs=0;bs<ys.length;bs++)vs=ys.charAt(bs),t(u,d,p,vs,vs);for(xs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ks=0;ks<xs.length;ks++)Ts=xs.charAt(ks),t(h,d,ds,Ts,Ts),t(u,d,p,Ts,Ts);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,ds,"h","ℎ"),t(u,d,ds,"h","ℎ"),ws="",Ss=0;Ss<xs.length;Ss++)Cs=xs.charAt(Ss),ws=String.fromCharCode(55349,56320+Ss),t(h,d,ds,Cs,ws),t(u,d,p,Cs,ws),ws=String.fromCharCode(55349,56372+Ss),t(h,d,ds,Cs,ws),t(u,d,p,Cs,ws),ws=String.fromCharCode(55349,56424+Ss),t(h,d,ds,Cs,ws),t(u,d,p,Cs,ws),ws=String.fromCharCode(55349,56580+Ss),t(h,d,ds,Cs,ws),t(u,d,p,Cs,ws),ws=String.fromCharCode(55349,56684+Ss),t(h,d,ds,Cs,ws),t(u,d,p,Cs,ws),ws=String.fromCharCode(55349,56736+Ss),t(h,d,ds,Cs,ws),t(u,d,p,Cs,ws),ws=String.fromCharCode(55349,56788+Ss),t(h,d,ds,Cs,ws),t(u,d,p,Cs,ws),ws=String.fromCharCode(55349,56840+Ss),t(h,d,ds,Cs,ws),t(u,d,p,Cs,ws),ws=String.fromCharCode(55349,56944+Ss),t(h,d,ds,Cs,ws),t(u,d,p,Cs,ws),Ss<26&&(ws=String.fromCharCode(55349,56632+Ss),t(h,d,ds,Cs,ws),t(u,d,p,Cs,ws),ws=String.fromCharCode(55349,56476+Ss),t(h,d,ds,Cs,ws),t(u,d,p,Cs,ws));for(t(h,d,ds,"k",ws="𝕜"),t(u,d,p,"k",ws),_s=0;_s<10;_s++)Es=_s.toString(),ws=String.fromCharCode(55349,57294+_s),t(h,d,ds,Es,ws),t(u,d,p,Es,ws),ws=String.fromCharCode(55349,57314+_s),t(h,d,ds,Es,ws),t(u,d,p,Es,ws),ws=String.fromCharCode(55349,57324+_s),t(h,d,ds,Es,ws),t(u,d,p,Es,ws),ws=String.fromCharCode(55349,57334+_s),t(h,d,ds,Es,ws),t(u,d,p,Es,ws);for(As="ÐÞþ",Ls=0;Ls<As.length;Ls++)Rs=As.charAt(Ls),t(h,d,ds,Rs,Rs),t(u,d,p,Rs,Rs);Is=[["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"]],Ns=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Ds=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),[Is[r][2],Is[r][t]];if(120782<=i&&i<=120831)return r=Math.floor((i-120782)/10),[Ns[r][2],Ns[r][t]];if(120485==i||120486==i)return[Is[0][2],Is[0][t]];if(120486<i&&i<120782)return["",""];throw new X("Unsupported character: "+e)},"wideCharacterFont"),Ms=mt(function(e,t,r){return{value:e=us[r][e]&&us[r][e].replace?us[r][e].replace:e,metrics:On(e,t,r)}},"lookupSymbol"),Os=mt(function(e,t,r,i,n){var a=Ms(e,t,r),s=a.metrics;return e=a.value,a=s?(a=s.italic,("text"===r||i&&"mathit"===i.font)&&(a=0),new as(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 as(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"),xl=mt(function(e,t,r,i){return void 0===i&&(i=[]),"boldsymbol"===r.font&&Ms(e,"Main-Bold",t).metrics?Os(e,"Main-Bold",t,r,i.concat(["mathbf"])):"\\"===e||"main"===us[t][e].font?Os(e,"Main-Regular",t,r,i):Os(e,"AMS-Regular",t,r,i.concat(["amsrm"]))},"mathsym"),Ps=mt(function(e,t,r,i,n){return"textord"!==n&&Ms(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},"boldsymbol"),Ml=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,c="",h="";if(55349===s.charCodeAt(0)&&([c,h]=Ds(s,a)),0<c.length)return Os(s,c,a,t,o.concat(h));if(l){if(n="boldsymbol"===l?(i=(c=Ps(s,a,t,o,r)).fontName,[c.fontClass]):e?(i=Us[l].fontName,[l]):(i=Ws(l,t.fontWeight,t.fontShape),[l,t.fontWeight,t.fontShape]),Ms(s,i,a).metrics)return Os(s,i,a,t,o.concat(n));if(ps.hasOwnProperty(s)&&"Typewriter"===i.slice(0,10)){for(var u=[],d=0;d<s.length;d++)u.push(Os(s[d],i,a,t,o.concat(n)));return qs(u)}}if("mathord"===r)return Os(s,"Math-Italic",a,t,o.concat(["mathnormal"]));if("textord"===r)return"ams"===(h=us[a][s]&&us[a][s].font)?(c=Ws("amsrm",t.fontWeight,t.fontShape),Os(s,c,a,t,o.concat("amsrm",t.fontWeight,t.fontShape))):"main"!==h&&h?(e=Ws(h,t.fontWeight,t.fontShape),Os(s,e,a,t,o.concat(e,t.fontWeight,t.fontShape))):(l=Ws("textrm",t.fontWeight,t.fontShape),Os(s,l,a,t,o.concat(t.fontWeight,t.fontShape)));throw new Error("unexpected type: "+r+" in makeOrd")},"makeOrd"),Bs=mt((e,t)=>{if(Ka(e.classes)!==Ka(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 as&&i instanceof as&&Bs(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"),$s=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"),Fs=mt(function(e,t,r,i){return e=new ts(e,t,r,i),$s(e),e},"makeSpan"),zs=mt((e,t,r,i)=>new ts(e,t,r,i),"makeSvgSpan"),Tl=mt(function(e,t,r){return(e=Fs([e],[],t)).height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),e.style.borderBottomWidth=K(e.height),e.maxFontSize=1,e},"makeLineSpan"),Ll=mt(function(e,t,r,i){return e=new rs(e,t,r,i),$s(e),e},"makeAnchor"),qs=mt(function(e){return e=new Ba(e),$s(e),e},"makeFragment"),m=mt(function(e,t){return e instanceof Ba?Fs([],[e],t):e},"wrapFragment"),js=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 c=e.positionData,h=0;h<e.children.length;h++){var u=e.children[h];c-="kern"===u.type?u.size:u.elem.height+u.elem.depth}l=c}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"),ic=mt(function(e,t){for(var{children:r,depth:e}=js(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=Fs(["pstrut"],[]);s.style.height=K(i);for(var o=[],l=e,c=e,h=e,u=0;u<r.length;u++){var d,p,g,f=r[u];"kern"===f.type?h+=f.size:(d=f.elem,g=f.wrapperClasses||[],p=f.wrapperStyle||{},(g=Fs(g,[s,d],void 0,p)).style.top=K(-i-h-d.depth),f.marginLeft&&(g.style.marginLeft=f.marginLeft),f.marginRight&&(g.style.marginRight=f.marginRight),o.push(g),h+=d.height+d.depth),l=Math.min(l,h),c=Math.max(c,h)}(e=Fs(["vlist"],o)).style.height=K(c);var m=l<0?(y=Fs([],[]),(y=Fs(["vlist"],[y])).style.height=K(-l),m=Fs(["vlist-s"],[new as("")]),[Fs(["vlist-r"],[e,m]),Fs(["vlist-r"],[y])]):[Fs(["vlist-r"],[e])],y=Fs(["vlist-t"],m);return 2===m.length&&y.classes.push("vlist-t2"),y.height=c,y.depth=-l,y},"makeVList"),Pl=mt((e,t)=>{var r=Fs(["mspace"],[],t),e=Xa(e,t);return r.style.marginRight=K(e),r},"makeGlue"),Ws=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"),Us={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"}},Gs={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},nc=mt(function(e,t){var[e,r,i]=Gs[e],e=new os(e),e=new ss([e],{width:K(r),height:K(i),style:"width:"+K(r),viewBox:"0 0 "+1e3*r+" "+1e3*i,preserveAspectRatio:"xMinYMin"});return(e=zs(["overlay"],[e],t)).height=i,e.style.height=K(i),e.style.width=K(r),e},"staticSvg"),Z={fontMap:Us,makeSymbol:Os,mathsym:xl,makeSpan:Fs,makeSvgSpan:zs,makeLineSpan:Tl,makeAnchor:Ll,makeFragment:qs,wrapFragment:m,makeVList:ic,makeOrd:Ml,makeGlue:Pl,staticSvg:nc,svgData:Gs,tryCombineChars:g},Vs={mord:{mop:f={number:3,unit:"mu"},mbin:xl={number:4,unit:"mu"},mrel:Tl={number:5,unit:"mu"},minner:f},mop:{mord:f,mop:f,mrel:Tl,minner:f},mbin:{mord:xl,mop:xl,mopen:xl,minner:xl},mrel:{mord:Tl,mop:Tl,mopen:Tl,minner:Tl},mopen:{},mclose:{mop:f,mbin:xl,mrel:Tl,minner:f},mpunct:{mord:f,mop:f,mrel:Tl,mopen:f,mclose:f,mpunct:f,minner:f},minner:{mord:f,mop:f,mbin:xl,mrel:Tl,mopen:f,mpunct:f,minner:f}},Ys={mord:{mop:f},mop:{mord:f,mop:f},mbin:{},mrel:{},mopen:{},mclose:{mop:f},mpunct:{},minner:{mop:f}},Hs={},Xs={},Ks={},mt(o,"defineFunction"),mt(Fn,"defineFunctionBuilders"),Zs=mt(function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},"normalizeArgument"),Qs=mt(function(e){return"ordgroup"===e.type?e.body:[e]},"ordargument"),Js=Z.makeSpan,eo=["leftmost","mbin","mopen","mrel","mop","mpunct"],to=["rightmost","mrel","mclose","mpunct"],ro={display:wa.DISPLAY,text:wa.TEXT,script:wa.SCRIPT,scriptscript:wa.SCRIPTSCRIPT},io={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},no=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,c=ho(e[o],t);c instanceof Ba?(l=c.children,s.push(...l)):s.push(c)}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(ro[a.style]))),a=Js([i[0]||"leftmost"],[],t),i=Js([i[1]||"rightmost"],[],t),ao(s,(e,t)=>{var r=t.classes[0],i=e.classes[0];"mbin"===r&&to.includes(i)?t.classes[0]="mord":"mbin"===i&&eo.includes(r)&&(e.classes[0]="mord")},{node:a},i,r="root"===r),ao(s,(e,t)=>{var t=lo(t),r=lo(e);if(e=t&&r?(e.hasClass("mtight")?Ys:Vs)[t][r]:null)return Z.makeGlue(e,n)},{node:a},i,r)),s},"buildExpression"),ao=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],c=so(l);c?e(c.children,t,i,null,a):((c=!l.hasClass("mspace"))&&(o=t(l,i.node))&&(i.insertAfter?i.insertAfter(o):(r.unshift(o),s++)),c?i.node=l:a&&l.hasClass("newline")&&(i.node=Js(["leftmost"])),i.insertAfter=(t=>e=>{r.splice(t+1,0,e),s++})(s))}n&&r.pop()},"traverseNonSpaceNodes"),so=mt(function(e){return e instanceof Ba||e instanceof rs||e instanceof ts&&e.hasClass("enclosing")?e:null},"checkPartialGroup"),oo=mt(function e(t,r){var i=so(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"),lo=mt(function(e,t){return e&&(t&&(e=oo(e,t)),io[e.classes[0]])||null},"getTypeOfDomTree"),co=mt(function(e,t){return e=["nulldelimiter"].concat(e.baseSizingClasses()),Js(t.concat(e))},"makeNullDelimiter"),ho=mt(function(e,t,r){if(!e)return Js();var i;if(Xs[e.type])return i=Xs[e.type](e,t),r&&t.size!==r.size&&(i=Js(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(zn,"buildHTMLUnbreakable"),mt(qn,"buildHTML"),mt(jn,"newDocumentFragment"),uo=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=Ka(this.classes));for(var r=0;r<this.children.length;r++)if(this.children[r]instanceof po&&this.children[r+1]instanceof po){for(var i=this.children[r].toText()+this.children[++r].toText();this.children[r+1]instanceof po;)i+=this.children[++r].toText();t.appendChild(new po(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+=pa.escape(this.attributes[e]),t+='"');0<this.classes.length&&(t+=' class ="'+pa.escape(Ka(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("")}},po=class{static{mt(this,"TextNode")}constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return pa.escape(this.toText())}toText(){return this.text}},Ll=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:uo,TextNode:po,SpaceNode:Ll,newDocumentFragment:jn},go=mt(function(e,t,r){return!us[t][e]||!us[t][e].replace||55349===e.charCodeAt(0)||ps.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=us[t][e].replace),new C.TextNode(e)},"makeText"),fo=mt(function(e){return 1===e.length?e[0]:new C.MathNode("mrow",e)},"makeRow"),mo=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)&&On(e=us[r][e]&&us[r][e].replace?us[r][e].replace:e,Z.fontMap[t].fontName,r)?Z.fontMap[t].variant:null):null},"getVariant"),mt(Wn,"isNumberPunctuation"),yo=mt(function(e,t,r){var i;if(1===e.length)return i=bo(e[0],t),r&&i instanceof uo&&"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,c=bo(e[s],t);if(c instanceof uo&&n instanceof uo){if("mtext"===c.type&&"mtext"===n.type&&c.getAttribute("mathvariant")===n.getAttribute("mathvariant")){n.children.push(...c.children);continue}if("mn"===c.type&&"mn"===n.type){n.children.push(...c.children);continue}if(Wn(c)&&"mn"===n.type){n.children.push(...c.children);continue}"mn"===c.type&&Wn(n)?(c.children=[...n.children,...c.children],a.pop()):("msup"===c.type||"msub"===c.type)&&1<=c.children.length&&("mn"===n.type||Wn(n))?(o=c.children[0])instanceof uo&&"mn"===o.type&&(o.children=[...n.children,...o.children],a.pop()):"mi"===n.type&&1===n.children.length&&(o=n.children[0])instanceof po&&"̸"===o.text&&("mo"===c.type||"mi"===c.type||"mn"===c.type)&&(l=c.children[0])instanceof po&&0<l.text.length&&(l.text=l.text.slice(0,1)+"̸"+l.text.slice(1),a.pop())}a.push(c),n=c}return a},"buildExpression"),vo=mt(function(e,t,r){return fo(yo(e,t,r))},"buildExpressionRow"),bo=mt(function(e,t){if(!e)return new C.MathNode("mrow");if(Ks[e.type])return Ks[e.type](e,t);throw new X("Got group of unknown type: '"+e.type+"'")},"buildGroup"),mt(Un,"buildMathML"),xo=mt(function(e){return new Ga({style:e.displayMode?wa.DISPLAY:wa.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},"optionsFromSettings"),To=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"),ko=mt(function(e,t,r){var i,n=xo(r);return"mathml"===r.output?Un(e,t,n,r.displayMode,!0):(e="html"===r.output?(i=qn(e,n),Z.makeSpan(["katex"],[i])):(i=Un(e,t,n,r.displayMode,!1),t=qn(e,n),Z.makeSpan(["katex"],[i,t])),To(e,r))},"buildTree"),wo=mt(function(e,t,r){return e=qn(e,xo(r)),e=Z.makeSpan(["katex"],[e]),To(e,r)},"buildHTMLTree"),Co={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(Co[e.replace(/^\\/,"")])])).setAttribute("stretchy","true"),e},"mathMLnode"),So={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]},Eo=mt(function(e){return"ordgroup"===e.type?e.body.length:1},"groupLength"),ic=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=Eo(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 os(t),t=new ss([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=So[i],[s,o,l]=a,c=l/1e3,h=s.length;if(1===h)var u=["hide-tail"],d=[a[3]];else if(2===h)u=["halfarrow-left","halfarrow-right"],d=["xMinYMin","xMaxYMin"];else{if(3!==h)throw new Error(`Correct katexImagesData or update code here to support
|
||
`+h+" children.");u=["brace-left","brace-center","brace-right"],d=["xMinYMin","xMidYMin","xMaxYMin"]}for(var p=0;p<h;p++){var g=new os(s[p]),g=new ss([g],{width:"400em",height:K(c),viewBox:"0 0 "+r+" "+l,preserveAspectRatio:d[p]+" slice"}),g=Z.makeSvgSpan([u[p]],[g],m);if(1===h)return{span:g,minWidth:o,height:c};g.style.height=K(c),n.push(g)}return{span:Z.makeSpan(["stretchy"],n,m),minWidth:o,height:c}}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"),Ml=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 ls({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&i.push(new ls({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"})),r=new ss(i,{width:"100%",height:K(e)}),a=Z.makeSvgSpan([],[r],n)),a.height=e,a.style.height=K(e),a},"encloseSpan"),_o={encloseSpan:Ml,mathMLnode:m,svgSpan:ic},mt(Gn,"assertNodeType"),mt(Vn,"assertSymbolNodeType"),mt(Yn,"checkSymbolNodeType"),Ao=mt((e,t)=>{e&&"supsub"===e.type?(o=(r=Gn(e.base,"accent")).base,e.base=o,i=$n(ho(e,t)),e.base=r):o=(r=Gn(e,"accent")).base;var r,i,n,a,e=ho(o,t.havingCrampedStyle()),s=0,o=(r.isShifty&&pa.isCharacterBox(o)&&(o=pa.getBaseElem(o),s=Bn(ho(o,t.havingCrampedStyle())).skew),"\\c"===r.label),l=o?e.height+e.depth:Math.min(e.height,t.fontMetrics().xHeight),c=r.isStretchy?(c=_o.svgSpan(r,t),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"elem",elem:c,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=Bn(a=Z.makeOrd({mode:r.mode,text:r.label},t,"textord"))).italic=0,n=a.width,o&&(l+=a.depth)),c=Z.makeSpan(["accent-body"],[a]),(o="\\textcircled"===r.label)&&(c.classes.push("accent-full"),l=e.height),a=s,o||(a-=n/2),c.style.left=K(a),"\\textcircled"===r.label&&(c.style.top=".2em"),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:-l},{type:"elem",elem:c}]},t)),s=Z.makeSpan(["mord","accent"],[c],t);return i?(i.children[0]=s,i.height=Math.max(s.height,i.height),i.classes[0]="mord",i):s},"htmlBuilder$a"),Pl=mt((e,t)=>{var r=e.isStretchy?_o.mathMLnode(e.label):new C.MathNode("mo",[go(e.label,e.mode)]);return(e=new C.MathNode("mover",[bo(e.base,t),r])).setAttribute("accent","true"),e},"mathmlBuilder$9"),Ro=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=Zs(t[0]),r=!Ro.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:Ao,mathmlBuilder:Pl}),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:Ao,mathmlBuilder:Pl}),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=ho(e.base,t),i=_o.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=_o.mathMLnode(e.label);return(e=new C.MathNode("munder",[bo(e.base,t),r])).setAttribute("accentunder","true"),e},"mathmlBuilder")}),Lo=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(ho(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(ho(e.below,n,t),t)).classes.push(s+"-arrow-pad")),_o.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=_o.mathMLnode(e.label);return n.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body?(r=Lo(bo(e.body,t)),e.below?(i=Lo(bo(e.below,t)),new C.MathNode("munderover",[n,i,r])):new C.MathNode("mover",[n,r])):e.below?(i=Lo(bo(e.below,t)),new C.MathNode("munder",[n,i])):(r=Lo(),new C.MathNode("mover",[n,r]))}}),Io=Z.makeSpan,mt(Hn,"htmlBuilder$9"),mt(Xn,"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:Qs(t),isCharacterBox:pa.isCharacterBox(t)}},htmlBuilder:Hn,mathmlBuilder:Xn}),No=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:No(t[0]),body:Qs(t[1]),isCharacterBox:pa.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?No(i):"mrel",i={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==r,body:Qs(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:pa.isCharacterBox(i)}},htmlBuilder:Hn,mathmlBuilder:Xn}),o({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){return{type:"pmb",mode:(e=e.parser).mode,mclass:No(t[0]),body:Qs(t[0])}},htmlBuilder(e,t){var r=no(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=yo(e.body,t),(t=new C.MathNode("mstyle",e)).setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),t}}),Do={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Mo=mt(()=>({type:"styling",body:[],mode:"math",style:"display"}),"newCell"),Oo=mt(e=>"textord"===e.type&&"@"===e.text,"isStartOfArrow"),Po=mt((e,t)=>("mathord"===e.type||"atom"===e.type)&&e.text===t,"isLabelEnd"),mt(Kn,"cdArrow"),mt(Zn,"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(ho(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",[bo(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(ho(e.fragment,t),t)).classes.push("cd-vert-arrow"),e},mathmlBuilder(e,t){return new C.MathNode("mrow",[bo(e.fragment,t)])}}),o({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var e=e.parser,r=Gn(t[0],"ordgroup").body,i="",n=0;n<r.length;n++)i+=Gn(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}}}),nc=mt((e,t)=>(t=no(e.body,t.withColor(e.color),!1),Z.makeFragment(t)),"htmlBuilder$8"),g=mt((e,t)=>(t=yo(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=Gn(t[0],"color-token").color;return{type:"color",mode:e.mode,color:r,body:Qs(t[1])}},htmlBuilder:nc,mathmlBuilder:g}),o({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:e,breakOnTokenText:r}=e,t=Gn(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:nc,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&&Gn(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(Xa(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(Xa(e.size,t))),r}}),Bo={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},$o=mt(e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new X("Expected a control sequence",e);return t},"checkControlSequence"),Fo=mt(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text?e.gullet.popToken():t},"getRHS"),zo=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(Bo[r.text])return"\\global"!==t&&"\\\\globallong"!==t||(r.text=Bo[r.text]),Gn(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===Bo[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=$o(e.gullet.popToken()),i=(e.gullet.consumeSpaces(),Fo(e));return zo(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=$o(e.gullet.popToken()),i=e.gullet.popToken(),n=e.gullet.popToken();return zo(e,r,n,"\\\\globalfuture"===t),e.gullet.pushToken(n),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}}),qo=mt(function(e,t,r){if(r=On(us.math[e]&&us.math[e].replace||e,t,r))return r;throw new Error("Unsupported symbol "+e+" and font size "+t+".")},"getMetrics"),jo=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"),Wo=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"),Uo=mt(function(e,t,r,i,n,a){return e=Z.makeSymbol(e,"Main-Regular",n,i),n=jo(e,t,i,a),r&&Wo(n,i,t),n},"makeSmallDelim"),Go=mt(function(e,t,r,i){return Z.makeSymbol(e,"Size"+t+"-Regular",r,i)},"mathrmSize"),Vo=mt(function(e,t,r,i,n,a){return e=Go(e,t,n,i),n=jo(Z.makeSpan(["delimsizing","size"+t],[e],i),wa.TEXT,i,a),r&&Wo(n,i,wa.TEXT),n},"makeLargeDelim"),Yo=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"),Ho=mt(function(e,t,r){var i=($a["Size4-Regular"][e.charCodeAt(0)]?$a["Size4-Regular"]:$a["Size1-Regular"])[e.charCodeAt(0)][4],e=new os("inner",Ma(e,Math.round(1e3*t))),e=new ss([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"),Xo={type:"kern",size:-.008},Ko=["|","\\lvert","\\rvert","\\vert"],Zo=["\\|","\\lVert","\\rVert","\\Vert"],Qo=mt(function(e,t,r,i,n,a){var s,o,l,c="",h=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"):Ko.includes(e)?(s="∣",c="vert",h=333):Zo.includes(e)?(s="∥",c="doublevert",h=556):"["===e||"\\lbrack"===e?(u="⎡",s="⎢",o="⎣",p="Size4-Regular",c="lbrack",h=667):"]"===e||"\\rbrack"===e?(u="⎤",s="⎥",o="⎦",p="Size4-Regular",c="rbrack",h=667):"\\lfloor"===e||"⌊"===e?(s=u="⎢",o="⎣",p="Size4-Regular",c="lfloor",h=667):"\\lceil"===e||"⌈"===e?(u="⎡",s=o="⎢",p="Size4-Regular",c="lceil",h=667):"\\rfloor"===e||"⌋"===e?(s=u="⎥",o="⎦",p="Size4-Regular",c="rfloor",h=667):"\\rceil"===e||"⌉"===e?(u="⎤",s=o="⎥",p="Size4-Regular",c="rceil",h=667):"("===e||"\\lparen"===e?(u="⎛",s="⎜",o="⎝",p="Size4-Regular",c="lparen",h=875):")"===e||"\\rparen"===e?(u="⎞",s="⎟",o="⎠",p="Size4-Regular",c="rparen",h=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=qo(u,p,n)).height+e.depth),g=(g=qo(s,p,n)).height+g.depth,f=(f=qo(o,p,n)).height+f.depth,m=0,y=1,t=(null!==d&&(m=(v=qo(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<c.length?(r=t-e-f,v=Math.round(1e3*t),r=Pa(c,Math.round(1e3*r)),c=new os(c,r),r=(h/1e3).toFixed(3)+"em",l=(v/1e3).toFixed(3)+"em",c=new ss([c],{width:r,height:l,viewBox:"0 0 "+h+" "+v}),(h=Z.makeSvgSpan([],[c],i)).height=v/1e3,h.style.width=r,h.style.height=l,g.push({type:"elem",elem:h})):(g.push(Yo(o,p,n)),g.push(Xo),null===d?g.push(Ho(s,t-e-f+.016,i)):(g.push(Ho(s,c=(t-e-f-m)/2+.016,i)),g.push(Xo),g.push(Yo(d,p,n)),g.push(Xo),g.push(Ho(s,c,i))),g.push(Xo),g.push(Yo(u,p,n))),i.havingBaseStyle(wa.TEXT)),r=Z.makeVList({positionType:"bottom",positionData:y,children:g},v);return jo(Z.makeSpan(["delimsizing","mult"],[r],v),wa.TEXT,i,a)},"makeStackedDelim"),Jo=mt(function(e,t,r,i,n){return i=Da(e,i,r),e=new os(e,i),i=new ss([e],{width:"400em",height:K(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"}),Z.makeSvgSpan(["hide-tail"],[i],n)},"sqrtSvg"),xl=mt(function(e,t){var r,i=t.havingBaseSizing(),n=ll("\\surd",e*i.sizeMultiplier,sl,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=Jo("sqrtMain",s=(1+a+.08)/i,l=1e3+1e3*a+80,a,t)).style.minWidth="0.853em",.833/i):"large"===n.type?(l=1080*il[n.size],o=(il[n.size]+a)/i,s=(il[n.size]+a+.08)/i,(r=Jo("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=Jo("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"),el=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],tl=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],rl=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],il=[0,1.2,1.8,2.4,3],Tl=mt(function(e,t,r,i,n){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),el.includes(e)||rl.includes(e))return Vo(e,t,!1,r,i,n);if(tl.includes(e))return Qo(e,il[t],!1,r,i,n);throw new X("Illegal delimiter: '"+e+"'")},"makeSizedDelim"),nl=[{type:"small",style:wa.SCRIPTSCRIPT},{type:"small",style:wa.SCRIPT},{type:"small",style:wa.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],al=[{type:"small",style:wa.SCRIPTSCRIPT},{type:"small",style:wa.SCRIPT},{type:"small",style:wa.TEXT},{type:"stack"}],sl=[{type:"small",style:wa.SCRIPTSCRIPT},{type:"small",style:wa.SCRIPT},{type:"small",style:wa.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],ol=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"),ll=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=qo(e,ol(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"),cl=mt(function(e,t,r,i,n,a){"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle");var s=rl.includes(e)?nl:el.includes(e)?sl:al;return"small"===(s=ll(e,t,s,i)).type?Uo(e,s.style,r,i,n,a):"large"===s.type?Vo(e,s.size,r,i,n,a):Qo(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 cl(e,r,!0,i,n,a)},"makeLeftRightDelim"),hl={sqrtImage:xl,sizedDelim:Tl,sizeToMaxHeight:il,customSizedDelim:cl,leftRightDelim:f},ul={"\\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}},dl=["(","\\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(Qn,"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=Qn(t[0],e),{type:"delimsizing",mode:e.parser.mode,size:ul[e.funcName].size,mclass:ul[e.funcName].mclass,delim:t.text}),"handler"),htmlBuilder:mt((e,t)=>"."===e.delim?Z.makeSpan([e.mclass]):hl.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),"htmlBuilder"),mathmlBuilder:mt(e=>{var t=[],t=("."!==e.delim&&t.push(go(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(hl.sizeToMaxHeight[e.size]));return t.setAttribute("minsize",e),t.setAttribute("maxsize",e),t},"mathmlBuilder")}),mt(Jn,"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:Qn(t[0],e).text,color:r}},"handler")}),o({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:mt((e,t)=>{var t=Qn(t[0],e),r=(++(e=e.parser).leftrightDepth,e.parseExpression(!1)),i=(--e.leftrightDepth,e.expect("\\right",!1),Gn(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)=>{Jn(e);for(var r,i=no(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?co(t,["mopen"]):hl.leftRightDelim(e.left,n,a,t,e.mode,["mopen"]),i.unshift(r),s)for(var l=1;l<i.length;l++){var c=i[l].isMiddle;c&&(i[l]=hl.leftRightDelim(c.delim,n,a,c.options,e.mode,[]))}return r="."===e.right?co(t,["mclose"]):(r=e.rightColor?t.withColor(e.rightColor):t,hl.leftRightDelim(e.right,n,a,r,e.mode,["mclose"])),i.push(r),Z.makeSpan(["minner"],i,t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>{Jn(e);var r,t=yo(e.body,t);return"."!==e.left&&((r=new C.MathNode("mo",[go(e.left,e.mode)])).setAttribute("fence","true"),t.unshift(r)),"."!==e.right&&((r=new C.MathNode("mo",[go(e.right,e.mode)])).setAttribute("fence","true"),e.rightColor&&r.setAttribute("mathcolor",e.rightColor),t.push(r)),fo(t)},"mathmlBuilder")}),o({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:mt((e,t)=>{if(t=Qn(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=co(t,[]):(r=hl.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?go("|","text"):go(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")}),Ll=mt((e,t)=>{var r,i,n,a,s,o=Z.wrapFragment(ho(e.body,t),t),l=e.label.slice(1),c=t.sizeMultiplier,h=0,u=pa.isCharacterBox(e.body);return"sout"===l?((r=Z.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/c,h=-.5*t.fontMetrics().xHeight):"phase"===l?(a=Xa({number:.6,unit:"pt"},t),s=Xa({number:.35,unit:"ex"},t),c/=t.havingBaseSizing().sizeMultiplier,i=o.height+o.depth+a+s,o.style.paddingLeft=K(i/2+a),c=Math.floor(1e3*i*c),n=Ia(c),n=new ss([new os("phase",n)],{width:"400em",height:K(c/1e3),viewBox:"0 0 400000 "+c,preserveAspectRatio:"xMinYMin slice"}),(r=Z.makeSvgSpan(["hide-tail"],[n],t)).style.height=K(i),h=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=c=0,n=/box/.test(l)?(i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),c=t.fontMetrics().fboxsep+("colorbox"===l?0:i)):"angl"===l?(c=4*(i=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),Math.max(0,.25-o.depth)):c=u?.2:0,r=_o.encloseSpan(o,l,c,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)),h=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:h},{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:h,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"),Ml=mt((e,t)=>{var r=new C.MathNode(-1<e.label.indexOf("colorbox")?"mpadded":"menclose",[bo(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=Gn(t[0],"color-token").color;return{type:"enclose",mode:e.mode,label:i,backgroundColor:n,body:t[1]}},htmlBuilder:Ll,mathmlBuilder:Ml}),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=Gn(t[0],"color-token").color,a=Gn(t[1],"color-token").color;return{type:"enclose",mode:e.mode,label:i,backgroundColor:a,borderColor:n,body:t[2]}},htmlBuilder:Ll,mathmlBuilder:Ml}),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:Ll,mathmlBuilder:Ml}),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]}}}),pl={},mt(ea,"defineEnvironment"),gl={},mt(l,"defineMacro"),mt(ta,"getHLines"),fl=mt(e=>{if(!e.parser.settings.displayMode)throw new X("{"+e.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext"),mt(ra,"getAutoTag"),mt(ia,"parseArray"),mt(na,"dCellStyle"),m=mt(function(e,t){var r=e.body.length,P=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,c=(e.colSeparationType&&"small"===e.colSeparationType&&(l=t.havingStyle(wa.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778),"CD"===e.colSeparationType?Xa({number:3,unit:"ex"},t):12*o),B=3*o,$=.7*(o=e.arraystretch*c),F=.3*o,h=0;function u(e){for(var t=0;t<e.length;++t)0<t&&(h+=.25),a.push({pos:h,isDashed:e[t]})}for(mt(u,"setHLinePos"),u(P[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=ho(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=Xa(z,t))&&(g<(v+=F)&&(g=v),v=0),e.addJot&&(g+=B),f.height=p,f.depth=g,h+=p,f.pos=h,h+=g+v,n[D]=f,u(P[D+1])}var b,x,T=h/2+t.fontMetrics().axisHeight,k=e.cols||[],w=[],C=[];if(e.tags&&e.tags.some(e=>e))for(D=0;D<r;++D){var S=n[D],q=S.pos-T,E=e.tags[D],_=void 0;(_=!0===E?Z.makeSpan(["eqn-num"],[],t):!1===E?Z.makeSpan([],[],t):Z.makeSpan([],no(E,t,!0),t)).depth=S.depth,_.height=S.height,C.push({type:"elem",elem:_,shift:q})}for(x=m=0;m<i||x<k.length;++m,++x){for(var A=k[x]||{},j=!0;"separator"===A.type;){if(j||((b=Z.makeSpan(["arraycolsep"],[])).style.width=K(t.fontMetrics().doubleRuleSep),w.push(b)),"|"!==A.separator&&":"!==A.separator)throw new X("Invalid separator type: "+A.separator);var R="|"===A.separator?"solid":"dashed",L=Z.makeSpan(["vertical-separator"],[],t);L.style.height=K(h),L.style.borderRightWidth=K(s),L.style.borderRightStyle=R,L.style.margin="0 "+K(-s/2),(R=h-T)&&(L.style.verticalAlign=K(-R)),w.push(L),A=k[++x]||{},j=!1}if(!(i<=m)){for(var I=void 0,N=((0<m||e.hskipBeforeAndAfter)&&0!==(I=pa.deflt(A.pregap,l))&&((b=Z.makeSpan(["arraycolsep"],[])).style.width=K(I),w.push(b)),[]),D=0;D<r;++D){var W,M=n[D],O=M[m];O&&(W=M.pos-T,O.depth=M.depth,O.height=M.height,N.push({type:"elem",elem:O,shift:W}))}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=pa.deflt(A.postgap,l))&&((b=Z.makeSpan(["arraycolsep"],[])).style.width=K(I),w.push(b))}}if(n=Z.makeSpan(["mtable"],w),0<a.length){for(var U=Z.makeLineSpan("hline",t,s),G=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:G,shift:H}:{type:"elem",elem:U,shift:H})}n=Z.makeVList({positionType:"individualShift",children:V},t)}return 0===C.length?Z.makeSpan(["mord"],[n],t):(c=Z.makeVList({positionType:"individualShift",children:C},t),c=Z.makeSpan(["tag"],[c],t),Z.makeFragment([n,c]))},"htmlBuilder"),ml={c:"center ",l:"left ",r:"right "},ic=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",[bo(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 c=new C.MathNode("mtable",r),h=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0),h=(c.setAttribute("rowspacing",K(h)),""),u="";if(e.cols&&0<e.cols.length){var d=e.cols,p="",g=!1,f=0,m=d.length;"separator"===d[0].type&&(h+="top ",f=1),"separator"===d[d.length-1].type&&(h+="bottom ",--m);for(var y=f;y<m;y++)"align"===d[y].type?(u+=ml[d[y].align],g&&(p+="none "),g=!0):"separator"===d[y].type&&g&&(p+="|"===d[y].separator?"solid ":"dashed ",g=!1);c.setAttribute("columnalign",u.trim()),/[sd]/.test(p)&&c.setAttribute("columnlines",p.trim())}if("align"===e.colSeparationType){for(var v=e.cols||[],b="",x=1;x<v.length;x++)b+=x%2?"0em ":"1em ";c.setAttribute("columnspacing",b.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?c.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?c.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");for(var T="",k=e.hLinesBeforeRow,h=(h+=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)&&c.setAttribute("rowlines",T.trim()),""!==h&&(c=new C.MathNode("menclose",[c])).setAttribute("notation",h.trim()),e.arraystretch&&e.arraystretch<1&&(c=new C.MathNode("mstyle",[c])).setAttribute("scriptlevel","1"),c},"mathmlBuilder"),Pl=mt(function(e,t){-1===e.envName.indexOf("ed")&&fl(e);var n,r=[],i=-1<e.envName.indexOf("at")?"alignat":"align",a="split"===e.envName,i=ia(e.parser,{cols:r,addJot:!0,autoTag:a?void 0:ra(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="",c=0;c<t[0].body.length;c++)l+=Gn(t[0].body[c],"textord").text;n=Number(l),s=2*n}var h=!s;i.body.forEach(function(e){for(var t=1;t<e.length;t+=2){var r=Gn(e[t],"styling");Gn(r.body[0],"ordgroup").body.unshift(o)}if(h)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&&h&&(p=1),r[u]={type:"align",align:d,pregap:p,postgap:0}}return i.colSeparationType=h?"align":"alignat",i},"alignedHandler"),ea({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){return t={cols:t=(Yn(t[0])?[t[0]]:Gn(t[0],"ordgroup").body).map(function(e){var t=Vn(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},ia(e.parser,t,na(e.envName))},htmlBuilder:m,mathmlBuilder:ic}),ea({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=ia(e.parser,i,na(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:ic}),ea({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){return(e=ia(e.parser,{arraystretch:.5},"script")).colSeparationType="small",e},htmlBuilder:m,mathmlBuilder:ic}),ea({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){if(1<(t=(Yn(t[0])?[t[0]]:Gn(t[0],"ordgroup").body).map(function(e){var t=Vn(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=ia(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:ic}),ea({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=ia(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},na(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:ic}),ea({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Pl,htmlBuilder:m,mathmlBuilder:ic}),ea({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){["gather","gather*"].includes(e.envName)&&fl(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:ra(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return ia(e.parser,t,"display")},htmlBuilder:m,mathmlBuilder:ic}),ea({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Pl,htmlBuilder:m,mathmlBuilder:ic}),ea({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){fl(e);var t={autoTag:ra(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return ia(e.parser,t,"display")},htmlBuilder:m,mathmlBuilder:ic}),ea({type:"array",names:["CD"],props:{numArgs:0},handler(e){return fl(e),Zn(e.parser)},htmlBuilder:m,mathmlBuilder:ic}),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")}}),yl=pl,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+=Gn(i.body[a],"textord").text;if("\\begin"!==r)return{type:"environment",mode:e.mode,name:n,nameGroup:i};if(!yl.hasOwnProperty(n))throw new X("No such environment: "+n,i);var t=yl[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=Gn(e.parseFunction(),"environment")).name!==n)throw new X("Mismatch: \\begin{"+n+"} matched by \\end{"+r.name+"}",o);return t}}),nc=mt((e,t)=>{var r=e.font,t=t.withFont(r);return ho(e.body,t)},"htmlBuilder$5"),g=mt((e,t)=>{var r=e.font,t=t.withFont(r);return bo(e.body,t)},"mathmlBuilder$4"),vl={"\\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=Zs(t[0]);return{type:"font",mode:e.mode,font:(r=r in vl?vl[r]:r).slice(1),body:t}},"handler"),htmlBuilder:nc,mathmlBuilder:g}),o({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:mt((e,t)=>{var e=e.parser,t=t[0],r=pa.isCharacterBox(t);return{type:"mclass",mode:e.mode,mclass:No(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:nc,mathmlBuilder:g}),bl=mt((e,t)=>("display"===e?t=t.id>=wa.SCRIPT.id?t.text():wa.DISPLAY:"text"===e&&t.size===wa.DISPLAY.size?t=wa.TEXT:"script"===e?t=wa.SCRIPT:"scriptscript"===e&&(t=wa.SCRIPTSCRIPT),t),"adjustStyle"),xl=mt((e,t)=>{var r,i,n,a,s=bl(e.size,t.style),o=s.fracNum(),l=s.fracDen(),o=t.havingStyle(o),c=ho(e.numer,o,t),h=(e.continued&&(h=8.5/t.fontMetrics().ptPerEm,u=3.5/t.fontMetrics().ptPerEm,c.height=c.height<h?h:c.height,c.depth=c.depth<u?u:c.depth),o=t.havingStyle(l),ho(e.denom,o,t)),u=e.hasBarLine?(i=(a=e.barSize?(i=Xa(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===wa.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-c.depth-(u+.5*i)<n&&(r+=n-(r-c.depth-(u+.5*i))),u-.5*i-(h.height-l)<n&&(l+=n-(u-.5*i-(h.height-l))),Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:h,shift:l},{type:"elem",elem:a,shift:-(u-.5*i)},{type:"elem",elem:c,shift:-r}]},t)):((a=r-c.depth-(h.height-l))<n&&(r+=.5*(n-a),l+=.5*(n-a)),Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:h,shift:l},{type:"elem",elem:c,shift:-r}]},t));return o=t.havingStyle(s),u.height*=o.sizeMultiplier/t.sizeMultiplier,u.depth*=o.sizeMultiplier/t.sizeMultiplier,i=s.size===wa.DISPLAY.size?t.fontMetrics().delim1:(s.size===wa.SCRIPTSCRIPT.size?t.havingStyle(wa.SCRIPT):t).fontMetrics().delim2,n=null==e.leftDelim?co(t,["mopen"]):hl.customSizedDelim(e.leftDelim,i,!0,t.havingStyle(s),e.mode,["mopen"]),a=e.continued?Z.makeSpan([]):null==e.rightDelim?co(t,["mclose"]):hl.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"),Tl=mt((e,t)=>{var r=new C.MathNode("mfrac",[bo(e.numer,t),bo(e.denom,t)]),i=(e.hasBarLine?e.barSize&&(i=Xa(e.barSize,t),r.setAttribute("linethickness",K(i))):r.setAttribute("linethickness","0px"),bl(e.size,t.style));return i.size!==t.style.size&&(r=new C.MathNode("mstyle",[r]),t=i.size===wa.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)),fo(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:xl,mathmlBuilder:Tl}),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}}}),kl=["display","text","script","scriptscript"],wl=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=Zs(t[0])).type&&"open"===a.family?wl(a.text):null,s="atom"===(s=Zs(t[1])).type&&"close"===s.family?wl(s.text):null,o=null,l=!!(l=Gn(t[2],"size")).isBlank||0<(o=l.value).number,c="auto";return"ordgroup"===(t=t[3]).type?0<t.body.length&&(r=Gn(t.body[0],"textord"),c=kl[Number(r.text)]):(t=Gn(t,"textord"),c=kl[Number(t.text)]),{type:"genfrac",mode:e.mode,numer:i,denom:n,continued:!1,hasBarLine:l,barSize:o,leftDelim:a,rightDelim:s,size:c}},htmlBuilder:xl,mathmlBuilder:Tl}),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:Gn(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=da(Gn(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:xl,mathmlBuilder:Tl}),Cl=mt((e,t)=>{var r,i,n=t.style,n="supsub"===e.type?(r=e.sup?ho(e.sup,t.havingStyle(n.sup()),t):ho(e.sub,t.havingStyle(n.sub()),t),Gn(e.base,"horizBrace")):Gn(e,"horizBrace"),e=ho(n.base,t.havingBaseStyle(wa.DISPLAY)),a=_o.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=_o.mathMLnode(e.label);return new C.MathNode(e.isOver?"mover":"munder",[bo(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:Cl,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=Gn(t[0],"url").url;return e.settings.isTrusted({command:"\\href",url:t})?{type:"href",mode:e.mode,href:t,body:Qs(r)}:e.formatUnsupportedCmd("\\href")},"handler"),htmlBuilder:mt((e,t)=>{var r=no(e.body,t,!1);return Z.makeAnchor(e.href,[],r,t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>((t=(t=vo(e.body,t))instanceof uo?t:new uo("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=Gn(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:Qs(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:Qs(t[0])}},htmlBuilder(e,t){return e=no(e.body,t,!1),Z.makeFragment(e)},mathmlBuilder(e,t){return new C.MathNode("mrow",yo(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=Gn(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:Qs(t)}:e.formatUnsupportedCmd(r)},"handler"),htmlBuilder:mt((e,t)=>{var r,i=no(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)=>vo(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:Qs(t[0]),mathml:Qs(t[1])}),"handler"),htmlBuilder:mt((e,t)=>(e=no(e.html,t,!1),Z.makeFragment(e)),"htmlBuilder"),mathmlBuilder:mt((e,t)=>vo(e.mathml,t),"mathmlBuilder")}),Sl=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]},Ha(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=Gn(r[0],"raw").string.split(","),l=0;l<o.length;l++){var c=o[l].split("=");if(2===c.length){var h=c[1].trim();switch(c[0].trim()){case"alt":s=h;break;case"width":i=Sl(h);break;case"height":n=Sl(h);break;case"totalheight":a=Sl(h);break;default:throw new X("Invalid key: '"+c[0]+"' in \\includegraphics.")}}}return r=Gn(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=Xa(e.height,t),i=0,n=(0<e.totalheight.number&&(i=Xa(e.totalheight,t)-r),0),t=(0<e.width.number&&(n=Xa(e.width,t)),{height:K(r+i)});return 0<n&&(t.width=K(n)),0<i&&(t.verticalAlign=K(-i)),(n=new is(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),Xa(e.height,t)),n=0;return 0<e.totalheight.number&&(n=Xa(e.totalheight,t)-i,r.setAttribute("valign",K(-n))),r.setAttribute("height",K(i+n)),0<e.width.number&&(i=Xa(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=Gn(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=Xa(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([],[ho(e.body,t)]),Z.makeSpan(["inner"],[r],t)):Z.makeSpan(["inner"],[ho(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",[bo(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)}}),El=mt((e,t)=>{switch(t.style.size){case wa.DISPLAY.size:return e.display;case wa.TEXT.size:return e.text;case wa.SCRIPT.size:return e.script;case wa.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:Qs(t[0]),text:Qs(t[1]),script:Qs(t[2]),scriptscript:Qs(t[3])}),"handler"),htmlBuilder:mt((e,t)=>(e=El(e,t),e=no(e,t,!1),Z.makeFragment(e)),"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=El(e,t),vo(e,t)),"mathmlBuilder")}),_l=mt((e,t,r,i,n,a,s)=>{e=Z.makeSpan([],[e]);var o,l,c=r&&pa.isCharacterBox(r);if(t&&(o={elem:t=ho(t,i.havingStyle(n.sup()),i),kern:Math.max(i.fontMetrics().bigOpSpacing1,i.fontMetrics().bigOpSpacing3-t.depth)}),r&&(l={elem:t=ho(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,h=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,h=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,h=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=[h],l&&0!==a&&!c&&((n=Z.makeSpan(["mspace"],[],i)).style.marginRight=K(a),r.unshift(n)),Z.makeSpan(["mop","op-limits"],r,i)},"assembleSupSub"),Al=["\\smallint"],Rl=mt((e,t)=>{var r,i,n,a=!1,s=("supsub"===e.type?(r=e.sup,i=e.sub,n=Gn(e.base,"op"),a=!0):n=Gn(e,"op"),!1);if((e=t.style).size===wa.DISPLAY.size&&n.symbol&&!Al.includes(n.name)&&(s=!0),n.symbol){var o,l=s?"Size2-Regular":"Size1-Regular",c="";"\\oiint"!==n.name&&"\\oiiint"!==n.name||(c=n.name.slice(1),n.name="oiint"===c?"\\iint":"\\iiint"),l=Z.makeSymbol(n.name,l,"math",t,["mop","op-symbol",s?"large-op":"small-op"]),0<c.length&&(o=l.italic,h=Z.staticSvg(c+"Size"+(s?"2":"1"),t),l=Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:h,shift:s?.08:0}]},t),n.name="\\"+c,l.classes.unshift("mop"),l.italic=o)}else if(n.body){var h=no(n.body,t,!0);1===h.length&&h[0]instanceof as?(l=h[0]).classes[0]="mop":l=Z.makeSpan(["mop"],h,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 c=s=0,(l instanceof as||"\\oiint"===n.name||"\\oiiint"===n.name)&&!n.suppressBaseShift&&(s=(l.height-l.depth)/2-t.fontMetrics().axisHeight,c=l.italic),a?_l(l,r,i,t,e,c,s):(s&&(l.style.position="relative",l.style.top=K(s)),l)},"htmlBuilder$2"),Ll=mt((e,t)=>{var r;return e.symbol?(r=new uo("mo",[go(e.name,e.mode)]),Al.includes(e.name)&&r.setAttribute("largeop","false")):r=e.body?new uo("mo",yo(e.body,t)):(r=new uo("mi",[new po(e.name.slice(1))]),t=new uo("mo",[go("","text")]),e.parentIsSupSub?new uo("mrow",[r,t]):jn([r,t])),r},"mathmlBuilder$1"),Il={"∏":"\\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=Il[r]),{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},"handler"),htmlBuilder:Rl,mathmlBuilder:Ll}),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:Qs(t)}),"handler"),htmlBuilder:Rl,mathmlBuilder:Ll}),Nl={"∫":"\\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:Rl,mathmlBuilder:Ll}),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:Rl,mathmlBuilder:Ll}),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=Nl[t]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:t}},htmlBuilder:Rl,mathmlBuilder:Ll}),Dl=mt((e,t)=>{var r,i,n,a,s=!1;if("supsub"===e.type?(r=e.sup,i=e.sub,n=Gn(e.base,"operatorname"),s=!0):n=Gn(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=no(e,t.withFont("mathrm"),!0),l=0;l<o.length;l++){var c=o[l];c instanceof as&&(c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}a=Z.makeSpan(["mop"],o,t)}else a=Z.makeSpan(["mop"],[],t);return s?_l(a,r,i,t,t.style,0,0):a},"htmlBuilder$1"),Ml=mt((e,t)=>{for(var r=yo(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",[go("","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:Qs(t),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},"handler"),htmlBuilder:Dl,mathmlBuilder:Ml}),l("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Fn({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Z.makeFragment(no(e.body,t,!1)):Z.makeSpan(["mord"],no(e.body,t,!0),t)},mathmlBuilder(e,t){return vo(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=ho(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",[bo(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:Qs(t)}),"handler"),htmlBuilder:mt((e,t)=>(e=no(e.body,t.withPhantom(),!1),Z.makeFragment(e)),"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=yo(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([],[ho(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=yo(Qs(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"],[ho(e.body,t.withPhantom())]),r=Z.makeSpan(["fix"],[]);return Z.makeSpan(["mord","rlap"],[e,r],t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=yo(Qs(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=Gn(t[0],"size").value;return{type:"raisebox",mode:e.mode,dy:r,body:t[1]}},htmlBuilder(e,t){var r=ho(e.body,t),e=Xa(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",[bo(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=Gn(t[0],"size"),t=Gn(t[1],"size");return{type:"rule",mode:e.mode,shift:r&&Gn(r,"size").value,width:i.value,height:t.value}},htmlBuilder(e,t){var r=Z.makeSpan(["mord","rule"],[],t),i=Xa(e.width,t),n=Xa(e.height,t),e=e.shift?Xa(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=Xa(e.width,t),i=Xa(e.height,t),e=e.shift?Xa(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(aa,"sizingGroup"),Ol=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Pl=mt((e,t)=>{var r=t.havingSize(e.size);return aa(e.body,r,t)},"htmlBuilder"),o({type:"sizing",names:Ol,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:Ol.indexOf(r)+1,body:e}},"handler"),htmlBuilder:Pl,mathmlBuilder:mt((e,t)=>(t=t.havingSize(e.size),e=yo(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]&&Gn(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([],[ho(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",[bo(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=ho(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<wa.TEXT.id?t.fontMetrics().xHeight:i)/4,n=r.height+r.depth+i+n,{span:n,ruleWidth:a,advanceWidth:s}=hl.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(wa.SCRIPTSCRIPT),r=ho(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",[bo(e,t),bo(r,t)]):new C.MathNode("msqrt",[bo(e,t)])}}),Bl={display:wa.DISPLAY,text:wa.TEXT,script:wa.SCRIPT,scriptscript:wa.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=Bl[e.style],r=t.havingStyle(r).withFont("");return aa(e.body,r,t)},mathmlBuilder(e,t){var r=Bl[e.style],t=t.havingStyle(r),r=yo(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}}),$l=mt(function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===wa.DISPLAY.size||r.alwaysHandleSupSub)?Rl:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===wa.DISPLAY.size||r.limits)?Dl:null:"accent"===r.type?pa.isCharacterBox(r.base)?Ao:null:"horizBrace"===r.type&&!e.sub===r.isOver?Cl:null:null},"htmlBuilderDelegate"),Fn({type:"supsub",htmlBuilder(e,t){if(a=$l(e,t))return a(e,t);var r,i,n,{base:a,sup:s,sub:o}=e,l=ho(a,t),c=t.fontMetrics(),h=0,u=0,a=a&&pa.isCharacterBox(a),o=(s&&(n=t.havingStyle(t.style.sup()),r=ho(s,n,t),a||(h=l.height-n.fontMetrics().supDrop*n.sizeMultiplier/t.sizeMultiplier)),o&&(s=t.havingStyle(t.style.sub()),i=ho(o,s,t),a||(u=l.depth+s.fontMetrics().subDrop*s.sizeMultiplier/t.sizeMultiplier)),n=t.style===wa.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2,t.sizeMultiplier),a=K(.5/c.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 as||o)&&(s=K(-l.italic)),r&&i){h=Math.max(h,n,r.depth+.25*c.xHeight),u=Math.max(u,c.sub2),e=4*c.defaultRuleThickness,h-r.depth-(i.height-u)<e&&(u=e-(h-r.depth)+i.height,0<(o=.8*c.xHeight-(h-r.depth)))&&(h+=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:-h,marginRight:a}]},t)}else if(i)u=Math.max(u,c.sub1,i.height-.8*c.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.");h=Math.max(h,n,r.depth+.25*c.xHeight),d=Z.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:r,marginRight:a}]},t)}return e=lo(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),[bo(e.base,t)]);return e.sub&&n.push(bo(e.sub,t)),e.sup&&n.push(bo(e.sup,t)),r=i?r?"mover":"munder":e.sub?e.sup?(i=e.base)&&"op"===i.type&&i.limits&&t.style===wa.DISPLAY||i&&"operatorname"===i.type&&i.alwaysHandleSupSub&&(t.style===wa.DISPLAY||i.limits)?"munderover":"msubsup":(r=e.base)&&"op"===r.type&&r.limits&&(t.style===wa.DISPLAY||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(r.limits||t.style===wa.DISPLAY)?"munder":"msub":(i=e.base)&&"op"===i.type&&i.limits&&(t.style===wa.DISPLAY||i.alwaysHandleSupSub)||i&&"operatorname"===i.type&&i.alwaysHandleSupSub&&(i.limits||t.style===wa.DISPLAY)?"mover":"msup",new C.MathNode(r,n)}}),Fn({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",[go(e.text,e.mode)]);return"bin"===e.family?"bold-italic"===(t=mo(e,t))&&r.setAttribute("mathvariant",t):"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false"),r}}),Fl={mi:"italic",mn:"normal",mtext:"normal"},Fn({type:"mathord",htmlBuilder(e,t){return Z.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var r=new C.MathNode("mi",[go(e.text,e.mode,t)]);return(e=mo(e,t)||"italic")!==Fl[r.type]&&r.setAttribute("mathvariant",e),r}}),Fn({type:"textord",htmlBuilder(e,t){return Z.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var r=go(e.text,e.mode,t),t=mo(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!==Fl[e.type]&&e.setAttribute("mathvariant",t),e}}),zl={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},ql={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}},Fn({type:"spacing",htmlBuilder(e,t){var r,i;if(ql.hasOwnProperty(e.text))return r=ql[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(zl.hasOwnProperty(e.text))return Z.makeSpan(["mspace",zl[e.text]],[],t);throw new X('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(ql.hasOwnProperty(e.text))return new C.MathNode("mtext",[new C.TextNode(" ")]);if(zl.hasOwnProperty(e.text))return new C.MathNode("mspace");throw new X('Unknown type of space "'+e.text+'"')}}),jl=mt(()=>{var e=new C.MathNode("mtd",[]);return e.setAttribute("width","50%"),e},"pad"),Fn({type:"tag",mathmlBuilder(e,t){return(e=new C.MathNode("mtable",[new C.MathNode("mtr",[jl(),new C.MathNode("mtd",[vo(e.body,t)]),jl(),new C.MathNode("mtd",[vo(e.tag,t)])])])).setAttribute("width","100%"),e}}),Wl={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Ul={"\\textbf":"textbf","\\textmd":"textmd"},Gl={"\\textit":"textit","\\textup":"textup"},Vl=mt((e,t)=>(e=e.font)?Wl[e]?t.withTextFontFamily(Wl[e]):Ul[e]?t.withTextFontWeight(Ul[e]):"\\emph"===e?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(Gl[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:Qs(t),font:r}},htmlBuilder(e,t){return t=Vl(e,t),e=no(e.body,t,!0),Z.makeSpan(["mord","text"],e,t)},mathmlBuilder(e,t){return t=Vl(e,t),vo(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=ho(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",[bo(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=ho(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",[bo(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=Yl(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(Yl(e)),(e=new C.MathNode("mtext",[e])).setAttribute("mathvariant","monospace"),e}}),Yl=mt(e=>e.body.replace(/ /g,e.star?"␣":" "),"makeVerb"),Hl=Hs,Xl=new RegExp("[̀-ͯ]+$"),Kl=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 oa("EOF",new sa(this,t,t));if(null===(i=this.tokenRegex.exec(e))||i.index!==t)throw new X("Unexpected character: '"+e[t]+"'",new oa(e[t],new sa(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 oa(i,new sa(this,t,this.tokenRegex.lastIndex))}},Zl=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}},Ql=gl,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}}),Jl={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=Jl[i.text])||t<=n)throw new X("Invalid base-"+t+" digit "+i.text);for(;null!=(r=Jl[e.future().text])&&r<t;)n=n*t+r,e.popToken()}return"\\@char{"+n+"}"}),ec=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=>ec(e,!1,!0,!1)),l("\\renewcommand",e=>ec(e,!0,!1,!1)),l("\\providecommand",e=>ec(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),Hl[r],us.math[r],us.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}}"),tc={",":"\\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 tc?t=tc[e]:("\\not"===e.slice(0,4)||e in us.math&&["bin","rel"].includes(us.math[e].group))&&(t="\\dotsb"),t}),rc={")":!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 rc?"\\ldots\\,":"\\ldots"}),l("\\dotsc",function(e){return(e=e.future().text)in rc&&","!==e?"\\ldots\\,":"\\ldots"}),l("\\cdots",function(e){return e.future().text in rc?"\\@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{"+(ic=K($a["Main-Regular"][84][1]-.7*$a["Main-Regular"][65][1]))+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),l("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+ic+"}{\\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",(nc=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",nc(!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}"),ac={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},sc=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 Zl(Ql,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Kl(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 oa("EOF",r.loc)),this.pushTokens(i),new oa("",sa.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 oa(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 Kl(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)||Hl.hasOwnProperty(e)||us.math.hasOwnProperty(e)||us.text.hasOwnProperty(e)||ac.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Hl.hasOwnProperty(e)&&!Hl[e].primitive}},oc=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,lc=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),cc={"́":{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"}},hc={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},(uc=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 sc(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 oa("}")),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&&Hl[i.text]&&Hl[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(!lc[n.text])break;var l=oc.test(n.text),c=[];for(c.push(new oa(lc[n.text])),this.consume();;){var h=this.fetch().text;if(!lc[h]||oc.test(h)!==l)break;c.unshift(new oa(lc[h])),this.consume()}a=this.subparse(c),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=Hl[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=Hl[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]},Ha(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:sa.range(r,s),body:a,semisimple:"\\begingroup"===i||void 0}}else if(null==(n=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===i[0]&&!ac.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:sa.range(i,e[r+2]),text:"---"}),t-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:sa.range(i,e[r+1]),text:"--"}),--t)),"'"!==n&&"`"!==n||e[r+1].text!==n||(e.splice(r,2,{type:"textord",mode:"text",loc:sa.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}}hc.hasOwnProperty(t[0])&&!us[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=hc[t[0]]+t.slice(1));var r=Xl.exec(t);if(r&&("i"===(t=t.substring(0,r.index))?t="ı":"j"===t&&(t="ȷ")),us[this.mode][t]){this.settings.strict&&"math"===this.mode&&0<=As.indexOf(t)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var i=us[this.mode][t].group,n=sa.range(e),a=cs.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&&(Dn(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:sa.range(e),text:t}}if(this.consume(),r)for(var s=0;s<r[0].length;s++){var o=r[0][s];if(!cc[o])throw new X("Unknown accent ' "+o+"'",e);var l=cc[o][this.mode]||cc[o].text;if(!l)throw new X("Accent "+o+" unsupported in "+this.mode+" mode",e);a={type:"accent",mode:this.mode,loc:sa.range(e),label:l,isStretchy:!1,isShifty:!0,base:a}}return a}}).endOfExpression=["}","\\endgroup","\\end","\\right","&"],dc=mt(function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");delete(e=new uc(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 oa("\\df@tag")])}]}return r},"parseTree"),pc=mt(function(e,t,r){t.textContent="",e=yc(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."),pc=mt(function(){throw new X("KaTeX doesn't work in quirks mode.")},"render")),gc=mt(function(e,t){return yc(e,t).toMarkup()},"renderToString"),fc=mt(function(e,t){return t=new fa(t),dc(e,t)},"generateParseTree"),mc=mt(function(e,t,r){if(!r.throwOnError&&e instanceof X)return(t=Z.makeSpan(["katex-error"],[new as(t)])).setAttribute("title",e.toString()),t.setAttribute("style","color:"+r.errorColor),t;throw e},"renderError"),yc=mt(function(e,t){t=new fa(t);try{var r=dc(e,t);return ko(r,e,t)}catch(r){return mc(r,e,t)}},"renderToDomTree"),vc=mt(function(e,t){t=new fa(t);try{var r=dc(e,t);return wo(r,e,t)}catch(r){return mc(r,e,t)}},"renderToHTMLTree"),Tc={version:bc="0.16.25",render:pc,renderToString:gc,ParseError:X,SETTINGS_SCHEMA:ga,__parse:fc,__renderToDomTree:yc,__renderToHTMLTree:vc,__setFontMetrics:Mn,__defineSymbol:t,__defineFunction:o,__defineMacro:l,__domTree:xc={Span:ts,Anchor:rs,SymbolNode:as,SvgNode:ss,PathNode:os,LineNode:ls}}});function wc(){let t="data-temp-href-target";_n.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),_n.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 Cc,Sc,Ec,_c,Ac,Rc,Lc,Ic,Nc,Dc,Mc,Oc,Pc,Bc,$c,Fc,zc,qc,jc,Wc,Uc,Gc,Vc,Yc,I,Hc,Xc,Kc,Zc,Qc,Jc,eh,th=r(()=>{An(),wi(),Cc=/<br\s*\/?>/gi,Sc=mt(e=>e?Mc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Ec=(()=>{let e=!1;return()=>{e||(wc(),e=!0)}})(),mt(wc,"setupDompurifyHooks"),_c=mt(e=>(Ec(),_n.sanitize(e)),"removeScript"),Ac=mt((e,t)=>(_r(t)&&("antiscript"===(t=t.securityLevel)||"strict"===t||"sandbox"===t?e=_c(e):"loose"!==t&&(e=(e=(e=Mc(e)).replace(/</g,"<").replace(/>/g,">")).replace(/=/g,"="),e=Dc(e))),e),"sanitizeMore"),Rc=mt((e,t)=>e&&(t.dompurifyConfig?_n.sanitize(Ac(e,t),t.dompurifyConfig):_n.sanitize(Ac(e,t),{FORBID_TAGS:["style"]})).toString(),"sanitizeText"),Lc=mt((e,t)=>"string"==typeof e?Rc(e,t):e.flat().map(e=>Rc(e,t)),"sanitizeTextOrArray"),Ic=mt(e=>Cc.test(e),"hasBreaks"),Nc=mt(e=>e.split(Cc),"splitBreaks"),Dc=mt(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Mc=mt(e=>e.replace(Cc,"#br#"),"breakToPlaceholder"),Oc=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"),Pc=mt(function(...e){return e=e.filter(e=>!isNaN(e)),Math.max(...e)},"getMax"),Bc=mt(function(...e){return e=e.filter(e=>!isNaN(e)),Math.min(...e)},"getMin"),$c=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],zc(r,i))&&(e=r+","+i,t++,a.pop()),a.push(qc(e))}return a.join("")},"parseGenericTypes"),Fc=mt((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),zc=mt((e,t)=>(e=Fc(e,"~"),t=Fc(t,"~"),1===e&&1===t),"shouldCombineSets"),qc=mt(e=>{let t=Fc(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"),jc=mt(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Wc=/\$\$(.*)\$\$/g,Uc=mt(e=>0<(e.match(Wc)?.length??0),"hasKatex"),Gc=mt(async(e,t)=>{var r=document.createElement("div"),e=(r.innerHTML=await Yc(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"),Vc=mt(async(e,t)=>{if(!Uc(e))return e;if(!(jc()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Wc,"MathML is unsupported in this environment.");{let r=(await Promise.resolve().then(()=>(kc(),Rn))).default,i=t.forceLegacyMathML||!jc()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Cc).map(e=>Uc(e)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${e}</div>`:`<div>${e}</div>`).join("").replace(Wc,(e,t)=>r.renderToString(t,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Yc=mt(async(e,t)=>Rc(await Vc(e,t),t),"renderKatexSanitized"),I={getRows:Sc,sanitizeText:Rc,sanitizeTextOrArray:Lc,hasBreaks:Ic,splitBreaks:Nc,lineBreakRegex:Cc,removeScript:_c,getUrl:Oc,evaluate:or,getMax:Pc,getMin:Bc}}),rh=r(()=>{Rr(),wi(),th(),e(),Hc={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},Xc=new Map,Kc=new Map,Zc=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(P.debug("Registering icon pack:",t.name),"loader"in t)Kc.set(t.name,t.loader);else{if(!("icons"in t))throw P.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Xc.set(t.name,t.icons)}}},"registerIconPacks"),Qc=mt(async(e,t)=>{var r=w(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=Xc.get(t);if(!i){var n=Kc.get(t);if(!n)throw new Error("Icon set not found: "+r.prefix);try{i={...await n(),prefix:t},Xc.set(t,i)}catch(e){throw P.error(e),new Error("Failed to load icon set: "+r.prefix)}}if(n=ae(i,r.name))return n;throw new Error("Icon not found: "+e)},"getRegisteredIconData"),Jc=mt(async e=>{try{return await Qc(e),!0}catch{return!1}},"isIconAvailable"),eh=mt(async(e,t,r)=>{let i;try{i=await Qc(e,t?.fallbackPrefix)}catch(e){P.error(e),i=Hc}return t=Ce(be((e=me(i,t)).body),{...e.attributes,...r}),Rc(t,vr())},"getIconSVG")});function ih(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 nh,ah,sh,oh,lh,ch,hh,uh,dh,ph,gh,fh,mh,yh,vh,bh=r(()=>{mt(ih,"dedent")}),xh=r(()=>{nh=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,ah=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,sh=/\s*%%.*\n/gm}),Th=r(()=>{oh=class extends Error{static{mt(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}}}),kh=r(()=>{e(),xh(),Th(),lh={},ch=mt(function(e,t){e=e.replace(nh,"").replace(ah,"").replace(sh,`
|
||
`);for(var[r,{detector:i}]of Object.entries(lh))if(i(e,t))return r;throw new oh("No diagram type detected matching given configuration for text: "+e)},"detectType"),hh=mt((...e)=>{for(var{id:t,detector:r,loader:i}of e)uh(t,r,i)},"registerLazyLoadedDiagrams"),uh=mt((e,t,r)=>{lh[e]&&P.warn(`Detector with key ${e} already exists. Overwriting.`),lh[e]={detector:t,loader:r},P.debug(`Detector with key ${e} added`+(r?" with loader":""))},"addDetector"),dh=mt(e=>lh[e].loader,"getDiagramLoader")}),wh=r(()=>{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,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],b=[1,37],x=[1,38],T=[1,39],k=[1,40],w=[1,41],C=[1,42],S=[1,43],E=[1,44],_=[1,45],A=[1,46],R=[1,47],L=[1,48],I=[1,50],q=[1,51],j=[1,52],W=[1,53],U=[1,54],G=[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],P=[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:b,53:x,54:T,55:k,56:w,57:C,58:S,59:E,60:_,61:A,62:R,63:L,64:I,65:q,66:j,67:W,68:U,69:G,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:b,53:x,54:T,55:k,56:w,57:C,58:S,59:E,60:_,61:A,62:R,63:L,64:I,65:q,66:j,67:W,68:U,69:G,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:b,53:x,54:T,55:k,56:w,57:C,58:S,59:E,60:_,61:A,62:R,63:L,64:I,65:q,66:j,67:W,68:U,69:G,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:b,53:x,54:T,55:k,56:w,57:C,58:S,59:E,60:_,61:A,62:R,63:L,64:I,65:q,66:j,67:W,68:U,69:G,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:b,53:x,54:T,55:k,56:w,57:C,58:S,59:E,60:_,61:A,62:R,63:L,64:I,65:q,66:j,67:W,68:U,69:G,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:b,53:x,54:T,55:k,56:w,57:C,58:S,59:E,60:_,61:A,62:R,63:L,64:I,65:q,66:j,67:W,68:U,69:G,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(P,[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:b,53:x,54:T,55:k,56:w,57:C,58:S,59:E,60:_,61:A,62:R,63:L,64:I,65:q,66:j,67:W,68:U,69:G,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:b,53:x,54:T,55:k,56:w,57:C,58:S,59:E,60:_,61:A,62:R,63:L,64:I,65:q,66:j,67:W,68:U,69:G,70:V,71:Y,72:H,73:X,74:K}),e(J,[2,21]),e(J,[2,22]),e(P,[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(P,[2,40]),e(P,[2,41]),e(P,[2,42]),e(P,[2,43]),e(P,[2,44]),e(P,[2,45]),e(P,[2,46]),e(P,[2,47]),e(P,[2,48]),e(P,[2,49]),e(P,[2,50]),e(P,[2,51]),e(P,[2,52]),e(P,[2,53]),e(P,[2,54]),e(P,[2,55]),e(P,[2,56]),e(P,[2,57]),e(P,[2,58]),e(P,[2,60]),e(P,[2,61]),e(P,[2,62]),e(P,[2,63]),e(P,[2,64]),e(P,[2,65]),e(P,[2,66]),e(P,[2,67]),e(P,[2,68]),e(P,[2,69]),e(P,[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(P,[2,24]),e(P,[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="",c=0,h=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 b,x,T,k,w,C,S,E={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===b||"u"<typeof b)&&(b=v()),o[T]&&o[T][b]))||!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 "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,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: "+b);switch(k[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],E.$=a[a.length-C],E._$={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&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return S;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(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);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(B,"Parser"),(ph=new((B.prototype=t).Parser=B)).parser=ph,gh=ph}),Ch=r(()=>{e(),fh=mt(function(e,t){for(var r of t)e.attr(r[0],r[1])},"d3Attrs"),mh=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"),yh=mt(function(e,t,r,i){t=mh(t,r,i),fh(e,t)},"configureSvgSize"),vh=mt(function(e,t,r,i){var n=t.node().getBBox(),a=n.width,s=(P.info(`SVG bounds: ${a}x`+(s=n.height),n),P.info("Graph bounds: 0x0",e),P.info(`Calculated bounds: ${e=a+2*r}x`+(a=s+2*r)),yh(t,a,e,i),`${n.x-r} ${n.y-r} ${n.width+2*r} `+(n.height+2*r));t.attr("viewBox",s)},"setupGraphViewbox")});function Sh(e){return[...e.cssRules].map(e=>e.cssText).join(`
|
||
`)}var Eh,_h,Ah,Rh,Lh=r(()=>{e(),Eh={},mt(Sh,"cssStyleSheetToString"),_h=mt((e,t,r,i)=>{let n="";return e in Eh&&Eh[e]?n=Eh[e]({...r,svgId:i}):P.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"),Ah=mt((e,t)=>{void 0!==t&&(Eh[e]=t)},"addStylesForDiagram"),Rh=_h}),Ih={};Vat(Ih,{clear:()=>Ph,getAccDescription:()=>zh,getAccTitle:()=>$h,getDiagramTitle:()=>jh,setAccDescription:()=>Fh,setAccTitle:()=>Bh,setDiagramTitle:()=>qh});var Nh,Dh,Mh,Oh,Ph,Bh,$h,Fh,zh,qh,jh,Wh,Uh,B,Gh,Vh,Yh,Hh,Xh,Kh,Zh,Qh,Jh,eu,tu,ru,iu,nu,au,su,ou,lu,cu,hu,uu,du,pu,gu,fu,mu,yu,vu,bu,xu,Tu,ku,wu,Cu,Su,Eu,_u,Au,Ru,Lu,Iu,Nu,Du,Mu,Ou,Pu,Bu,$u,Fu,zu,qu,ju,Wu=r(()=>{th(),wi(),Mh=Dh=Nh="",Oh=mt(e=>Rc(e,vr()),"sanitizeText"),Ph=mt(()=>{Dh=Mh=Nh=""},"clear"),Bh=mt(e=>{Nh=Oh(e).replace(/^\s+/g,"")},"setAccTitle"),$h=mt(()=>Nh,"getAccTitle"),Fh=mt(e=>{Mh=Oh(e).replace(/\n\s+/g,`
|
||
`)},"setAccDescription"),zh=mt(()=>Mh,"getAccDescription"),qh=mt(e=>{Dh=Oh(e)},"setDiagramTitle"),jh=mt(()=>Dh,"getDiagramTitle")}),Uu=r(()=>{kh(),e(),wi(),th(),Ch(),Lh(),Wu(),Wh=P,Uh=Re,B=vr,Gh=yr,Vh=sr,Yh=mt(e=>Rc(e,B()),"sanitizeText"),Hh=vh,Xh=mt(()=>Ih,"getCommonDb"),Kh={},Zh=mt((e,t,r)=>{Kh[e]&&Wh.warn(`Diagram with id ${e} already registered. Overwriting.`),Kh[e]=t,r&&uh(e,r),Ah(e,t.styles),t.injectUtils?.(Wh,Uh,B,Yh,Hh,Xh(),()=>{})},"registerDiagram"),Qh=mt(e=>{if(e in Kh)return Kh[e];throw new Jh(e)},"getDiagram"),Jh=class extends Error{static{mt(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}}}),Gu=r(()=>{Uu(),th(),Wu(),eu=[],tu=[""],nu=[{alias:ru="global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:iu=""}],su="",ou=!(au=[]),lu=4,cu=2,uu=mt(function(){return hu},"getC4Type"),du=mt(function(e){hu=Rc(e,B())},"setC4Type"),pu=mt(function(r,i,n,a,s,o,l,c,h){if(null!=r&&null!=i&&null!=n&&null!=a){let e={},t=au.find(e=>e.from===i&&e.to===n);t?e=t:au.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 c?([a,o]=Object.entries(c)[0],e[a]=o):e.tags=c,"object"==typeof h?([s,r]=Object.entries(h)[0],e[s]=r):e.link=h,e.wrap=Pu()}},"addRel"),gu=mt(function(r,i,n,a,s,o,l){if(null!==i&&null!==n){let e={},t=eu.find(e=>e.alias===i);var c;t&&i===t.alias?e=t:(e.alias=i,eu.push(e)),e.label=null==n?{text:""}:{text:n},null==a?e.descr={text:""}:"object"==typeof a?([n,c]=Object.entries(a)[0],e[n]={text:c}):e.descr={text:a},"object"==typeof s?([n,c]=Object.entries(s)[0],e[n]=c):e.sprite=s,"object"==typeof o?([a,n]=Object.entries(o)[0],e[a]=n):e.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],e[c]=s):e.link=l,e.typeC4Shape={text:r},e.parentBoundary=ru,e.wrap=Pu()}},"addPersonOrSystem"),fu=mt(function(r,i,n,a,s,o,l,c){if(null!==i&&null!==n){let e={},t=eu.find(e=>e.alias===i);var h;t&&i===t.alias?e=t:(e.alias=i,eu.push(e)),e.label=null==n?{text:""}:{text:n},null==a?e.techn={text:""}:"object"==typeof a?([n,h]=Object.entries(a)[0],e[n]={text:h}):e.techn={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.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],e[h]=s):e.tags=l,"object"==typeof c?([a,n]=Object.entries(c)[0],e[a]=n):e.link=c,e.wrap=Pu(),e.typeC4Shape={text:r},e.parentBoundary=ru}},"addContainer"),mu=mt(function(r,i,n,a,s,o,l,c){if(null!==i&&null!==n){let e={},t=eu.find(e=>e.alias===i);var h;t&&i===t.alias?e=t:(e.alias=i,eu.push(e)),e.label=null==n?{text:""}:{text:n},null==a?e.techn={text:""}:"object"==typeof a?([n,h]=Object.entries(a)[0],e[n]={text:h}):e.techn={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.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],e[h]=s):e.tags=l,"object"==typeof c?([a,n]=Object.entries(c)[0],e[a]=n):e.link=c,e.wrap=Pu(),e.typeC4Shape={text:r},e.parentBoundary=ru}},"addComponent"),yu=mt(function(r,i,n,a,s){if(null!==r&&null!==i){let e={},t=nu.find(e=>e.alias===r);var o;t&&r===t.alias?e=t:(e.alias=r,nu.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=ru,e.wrap=Pu(),iu=ru,ru=r,tu.push(iu)}},"addPersonOrSystemBoundary"),vu=mt(function(r,i,n,a,s){if(null!==r&&null!==i){let e={},t=nu.find(e=>e.alias===r);var o;t&&r===t.alias?e=t:(e.alias=r,nu.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=ru,e.wrap=Pu(),iu=ru,ru=r,tu.push(iu)}},"addContainerBoundary"),bu=mt(function(r,i,n,a,s,e,o,l){if(null!==i&&null!==n){let e={},t=nu.find(e=>e.alias===i);var c;t&&i===t.alias?e=t:(e.alias=i,nu.push(e)),e.label=null==n?{text:""}:{text:n},null==a?e.type={text:"node"}:"object"==typeof a?([n,c]=Object.entries(a)[0],e[n]={text:c}):e.type={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.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],e[c]=s):e.link=l,e.nodeType=r,e.parentBoundary=ru,e.wrap=Pu(),iu=ru,ru=i,tu.push(iu)}},"addDeploymentNode"),xu=mt(function(){ru=iu,tu.pop(),iu=tu.pop(),tu.push(iu)},"popBoundaryParseStack"),Tu=mt(function(e,t,r,i,n,a,s,o,l,c,h){let u=eu.find(e=>e.alias===t);var d,p;void 0===u&&void 0===(u=nu.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!=c&&("object"==typeof c?([r,p]=Object.entries(c)[0],u[r]=p):u.legendText=c),null!=h&&("object"==typeof h?([s,n]=Object.entries(h)[0],u[s]=n):u.legendSprite=h))},"updateElStyle"),ku=mt(function(e,t,r,i,n,a,s){var o,l,c=au.find(e=>e.from===t&&e.to===r);void 0!==c&&(null!=i&&("object"==typeof i?([o,l]=Object.entries(i)[0],c[o]=l):c.textColor=i),null!=n&&("object"==typeof n?([o,l]=Object.entries(n)[0],c[o]=l):c.lineColor=n),null!=a&&("object"==typeof a?([i,o]=Object.entries(a)[0],c[i]=parseInt(o)):c.offsetX=parseInt(a)),null!=s)&&("object"==typeof s?([l,n]=Object.entries(s)[0],c[l]=parseInt(n)):c.offsetY=parseInt(s))},"updateRelStyle"),wu=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&&(lu=t),1<=i&&(cu=i)},"updateLayoutConfig"),Cu=mt(function(){return lu},"getC4ShapeInRow"),Su=mt(function(){return cu},"getC4BoundaryInRow"),Eu=mt(function(){return ru},"getCurrentBoundaryParse"),_u=mt(function(){return iu},"getParentBoundaryParse"),Au=mt(function(t){return null==t?eu:eu.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),Ru=mt(function(t){return eu.find(e=>e.alias===t)},"getC4Shape"),Lu=mt(function(e){return Object.keys(Au(e))},"getC4ShapeKeys"),Iu=mt(function(t){return null==t?nu:nu.filter(e=>e.parentBoundary===t)},"getBoundaries"),Nu=Iu,Du=mt(function(){return au},"getRels"),Mu=mt(function(){return su},"getTitle"),Ou=mt(function(e){ou=e},"setWrap"),Pu=mt(function(){return ou},"autoWrap"),Bu=mt(function(){eu=[],nu=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],ru="global",tu=[iu=""],tu=[su=""],ou=!(au=[]),lu=4,cu=2},"clear"),$u={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},Fu={FILLED:0,OPEN:1},zu={LEFTOF:0,RIGHTOF:1,OVER:2},qu=mt(function(e){su=Rc(e,B())},"setTitle"),ju={addPersonOrSystem:gu,addPersonOrSystemBoundary:yu,addContainer:fu,addContainerBoundary:vu,addComponent:mu,addDeploymentNode:bu,popBoundaryParseStack:xu,addRel:pu,updateElStyle:Tu,updateRelStyle:ku,updateLayoutConfig:wu,autoWrap:Pu,setWrap:Ou,getC4ShapeArray:Au,getC4Shape:Ru,getC4ShapeKeys:Lu,getBoundaries:Iu,getBoundarys:Nu,getCurrentBoundaryParse:Eu,getParentBoundaryParse:_u,getRels:Du,getTitle:Mu,getC4Type:uu,getC4ShapeInRow:Cu,getC4BoundaryInRow:Su,setAccTitle:Bh,getAccTitle:$h,getAccDescription:zh,setAccDescription:Fh,getConfig:mt(()=>B().c4,"getConfig"),clear:Bu,LINETYPE:$u,ARROWTYPE:Fu,PLACEMENT:zu,setTitle:qu,setC4Type:du}});function Vu(e,t){return null==e||null==t?NaN:e<t?-1:t<e?1:t<=e?0:NaN}var Yu=r(()=>{mt(Vu,"ascending")});function Hu(e,t){return null==e||null==t?NaN:t<e?-1:e<t?1:e<=t?0:NaN}var Xu=r(()=>{mt(Hu,"descending")});function Ku(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=Vu,s=mt((e,t)=>Vu(r(e),t),"compare2"),mt((e,t)=>r(e)-t,"delta")):(a=r===Vu||r===Hu?r:Zu,s=r),mt(o,"left"),mt(e,"right"),mt(t,"center"),{left:o,center:t,right:e}}function Zu(){return 0}var Qu=r(()=>{Yu(),Xu(),mt(Ku,"bisector"),mt(Zu,"zero")});function Ju(e){return null===e?NaN:+e}var ed,td,rd=r(()=>{mt(Ju,"number")}),id=r(()=>{Yu(),Qu(),rd(),ed=Ku(Vu).right,Ku(Ju).center,td=ed});function nd({_intern:e,_key:t},r){return t=t(r),e.has(t)?e.get(t):r}function ad({_intern:e,_key:t},r){return t=t(r),e.has(t)?e.get(t):(e.set(t,r),r)}function sd({_intern:e,_key:t},r){return t=t(r),e.has(t)&&(r=e.get(t),e.delete(t)),r}function od(e){return null!==e&&"object"==typeof e?e.valueOf():e}var ld,cd=r(()=>{ld=class extends Map{static{mt(this,"InternMap")}constructor(e,t=od){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(nd(this,e))}has(e){return super.has(nd(this,e))}set(e,t){return super.set(ad(this,e),t)}delete(e){return super.delete(sd(this,e))}},mt(nd,"intern_get"),mt(ad,"intern_set"),mt(sd,"intern_delete"),mt(od,"keyof")});function hd(e,t,r){let i=(t-e)/Math.max(0,r),n=Math.floor(Math.log10(i)),a=i/Math.pow(10,n),s=gd<=a?10:fd<=a?5:md<=a?2:1,o,l,c;return n<0?(c=Math.pow(10,-n)/s,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*s,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=r&&r<2?hd(e,t,2*r):[o,l,c]}function ud(e,t,r){if(!(0<(r=+r)))return[];if((e=+e)==(t=+t))return[e];var i=t<e,[n,a,s]=i?hd(t,e,r):hd(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 dd(e,t,r){return hd(e=+e,t=+t,r=+r)[2]}function pd(e,t,r){r=+r;var i=(t=+t)<(e=+e);return(i?-1:1)*((e=i?dd(t,e,r):dd(e,t,r))<0?1/-e:e)}var gd,fd,md,yd=r(()=>{gd=Math.sqrt(50),fd=Math.sqrt(10),md=Math.sqrt(2),mt(hd,"tickSpec"),mt(ud,"ticks"),mt(dd,"tickIncrement"),mt(pd,"tickStep")});function vd(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=r(()=>{mt(vd,"max")});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 Td=r(()=>{mt(xd,"min")});function kd(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 wd=r(()=>{mt(kd,"range")}),Cd=r(()=>{id(),Qu(),bd(),Td(),wd(),yd(),cd()});function Sd(e){return e}var Ed=r(()=>{mt(Sd,"default")});function _d(e){return"translate("+e+",0)"}function Ad(e){return"translate(0,"+e+")"}function Rd(t){return e=>+t(e)}function Ld(t,r){return r=Math.max(0,t.bandwidth()-2*r)/2,t.round()&&(r=Math.round(r)),e=>+t(e)+r}function Id(){return!this.__axis}function Nd(p,g){var f=[],m=null,y=null,v=6,b=6,x=3,T=typeof window<"u"&&1<window.devicePixelRatio?0:.5,k=p===Od||4===p?-1:1,w=4===p||2===p?"x":"y",C=p===Od||p===Pd?_d:Ad;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)+x,n=+(a=g.range())[0]+T,a=+a[a.length-1]+T,s=(g.bandwidth?Ld:Rd)(g.copy(),T),o=e.selection?e.selection():e,l=o.selectAll(".domain").data([null]),c=(t=o.selectAll(".tick").data(t,g).order()).exit(),h=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(h),u=u.merge(h.append("line").attr("stroke","currentColor").attr(w+"2",k*v)),d=d.merge(h.append("text").attr("fill","currentColor").attr(w,k*i).attr("dy",p===Od?"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),c=c.transition(e).attr("opacity",1e-6).attr("transform",function(e){return isFinite(e=s(e))?C(e+T):this.getAttribute("transform")}),h.attr("opacity",1e-6).attr("transform",function(e){var t=this.parentNode.__axis;return C((t&&isFinite(t=t(e))?t:s(e))+T)})),c.remove(),l.attr("d",4===p||2===p?b?"M"+k*b+","+n+"H"+T+"V"+a+"H"+k*b:"M"+T+","+n+"V"+a:b?"M"+n+","+k*b+"V"+T+"H"+a+"V"+k*b:"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(Id).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=b=+e,t):v},t.tickSizeInner=function(e){return arguments.length?(v=+e,t):v},t.tickSizeOuter=function(e){return arguments.length?(b=+e,t):b},t.tickPadding=function(e){return arguments.length?(x=+e,t):x},t.offset=function(e){return arguments.length?(T=+e,t):T},t}function Dd(e){return Nd(Od,e)}function Md(e){return Nd(Pd,e)}var Od,Pd,Bd=r(()=>{Ed(),Od=1,Pd=3,mt(_d,"translateX"),mt(Ad,"translateY"),mt(Rd,"number"),mt(Ld,"center"),mt(Id,"entering"),mt(Nd,"axis"),mt(Dd,"axisTop"),mt(Md,"axisBottom")}),$d=r(()=>{Bd()});function Fd(){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 zd(i)}function zd(e){this._=e}function qd(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 jd(e,t){for(var r,i=0,n=e.length;i<n;++i)if((r=e[i]).name===t)return r.value}function Wd(e,t,r){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=Ud,e=e.slice(0,i).concat(e.slice(i+1));break}return null!=r&&e.push({name:t,value:r}),e}var Ud,Gd,Vd,Yd,Hd=r(()=>{Ud={value:mt(()=>{},"value")},mt(Fd,"dispatch"),mt(zd,"Dispatch"),mt(qd,"parseTypenames"),zd.prototype=Fd.prototype={constructor:zd,on:mt(function(e,t){var r,i=this._,n=qd(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]=Wd(i[r],e.name,t);else if(null==t)for(r in i)i[r]=Wd(i[r],e.name,null);return this}for(;++a<s;)if(r=(r=(e=n[a]).type)&&jd(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 zd(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(jd,"get"),mt(Wd,"set"),Gd=Fd}),Xd=r(()=>{Hd()}),Kd=r(()=>{Yd={svg:"http://www.w3.org/2000/svg",xhtml:Vd="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 Zd(e){var t=e+="",r=t.indexOf(":");return 0<=r&&"xmlns"!==(t=e.slice(0,r))&&(e=e.slice(r+1)),Yd.hasOwnProperty(t)?{space:Yd[t],local:e}:e}var Qd=r(()=>{Kd(),mt(Zd,"default")});function Jd(r){return function(){var e=this.ownerDocument,t=this.namespaceURI;return t===Vd&&e.documentElement.namespaceURI===Vd?e.createElement(r):e.createElementNS(t,r)}}function ep(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function tp(e){return((e=Zd(e)).local?ep:Jd)(e)}var rp=r(()=>{Qd(),Kd(),mt(Jd,"creatorInherit"),mt(ep,"creatorFixed"),mt(tp,"default")});function ip(){}function np(e){return null==e?ip:function(){return this.querySelector(e)}}var ap=r(()=>{mt(ip,"none"),mt(np,"default")});function sp(e){"function"!=typeof e&&(e=np(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,c=i[n]=new Array(l),h=0;h<l;++h)(a=o[h])&&(s=e.call(a,a.__data__,h,o))&&("__data__"in a&&(s.__data__=a.__data__),c[h]=s);return new Dg(i,this._parents)}var op=r(()=>{$g(),ap(),mt(sp,"default")});function lp(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}var cp=r(()=>{mt(lp,"array")});function hp(){return[]}function up(e){return null==e?hp:function(){return this.querySelectorAll(e)}}var dp=r(()=>{mt(hp,"empty"),mt(up,"default")});function pp(e){return function(){return lp(e.apply(this,arguments))}}function gp(e){e=("function"==typeof e?pp:up)(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,c=0;c<l;++c)(s=o[c])&&(i.push(e.call(s,s.__data__,c,o)),n.push(s));return new Dg(i,n)}var fp=r(()=>{$g(),cp(),dp(),mt(pp,"arrayAll"),mt(gp,"default")});function mp(e){return function(){return this.matches(e)}}function yp(t){return function(e){return e.matches(t)}}var vp=r(()=>{mt(mp,"default"),mt(yp,"childMatcher")});function bp(e){return function(){return kp.call(this.children,e)}}function xp(){return this.firstElementChild}function Tp(e){return this.select(null==e?xp:bp("function"==typeof e?e:yp(e)))}var kp,wp=r(()=>{vp(),kp=Array.prototype.find,mt(bp,"childFind"),mt(xp,"childFirst"),mt(Tp,"default")});function Cp(){return Array.from(this.children)}function Sp(e){return function(){return _p.call(this.children,e)}}function Ep(e){return this.selectAll(null==e?Cp:Sp("function"==typeof e?e:yp(e)))}var _p,Ap=r(()=>{vp(),_p=Array.prototype.filter,mt(Cp,"children"),mt(Sp,"childrenFilter"),mt(Ep,"default")});function Rp(e){"function"!=typeof e&&(e=mp(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]=[],c=0;c<o;++c)(a=s[c])&&e.call(a,a.__data__,c,s)&&l.push(a);return new Dg(i,this._parents)}var Lp=r(()=>{$g(),vp(),mt(Rp,"default")});function Ip(e){return new Array(e.length)}var Np=r(()=>{mt(Ip,"default")});function Dp(){return new Dg(this._enter||this._groups.map(Ip),this._parents)}function Mp(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var Op=r(()=>{Np(),$g(),mt(Dp,"default"),mt(Mp,"EnterNode"),Mp.prototype={constructor:Mp,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 Bp=r(()=>{mt(Pp,"default")});function $p(e,t,r,i,n,a){for(var s,o=0,l=t.length,c=a.length;o<c;++o)(s=t[o])?(s.__data__=a[o],i[o]=s):r[o]=new Mp(e,a[o]);for(;o<l;++o)(s=t[o])&&(n[o]=s)}function Fp(e,t,r,i,n,a,s){for(var o,l,c=new Map,h=t.length,u=a.length,d=new Array(h),p=0;p<h;++p)(o=t[p])&&(d[p]=l=s.call(o,o.__data__,p,t)+"",c.has(l)?n[p]=o:c.set(l,o));for(p=0;p<u;++p)l=s.call(e,a[p],p,a)+"",(o=c.get(l))?((i[p]=o).__data__=a[p],c.delete(l)):r[p]=new Mp(e,a[p]);for(p=0;p<h;++p)(o=t[p])&&c.get(d[p])===o&&(n[p]=o)}function zp(e){return e.__data__}function qp(e,t){if(!arguments.length)return Array.from(this,zp);var r=t?Fp:$p,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),c=0;c<a;++c){var h=i[c],u=n[c],d=u.length,p=jp(e.call(h,h&&h.__data__,c,i)),g=p.length,f=o[c]=new Array(g),m=s[c]=new Array(g);r(h,u,f,m,l[c]=new Array(d),p,t);for(var y,v,b=0,x=0;b<g;++b)if(y=f[b]){for(x<=b&&(x=b+1);!(v=m[x])&&++x<g;);y._next=v||null}}return(s=new Dg(s,i))._enter=o,s._exit=l,s}function jp(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}var Wp=r(()=>{$g(),Op(),Bp(),mt($p,"bindIndex"),mt(Fp,"bindKey"),mt(zp,"datum"),mt(qp,"default"),mt(jp,"arraylike")});function Up(){return new Dg(this._exit||this._groups.map(Ip),this._parents)}var Gp=r(()=>{Np(),$g(),mt(Up,"default")});function Vp(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 Yp=r(()=>{mt(Vp,"default")});function Hp(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],c=r[s],h=l.length,u=a[s]=new Array(h),d=0;d<h;++d)(o=l[d]||c[d])&&(u[d]=o);for(;s<i;++s)a[s]=t[s];return new Dg(a,this._parents)}var Xp=r(()=>{$g(),mt(Hp,"default")});function Kp(){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 Zp=r(()=>{mt(Kp,"default")});function Qp(r){function e(e,t){return e&&t?r(e.__data__,t.__data__):!e-!t}r=r||Jp,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,c=n[a]=new Array(l),h=0;h<l;++h)(s=o[h])&&(c[h]=s);c.sort(e)}return new Dg(n,this._parents).order()}function Jp(e,t){return e<t?-1:t<e?1:t<=e?0:NaN}var e0=r(()=>{$g(),mt(Qp,"default"),mt(Jp,"ascending")});function t0(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var r0=r(()=>{mt(t0,"default")});function i0(){return Array.from(this)}var n0=r(()=>{mt(i0,"default")});function a0(){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 s0=r(()=>{mt(a0,"default")});function o0(){let e=0;for(var t of this)++e;return e}var l0=r(()=>{mt(o0,"default")});function c0(){return!this.node()}var h0=r(()=>{mt(c0,"default")});function u0(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 d0=r(()=>{mt(u0,"default")});function p0(e){return function(){this.removeAttribute(e)}}function g0(e){return function(){this.removeAttributeNS(e.space,e.local)}}function f0(e,t){return function(){this.setAttribute(e,t)}}function m0(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function y0(t,r){return function(){var e=r.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function v0(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=Zd(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?g0:p0:"function"==typeof t?e.local?v0:y0:e.local?m0:f0)(e,t))}var x0=r(()=>{Qd(),mt(p0,"attrRemove"),mt(g0,"attrRemoveNS"),mt(f0,"attrConstant"),mt(m0,"attrConstantNS"),mt(y0,"attrFunction"),mt(v0,"attrFunctionNS"),mt(b0,"default")});function T0(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var k0=r(()=>{mt(T0,"default")});function w0(e){return function(){this.style.removeProperty(e)}}function C0(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 E0(e,t,r){return 1<arguments.length?this.each((null==t?w0:"function"==typeof t?S0:C0)(e,t,r??"")):_0(this.node(),e)}function _0(e,t){return e.style.getPropertyValue(t)||T0(e).getComputedStyle(e,null).getPropertyValue(t)}var A0=r(()=>{k0(),mt(w0,"styleRemove"),mt(C0,"styleConstant"),mt(S0,"styleFunction"),mt(E0,"default"),mt(_0,"styleValue")});function R0(e){return function(){delete this[e]}}function L0(e,t){return function(){this[e]=t}}function I0(t,r){return function(){var e=r.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function N0(e,t){return 1<arguments.length?this.each((null==t?R0:"function"==typeof t?I0:L0)(e,t)):this.node()[e]}var D0=r(()=>{mt(R0,"propertyRemove"),mt(L0,"propertyConstant"),mt(I0,"propertyFunction"),mt(N0,"default")});function M0(e){return e.trim().split(/^|\s+/)}function O0(e){return e.classList||new P0(e)}function P0(e){this._node=e,this._names=M0(e.getAttribute("class")||"")}function B0(e,t){for(var r=O0(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function $0(e,t){for(var r=O0(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function F0(e){return function(){B0(this,e)}}function z0(e){return function(){$0(this,e)}}function q0(e,t){return function(){(t.apply(this,arguments)?B0:$0)(this,e)}}function j0(e,t){var r=M0(e+"");if(arguments.length<2){for(var i=O0(this.node()),n=-1,a=r.length;++n<a;)if(!i.contains(r[n]))return!1;return!0}return this.each(("function"==typeof t?q0:t?F0:z0)(r,t))}var W0=r(()=>{mt(M0,"classArray"),mt(O0,"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(B0,"classedAdd"),mt($0,"classedRemove"),mt(F0,"classedTrue"),mt(z0,"classedFalse"),mt(q0,"classedFunction"),mt(j0,"default")});function U0(){this.textContent=""}function G0(e){return function(){this.textContent=e}}function V0(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Y0(e){return arguments.length?this.each(null==e?U0:("function"==typeof e?V0:G0)(e)):this.node().textContent}var H0=r(()=>{mt(U0,"textRemove"),mt(G0,"textConstant"),mt(V0,"textFunction"),mt(Y0,"default")});function X0(){this.innerHTML=""}function K0(e){return function(){this.innerHTML=e}}function Z0(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Q0(e){return arguments.length?this.each(null==e?X0:("function"==typeof e?Z0:K0)(e)):this.node().innerHTML}var J0=r(()=>{mt(X0,"htmlRemove"),mt(K0,"htmlConstant"),mt(Z0,"htmlFunction"),mt(Q0,"default")});function eg(){this.nextSibling&&this.parentNode.appendChild(this)}function tg(){return this.each(eg)}var rg=r(()=>{mt(eg,"raise"),mt(tg,"default")});function ig(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ng(){return this.each(ig)}var ag=r(()=>{mt(ig,"lower"),mt(ng,"default")});function sg(e){var t="function"==typeof e?e:tp(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var og=r(()=>{rp(),mt(sg,"default")});function lg(){return null}function cg(e,t){var r="function"==typeof e?e:tp(e),i=null==t?lg:"function"==typeof t?t:np(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}var hg=r(()=>{rp(),ap(),mt(lg,"constantNull"),mt(cg,"default")});function ug(){var e=this.parentNode;e&&e.removeChild(this)}function dg(){return this.each(ug)}var pg=r(()=>{mt(ug,"remove"),mt(dg,"default")});function gg(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function fg(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function mg(e){return this.select(e?fg:gg)}var yg=r(()=>{mt(gg,"selection_cloneShallow"),mt(fg,"selection_cloneDeep"),mt(mg,"default")});function vg(e){return arguments.length?this.property("__data__",e):this.node().__data__}var bg=r(()=>{mt(vg,"default")});function xg(t){return function(e){t.call(this,e,this.__data__)}}function Tg(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 kg(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 wg(a,s,o){return function(){var e,t=this.__on,r=xg(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 Cg(e,t,r){var i,n,a=Tg(e+""),s=a.length;if(!(arguments.length<2)){for(o=t?wg:kg,i=0;i<s;++i)this.each(o(a[i],t,r));return this}var o=this.node().__on;if(o)for(var l,c=0,h=o.length;c<h;++c)for(i=0,l=o[c];i<s;++i)if((n=a[i]).type===l.type&&n.name===l.name)return l.value}var Sg=r(()=>{mt(xg,"contextListener"),mt(Tg,"parseTypenames"),mt(kg,"onRemove"),mt(wg,"onAdd"),mt(Cg,"default")});function Eg(e,t,r){var i=T0(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 _g(e,t){return function(){return Eg(this,e,t)}}function Ag(e,t){return function(){return Eg(this,e,t.apply(this,arguments))}}function Rg(e,t){return this.each(("function"==typeof t?Ag:_g)(e,t))}var Lg=r(()=>{k0(),mt(Eg,"dispatchEvent"),mt(_g,"dispatchConstant"),mt(Ag,"dispatchFunction"),mt(Rg,"default")});function*Ig(){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 Ng=r(()=>{mt(Ig,"default")});function Dg(e,t){this._groups=e,this._parents=t}function Mg(){return new Dg([[document.documentElement]],Pg)}function Og(){return this}var Pg,Bg,$g=r(()=>{op(),fp(),wp(),Ap(),Lp(),Wp(),Op(),Gp(),Yp(),Xp(),Zp(),e0(),r0(),n0(),s0(),l0(),h0(),d0(),x0(),A0(),D0(),W0(),H0(),J0(),rg(),ag(),og(),hg(),pg(),yg(),bg(),Sg(),Lg(),Ng(),Pg=[null],mt(Dg,"Selection"),mt(Mg,"selection"),mt(Og,"selection_selection"),Dg.prototype=Mg.prototype={constructor:Dg,select:sp,selectAll:gp,selectChild:Tp,selectChildren:Ep,filter:Rp,data:qp,enter:Dp,exit:Up,join:Vp,merge:Hp,selection:Og,order:Kp,sort:Qp,call:t0,nodes:i0,node:a0,size:o0,empty:c0,each:u0,attr:b0,style:E0,property:N0,classed:j0,text:Y0,html:Q0,raise:tg,lower:ng,append:sg,insert:cg,remove:dg,clone:mg,datum:vg,on:Cg,dispatch:Rg,[Symbol.iterator]:Ig},Bg=Mg});function Q(e){return"string"==typeof e?new Dg([[document.querySelector(e)]],[document.documentElement]):new Dg([[e]],Pg)}var Fg=r(()=>{$g(),mt(Q,"default")}),zg=r(()=>{vp(),Qd(),Fg(),$g(),ap(),dp(),A0()}),qg=r(()=>{});function jg(e,t,r){(e.prototype=t.prototype=r).constructor=e}function Wg(e,t){var r,i=Object.create(e.prototype);for(r in t)i[r]=t[r];return i}var Ug=r(()=>{mt(jg,"default"),mt(Wg,"extend")});function Gg(){}function Vg(){return this.rgb().formatHex()}function Yg(){return this.rgb().formatHex8()}function Hg(){return hf(this).formatHsl()}function Xg(){return this.rgb().formatRgb()}function Kg(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=bf.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Zg(t):3===r?new tf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Qg(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Qg(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=xf.exec(e))?new tf(t[1],t[2],t[3],1):(t=Tf.exec(e))?new tf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=kf.exec(e))?Qg(t[1],t[2],t[3],t[4]):(t=wf.exec(e))?Qg(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Cf.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]):Ef.hasOwnProperty(e)?Zg(Ef[e]):"transparent"===e?new tf(NaN,NaN,NaN,0):null}function Zg(e){return new tf(e>>16&255,e>>8&255,255&e,1)}function Qg(e,t,r,i){return new tf(e=i<=0?t=r=NaN:e,t,r,i)}function Jg(e){return(e=e instanceof Gg?e:Kg(e))?new tf((e=e.rgb()).r,e.g,e.b,e.opacity):new tf}function ef(e,t,r,i){return 1===arguments.length?Jg(e):new tf(e,t,r,i??1)}function tf(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}function rf(){return"#"+lf(this.r)+lf(this.g)+lf(this.b)}function nf(){return"#"+lf(this.r)+lf(this.g)+lf(this.b)+lf(255*(isNaN(this.opacity)?1:this.opacity))}function af(){var e=sf(this.opacity);return(1===e?"rgb(":"rgba(")+of(this.r)+`, ${of(this.g)}, `+of(this.b)+(1===e?")":`, ${e})`)}function sf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function of(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function lf(e){return((e=of(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 df(e,t,r,i)}function hf(e){var t,r,i,n,a,s,o,l;return e instanceof df?new df(e.h,e.s,e.l,e.opacity):(e=e instanceof Gg?e:Kg(e))?e instanceof df?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 df(s,o,l,e.opacity)):new df}function uf(e,t,r,i){return 1===arguments.length?hf(e):new df(e,t,r,i??1)}function df(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}function pf(e){return(e=(e||0)%360)<0?e+360:e}function gf(e){return Math.max(0,Math.min(1,e||0))}function ff(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 mf,yf,vf,bf,xf,Tf,kf,wf,Cf,Sf,Ef,_f,Af,Rf=r(()=>{Ug(),mt(Gg,"Color"),mf="\\s*([+-]?\\d+)\\s*",yf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",vf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",bf=/^#([0-9a-f]{3,8})$/,xf=new RegExp(`^rgb\\(${mf},${mf},${mf}\\)$`),Tf=new RegExp(`^rgb\\(${vf},${vf},${vf}\\)$`),kf=new RegExp(`^rgba\\(${mf},${mf},${mf},${yf}\\)$`),wf=new RegExp(`^rgba\\(${vf},${vf},${vf},${yf}\\)$`),Cf=new RegExp(`^hsl\\(${yf},${vf},${vf}\\)$`),Sf=new RegExp(`^hsla\\(${yf},${vf},${vf},${yf}\\)$`),Ef={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},jg(Gg,Kg,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Vg,formatHex:Vg,formatHex8:Yg,formatHsl:Hg,formatRgb:Xg,toString:Xg}),mt(Vg,"color_formatHex"),mt(Yg,"color_formatHex8"),mt(Hg,"color_formatHsl"),mt(Xg,"color_formatRgb"),mt(Kg,"color"),mt(Zg,"rgbn"),mt(Qg,"rgba"),mt(Jg,"rgbConvert"),mt(ef,"rgb"),mt(tf,"Rgb"),jg(tf,ef,Wg(Gg,{brighter(e){return e=null==e?1/.7:Math.pow(1/.7,e),new tf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new tf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new tf(of(this.r),of(this.g),of(this.b),sf(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:rf,formatHex:rf,formatHex8:nf,formatRgb:af,toString:af})),mt(rf,"rgb_formatHex"),mt(nf,"rgb_formatHex8"),mt(af,"rgb_formatRgb"),mt(sf,"clampa"),mt(of,"clampi"),mt(lf,"hex"),mt(cf,"hsla"),mt(hf,"hslConvert"),mt(uf,"hsl"),mt(df,"Hsl"),jg(df,uf,Wg(Gg,{brighter(e){return e=null==e?1/.7:Math.pow(1/.7,e),new df(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new df(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 tf(ff(240<=e?e-240:120+e,r=2*r-(t=r+(r<.5?r:1-r)*t),t),ff(e,r,t),ff(e<120?240+e:e-120,r,t),this.opacity)},clamp(){return new df(pf(this.h),gf(this.s),gf(this.l),sf(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=sf(this.opacity);return(1===e?"hsl(":"hsla(")+pf(this.h)+`, ${100*gf(this.s)}%, ${100*gf(this.l)}%`+(1===e?")":`, ${e})`)}})),mt(pf,"clamph"),mt(gf,"clampt"),mt(ff,"hsl2rgb")}),Lf=r(()=>{_f=Math.PI/180,Af=180/Math.PI});function If(e){var t,r,i,n,a,s;return e instanceof Df?new Df(e.l,e.a,e.b,e.opacity):e instanceof zf?qf(e):(n=Mf(.2225045*(t=Bf((e=e instanceof tf?e:Jg(e)).r))+.7168786*(r=Bf(e.g))+.0606169*(i=Bf(e.b))),t===r&&r===i?a=s=n:(a=Mf((.4360747*t+.3850649*r+.1430804*i)/.96422),s=Mf((.0139322*t+.0971045*r+.7141733*i)/.82521)),new Df(116*n-16,500*(a-n),200*(n-s),e.opacity))}function Nf(e,t,r,i){return 1===arguments.length?If(e):new Df(e,t,r,i??1)}function Df(e,t,r,i){this.l=+e,this.a=+t,this.b=+r,this.opacity=+i}function Mf(e){return Gf<e?Math.pow(e,1/3):e/Uf+jf}function Of(e){return Wf<e?e*e*e:Uf*(e-jf)}function Pf(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Bf(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function $f(e){var t;return e instanceof zf?new zf(e.h,e.c,e.l,e.opacity):0===(e=e instanceof Df?e:If(e)).a&&0===e.b?new zf(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity):new zf((t=Math.atan2(e.b,e.a)*Af)<0?360+t:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Ff(e,t,r,i){return 1===arguments.length?$f(e):new zf(e,t,r,i??1)}function zf(e,t,r,i){this.h=+e,this.c=+t,this.l=+r,this.opacity=+i}function qf(e){var t;return isNaN(e.h)?new Df(e.l,0,0,e.opacity):(t=e.h*_f,new Df(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity))}var jf,Wf,Uf,Gf,Vf=r(()=>{Ug(),Rf(),Lf(),jf=4/29,Uf=3*(Wf=6/29)*Wf,Gf=Wf*Wf*Wf,mt(If,"labConvert"),mt(Nf,"lab"),mt(Df,"Lab"),jg(Df,Nf,Wg(Gg,{brighter(e){return new Df(this.l+18*(e??1),this.a,this.b,this.opacity)},darker(e){return new Df(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 tf(Pf(3.1338561*(t=.96422*Of(t))-1.6168667*(e=+Of(e))-.4906146*(r=.82521*Of(r))),Pf(-.9787684*t+1.9161415*e+.033454*r),Pf(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),mt(Mf,"xyz2lab"),mt(Of,"lab2xyz"),mt(Pf,"lrgb2rgb"),mt(Bf,"rgb2lrgb"),mt($f,"hclConvert"),mt(Ff,"hcl"),mt(zf,"Hcl"),mt(qf,"hcl2lab"),jg(zf,Ff,Wg(Gg,{brighter(e){return new zf(this.h,this.c,this.l+18*(e??1),this.opacity)},darker(e){return new zf(this.h,this.c,this.l-18*(e??1),this.opacity)},rgb(){return qf(this).rgb()}}))}),Yf=r(()=>{Rf(),Vf()});function Hf(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 Xf(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 Hf((e-t/o)*o,n,r,i,a)}}var Kf=r(()=>{mt(Hf,"basis"),mt(Xf,"default")});function Zf(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 Hf((e-t/n)*n,r,i[t%n],i[(t+1)%n],i[(t+2)%n])}}var Qf,Jf=r(()=>{Kf(),mt(Zf,"default")}),e1=r(()=>{Qf=mt(e=>()=>e,"default")});function t1(t,r){return function(e){return t+e*r}}function r1(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 i1(e,t){var r=t-e;return r?t1(e,180<r||r<-180?r-360*Math.round(r/360):r):Qf(isNaN(e)?t:e)}function n1(r){return 1==(r=+r)?a1:function(e,t){return t-e?r1(e,t,r):Qf(isNaN(e)?t:e)}}function a1(e,t){var r=t-e;return r?t1(e,r):Qf(isNaN(e)?t:e)}var s1=r(()=>{e1(),mt(t1,"linear"),mt(r1,"exponential"),mt(i1,"hue"),mt(n1,"gamma"),mt(a1,"nogamma")});function o1(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=ef(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 l1,c1=r(()=>{Yf(),Kf(),Jf(),s1(),l1=mt(function e(t){var s=n1(t);function r(t,e){var r=s((t=ef(t)).r,(e=ef(e)).r),i=s(t.g,e.g),n=s(t.b,e.b),a=a1(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(o1,"rgbSpline"),o1(Xf),o1(Zf)});function h1(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 u1(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var d1=r(()=>{mt(h1,"default"),mt(u1,"isNumberArray")});function p1(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]=_1(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 g1=r(()=>{A1(),mt(p1,"genericArray")});function f1(t,r){var i=new Date;return t=+t,r=+r,function(e){return i.setTime(t*(1-e)+r*e),i}}var m1=r(()=>{mt(f1,"default")});function y1(t,r){return t=+t,r=+r,function(e){return t*(1-e)+r*e}}var v1=r(()=>{mt(y1,"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]=_1(e[r],t[r]):n[r]=t[r];return function(e){for(r in i)n[r]=i[r](e);return n}}var x1=r(()=>{A1(),mt(b1,"default")});function T1(e){return function(){return e}}function k1(t){return function(e){return t(e)+""}}function w1(e,i){var t,r,n,a=C1.lastIndex=S1.lastIndex=0,s=-1,o=[],l=[];for(e+="",i+="";(t=C1.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:y1(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]?k1(l[0].x):T1(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 C1,S1,E1=r(()=>{v1(),C1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,S1=new RegExp(C1.source,"g"),mt(T1,"zero"),mt(k1,"one"),mt(w1,"default")});function _1(e,t){var r=typeof t;return null==t||"boolean"==r?Qf(t):("number"==r?y1:"string"==r?(r=Kg(t))?(t=r,l1):w1:t instanceof Kg?l1:t instanceof Date?f1:u1(t)?h1:Array.isArray(t)?p1:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?b1:y1)(e,t)}var A1=r(()=>{Yf(),c1(),g1(),m1(),v1(),x1(),E1(),e1(),d1(),mt(_1,"default")});function R1(t,r){return t=+t,r=+r,function(e){return Math.round(t*(1-e)+r*e)}}var L1=r(()=>{mt(R1,"default")});function I1(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)*N1,skewX:Math.atan(l)*N1,scaleX:s,scaleY:o}}var N1,D1,M1=r(()=>{N1=180/Math.PI,D1={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},mt(I1,"default")});function O1(e){return(e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"")).isIdentity?D1:I1(e.a,e.b,e.c,e.d,e.e,e.f)}function P1(e){return null!=e&&((B1=B1||document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("transform",e),e=B1.transform.baseVal.consolidate())?I1((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):D1}var B1,$1=r(()=>{M1(),mt(O1,"parseCss"),mt(P1,"parseSvg")});function F1(r,o,l,n){function c(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:y1(e,r)},{i:s-2,x:y1(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(c(r)+"rotate(",null,n)-2,x:y1(e,t)})):t&&r.push(c(r)+"rotate("+t+n)}function h(e,t,r,i){e!==t?i.push({i:r.push(c(r)+"skewX(",null,n)-2,x:y1(e,t)}):t&&r.push(c(r)+"skewX("+t+n)}function u(e,t,r,i,n,a){var s;e!==r||t!==i?(s=n.push(c(n)+"scale(",null,",",null,")"),a.push({i:s-4,x:y1(e,r)},{i:s-2,x:y1(t,i)})):1===r&&1===i||n.push(c(n)+"scale("+r+","+i+")")}return mt(c,"pop"),mt(i,"translate"),mt(s,"rotate"),mt(h,"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),h(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 z1,q1,j1=r(()=>{v1(),$1(),mt(F1,"interpolateTransform"),z1=F1(O1,"px, ","px)","deg)"),q1=F1(P1,", ",")",")")});function W1(s){return function(t,e){var r=s((t=Ff(t)).h,(e=Ff(e)).h),i=a1(t.c,e.c),n=a1(t.l,e.l),a=a1(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 U1,G1=r(()=>{Yf(),s1(),mt(W1,"hcl"),U1=W1(i1),W1(a1)}),V1=r(()=>{A1(),v1(),L1(),E1(),j1(),c1(),G1()});function Y1(){return cm||(dm(H1),cm=um.now()+hm)}function H1(){cm=0}function X1(){this._call=this._time=this._next=null}function K1(e,t,r){var i=new X1;return i.restart(e,t,r),i}function Z1(){Y1(),++rm;for(var e,t=sm;t;)0<=(e=cm-t._time)&&t._call.call(void 0,e),t=t._next;--rm}function Q1(){cm=(lm=um.now())+hm,rm=im=0;try{Z1()}finally{rm=0,em(),cm=0}}function J1(){var e=um.now(),t=e-lm;am<t&&(hm-=t,lm=e)}function em(){for(var e,t,r=sm,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:sm=t);om=e,tm(i)}function tm(e){rm||(im=im&&clearTimeout(im),24<e-cm?(e<1/0&&(im=setTimeout(Q1,e-um.now()-hm)),nm=nm&&clearInterval(nm)):(nm||(lm=um.now(),nm=setInterval(J1,am)),rm=1,dm(Q1)))}var rm,im,nm,am,sm,om,lm,cm,hm,um,dm,pm=r(()=>{am=1e3,hm=cm=lm=nm=im=rm=0,um="object"==typeof performance&&performance.now?performance:Date,dm="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)},mt(Y1,"now"),mt(H1,"clearNow"),mt(X1,"Timer"),X1.prototype=K1.prototype={constructor:X1,restart:mt(function(e,t,r){if("function"!=typeof e)throw new TypeError("callback is not a function");r=(null==r?Y1():+r)+(null==t?0:+t),this._next||om===this||(om?om._next=this:sm=this,om=this),this._call=e,this._time=r,tm()},"restart"),stop:mt(function(){this._call&&(this._call=null,this._time=1/0,tm())},"stop")},mt(K1,"timer"),mt(Z1,"timerFlush"),mt(Q1,"wake"),mt(J1,"poke"),mt(em,"nap"),mt(tm,"sleep")});function gm(t,r,e){var i=new X1;return r=null==r?0:+r,i.restart(e=>{i.stop(),t(e+r)},r,e),i}var fm=r(()=>{pm(),mt(gm,"default")}),mm=r(()=>{pm(),fm()});function ym(e,t,r,i,n,a){var s=e.__transition;if(s){if(r in s)return}else e.__transition={};Tm(e,r,{name:t,index:i,group:n,on:km,tween:wm,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Cm})}function vm(e,t){if((e=xm(e,t)).state>Cm)throw new Error("too late; already scheduled");return e}function bm(e,t){if((e=xm(e,t)).state>_m)throw new Error("too late; already running");return e}function xm(e,t){if(e=(e=e.__transition)&&e[t])return e;throw new Error("transition not found")}function Tm(a,s,o){var l,c=a.__transition;function e(e){o.state=Sm,o.timer.restart(h,o.delay,o.time),o.delay<=e&&h(e-o.delay)}function h(e){var t,r,i,n;if(o.state!==Sm)return d();for(t in c)if(n=c[t],n.name===o.name){if(n.state===_m)return gm(h);n.state===Am?(n.state=Lm,n.timer.stop(),n.on.call("interrupt",a,a.__data__,n.index,n.group),delete c[t]):+t<s&&(n.state=Lm,n.timer.stop(),n.on.call("cancel",a,a.__data__,n.index,n.group),delete c[t])}if(gm(function(){o.state===_m&&(o.state=Am,o.timer.restart(u,o.delay,o.time),u(e))}),o.state=Em,o.on.call("start",a,a.__data__,o.index,o.group),o.state===Em){for(o.state=_m,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=Lm,o.timer.stop(),delete c[s],c)return;delete a.__transition}(c[s]=o).timer=K1(e,0,o.time),mt(e,"schedule"),mt(h,"start"),mt(u,"tick"),mt(d,"stop")}var km,wm,Cm,Sm,Em,_m,Am,Rm,Lm,Im=r(()=>{Xd(),mm(),km=Gd("start","end","cancel","interrupt"),wm=[],Cm=0,Sm=1,Em=2,_m=3,Am=4,Rm=5,Lm=6,mt(ym,"default"),mt(vm,"init"),mt(bm,"set"),mt(xm,"get"),mt(Tm,"create")});function Nm(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=Em<r.state&&r.state<Rm,r.state=Lm,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete a[n]);s&&delete e.__transition}}var Dm=r(()=>{Im(),mt(Nm,"default")});function Mm(e){return this.each(function(){Nm(this,e)})}var Om=r(()=>{Dm(),mt(Mm,"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 Bm(a,s,o){var l,c;if("function"!=typeof o)throw new Error;return function(){var e=bm(this,a),t=e.tween;if(t!==l){c=(l=t).slice();for(var r={name:s,value:o},i=0,n=c.length;i<n;++i)if(c[i].name===s){c[i]=r;break}i===n&&c.push(r)}e.tween=c}}function $m(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i,n=xm(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:Bm)(r,e,t))}function Fm(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 xm(e,i).value[t]}}var zm=r(()=>{Im(),mt(Pm,"tweenRemove"),mt(Bm,"tweenFunction"),mt($m,"default"),mt(Fm,"tweenValue")});function qm(e,t){var r;return("number"==typeof t?y1:t instanceof Kg?l1:(r=Kg(t))?(t=r,l1):w1)(e,t)}var jm=r(()=>{Yf(),V1(),mt(qm,"default")});function Wm(e){return function(){this.removeAttribute(e)}}function Um(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Gm(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 Vm(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 Ym(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 Hm(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 Xm(e,t){var r=Zd(e),i="transform"===r?q1:qm;return this.attrTween(e,"function"==typeof t?(r.local?Hm:Ym)(r,i,Fm(this,"attr."+e,t)):null==t?(r.local?Um:Wm)(r):(r.local?Vm:Gm)(r,i,t))}var Km=r(()=>{V1(),zg(),zm(),jm(),mt(Wm,"attrRemove"),mt(Um,"attrRemoveNS"),mt(Gm,"attrConstant"),mt(Vm,"attrConstantNS"),mt(Ym,"attrFunction"),mt(Hm,"attrFunctionNS"),mt(Xm,"default")});function Zm(t,r){return function(e){this.setAttribute(t,r.call(this,e))}}function Qm(t,r){return function(e){this.setAttributeNS(t.space,t.local,r.call(this,e))}}function Jm(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 ey(t,r){var i,n;function e(){var e=r.apply(this,arguments);return i=e!==n?(n=e)&&Zm(t,e):i}return mt(e,"tween"),e._value=r,e}function ty(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=Zd(e),this.tween(r,(e.local?Jm:ey)(e,t))}var ry=r(()=>{zg(),mt(Zm,"attrInterpolate"),mt(Qm,"attrInterpolateNS"),mt(Jm,"attrTweenNS"),mt(ey,"attrTween"),mt(ty,"default")});function iy(e,t){return function(){vm(this,e).delay=+t.apply(this,arguments)}}function ny(e,t){return t=+t,function(){vm(this,e).delay=t}}function ay(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?iy:ny)(t,e)):xm(this.node(),t).delay}var sy=r(()=>{Im(),mt(iy,"delayFunction"),mt(ny,"delayConstant"),mt(ay,"default")});function oy(e,t){return function(){bm(this,e).duration=+t.apply(this,arguments)}}function ly(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?oy:ly)(t,e)):xm(this.node(),t).duration}var hy=r(()=>{Im(),mt(oy,"durationFunction"),mt(ly,"durationConstant"),mt(cy,"default")});function uy(e,t){if("function"!=typeof t)throw new Error;return function(){bm(this,e).ease=t}}function dy(e){var t=this._id;return arguments.length?this.each(uy(t,e)):xm(this.node(),t).ease}var py=r(()=>{Im(),mt(uy,"easeConstant"),mt(dy,"default")});function gy(t,r){return function(){var e=r.apply(this,arguments);if("function"!=typeof e)throw new Error;bm(this,t).ease=e}}function fy(e){if("function"!=typeof e)throw new Error;return this.each(gy(this._id,e))}var my=r(()=>{Im(),mt(gy,"easeVarying"),mt(fy,"default")});function yy(e){"function"!=typeof e&&(e=mp(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]=[],c=0;c<o;++c)(a=s[c])&&e.call(a,a.__data__,c,s)&&l.push(a);return new n2(i,this._parents,this._name,this._id)}var vy=r(()=>{zg(),c2(),mt(yy,"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],c=r[s],h=l.length,u=a[s]=new Array(h),d=0;d<h;++d)(o=l[d]||c[d])&&(u[d]=o);for(;s<i;++s)a[s]=t[s];return new n2(a,this._parents,this._name,this._id)}var xy=r(()=>{c2(),mt(by,"default")});function Ty(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 ky(r,i,n){var a,s,o=Ty(i)?vm:bm;return function(){var e=o(this,r),t=e.on;t!==a&&(s=(a=t).copy()).on(i,n),e.on=s}}function wy(e,t){var r=this._id;return arguments.length<2?xm(this.node(),r).on.on(e):this.each(ky(r,e,t))}var Cy=r(()=>{Im(),mt(Ty,"start"),mt(ky,"onFunction"),mt(wy,"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 Ey(){return this.on("end.remove",Sy(this._id))}var _y=r(()=>{mt(Sy,"removeFunction"),mt(Ey,"default")});function Ay(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=np(e));for(var i=this._groups,n=i.length,a=new Array(n),s=0;s<n;++s)for(var o,l,c=i[s],h=c.length,u=a[s]=new Array(h),d=0;d<h;++d)(o=c[d])&&(l=e.call(o,o.__data__,d,c))&&("__data__"in o&&(l.__data__=o.__data__),u[d]=l,ym(u[d],t,r,d,u,xm(o,r)));return new n2(a,this._parents,t,r)}var Ry=r(()=>{zg(),c2(),Im(),mt(Ay,"default")});function Ly(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=up(e));for(var i=this._groups,n=i.length,a=[],s=[],o=0;o<n;++o)for(var l,c=i[o],h=c.length,u=0;u<h;++u)if(l=c[u]){for(var d,p=e.call(l,l.__data__,u,c),g=xm(l,r),f=0,m=p.length;f<m;++f)(d=p[f])&&ym(d,t,r,f,p,g);a.push(p),s.push(l)}return new n2(a,s,t,r)}var Iy=r(()=>{zg(),c2(),Im(),mt(Ly,"default")});function Ny(){return new Dy(this._groups,this._parents)}var Dy,My=r(()=>{zg(),Dy=Bg.prototype.constructor,mt(Ny,"default")});function Oy(r,i){var n,a,s;return function(){var e=_0(this,r),t=(this.style.removeProperty(r),_0(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 By(t,r,i){var n,a,s=i+"";return function(){var e=_0(this,t);return e===s?null:e===n?a:a=r(n=e,i)}}function $y(i,n,a){var s,o,l;return function(){var e=_0(this,i),t=a(this),r=t+"";return null==t&&(this.style.removeProperty(i),r=t=_0(this,i)),e===r?null:e===s&&r===o?l:(o=r,l=n(s=e,t))}}function Fy(i,n){var a,s,o,l,c="style."+n,h="end."+c;return function(){var e=bm(this,i),t=e.on,r=null==e.value[c]?l=l||Py(n):void 0;t===a&&o===r||(s=(a=t).copy()).on(h,o=r),e.on=s}}function zy(e,t,r){var i="transform"==(e+="")?z1:qm;return null==t?this.styleTween(e,Oy(e,i)).on("end.style."+e,Py(e)):"function"==typeof t?this.styleTween(e,$y(e,i,Fm(this,"style."+e,t))).each(Fy(this._id,e)):this.styleTween(e,By(e,i,t),r).on("end.style."+e,null)}var qy=r(()=>{V1(),zg(),Im(),zm(),jm(),mt(Oy,"styleNull"),mt(Py,"styleRemove"),mt(By,"styleConstant"),mt($y,"styleFunction"),mt(Fy,"styleMaybeRemove"),mt(zy,"default")});function jy(t,r,i){return function(e){this.style.setProperty(t,r.call(this,e),i)}}function Wy(t,r,i){var n,a;function e(){var e=r.apply(this,arguments);return n=e!==a?(a=e)&&jy(t,e,i):n}return mt(e,"tween"),e._value=r,e}function Uy(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,Wy(e,t,r??""))}var Gy=r(()=>{mt(jy,"styleInterpolate"),mt(Wy,"styleTween"),mt(Uy,"default")});function Vy(e){return function(){this.textContent=e}}function Yy(t){return function(){var e=t(this);this.textContent=e??""}}function Hy(e){return this.tween("text","function"==typeof e?Yy(Fm(this,"text",e)):Vy(null==e?"":e+""))}var Xy=r(()=>{zm(),mt(Vy,"textConstant"),mt(Yy,"textFunction"),mt(Hy,"default")});function Ky(t){return function(e){this.textContent=t.call(this,e)}}function Zy(t){var r,i;function e(){var e=t.apply(this,arguments);return r=e!==i?(i=e)&&Ky(e):r}return mt(e,"tween"),e._value=t,e}function Qy(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,Zy(e))}var Jy=r(()=>{mt(Ky,"textInterpolate"),mt(Zy,"textTween"),mt(Qy,"default")});function e2(){for(var e=this._name,t=this._id,r=++o2,i=this._groups,n=i.length,a=0;a<n;++a)for(var s,o=i[a],l=o.length,c=0;c<l;++c)(s=o[c])&&ym(s,e,r,c,o,{time:(s=xm(s,t)).time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease});return new n2(i,this._parents,e,r)}var t2=r(()=>{c2(),Im(),mt(e2,"default")});function r2(){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 i2=r(()=>{Im(),mt(r2,"default")});function n2(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function a2(e){return Bg().transition(e)}function s2(){return++o2}var o2,l2,c2=r(()=>{zg(),Km(),ry(),sy(),hy(),py(),my(),vy(),xy(),Cy(),_y(),Ry(),Iy(),My(),qy(),Gy(),Xy(),Jy(),t2(),zm(),i2(),o2=0,mt(n2,"Transition"),mt(a2,"transition"),mt(s2,"newId"),l2=Bg.prototype,n2.prototype=a2.prototype={constructor:n2,select:Ay,selectAll:Ly,selectChild:l2.selectChild,selectChildren:l2.selectChildren,filter:yy,merge:by,selection:Ny,transition:e2,call:l2.call,nodes:l2.nodes,node:l2.node,size:l2.size,empty:l2.empty,each:l2.each,on:wy,attr:Xm,attrTween:ty,style:zy,styleTween:Uy,text:Hy,textTween:Qy,remove:Ey,tween:$m,delay:ay,duration:cy,ease:dy,easeVarying:fy,end:r2,[Symbol.iterator]:l2[Symbol.iterator]}});function h2(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var u2=r(()=>{mt(h2,"cubicInOut")}),d2=r(()=>{u2()});function p2(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 g2(e){var t,r;e=e instanceof n2?(t=e._id,e._name):(t=++o2,(r=f2).time=Y1(),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,c=0;c<l;++c)(s=o[c])&&ym(s,e,t,c,o,r||p2(s,t));return new n2(i,this._parents,e,t)}var f2,m2=r(()=>{c2(),Im(),d2(),mm(),f2={time:null,delay:0,duration:250,ease:h2},mt(p2,"inherit"),mt(g2,"default")}),y2=r(()=>{zg(),Om(),m2(),Bg.prototype.interrupt=Mm,Bg.prototype.transition=g2}),v2=r(()=>{y2()}),b2=r(()=>{}),x2=r(()=>{}),T2=r(()=>{});function k2(e){return[+e[0],+e[1]]}function w2(e){return[k2(e[0]),k2(e[1])]}function C2(e){return{type:e}}var S2,E2,_2,A2=r(()=>{v2(),b2(),x2(),T2(),{abs:S2,max:E2,min:_2}=Math,mt(k2,"number1"),mt(w2,"number2"),["w","e"].map(C2),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(C2),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(C2),mt(function(e){return null==e?null:w2(e)},"input"),mt(function(e){return e},"output"),mt(C2,"type")}),R2=r(()=>{A2()});function L2(r){this._+=r[0];for(let e=1,t=r.length;e<t;++e)this._+=arguments[e]+r[e]}function I2(e){var t=Math.floor(e);if(!(0<=t))throw new Error("invalid digits: "+e);if(15<t)return L2;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 N2(){return new B2}var D2,M2,O2,P2,B2,$2=r(()=>{D2=Math.PI,P2=(M2=2*D2)-(O2=1e-6),mt(L2,"append"),mt(I2,"appendRound"),B2=class{static{mt(this,"Path")}constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?L2:I2(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,c=r-e,h=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}`:O2<p&&(Math.abs(d*c-h*u)>O2&&n?(s=c*c+h*h,i=(r-=o)*r+(o=i-l)*o,l=Math.sqrt(s),a=Math.sqrt(p),p=(s=n*Math.tan((D2-Math.acos((s+p-i)/(2*l*a)))/2))/a,i=s/l,Math.abs(p-1)>O2&&this._append`L${e+p*u},${t+p*d}`,this._append`A${n},${n},0,0,${+(u*o<d*r)},${this._x1=e+i*c},${this._y1=t+i*h}`):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,c=t+o,h=1^a,a=a?i-n:n-i;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>O2||Math.abs(this._y1-c)>O2)&&this._append`L${l},${c}`,r&&((a=a<0?a%M2+M2:a)>P2?this._append`A${r},${r},0,1,${h},${e-s},${t-o}A${r},${r},0,1,${h},${this._x1=l},${this._y1=c}`:O2<a&&this._append`A${r},${r},0,${+(D2<=a)},${h},${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(N2,"path"),N2.prototype=B2.prototype}),F2=r(()=>{$2()}),z2=r(()=>{}),q2=r(()=>{}),j2=r(()=>{}),W2=r(()=>{}),U2=r(()=>{}),G2=r(()=>{}),V2=r(()=>{});function Y2(e){return 1e21<=Math.abs(e=Math.round(e))?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function H2(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 X2=r(()=>{mt(Y2,"default"),mt(H2,"formatDecimalParts")});function K2(e){return(e=H2(Math.abs(e)))?e[1]:NaN}var Z2=r(()=>{X2(),mt(K2,"default")});function Q2(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 J2=r(()=>{mt(Q2,"default")});function ev(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}var tv=r(()=>{mt(ev,"default")});function rv(e){var t;if(t=nv.exec(e))return new iv({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 iv(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 nv,av=r(()=>{nv=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i,mt(rv,"formatSpecifier"),rv.prototype=iv.prototype,mt(iv,"FormatSpecifier"),iv.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 sv(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 ov=r(()=>{mt(sv,"default")});function lv(e,t){var r,i,n=H2(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")+H2(e,Math.max(0,t+n-1))[0]):e+""}var cv,hv=r(()=>{X2(),mt(lv,"default")});function uv(e,t){var r;return(t=H2(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 dv,pv=r(()=>{X2(),mt(uv,"default")}),gv=r(()=>{X2(),hv(),pv(),dv={"%":mt((e,t)=>(100*e).toFixed(t),"%"),b:mt(e=>Math.round(e).toString(2),"b"),c:mt(e=>e+"","c"),d:Y2,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)=>uv(100*e,t),"p"),r:uv,s:lv,X:mt(e=>Math.round(e).toString(16).toUpperCase(),"X"),x:mt(e=>Math.round(e).toString(16),"x")}});function fv(e){return e}var mv=r(()=>{mt(fv,"default")});function yv(e){var k=void 0===e.grouping||void 0===e.thousands?fv:Q2(vv.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?fv:ev(vv.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",S=void 0===e.minus?"−":e.minus+"",E=void 0===e.nan?"NaN":e.nan+"";function s(e){var c=(e=rv(e)).fill,h=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"):dv[y]||(void 0===f&&(f=12),m=!0,y="g"),(d||"0"===c&&"="===h)&&(d=!0,c="0",h="="),"$"===t?i:"#"===t&&/[boxX]/.test(y)?"0"+y.toLowerCase():""),b="$"===t?n:/[%p]/.test(y)?a:"",x=dv[y],T=/[defgprs%]/.test(y);function r(e){var t,r,i,n=v,a=b;if("c"===y)a=x(e)+a,e="";else{var s=(e=+e)<0||1/e<0;if(e=isNaN(e)?E:x(Math.abs(e),f),m&&(e=sv(e)),n=((s=(!s||0!=+e||"+"===u)&&s)?"("===u?u:S:"-"===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(c):"";switch(g&&d&&(e=k(l+e,l.length?p-a.length:1/0),l=""),h){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=rv(e)).type="f",e)),e=3*Math.max(-8,Math.min(8,Math.floor(K2(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 vv,bv,xv=r(()=>{Z2(),J2(),tv(),av(),ov(),gv(),hv(),mv(),vv=Array.prototype.map,bv=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],mt(yv,"default")});function Tv(e){return kv=yv(e),wv=kv.format,Cv=kv.formatPrefix,kv}var kv,wv,Cv,Sv=r(()=>{xv(),Tv({thousands:",",grouping:[3],currency:["$",""]}),mt(Tv,"defaultLocale")});function Ev(e){return Math.max(0,-K2(Math.abs(e)))}var _v=r(()=>{Z2(),mt(Ev,"default")});function Av(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(K2(t)/3)))-K2(Math.abs(e)))}var Rv=r(()=>{Z2(),mt(Av,"default")});function Lv(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,K2(t)-K2(e))+1}var Iv=r(()=>{Z2(),mt(Lv,"default")}),Nv=r(()=>{Sv(),av(),_v(),Rv(),Iv()}),Dv=r(()=>{});function Mv(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 Ov(){return this.eachAfter(Mv)}var Pv=r(()=>{mt(Mv,"count"),mt(Ov,"default")});function Bv(e,t){let r=-1;for(var i of this)e.call(t,i,++r,this);return this}var $v=r(()=>{mt(Bv,"default")});function Fv(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 zv=r(()=>{mt(Fv,"default")});function qv(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 jv=r(()=>{mt(qv,"default")});function Wv(e,t){let r=-1;for(var i of this)if(e.call(t,i,++r,this))return i}var Uv=r(()=>{mt(Wv,"default")});function Gv(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 Vv=r(()=>{mt(Gv,"default")});function Yv(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}var Hv=r(()=>{mt(Yv,"default")});function Xv(e){for(var t=this,r=Kv(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 Kv(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 Zv=r(()=>{mt(Xv,"default"),mt(Kv,"leastCommonAncestor")});function Qv(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}var Jv=r(()=>{mt(Qv,"default")});function eb(){return Array.from(this)}var tb=r(()=>{mt(eb,"default")});function rb(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}var ib=r(()=>{mt(rb,"default")});function nb(){var t=this,r=[];return t.each(function(e){e!==t&&r.push({source:e.parent,target:e})}),r}var ab=r(()=>{mt(nb,"default")});function*sb(){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 ob=r(()=>{mt(sb,"default")});function lb(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=ub)):void 0===t&&(t=hb);for(var r,i,n,a,s,o=[e=new gb(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 gb(n[a])),i.parent=r,i.depth=r.depth+1;return e.eachBefore(pb)}function cb(){return lb(this).eachBefore(db)}function hb(e){return e.children}function ub(e){return Array.isArray(e)?e[1]:null}function db(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function pb(e){for(var t=0;e.height=t,(e=e.parent)&&e.height<++t;);}function gb(e){this.data=e,this.depth=this.height=0,this.parent=null}var fb=r(()=>{Pv(),$v(),zv(),jv(),Uv(),Vv(),Hv(),Zv(),Jv(),tb(),ib(),ab(),ob(),mt(lb,"hierarchy"),mt(cb,"node_copy"),mt(hb,"objectChildren"),mt(ub,"mapChildren"),mt(db,"copyData"),mt(pb,"computeHeight"),mt(gb,"Node"),gb.prototype=lb.prototype={constructor:gb,count:Ov,each:Bv,eachAfter:qv,eachBefore:Fv,find:Wv,sum:Gv,sort:Yv,path:Xv,ancestors:Qv,descendants:eb,leaves:rb,links:nb,copy:cb,[Symbol.iterator]:sb}});function mb(e){if("function"!=typeof e)throw new Error;return e}var yb=r(()=>{mt(mb,"required")});function vb(){return 0}function bb(e){return function(){return e}}var xb=r(()=>{mt(vb,"constantZero"),mt(bb,"default")});function Tb(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 kb=r(()=>{mt(Tb,"default")});function wb(e,t,r,i,n){for(var a,s=e.children,o=-1,l=s.length,c=e.value&&(i-t)/e.value;++o<l;)(a=s[o]).y0=r,a.y1=n,a.x0=t,a.x1=t+=a.value*c}var Cb=r(()=>{mt(wb,"default")});function Sb(e,t,r,i,n){for(var a,s=e.children,o=-1,l=s.length,c=e.value&&(n-r)/e.value;++o<l;)(a=s[o]).x0=t,a.x1=i,a.y0=r,a.y1=r+=a.value*c}var Eb=r(()=>{mt(Sb,"default")});function _b(e,t,r,i,n,a){for(var s,o,l,c,h,u,d,p,g,f,m,y=[],v=t.children,b=0,x=0,T=v.length,k=t.value;b<T;){for(l=n-r,c=a-i;!(h=v[x++].value)&&x<T;);for(m=(u=d=h)*h*(f=Math.max(c/l,l/c)/(k*e)),g=Math.max(d/m,m/u);x<T;++x){if(h+=o=v[x].value,o<u&&(u=o),d<o&&(d=o),m=h*h*f,g<(p=Math.max(d/m,m/u))){h-=o;break}g=p}y.push(s={value:h,dice:l<c,children:v.slice(b,x)}),s.dice?wb(s,r,i,n,k?i+=c*h/k:a):Sb(s,r,i,k?r+=l*h/k:n,a),k-=h,b=x}return y}var Ab,Rb,Lb=r(()=>{Cb(),Eb(),Ab=(1+Math.sqrt(5))/2,mt(_b,"squarifyRatio"),Rb=mt(function t(a){function e(e,t,r,i,n){_b(a,e,t,r,i,n)}return mt(e,"squarify"),e.ratio=function(e){return t(1<(e=+e)?e:1)},e},"custom")(Ab)});function Ib(){var s=Rb,t=!1,r=1,i=1,o=[0],l=vb,c=vb,h=vb,u=vb,d=vb;function n(e){return e.x0=e.y0=0,e.x1=r,e.y1=i,e.eachBefore(a),o=[0],t&&e.eachBefore(Tb),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+=c(e)-t,(n-=h(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=mb(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:bb(+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?(c="function"==typeof e?e:bb(+e),n):c},n.paddingRight=function(e){return arguments.length?(h="function"==typeof e?e:bb(+e),n):h},n.paddingBottom=function(e){return arguments.length?(u="function"==typeof e?e:bb(+e),n):u},n.paddingLeft=function(e){return arguments.length?(d="function"==typeof e?e:bb(+e),n):d},n}var Nb=r(()=>{kb(),Lb(),yb(),xb(),mt(Ib,"default")}),Db=r(()=>{fb(),Nb()}),Mb=r(()=>{}),Ob=r(()=>{});function Pb(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var Bb=r(()=>{mt(Pb,"initRange")});function $b(){var r=new ld,i=[],n=[],a=Fb;function s(e){let t=r.get(e);if(void 0===t){if(a!==Fb)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 ld;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 $b(i,n).unknown(a)},Pb.apply(s,arguments),s}var Fb,zb=r(()=>{Cd(),Bb(),Fb=Symbol("implicit"),mt($b,"ordinal")});function qb(){var n,a,e=$b().unknown(void 0),s=e.domain,o=e.range,l=0,c=1,h=!1,u=0,d=0,p=.5;function t(){var e=s().length,t=c<l,r=t?c:l,i=(n=((i=t?l:c)-r)/Math.max(1,e-u+2*d),h&&(n=Math.floor(n)),r+=(i-r-n*(e-u))*p,a=n*(1-u),h&&(r=Math.round(r),a=Math.round(a)),kd(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,c]=e,l=+l,c=+c,t()):[l,c]},e.rangeRound=function(e){return[l,c]=e,l=+l,c=+c,h=!0,t()},e.bandwidth=function(){return a},e.step=function(){return n},e.round=function(e){return arguments.length?(h=!!e,t()):h},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 qb(s(),[l,c]).round(h).paddingInner(u).paddingOuter(d).align(p)},Pb.apply(t(),arguments)}var jb=r(()=>{Cd(),Bb(),zb(),mt(qb,"band")});function Wb(e){return function(){return e}}var Ub=r(()=>{mt(Wb,"constants")});function Gb(e){return+e}var Vb=r(()=>{mt(Gb,"number")});function Yb(e){return e}function Hb(t,r){return(r-=t=+t)?function(e){return(e-t)/r}:Wb(isNaN(r)?NaN:.5)}function Xb(t,r){var e;return r<t&&(e=t,t=r,r=e),function(e){return Math.max(t,Math.min(r,e))}}function Kb(e,t,r){var i=e[0],e=e[1],n=t[0],t=t[1],n=e<i?(i=Hb(e,i),r(t,n)):(i=Hb(i,e),r(n,t));return function(e){return n(i(e))}}function Zb(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]=Hb(r[s],r[s+1]),a[s]=t(e[s],e[s+1]);return function(e){var t=td(r,e,1,i)-1;return a[t](n[t](e))}}function Qb(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Jb(){var r,i,t,n,a,s,o=tx,l=tx,c=_1,h=Yb;function u(){var e=Math.min(o.length,l.length);return h!==Yb&&(h=Xb(o[0],o[e-1])),n=2<e?Zb:Kb,a=s=null,d}function d(e){return null==e||isNaN(e=+e)?t:(a=a||n(o.map(r),l,c))(r(h(e)))}return mt(u,"rescale"),mt(d,"scale"),d.invert=function(e){return h(i((s=s||n(l,o.map(r),y1))(e)))},d.domain=function(e){return arguments.length?(o=Array.from(e,Gb),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),c=R1,u()},d.clamp=function(e){return arguments.length?(h=!!e||Yb,u()):h!==Yb},d.interpolate=function(e){return arguments.length?(c=e,u()):c},d.unknown=function(e){return arguments.length?(t=e,d):t},function(e,t){return r=e,i=t,u()}}function ex(){return Jb()(Yb,Yb)}var tx,rx=r(()=>{Cd(),V1(),Ub(),Vb(),tx=[0,1],mt(Yb,"identity"),mt(Hb,"normalize"),mt(Xb,"clamper"),mt(Kb,"bimap"),mt(Zb,"polymap"),mt(Qb,"copy"),mt(Jb,"transformer"),mt(ex,"continuous")});function ix(e,t,r,i){var n,a=pd(e,t,r);switch((i=rv(i??",f")).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t));return null!=i.precision||isNaN(n=Av(a,s))||(i.precision=n),Cv(i,s);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(n=Lv(a,Math.max(Math.abs(e),Math.abs(t))))||(i.precision=n-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(n=Ev(a))||(i.precision=n-2*("%"===i.type))}return wv(i)}var nx=r(()=>{Cd(),Nv(),mt(ix,"tickFormat")});function ax(c){var h=c.domain;return c.ticks=function(e){var t=h();return ud(t[0],t[t.length-1],e??10)},c.tickFormat=function(e,t){var r=h();return ix(r[0],r[r.length-1],e??10,t)},c.nice=function(e){null==e&&(e=10);var t,r,i=h(),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=dd(s,o,e))===t)return i[n]=s,i[a]=o,h(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 c},c}function sx(){var e=ex();return e.copy=function(){return Qb(e,sx())},Pb.apply(e,arguments),ax(e)}var ox=r(()=>{Cd(),rx(),Bb(),nx(),mt(ax,"linearish"),mt(sx,"linear")});function lx(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 cx=r(()=>{mt(lx,"nice")});function hx(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=>hx(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)=>(ux.setTime(+e),dx.setTime(+t),a(ux),a(dx),Math.floor(r(ux,dx))),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 ux,dx,px,gx,fx,mx,yx,vx,bx,xx,Tx,kx=r(()=>{ux=new Date,dx=new Date,mt(hx,"timeInterval")}),wx=r(()=>{kx(),(px=hx(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e)).every=r=>(r=Math.floor(r),isFinite(r)&&0<r?1<r?hx(e=>{e.setTime(Math.floor(e/r)*r)},(e,t)=>{e.setTime(+e+t*r)},(e,t)=>(t-e)/r):px:null)}),Cx=r(()=>{kx(),(gx=hx(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+1e3*t)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds())).range}),Sx=r(()=>{kx(),(fx=hx(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,(mx=hx(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes())).range}),Ex=r(()=>{kx(),(yx=hx(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,(vx=hx(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+36e5*t)},(e,t)=>(t-e)/36e5,e=>e.getUTCHours())).range}),_x=r(()=>{kx(),(bx=hx(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,(xx=hx(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>e.getUTCDate()-1)).range,(Tx=hx(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 Ax(t){return hx(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 Rx(t){return hx(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 Lx,Ix,Nx,Dx,Mx,Ox,Px,Bx,$x,Fx,zx,qx,jx,Wx,Ux,Gx,Vx,Yx,Hx=r(()=>{kx(),mt(Ax,"timeWeekday"),Lx=Ax(0),Ix=Ax(1),Nx=Ax(2),Dx=Ax(3),Mx=Ax(4),Ox=Ax(5),Px=Ax(6),Lx.range,Ix.range,Nx.range,Dx.range,Mx.range,Ox.range,Px.range,mt(Rx,"utcWeekday"),Bx=Rx(0),$x=Rx(1),Fx=Rx(2),zx=Rx(3),qx=Rx(4),jx=Rx(5),Wx=Rx(6),Bx.range,$x.range,Fx.range,zx.range,qx.range,jx.range,Wx.range}),Xx=r(()=>{kx(),(Ux=hx(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,(Gx=hx(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}),Kx=r(()=>{kx(),(Vx=hx(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?hx(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,(Yx=hx(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?hx(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 Zx(a,e,t,r,i,n){let s=[[gx,1,1e3],[gx,5,5e3],[gx,15,15e3],[gx,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=Ku(([,,e])=>e).right(s,i);return n===s.length?a.every(pd(e/31536e6,t/31536e6,r)):0===n?px.every(Math.max(pd(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 Qx,Jx,e4,t4,r4=r(()=>{Cd(),wx(),Cx(),Sx(),Ex(),_x(),Hx(),Xx(),Kx(),mt(Zx,"ticker"),[Qx,Jx]=Zx(Yx,Gx,Bx,Tx,vx,mx),[e4,t4]=Zx(Vx,Ux,Lx,bx,yx,fx)}),i4=r(()=>{wx(),Cx(),Sx(),Ex(),_x(),Hx(),Xx(),Kx(),r4()});function n4(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 a4(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 s4(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function o4(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,c=h4(t),h=u4(t),P=h4(r),B=u4(r),$=h4(s),F=u4(s),z=h4(o),q=u4(o),j=h4(l),W=u4(l),u={a:C,A:S,b:E,B:_,c:null,d:N4,e:N4,f:B4,g:H4,G:K4,H:D4,I:M4,j:O4,L:P4,m:$4,M:F4,p:A,q:R,Q:bT,s:xT,S:z4,u:q4,U:j4,V:U4,w:G4,W:V4,x:null,X:null,y:Y4,Y:X4,Z:Z4,"%":vT},d={a:L,A:I,b:N,B:D,c:null,d:Q4,e:Q4,f:iT,g:gT,G:mT,H:J4,I:eT,j:tT,L:rT,m:nT,M:aT,p:M,q:O,Q:bT,s:xT,S:sT,u:oT,U:lT,V:hT,w:uT,W:dT,x:null,X:null,y:pT,Y:fT,Z:yT,"%":vT},U={a:y,A:v,b:b,B:x,c:T,d:k4,e:k4,f:A4,g:v4,G:y4,H:C4,I:C4,j:w4,L:_4,m:T4,M:S4,p:m,q:x4,Q:L4,s:I4,S:E4,u:p4,U:g4,V:f4,w:d4,W:m4,x:k,X:w,y:v4,Y:y4,Z:b4,"%":R4};function p(l,c){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=TT[t=l.charAt(++a)])?t=l.charAt(++a):r="e"===t?" ":"0",(i=c[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=s4(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=a4(s4(i.y,0,1))).getUTCDay())||0===r?$x.ceil(t):$x(t),t=xx.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=n4(s4(i.y,0,1))).getDay())||0===r?Ix.ceil(t):Ix(t),t=bx.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?a4(s4(i.y,0,1)).getUTCDay():n4(s4(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,a4):n4)(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=U[n in TT?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=c.exec(t.slice(r)))?(e.p=h.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=P.exec(t.slice(r)))?(e.w=B.get(t[0].toLowerCase()),r+t[0].length):-1}function b(e,t,r){return(t=j.exec(t.slice(r)))?(e.m=W.get(t[0].toLowerCase()),r+t[0].length):-1}function x(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 S(e){return r[e.getDay()]}function E(e){return l[e.getMonth()]}function _(e){return o[e.getMonth()]}function A(e){return t[+(12<=e.getHours())]}function R(e){return 1+~~(e.getMonth()/3)}function L(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(b,"parseShortMonth"),mt(x,"parseMonth"),mt(T,"parseLocaleDateTime"),mt(k,"parseLocaleDate"),mt(w,"parseLocaleTime"),mt(C,"formatShortWeekday"),mt(S,"formatWeekday"),mt(E,"formatShortMonth"),mt(_,"formatMonth"),mt(A,"formatPeriod"),mt(R,"formatQuarter"),mt(L,"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 l4(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(CT,"\\$&")}function h4(e){return new RegExp("^(?:"+e.map(c4).join("|")+")","i")}function u4(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function d4(e,t,r){return(t=kT.exec(t.slice(r,r+1)))?(e.w=+t[0],r+t[0].length):-1}function p4(e,t,r){return(t=kT.exec(t.slice(r,r+1)))?(e.u=+t[0],r+t[0].length):-1}function g4(e,t,r){return(t=kT.exec(t.slice(r,r+2)))?(e.U=+t[0],r+t[0].length):-1}function f4(e,t,r){return(t=kT.exec(t.slice(r,r+2)))?(e.V=+t[0],r+t[0].length):-1}function m4(e,t,r){return(t=kT.exec(t.slice(r,r+2)))?(e.W=+t[0],r+t[0].length):-1}function y4(e,t,r){return(t=kT.exec(t.slice(r,r+4)))?(e.y=+t[0],r+t[0].length):-1}function v4(e,t,r){return(t=kT.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 x4(e,t,r){return(t=kT.exec(t.slice(r,r+1)))?(e.q=3*t[0]-3,r+t[0].length):-1}function T4(e,t,r){return(t=kT.exec(t.slice(r,r+2)))?(e.m=t[0]-1,r+t[0].length):-1}function k4(e,t,r){return(t=kT.exec(t.slice(r,r+2)))?(e.d=+t[0],r+t[0].length):-1}function w4(e,t,r){return(t=kT.exec(t.slice(r,r+3)))?(e.m=0,e.d=+t[0],r+t[0].length):-1}function C4(e,t,r){return(t=kT.exec(t.slice(r,r+2)))?(e.H=+t[0],r+t[0].length):-1}function S4(e,t,r){return(t=kT.exec(t.slice(r,r+2)))?(e.M=+t[0],r+t[0].length):-1}function E4(e,t,r){return(t=kT.exec(t.slice(r,r+2)))?(e.S=+t[0],r+t[0].length):-1}function _4(e,t,r){return(t=kT.exec(t.slice(r,r+3)))?(e.L=+t[0],r+t[0].length):-1}function A4(e,t,r){return(t=kT.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=wT.exec(t.slice(r,r+1)))?r+t[0].length:-1}function L4(e,t,r){return(t=kT.exec(t.slice(r)))?(e.Q=+t[0],r+t[0].length):-1}function I4(e,t,r){return(t=kT.exec(t.slice(r)))?(e.s=+t[0],r+t[0].length):-1}function N4(e,t){return l4(e.getDate(),t,2)}function D4(e,t){return l4(e.getHours(),t,2)}function M4(e,t){return l4(e.getHours()%12||12,t,2)}function O4(e,t){return l4(1+bx.count(Vx(e),e),t,3)}function P4(e,t){return l4(e.getMilliseconds(),t,3)}function B4(e,t){return P4(e,t)+"000"}function $4(e,t){return l4(e.getMonth()+1,t,2)}function F4(e,t){return l4(e.getMinutes(),t,2)}function z4(e,t){return l4(e.getSeconds(),t,2)}function q4(e){return 0===(e=e.getDay())?7:e}function j4(e,t){return l4(Lx.count(Vx(e)-1,e),t,2)}function W4(e){var t=e.getDay();return 4<=t||0===t?Mx(e):Mx.ceil(e)}function U4(e,t){return e=W4(e),l4(Mx.count(Vx(e),e)+(4===Vx(e).getDay()),t,2)}function G4(e){return e.getDay()}function V4(e,t){return l4(Ix.count(Vx(e)-1,e),t,2)}function Y4(e,t){return l4(e.getFullYear()%100,t,2)}function H4(e,t){return l4((e=W4(e)).getFullYear()%100,t,2)}function X4(e,t){return l4(e.getFullYear()%1e4,t,4)}function K4(e,t){var r=e.getDay();return l4((e=4<=r||0===r?Mx(e):Mx.ceil(e)).getFullYear()%1e4,t,4)}function Z4(e){return(0<(e=e.getTimezoneOffset())?"-":(e*=-1,"+"))+l4(e/60|0,"0",2)+l4(e%60,"0",2)}function Q4(e,t){return l4(e.getUTCDate(),t,2)}function J4(e,t){return l4(e.getUTCHours(),t,2)}function eT(e,t){return l4(e.getUTCHours()%12||12,t,2)}function tT(e,t){return l4(1+xx.count(Yx(e),e),t,3)}function rT(e,t){return l4(e.getUTCMilliseconds(),t,3)}function iT(e,t){return rT(e,t)+"000"}function nT(e,t){return l4(e.getUTCMonth()+1,t,2)}function aT(e,t){return l4(e.getUTCMinutes(),t,2)}function sT(e,t){return l4(e.getUTCSeconds(),t,2)}function oT(e){return 0===(e=e.getUTCDay())?7:e}function lT(e,t){return l4(Bx.count(Yx(e)-1,e),t,2)}function cT(e){var t=e.getUTCDay();return 4<=t||0===t?qx(e):qx.ceil(e)}function hT(e,t){return e=cT(e),l4(qx.count(Yx(e),e)+(4===Yx(e).getUTCDay()),t,2)}function uT(e){return e.getUTCDay()}function dT(e,t){return l4($x.count(Yx(e)-1,e),t,2)}function pT(e,t){return l4(e.getUTCFullYear()%100,t,2)}function gT(e,t){return l4((e=cT(e)).getUTCFullYear()%100,t,2)}function fT(e,t){return l4(e.getUTCFullYear()%1e4,t,4)}function mT(e,t){var r=e.getUTCDay();return l4((e=4<=r||0===r?qx(e):qx.ceil(e)).getUTCFullYear()%1e4,t,4)}function yT(){return"+0000"}function vT(){return"%"}function bT(e){return+e}function xT(e){return Math.floor(+e/1e3)}var TT,kT,wT,CT,ST=r(()=>{i4(),mt(n4,"localDate"),mt(a4,"utcDate"),mt(s4,"newDate"),mt(o4,"formatLocale"),TT={"-":"",_:" ",0:"0"},kT=/^\s*\d+/,wT=/^%/,CT=/[\\^$*+?|[\]().{}]/g,mt(l4,"pad"),mt(c4,"requote"),mt(h4,"formatRe"),mt(u4,"formatLookup"),mt(d4,"parseWeekdayNumberSunday"),mt(p4,"parseWeekdayNumberMonday"),mt(g4,"parseWeekNumberSunday"),mt(f4,"parseWeekNumberISO"),mt(m4,"parseWeekNumberMonday"),mt(y4,"parseFullYear"),mt(v4,"parseYear"),mt(b4,"parseZone"),mt(x4,"parseQuarter"),mt(T4,"parseMonthNumber"),mt(k4,"parseDayOfMonth"),mt(w4,"parseDayOfYear"),mt(C4,"parseHour24"),mt(S4,"parseMinutes"),mt(E4,"parseSeconds"),mt(_4,"parseMilliseconds"),mt(A4,"parseMicroseconds"),mt(R4,"parseLiteralPercent"),mt(L4,"parseUnixTimestamp"),mt(I4,"parseUnixTimestampSeconds"),mt(N4,"formatDayOfMonth"),mt(D4,"formatHour24"),mt(M4,"formatHour12"),mt(O4,"formatDayOfYear"),mt(P4,"formatMilliseconds"),mt(B4,"formatMicroseconds"),mt($4,"formatMonthNumber"),mt(F4,"formatMinutes"),mt(z4,"formatSeconds"),mt(q4,"formatWeekdayNumberMonday"),mt(j4,"formatWeekNumberSunday"),mt(W4,"dISO"),mt(U4,"formatWeekNumberISO"),mt(G4,"formatWeekdayNumberSunday"),mt(V4,"formatWeekNumberMonday"),mt(Y4,"formatYear"),mt(H4,"formatYearISO"),mt(X4,"formatFullYear"),mt(K4,"formatFullYearISO"),mt(Z4,"formatZone"),mt(Q4,"formatUTCDayOfMonth"),mt(J4,"formatUTCHour24"),mt(eT,"formatUTCHour12"),mt(tT,"formatUTCDayOfYear"),mt(rT,"formatUTCMilliseconds"),mt(iT,"formatUTCMicroseconds"),mt(nT,"formatUTCMonthNumber"),mt(aT,"formatUTCMinutes"),mt(sT,"formatUTCSeconds"),mt(oT,"formatUTCWeekdayNumberMonday"),mt(lT,"formatUTCWeekNumberSunday"),mt(cT,"UTCdISO"),mt(hT,"formatUTCWeekNumberISO"),mt(uT,"formatUTCWeekdayNumberSunday"),mt(dT,"formatUTCWeekNumberMonday"),mt(pT,"formatUTCYear"),mt(gT,"formatUTCYearISO"),mt(fT,"formatUTCFullYear"),mt(mT,"formatUTCFullYearISO"),mt(yT,"formatUTCZone"),mt(vT,"formatLiteralPercent"),mt(bT,"formatUnixTimestamp"),mt(xT,"formatUnixTimestampSeconds")});function ET(e){return _T=o4(e),AT=_T.format,_T}var _T,AT,RT=r(()=>{ST(),ET({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(ET,"defaultLocale")}),LT=r(()=>{RT()});function IT(e){return new Date(e)}function NT(e){return e instanceof Date?+e:+new Date(+e)}function DT(r,i,t,n,a,s,o,l,c,h){var u=ex(),d=u.invert,p=u.domain,g=h(".%L"),f=h(":%S"),m=h("%I:%M"),y=h("%I %p"),v=h("%a %d"),b=h("%b %d"),x=h("%B"),T=h("%Y");function k(e){return(c(e)<e?g:l(e)<e?f:o(e)<e?m:s(e)<e?y:n(e)<e?a(e)<e?v:b:t(e)<e?x: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,NT)):p().map(IT)},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:h(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(lx(t,e)):u},u.copy=function(){return Qb(u,DT(r,i,t,n,a,s,o,l,c,h))},u}function MT(){return Pb.apply(DT(e4,t4,Vx,Ux,Lx,bx,yx,fx,gx,AT).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var OT=r(()=>{i4(),LT(),rx(),Bb(),cx(),mt(IT,"date"),mt(NT,"number"),mt(DT,"calendar"),mt(MT,"time")}),PT=r(()=>{jb(),ox(),zb(),OT()});function BT(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 $T,FT=r(()=>{mt(BT,"default")}),zT=r(()=>{FT(),$T=BT("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")}),qT=r(()=>{zT()});function jT(e){return mt(function(){return e},"constant")}var WT=r(()=>{mt(jT,"default")});function UT(e){return 1<e?0:e<-1?e5:Math.acos(e)}function GT(e){return 1<=e?t5:e<=-1?-t5:Math.asin(e)}var VT,YT,HT,XT,KT,ZT,QT,JT,e5,t5,r5,i5=r(()=>{VT=Math.abs,YT=Math.atan2,HT=Math.cos,XT=Math.max,KT=Math.min,ZT=Math.sin,QT=Math.sqrt,JT=1e-12,t5=(e5=Math.PI)/2,r5=2*e5,mt(UT,"acos"),mt(GT,"asin")});function n5(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 B2(i)}var a5=r(()=>{F2(),mt(n5,"withPath")});function s5(e){return e.innerRadius}function o5(e){return e.outerRadius}function l5(e){return e.startAngle}function c5(e){return e.endAngle}function h5(e){return e&&e.padAngle}function u5(e,t,r,i,n,a,s,o){var l=(o-=a)*(r-=e)-(s-=n)*(i-=t);if(!(l*l<JT))return[e+(l=(s*(t-a)-o*(e-n))/l)*r,t+l*i]}function d5(e,t,r,i,n,a,s){var o=(s=(s?a:-a)/QT((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,c=(e+r)/2,h=t-l,u=r-e,d=h*h+u*u,t=((l=l*r-t*e)*u-h*(r=(u<0?-1:1)*QT(XT(0,(a=n-a)*a*d-l*l))))/d,e=(-l*h-u*r)/d,p=(l*u+h*r)/d,l=(-l*h+u*r)/d;return(r=p-i)*r+(d=l-c)*d<(h=t-i)*h+(u=e-c)*u&&(t=p,e=l),{cx:t,cy:e,x01:-o,y01:-s,x11:t*(n/a-1),y11:e*(n/a-1)}}function p5(){var A=s5,R=o5,L=jT(0),I=null,N=l5,D=c5,M=h5,O=null,P=n5(t);function t(){var e,t,r,i,n,a,s,o,l,c,h,u,d,p,g,f,m,y,v,b,x,T,k=+A.apply(this,arguments),w=+R.apply(this,arguments),C=N.apply(this,arguments)-t5,S=D.apply(this,arguments)-t5,E=VT(S-C),_=C<S;if(O=O||(e=P()),w<k&&(t=w,w=k,k=t),JT<w?r5-JT<E?(O.moveTo(w*HT(C),w*ZT(C)),O.arc(0,0,w,C,S,!_),JT<k&&(O.moveTo(k*HT(S),k*ZT(S)),O.arc(0,0,k,S,C,_))):(i=t=C,n=r=S,s=a=E,h=M.apply(this,arguments)/2,d=JT<h&&(I?+I.apply(this,arguments):QT(k*k+w*w)),T=x=o=KT(VT(w-k)/2,+L.apply(this,arguments)),JT<d&&(u=GT(d/k*ZT(h)),d=GT(d/w*ZT(h)),(a-=2*u)>JT?(i+=u*=_?1:-1,n-=u):(a=0,i=n=(C+S)/2),(s-=2*d)>JT?(t+=d*=_?1:-1,r-=d):(s=0,t=r=(C+S)/2)),h=w*HT(t),u=w*ZT(t),d=k*HT(n),C=k*ZT(n),JT<o&&(p=w*HT(r),g=w*ZT(r),f=k*HT(i),m=k*ZT(i),E<e5)&&((S=u5(h,u,f,m,p,g,d,C))?(E=h-S[0],b=u-S[1],y=p-S[0],v=g-S[1],E=1/ZT(UT((E*y+b*v)/(QT(E*E+b*b)*QT(y*y+v*v)))/2),b=QT(S[0]*S[0]+S[1]*S[1]),x=KT(o,(k-b)/(E-1)),T=KT(o,(w-b)/(1+E))):x=T=0),JT<s?JT<T?(l=d5(f,m,h,u,w,T,_),c=d5(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,YT(l.y01,l.x01),YT(c.y01,c.x01),!_):(O.arc(l.cx,l.cy,T,YT(l.y01,l.x01),YT(l.y11,l.x11),!_),O.arc(0,0,w,YT(l.cy+l.y11,l.cx+l.x11),YT(c.cy+c.y11,c.cx+c.x11),!_),O.arc(c.cx,c.cy,T,YT(c.y11,c.x11),YT(c.y01,c.x01),!_))):(O.moveTo(h,u),O.arc(0,0,w,t,r,!_)):O.moveTo(h,u),JT<k&&JT<a?JT<x?(l=d5(d,C,p,g,k,-x,_),c=d5(h,u,f,m,k,-x,_),O.lineTo(l.cx+l.x01,l.cy+l.y01),x<o?O.arc(l.cx,l.cy,x,YT(l.y01,l.x01),YT(c.y01,c.x01),!_):(O.arc(l.cx,l.cy,x,YT(l.y01,l.x01),YT(l.y11,l.x11),!_),O.arc(0,0,k,YT(l.cy+l.y11,l.cx+l.x11),YT(c.cy+c.y11,c.cx+c.x11),_),O.arc(c.cx,c.cy,x,YT(c.y11,c.x11),YT(c.y01,c.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)+ +R.apply(this,arguments))/2,t=(+N.apply(this,arguments)+ +D.apply(this,arguments))/2-e5/2;return[HT(t)*e,ZT(t)*e]},t.innerRadius=function(e){return arguments.length?(A="function"==typeof e?e:jT(+e),t):A},t.outerRadius=function(e){return arguments.length?(R="function"==typeof e?e:jT(+e),t):R},t.cornerRadius=function(e){return arguments.length?(L="function"==typeof e?e:jT(+e),t):L},t.padRadius=function(e){return arguments.length?(I=null==e?null:"function"==typeof e?e:jT(+e),t):I},t.startAngle=function(e){return arguments.length?(N="function"==typeof e?e:jT(+e),t):N},t.endAngle=function(e){return arguments.length?(D="function"==typeof e?e:jT(+e),t):D},t.padAngle=function(e){return arguments.length?(M="function"==typeof e?e:jT(+e),t):M},t.context=function(e){return arguments.length?(O=e??null,t):O},t}var g5=r(()=>{WT(),i5(),a5(),mt(s5,"arcInnerRadius"),mt(o5,"arcOuterRadius"),mt(l5,"arcStartAngle"),mt(c5,"arcEndAngle"),mt(h5,"arcPadAngle"),mt(u5,"intersect"),mt(d5,"cornerTangents"),mt(p5,"default")});function f5(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}var m5=r(()=>{Array.prototype.slice,mt(f5,"default")});function y5(e){this._context=e}function v5(e){return new y5(e)}var b5=r(()=>{mt(y5,"Linear"),y5.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(v5,"default")});function x5(e){return e[0]}function T5(e){return e[1]}var k5=r(()=>{mt(x5,"x"),mt(T5,"y")});function w5(s,o){var l=jT(!0),c=null,h=v5,u=null,d=n5(t);function t(e){var t,r,i,n=(e=f5(e)).length,a=!1;for(null==c&&(u=h(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?x5:jT(s),o="function"==typeof o?o:void 0===o?T5:jT(o),mt(t,"line"),t.x=function(e){return arguments.length?(s="function"==typeof e?e:jT(+e),t):s},t.y=function(e){return arguments.length?(o="function"==typeof e?e:jT(+e),t):o},t.defined=function(e){return arguments.length?(l="function"==typeof e?e:jT(!!e),t):l},t.curve=function(e){return arguments.length?(h=e,null!=c&&(u=h(c)),t):h},t.context=function(e){return arguments.length?(null==e?c=u=null:u=h(c=e),t):c},t}var C5=r(()=>{m5(),WT(),b5(),a5(),k5(),mt(w5,"default")});function S5(e,t){return t<e?-1:e<t?1:e<=t?0:NaN}var E5=r(()=>{mt(S5,"default")});function _5(e){return e}var A5=r(()=>{mt(_5,"default")});function R5(){var p=_5,g=S5,f=null,m=jT(0),y=jT(r5),v=jT(0);function t(r){for(var e,t,i,n=(r=f5(r)).length,a=0,s=new Array(n),o=new Array(n),l=+m.apply(this,arguments),c=Math.min(r5,Math.max(-r5,y.apply(this,arguments)-l)),h=Math.min(Math.abs(c)/n,v.apply(this,arguments)),u=h*(c<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?(c-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:h};return o}return mt(t,"pie"),t.value=function(e){return arguments.length?(p="function"==typeof e?e:jT(+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:jT(+e),t):m},t.endAngle=function(e){return arguments.length?(y="function"==typeof e?e:jT(+e),t):y},t.padAngle=function(e){return arguments.length?(v="function"==typeof e?e:jT(+e),t):v},t}var L5=r(()=>{m5(),WT(),E5(),A5(),i5(),mt(R5,"default")});function I5(e){return new D5(e,!0)}function N5(e){return new D5(e,!1)}var D5,M5=r(()=>{D5=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(I5,"bumpX"),mt(N5,"bumpY")});function O5(){}var P5=r(()=>{mt(O5,"default")});function B5(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 $5(e){this._context=e}function F5(e){return new $5(e)}var z5=r(()=>{mt(B5,"point"),mt($5,"Basis"),$5.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:B5(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:B5(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},mt(F5,"default")});function q5(e){this._context=e}function j5(e){return new q5(e)}var W5=r(()=>{P5(),z5(),mt(q5,"BasisClosed"),q5.prototype={areaStart:O5,areaEnd:O5,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:B5(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},mt(j5,"default")});function U5(e){this._context=e}function G5(e){return new U5(e)}var V5=r(()=>{z5(),mt(U5,"BasisOpen"),U5.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:B5(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},mt(G5,"default")});function Y5(e,t){this._basis=new $5(e),this._beta=t}var H5,X5=r(()=>{z5(),mt(Y5,"Bundle"),Y5.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")},H5=mt(function t(r){function e(e){return 1===r?new $5(e):new Y5(e,r)}return mt(e,"bundle"),e.beta=function(e){return t(+e)},e},"custom")(.85)});function K5(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 Z5(e,t){this._context=e,this._k=(1-t)/6}var Q5,J5=r(()=>{mt(K5,"point"),mt(Z5,"Cardinal"),Z5.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:K5(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:K5(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")},Q5=mt(function t(r){function e(e){return new Z5(e,r)}return mt(e,"cardinal"),e.tension=function(e){return t(+e)},e},"custom")(0)});function e3(e,t){this._context=e,this._k=(1-t)/6}var t3,r3=r(()=>{P5(),J5(),mt(e3,"CardinalClosed"),e3.prototype={areaStart:O5,areaEnd:O5,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:K5(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")},t3=mt(function t(r){function e(e){return new e3(e,r)}return mt(e,"cardinal"),e.tension=function(e){return t(+e)},e},"custom")(0)});function i3(e,t){this._context=e,this._k=(1-t)/6}var n3,a3=r(()=>{J5(),mt(i3,"CardinalOpen"),i3.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:K5(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")},n3=mt(function t(r){function e(e){return new i3(e,r)}return mt(e,"cardinal"),e.tension=function(e){return t(+e)},e},"custom")(0)});function s3(e,t,r){var i,n,a=e._x1,s=e._y1,o=e._x2,l=e._y2;JT<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),JT<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 o3(e,t){this._context=e,this._alpha=t}var l3,c3=r(()=>{i5(),J5(),mt(s3,"point"),mt(o3,"CatmullRom"),o3.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:s3(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")},l3=mt(function t(r){function e(e){return r?new o3(e,r):new Z5(e,0)}return mt(e,"catmullRom"),e.alpha=function(e){return t(+e)},e},"custom")(.5)});function h3(e,t){this._context=e,this._alpha=t}var u3,d3=r(()=>{r3(),P5(),c3(),mt(h3,"CatmullRomClosed"),h3.prototype={areaStart:O5,areaEnd:O5,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:s3(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")},u3=mt(function t(r){function e(e){return r?new h3(e,r):new e3(e,0)}return mt(e,"catmullRom"),e.alpha=function(e){return t(+e)},e},"custom")(.5)});function p3(e,t){this._context=e,this._alpha=t}var g3,f3=r(()=>{a3(),c3(),mt(p3,"CatmullRomOpen"),p3.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:s3(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")},g3=mt(function t(r){function e(e){return r?new p3(e,r):new i3(e,0)}return mt(e,"catmullRom"),e.alpha=function(e){return t(+e)},e},"custom")(.5)});function m3(e){this._context=e}function y3(e){return new m3(e)}var v3=r(()=>{P5(),mt(m3,"LinearClosed"),m3.prototype={areaStart:O5,areaEnd:O5,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(y3,"default")});function b3(e){return e<0?-1:1}function x3(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(b3(n)+b3(r))*Math.min(Math.abs(n),Math.abs(r),.5*Math.abs(e))||0}function T3(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function k3(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 w3(e){this._context=e}function C3(e){this._context=new S3(e)}function S3(e){this._context=e}function E3(e){return new w3(e)}function _3(e){return new C3(e)}var A3=r(()=>{mt(b3,"sign"),mt(x3,"slope3"),mt(T3,"slope2"),mt(k3,"point"),mt(w3,"MonotoneX"),w3.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:k3(this,this._t0,T3(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,k3(this,T3(this,r=x3(this,e,t)),r);break;default:k3(this,this._t0,r=x3(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}},"point")},mt(C3,"MonotoneY"),(C3.prototype=Object.create(w3.prototype)).point=function(e,t){w3.prototype.point.call(this,t,e)},mt(S3,"ReflectContext"),S3.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(E3,"monotoneX"),mt(_3,"monotoneY")});function R3(e){this._context=e}function L3(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 I3(e){return new R3(e)}var N3=r(()=>{mt(R3,"Natural"),R3.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=L3(e),n=L3(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(L3,"controlPoints"),mt(I3,"default")});function D3(e,t){this._context=e,this._t=t}function M3(e){return new D3(e,.5)}function O3(e){return new D3(e,0)}function P3(e){return new D3(e,1)}var B3=r(()=>{mt(D3,"Step"),D3.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(M3,"default"),mt(O3,"stepBefore"),mt(P3,"stepAfter")}),$3=r(()=>{g5(),C5(),L5(),W5(),V5(),z5(),M5(),X5(),r3(),a3(),J5(),d3(),f3(),c3(),v3(),b5(),A3(),N3(),B3()}),F3=r(()=>{}),z3=r(()=>{});function q3(e,t,r){this.k=e,this.x=t,this.y=r}function j3(e){for(;!e.__zoom;)if(!(e=e.parentNode))return W3;return e.__zoom}var W3,U3,G3,V3,Y3,H3,X3,K3,Z3,Q3,J3,ek,tk,rk,ik,nk,ak,sk,ok,lk,ck,hk,uk,dk,pk,gk,fk=r(()=>{mt(q3,"Transform"),q3.prototype={constructor:q3,scale:mt(function(e){return 1===e?this:new q3(this.k*e,this.x,this.y)},"scale"),translate:mt(function(e,t){return 0===e&0===t?this:new q3(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")},W3=new q3(1,0,0),j3.prototype=q3.prototype,mt(j3,"transform")}),mk=r(()=>{}),yk=r(()=>{v2(),F3(),z3(),fk(),mk()}),vk=r(()=>{yk(),fk()}),bk=r(()=>{Cd(),$d(),R2(),z2(),Yf(),q2(),j2(),Xd(),qg(),W2(),d2(),U2(),V2(),Nv(),Dv(),Db(),V1(),F2(),Mb(),G2(),Ob(),PT(),qT(),zg(),$3(),i4(),LT(),mm(),v2(),vk()}),xk=qat(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=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"}),Tk=qat(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeUrl=void 0;var a=xk();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 c(e){try{return decodeURIComponent(e)}catch{return e}}function t(e){if(!e)return a.BLANK_URL;for(var t,r,i,n=c(e.trim());(t=(n=c(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(c,"decodeURI"),mt(t,"sanitizeUrl"),e.sanitizeUrl=t}),kk=r(()=>{U3=j(Tk(),1),bk(),th(),G3=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"),V3=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"},G3(e,t).lower()},"drawBackgroundRect"),Y3=mt((e,t)=>{var r=t.text.replace(Cc," "),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"),H3=mt((e,t,r,i)=>{(e=e.append("image")).attr("x",t),e.attr("y",r),t=(0,U3.sanitizeUrl)(i),e.attr("xlink:href",t)},"drawImage"),X3=mt((e,t,r,i)=>{(e=e.append("use")).attr("x",t),e.attr("y",r),t=(0,U3.sanitizeUrl)(i),e.attr("xlink:href","#"+t)},"drawEmbeddedImage"),K3=mt(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),Z3=mt(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),Q3=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")}),wk=r(()=>{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:c,fontWeight:h}=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",h).style("font-family",c);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])}th(),kk(),J3=j(Tk(),1),ek=mt(function(e,t){return G3(e,t)},"drawRect"),tk=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,J3.sanitizeUrl)(a),e.attr("xlink:href",t)},"drawImage"),rk=mt((e,t,r,i)=>{let n=e.append("g"),a=0;for(var s of t){var o,l=s.textColor||"#444444",c=s.lineColor||"#444444",h=s.offsetX?parseInt(s.offsetX):0,u=s.offsetY?parseInt(s.offsetY):0,c=(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",c),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",c).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());pk(r)(s.label.text,n,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+h,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},c),s.techn&&""!==s.techn.text&&(c=r.messageFont(),pk(r)("["+s.techn.text+"]",n,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+h,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"},c))}},"drawRels"),ik=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=(ek(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,pk(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,pk(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,pk(r)(t.descr.text,i,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},l))},"drawBoundary"),nk=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"),K3());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},ek(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=dk(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":tk(o,48,48,t.x+t.width/2-24,t.y+t.image.Y,s)}let c=r[t.typeC4Shape.text+"Font"]();return c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=a,pk(r)(t.label.text,o,t.x,t.y+t.label.Y,t.width,t.height,{fill:a},c),(c=r[t.typeC4Shape.text+"Font"]()).fontColor=a,t.techn&&""!==t.techn?.text?pk(r)(t.techn.text,o,t.x,t.y+t.techn.Y,t.width,t.height,{fill:a,"font-style":"italic"},c):t.type&&""!==t.type.text&&pk(r)(t.type.text,o,t.x,t.y+t.type.Y,t.width,t.height,{fill:a,"font-style":"italic"},c),t.descr&&""!==t.descr.text&&((c=r.personFont()).fontColor=a,pk(r)(t.descr.text,o,t.x,t.y+t.descr.Y,t.width,t.height,{fill:a},c)),t.height},"drawC4Shape"),ak=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"),sk=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"),ok=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"),lk=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"),hk=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"),uk=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"),dk=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"),pk=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:l},gk={drawRect:ek,drawBoundary:ik,drawC4Shape:nk,drawRels:rk,drawImage:tk,insertArrowHead:lk,insertArrowEnd:ck,insertArrowFilledHead:hk,insertArrowCrossHead:uk,insertDatabaseIcon:ak,insertComputerIcon:sk,insertClockIcon:ok}});function Ck(e){return Number.isSafeInteger(e)&&0<=e}var Sk=r(()=>{mt(Ck,"isLength")});function Ek(e){return null!=e&&"function"!=typeof e&&Ck(e.length)}var _k=r(()=>{Sk(),mt(Ek,"isArrayLike")});function Ak(e){return"__proto__"===e}var Rk=r(()=>{mt(Ak,"isUnsafeProperty")});function Lk(e){return null==e||"object"!=typeof e&&"function"!=typeof e}var Ik=r(()=>{mt(Lk,"isPrimitive")});function Nk(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}var Dk=r(()=>{mt(Nk,"getSymbols")});function Mk(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var Ok,Pk,Bk,$k,Fk,zk,qk,jk,Wk,Uk,Gk,Vk,Yk,Hk,Xk,Kk,Zk,Qk,Jk,ew,tw,rw,iw=r(()=>{mt(Mk,"getTag")}),nw=r(()=>{Ok="[object RegExp]",Pk="[object String]",Bk="[object Number]",$k="[object Boolean]",Fk="[object Arguments]",zk="[object Symbol]",qk="[object Date]",jk="[object Map]",Wk="[object Set]",Uk="[object Array]",Gk="[object ArrayBuffer]",Vk="[object Object]",Yk="[object DataView]",Hk="[object Uint8Array]",Xk="[object Uint8ClampedArray]",Kk="[object Uint16Array]",Zk="[object Uint32Array]",Qk="[object Int8Array]",Jk="[object Int16Array]",ew="[object Int32Array]",tw="[object Float32Array]",rw="[object Float64Array]"});function aw(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var sw=r(()=>{mt(aw,"isTypedArray")});function ow(e,t){return lw(e,void 0,e,new Map,t)}function lw(t,e,r,i=new Map,n=void 0){if(void 0!==(e=n?.(t,e,r,i)))return e;if(Lk(t))return t;if(i.has(t))return i.get(t);if(Array.isArray(t)){var a=new Array(t.length);i.set(t,a);for(let e=0;e<t.length;e++)a[e]=lw(t[e],e,r,i,n);return Object.hasOwn(t,"index")&&(a.index=t.index),Object.hasOwn(t,"input")&&(a.input=t.input),a}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return(e=new RegExp(t.source,t.flags)).lastIndex=t.lastIndex,e;if(t instanceof Map){var s,o,l=new Map;i.set(t,l);for([s,o]of t)l.set(s,lw(o,s,r,i,n));return l}if(t instanceof Set){var c,h=new Set;i.set(t,h);for(c of t)h.add(lw(c,void 0,r,i,n));return h}if(typeof Buffer<"u"&&Buffer.isBuffer(t))return t.subarray();if(aw(t)){var u=new(Object.getPrototypeOf(t).constructor)(t.length);i.set(t,u);for(let e=0;e<t.length;e++)u[e]=lw(t[e],e,r,i,n);return u}return t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer?t.slice(0):t instanceof DataView?(e=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength),i.set(t,e),cw(e,t,r,i,n),e):typeof File<"u"&&t instanceof File?(e=new File([t],t.name,{type:t.type}),i.set(t,e),cw(e,t,r,i,n),e):typeof Blob<"u"&&t instanceof Blob?(e=new Blob([t],{type:t.type}),i.set(t,e),cw(e,t,r,i,n),e):t instanceof Error?(e=structuredClone(t),i.set(t,e),e.message=t.message,e.name=t.name,e.stack=t.stack,e.cause=t.cause,e.constructor=t.constructor,cw(e,t,r,i,n),e):t instanceof Boolean?(e=new Boolean(t.valueOf()),i.set(t,e),cw(e,t,r,i,n),e):t instanceof Number?(e=new Number(t.valueOf()),i.set(t,e),cw(e,t,r,i,n),e):t instanceof String?(e=new String(t.valueOf()),i.set(t,e),cw(e,t,r,i,n),e):"object"==typeof t&&hw(t)?(e=Object.create(Object.getPrototypeOf(t)),i.set(t,e),cw(e,t,r,i,n),e):t}function cw(t,r,i=t,n,a){var s=[...Object.keys(r),...Nk(r)];for(let e=0;e<s.length;e++){var o=s[e],l=Object.getOwnPropertyDescriptor(t,o);null!=l&&!l.writable||(t[o]=lw(r[o],o,i,n,a))}}function hw(e){switch(Mk(e)){case Fk:case Uk:case Gk:case Yk:case $k:case qk:case tw:case rw:case Qk:case Jk:case ew:case jk:case Bk:case Vk:case Ok:case Wk:case Pk:case zk:case Hk:case Xk:case Kk:case Zk:return!0;default:return!1}}var uw=r(()=>{Dk(),iw(),nw(),Ik(),sw(),mt(ow,"cloneDeepWith"),mt(lw,"cloneDeepWithImpl"),mt(cw,"copyProperties"),mt(hw,"isCloneableObject")});function dw(a,s){return ow(a,(e,t,r,i)=>{if(void 0!==(e=s?.(e,t,r,i)))return e;if("object"==typeof a){if(Mk(a)===Vk&&"function"!=typeof a.constructor)return i.set(a,t={}),cw(t,a,r,i),t;switch(Object.prototype.toString.call(a)){case Bk:case Pk:case $k:var n=new a.constructor(a?.valueOf());return cw(n,a),n;case Fk:return cw(n={},a),n.length=a.length,n[Symbol.iterator]=a[Symbol.iterator],n;default:return}}})}var pw=r(()=>{uw(),iw(),nw(),mt(dw,"cloneDeepWith")});function gw(e){return dw(e)}var fw=r(()=>{pw(),mt(gw,"cloneDeep")});function mw(e){return null!==e&&"object"==typeof e&&"[object Arguments]"===Mk(e)}var yw=r(()=>{iw(),mt(mw,"isArguments")});function vw(e){return"object"==typeof e&&null!==e}var bw=r(()=>{mt(vw,"isObjectLike")});function xw(e){return vw(e)&&Ek(e)}var Tw=r(()=>{_k(),bw(),mt(xw,"isArrayLikeObject")});function kw(e){return Array.isArray(e)}var ww=r(()=>{mt(kw,"isArray")});function Cw(i,n){if("function"!=typeof i||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");let a=mt(function(...e){var 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"),e=Cw.Cache||Map;return a.cache=new e,a}var Sw=r(()=>{mt(Cw,"memoize"),Cw.Cache=Map});function Ew(){}var _w=r(()=>{mt(Ew,"noop")});function Aw(e){var t=e?.constructor;return e===("function"==typeof t?t:Object).prototype}var Rw=r(()=>{mt(Aw,"isPrototype")});function Lw(e){return aw(e)}var Iw=r(()=>{sw(),mt(Lw,"isTypedArray")});function Nw(i){if(Lk(i))return i;var e,t,r,n,a=Mk(i);if(!Dw(i))return{};if(kw(i))return e=Array.from(i),0<i.length&&"string"==typeof i[0]&&Object.hasOwn(i,"index")&&(e.index=i.index,e.input=i.input),e;if(Lw(i))return new i.constructor(i.buffer,i.byteOffset,i.length);if(a===Gk)return new ArrayBuffer(i.byteLength);if(a===Yk)return e=i.buffer,t=i.byteOffset,n=i.byteLength,r=new ArrayBuffer(n),e=new Uint8Array(e,t,n),new Uint8Array(r).set(e),new DataView(r);if(a===$k||a===Bk||a===Pk)return t=new i.constructor(i.valueOf()),(a===Pk?Pw:Mw)(t,i),t;if(a===qk)return new Date(Number(i));if(a===Ok)return n=i,(e=new RegExp(n.source,n.flags)).lastIndex=n.lastIndex,e;if(a===zk)return Object(Symbol.prototype.valueOf.call(i));if(a===jk){let e=i,r=new Map;return e.forEach((e,t)=>{r.set(t,e)}),r}if(a!==Wk)return a===Fk?(Mw(r={},t=i),r.length=t.length,r[Symbol.iterator]=t[Symbol.iterator],r):(Bw(n={},i),Mw(n,i),Ow(n,i),n);{let e=i,t=new Set;return e.forEach(e=>{t.add(e)}),t}}function Dw(e){switch(Mk(e)){case Fk:case Uk:case Gk:case Yk:case $k:case qk:case tw:case rw:case Qk:case Jk:case ew:case jk:case Bk:case Vk:case Ok:case Wk:case Pk:case zk:case Hk:case Xk:case Kk:case Zk:return!0;default:return!1}}function Mw(e,t){for(var r in t)Object.hasOwn(t,r)&&(e[r]=t[r])}function Ow(t,r){var i=Object.getOwnPropertySymbols(r);for(let e=0;e<i.length;e++){var n=i[e];Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}}function Pw(e,t){var r,i=t.valueOf().length;for(r in t)Object.hasOwn(t,r)&&(Number.isNaN(Number(r))||Number(r)>=i)&&(e[r]=t[r])}function Bw(e,t){var r=Object.getPrototypeOf(t);null!==r&&"function"==typeof t.constructor&&Object.setPrototypeOf(e,r)}var $w=r(()=>{Ik(),iw(),nw(),ww(),Iw(),mt(Nw,"clone"),mt(Dw,"isCloneableObject"),mt(Mw,"copyOwnProperties"),mt(Ow,"copySymbolProperties"),mt(Pw,"cloneStringObjectProperties"),mt(Bw,"copyPrototype")});function Fw(e){if("object"!=typeof e||null==e)return!1;if(null===Object.getPrototypeOf(e))return!0;var t;if("[object Object]"!==Object.prototype.toString.call(e))return!(null==(t=e[Symbol.toStringTag])||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable)&&e.toString()===`[object ${t}]`;let r=e;for(;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}var zw=r(()=>{mt(Fw,"isPlainObject")});function qw(e){var t,r,i,n;return Lk(e)?e:Array.isArray(e)||aw(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer?e.slice(0):null==(t=Object.getPrototypeOf(e))?Object.assign(Object.create(t),e):(i=t.constructor,e instanceof Date||e instanceof Map||e instanceof Set?new i(e):e instanceof RegExp?((r=new i(e)).lastIndex=e.lastIndex,r):e instanceof DataView?new i(e.buffer.slice(0)):e instanceof Error?((n=e instanceof AggregateError?new i(e.errors,e.message,{cause:e.cause}):new i(e.message,{cause:e.cause})).stack=e.stack,Object.assign(n,e),n):typeof File<"u"&&e instanceof File?new i([e],e.name,{type:e.type,lastModified:e.lastModified}):"object"==typeof e?(r=Object.create(t),Object.assign(r,e)):e)}var jw=r(()=>{Ik(),sw(),mt(qw,"clone")});function Ww(e,...t){let r=t.slice(0,-1),i=t[t.length-1],n=e;for(let e=0;e<r.length;e++){var a=r[e];n=Uw(n,a,i,new Map)}return n}function Uw(r,i,n,a){if(Lk(r)&&(r=Object(r)),null!=i&&"object"==typeof i){if(a.has(i))return qw(a.get(i));if(a.set(i,r),Array.isArray(i)){i=i.slice();for(let e=0;e<i.length;e++)i[e]=i[e]??void 0}var t=[...Object.keys(i),...Nk(i)];for(let e=0;e<t.length;e++){var s=t[e];if(!Ak(s)){let e=i[s],t=r[s];if(mw(e)&&(e={...e}),mw(t)&&(t={...t}),typeof Buffer<"u"&&Buffer.isBuffer(e)&&(e=gw(e)),Array.isArray(e))if(Array.isArray(t)){var o=[],l=Reflect.ownKeys(t);for(let e=0;e<l.length;e++){var c=l[e];o[c]=t[c]}t=o}else if(xw(t)){var h=[];for(let e=0;e<t.length;e++)h[e]=t[e];t=h}else t=[];var u=n(t,e,s,r,i,a);void 0!==u?r[s]=u:Array.isArray(e)||vw(t)&&vw(e)&&(Fw(t)||Fw(e)||Lw(t)||Lw(e))?r[s]=Uw(t,e,n,a):null==t&&Fw(e)?r[s]=Uw({},e,n,a):null==t&&Lw(e)?r[s]=gw(e):void 0!==t&&void 0===e||(r[s]=e)}}}return r}var Gw=r(()=>{fw(),Rk(),jw(),Ik(),Dk(),yw(),Tw(),bw(),zw(),Iw(),mt(Ww,"mergeWith"),mt(Uw,"mergeWithDeep")});function Vw(e,...t){return Ww(e,...t,Ew)}var Yw=r(()=>{Gw(),_w(),mt(Vw,"merge")});function Hw(e){var t;return null==e||(Ek(e)?!("function"!=typeof e.splice&&"string"!=typeof e&&("u"<typeof Buffer||!Buffer.isBuffer(e))&&!Lw(e)&&!mw(e))&&0===e.length:"object"!=typeof e||(e instanceof Map||e instanceof Set?0===e.size:(t=Object.keys(e),Aw(e)?0===t.filter(e=>"constructor"!==e).length:0===t.length)))}var Xw=r(()=>{yw(),_k(),Iw(),Rw(),mt(Hw,"isEmpty")}),Kw=r(()=>{Sw(),$w(),Yw(),Xw()});function Zw(e,t){return e?(e="curve"+(e.charAt(0).toUpperCase()+e.slice(1)),pC[e]??t):t}function Qw(e,t){if(e=e.trim())return"loose"!==t.securityLevel?(0,uC.sanitizeUrl)(e):e}function Jw(e,t){return e&&t?Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0}function eC(e){let t,r=0;e.forEach(e=>{r+=Jw(e,t),t=e});var i=r/2;return TC(e,i)}function tC(e){return 1===e.length?e[0]:eC(e)}function rC(e,t,r){var r=structuredClone(r),i=(P.info("our points",r),"start_left"!==t&&"start_right"!==t&&r.reverse(),25+e),i=TC(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 iC(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 nC(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 aC(e,t){return LC(e,t).height}function sC(e,t){return LC(e,t).width}function oC(e){return"str"in e}function lC(e,t){return Vw({},e,t)}function cC(e){return e??null}function hC(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 uC,dC,pC,gC,fC,mC,yC,vC,bC,xC,TC,kC,wC,CC,SC,EC,_C,AC,RC,LC,IC,NC,DC,MC,OC,PC,BC,$C,FC,zC=r(()=>{uC=j(Tk(),1),bk(),th(),ki(),e(),kh(),Lr(),Kw(),xh(),dC="",pC={curveBasis:F5,curveBasisClosed:j5,curveBasisOpen:G5,curveBumpX:I5,curveBumpY:N5,curveBundle:H5,curveCardinalClosed:t3,curveCardinalOpen:n3,curveCardinal:Q5,curveCatmullRomClosed:u3,curveCatmullRomOpen:g3,curveCatmullRom:l3,curveLinear:v5,curveLinearClosed:y3,curveMonotoneX:E3,curveMonotoneY:_3,curveNatural:I3,curveStep:M3,curveStepAfter:P3,curveStepBefore:O3},gC=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,fC=mt(function(e,t){var r,i=mC(e,/(?:init\b)|(?:initialize\b)/),n={};if(n=Array.isArray(i)?(r=i.map(e=>e.args),nr(r),Ee(n,[...r])):i.args)return r=ch(e,t),void 0!==n[i="config"]&&(n[r="flowchart-v2"===r?"flowchart":r]=n[i],delete n[i]),n},"detectInit"),mC=mt(function(e,t=null){try{var r=new RegExp(`[%]{2}(?![{]${gC.source})(?=[}][%]{2}).*
|
||
`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),P.debug(`Detecting diagram directive${null!==t?" type:"+t:""} based on the text:`+e);for(var i,n,a,s=[];null!==(i=ah.exec(e));)i.index===ah.lastIndex&&ah.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 P.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),yC=mt(function(e){return e.replace(ah,"")},"removeDirectives"),vC=mt(function(e,t){for(var[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray"),mt(Zw,"interpolateToCurve"),mt(Qw,"formatUrl"),bC=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 P.error(`Function name: ${t} not found in window`);a[n](...e)},"runFunc"),mt(Jw,"distance"),mt(eC,"traverseEdge"),mt(tC,"calcLabelPosition"),xC=mt((e,t=2)=>(t=Math.pow(10,t),Math.round(e*t)/t),"roundNumber"),TC=mt((e,t)=>{let r,i=t;for(var n of e){if(r){var a=Jw(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:xC((1-a)*r.x+a*n.x,5),y:xC((1-a)*r.y+a*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),kC=mt((e,t,r)=>{P.info("our points "+JSON.stringify(t)),t[0]!==r&&(t=t.reverse());var r=TC(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(rC,"calcTerminalLabelPosition"),mt(iC,"getStylesFromArray"),wC=0,CC=mt(()=>(wC++,"id-"+Math.random().toString(36).substr(2,12)+"-"+wC),"generateId"),mt(nC,"makeRandomHex"),SC=mt(e=>nC(e.length),"random"),EC=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"),_C=mt(function(e,t){var r=t.text.replace(I.lineBreakRegex," "),[,i]=OC(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"),AC=Cw((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),c=[],h="";return l.forEach((e,t)=>{var r,i,n=sC(e+" ",o),a=sC(h,o);h=s<n?({hyphenatedStrings:r,remainingWord:i}=RC(e,s,"-",o),c.push(h,...r),i):s<=a+n?(c.push(h),e):[h,e].filter(Boolean).join(" "),t+1===l.length&&c.push(h)}),c.filter(e=>""!==e).join(o.joinWith)},(e,t,r)=>""+e+t+r.fontSize+r.fontWeight+r.fontFamily+r.joinWith),RC=Cw((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=sC(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(aC,"calculateTextHeight"),mt(sC,"calculateTextWidth"),LC=Cw((e,t)=>{var{fontSize:t=12,fontFamily:r="Arial",fontWeight:i=400}=t;if(!e)return{width:0,height:0};var[,n]=OC(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 c,h={width:0,height:0,lineHeight:0};for(c of a){var u=EC();if(u.text=c||dC,0===(u=((u=_C(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");h.width=Math.round(Math.max(h.width,u.width)),u=Math.round(u.height),h.height+=u,h.lineHeight=Math.round(Math.max(h.lineHeight,u))}s.push(h)}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),IC=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")}},DC=mt(function(e){return NC=NC||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),NC.innerHTML=e,unescape(NC.textContent)},"entityDecode"),mt(oC,"isDetailedError"),MC=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"),OC=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(lC,"cleanAndMerge"),PC={assignWithDepth:Ee,wrapLabel:AC,calculateTextHeight:aC,calculateTextWidth:sC,calculateTextDimensions:LC,cleanAndMerge:lC,detectInit:fC,detectDirective:mC,isSubstringInArray:vC,interpolateToCurve:Zw,calcLabelPosition:tC,calcCardinalityPosition:kC,calcTerminalLabelPosition:rC,formatUrl:Qw,getStylesFromArray:iC,generateId:CC,random:SC,runFunc:bC,entityDecode:DC,insertTitle:MC,isLabelCoordinateInPath:hC,parseFontSize:OC,InitIDGenerator:IC},BC=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"),$C=mt(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),FC=mt((e,t,{counter:r=0,prefix:i,suffix:n},a)=>a||(i?i+"_":"")+e+`_${t}_`+r+(n?"_"+n:""),"getEdgeId"),mt(cC,"handleUndefinedAttr"),mt(hC,"isLabelCoordinateInPath")});function qC(e,t,r,i,n){if(!t[e].width)if(r)t[e].text=AC(t[e].text,n,i),t[e].textLines=t[e].text.split(I.lineBreakRegex).length,t[e].width=n,t[e].height=aC(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(sC(s,i),t[e].width),a=aC(s,i),t[e].height=t[e].height+a}}function jC(t,r,i,e,n){var a,s,o=new HC(n);o.data.widthLimit=i.data.widthLimit/Math.min(VC,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&&YC.wrap,c=ZC(YC),l=(c.fontSize=c.fontSize+2,c.fontWeight="bold",qC("label",s,l,c,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+"]",qC("type",s,l,c=ZC(YC),o.data.widthLimit),s.type.Y=e+5,e=s.type.Y+s.type.height),s.descr&&""!==s.descr.text&&((c=ZC(YC)).fontSize=c.fontSize-2,qC("descr",s,l,c,o.data.widthLimit),s.descr.Y=e+20,e=s.descr.Y+s.descr.height),c=0==a||a%VC==0?(l=i.data.startx+YC.diagramMarginX,i.data.stopy+YC.diagramMarginY+e):(l=o.data.stopx!==o.data.startx?o.data.stopx+YC.diagramMarginX:o.data.startx,o.data.starty),o.setData(l,l,c,c),o.name=s.alias,n.db.getC4ShapeArray(s.alias));0<(c=n.db.getC4ShapeKeys(s.alias)).length&&e6(o,t,l,c),r=s.alias,0<(l=n.db.getBoundaries(r)).length&&jC(t,0,o,l,n),"global"!==s.alias&&JC(t,s,o),i.data.stopy=Math.max(o.data.stopy+YC.c4ShapeMargin,i.data.stopy),i.data.stopx=Math.max(o.data.stopx+YC.c4ShapeMargin,i.data.stopx),WC=Math.max(WC,i.data.stopx),UC=Math.max(UC,i.data.stopy)}}var WC,UC,GC,VC,YC,HC,XC,KC,ZC,QC,JC,e6,t6,r6,i6,n6,a6,s6,o6,l6,c6=r(()=>{bk(),wk(),e(),wh(),th(),Gu(),Uu(),Lr(),zC(),Ch(),UC=WC=0,GC=4,VC=2,ph.yy=ju,YC={},HC=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,XC(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>GC)&&(t=this.nextData.startx+e.margin+YC.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},XC(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},XC=mt(function(e){Ee(YC,e),e.fontFamily&&(YC.personFontFamily=YC.systemFontFamily=YC.messageFontFamily=e.fontFamily),e.fontSize&&(YC.personFontSize=YC.systemFontSize=YC.messageFontSize=e.fontSize),e.fontWeight&&(YC.personFontWeight=YC.systemFontWeight=YC.messageFontWeight=e.fontWeight)},"setConf"),KC=mt((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),ZC=mt(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),QC=mt(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),mt(qC,"calcC4ShapeTextWH"),JC=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=YC.c4ShapeMargin-35;var r=t.wrap&&YC.wrap,i=ZC(YC),n=(i.fontSize=i.fontSize+2,i.fontWeight="bold",sC(t.label.text,i));qC("label",t,r,i,n),gk.drawBoundary(e,t,YC)},"drawBoundary"),e6=mt(function(r,i,n,e){let a=0;for(var s of e){a=0;var o=n[s];switch((s=KC(YC,o.typeC4Shape.text)).fontSize=s.fontSize-2,o.typeC4Shape.width=sC("«"+o.typeC4Shape.text+"»",s),o.typeC4Shape.height=s.fontSize+2,o.typeC4Shape.Y=YC.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&&YC.wrap,l=YC.width-2*YC.c4ShapePadding,c=KC(YC,o.typeC4Shape.text);c.fontSize=c.fontSize+2,c.fontWeight="bold",qC("label",o,s,c,l),o.label.Y=a+8,a=o.label.Y+o.label.height,o.type&&""!==o.type.text?(o.type.text="["+o.type.text+"]",qC("type",o,s,KC(YC,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+"]",qC("techn",o,s,KC(YC,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&&(qC("descr",o,s,KC(YC,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+=YC.c4ShapePadding,o.width=Math.max(o.width||YC.width,t,YC.width),o.height=Math.max(o.height||YC.height,e,YC.height),o.margin=o.margin||YC.c4ShapeMargin,r.insert(o),gk.drawC4Shape(i,o,YC)}r.bumpLastMargin(YC.c4ShapeMargin)},"drawC4ShapeArray"),t6=class{static{mt(this,"Point")}constructor(e,t){this.x=e,this.y=t}},r6=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),c=Math.abs(i-a),h=c/l,u=e.height/e.width,d=null;return i==a&&r<n?d=new t6(r+e.width,o):i==a&&n<r?d=new t6(r,o):r==n&&i<a?d=new t6(s,i+e.height):r==n&&a<i&&(d=new t6(s,i)),n<r&&i<a?d=h<=u?new t6(r,o+h*e.width/2):new t6(s-l/c*e.height/2,i+e.height):r<n&&i<a?d=h<=u?new t6(r+e.width,o+h*e.width/2):new t6(s+l/c*e.height/2,i+e.height):r<n&&a<i?d=h<=u?new t6(r+e.width,o-h*e.width/2):new t6(s+e.height/2*l/c,i):n<r&&a<i&&(d=h<=u?new t6(r,o-e.width/2*h):new t6(s-e.height/2*l/c,i)),d},"getIntersectPoint"),i6=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,r6(e,r));return r.x=e.x+e.width/2,r.y=e.y+e.height/2,{startPoint:i,endPoint:e=r6(t,r)}},"getIntersectPoints"),n6=mt(function(e,t,r,i,n){let a=0;for(var s of t){a+=1;var o=s.wrap&&YC.wrap,l=QC(YC);"C4Dynamic"===i.db.getC4Type()&&(s.label.text=a+": "+s.label.text);let e=sC(s.label.text,l);qC("label",s,o,l,e),s.techn&&""!==s.techn.text&&qC("techn",s,o,l,e=sC(s.techn.text,l)),s.descr&&""!==s.descr.text&&qC("descr",s,o,l,e=sC(s.descr.text,l)),o=r(s.from),l=r(s.to),o=i6(o,l),s.startPoint=o.startPoint,s.endPoint=o.endPoint}gk.drawRels(e,t,YC,n)},"drawRels"),mt(jC,"drawInsideBoundary"),a6=mt(function(e,t,r,i){YC=B().c4;let n=B().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(YC.wrap),GC=o.getC4ShapeInRow(),VC=o.getC4BoundaryInRow(),P.debug("C:"+JSON.stringify(YC,null,2)),"sandbox"===n?s.select(`[id="${t}"]`):Q(`[id="${t}"]`)),l=(gk.insertComputerIcon(o,t),gk.insertDatabaseIcon(o,t),gk.insertClockIcon(o,t),(s=new HC(i)).setData(YC.diagramMarginX,YC.diagramMarginX,YC.diagramMarginY,YC.diagramMarginY),s.data.widthLimit=screen.availWidth,WC=YC.diagramMarginX,UC=YC.diagramMarginY,i.db.getTitle());jC(o,0,s,i.db.getBoundaries(""),i),gk.insertArrowHead(o,t),gk.insertArrowEnd(o,t),gk.insertArrowCrossHead(o,t),gk.insertArrowFilledHead(o,t),n6(o,i.db.getRels(),i.db.getC4Shape,i,t),s.data.stopx=WC,s.data.stopy=UC,t=(i=s.data).stopy-i.starty+2*YC.diagramMarginY,s=i.stopx-i.startx+2*YC.diagramMarginX,l&&o.append("text").text(l).attr("x",(i.stopx-i.startx)/2-4*YC.diagramMarginX).attr("y",i.starty+YC.diagramMarginY),yh(o,t,s,YC.useMaxWidth),o.attr("viewBox",i.startx-YC.diagramMarginX+" -"+(YC.diagramMarginY+(l=l?60:0))+" "+s+" "+(t+l)),P.debug("models:",i)},"draw"),s6={drawPersonOrSystemArray:e6,drawBoundary:JC,setConf:XC,draw:a6}}),h6=r(()=>{o6=mt(e=>`.person {
|
||
stroke: ${e.personBorder};
|
||
fill: ${e.personBkg};
|
||
}
|
||
`,"getStyles"),l6=o6}),u6={};Vat(u6,{diagram:()=>d6});var d6,p6=r(()=>{wh(),Gu(),c6(),h6(),d6={parser:gh,db:ju,renderer:s6,styles:l6,init:mt(({c4:e,wrap:t})=>{s6.setConf(e),ju.setWrap(t)},"init")}});function g6(e){return"u"<typeof e||null===e}function f6(e){return"object"==typeof e&&null!==e}function m6(e){return Array.isArray(e)?e:g6(e)?[]:[e]}function y6(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 v6(e,t){for(var r="",i=0;i<t;i+=1)r+=e;return r}function b6(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}function x6(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 T6(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=x6(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}function k6(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 w6(e,t){return xE.repeat(" ",t-e.length)+e}function C6(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="",c=Math.min(e.line+t.linesAfter,a.length).toString().length,h=t.maxLength-(t.indent+c+3),u=1;u<=t.linesBefore&&!(s-u<0);u++)o=k6(e.buffer,n[s-u],a[s-u],e.position-(n[s]-n[s-u]),h),l=xE.repeat(" ",t.indent)+w6((e.line-u+1).toString(),c)+" | "+o.str+`
|
||
`+l;for(o=k6(e.buffer,n[s],a[s],e.position,h),l=(l+=xE.repeat(" ",t.indent)+w6((e.line+1).toString(),c)+" | "+o.str+`
|
||
`)+xE.repeat("-",t.indent+c+3+o.pos)+`^
|
||
`,u=1;u<=t.linesAfter&&!(a.length<=s+u);u++)o=k6(e.buffer,n[s+u],a[s+u],e.position-(n[s]-n[s+u]),h),l+=xE.repeat(" ",t.indent)+w6((e.line+u+1).toString(),c)+" | "+o.str+`
|
||
`;return l.replace(/\n$/,"")}function S6(e){var r={};return null!==e&&Object.keys(e).forEach(function(t){e[t].forEach(function(e){r[String(e)]=t})}),r}function E6(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===wE.indexOf(e))throw new TE('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=S6(e.styleAliases||null),-1===CE.indexOf(this.kind))throw new TE('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}function _6(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 A6(){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 R6(e){return this.extend(e)}function L6(e){var t;return null===e||1===(t=e.length)&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)}function I6(){return null}function N6(e){return null===e}function D6(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 M6(e){return"true"===e||"True"===e||"TRUE"===e}function O6(e){return"[object Boolean]"===Object.prototype.toString.call(e)}function P6(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function B6(e){return 48<=e&&e<=55}function $6(e){return 48<=e&&e<=57}function F6(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(!P6(e.charCodeAt(i)))return!1;n=!0}return n&&"_"!==t}if("o"===t){for(i++;i<r;i++)if("_"!==(t=e[i])){if(!B6(e.charCodeAt(i)))return!1;n=!0}return n&&"_"!==t}}if("_"===t)return!1;for(;i<r;i++)if("_"!==(t=e[i])){if(!$6(e.charCodeAt(i)))return!1;n=!0}return!(!n||"_"===t)}function z6(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 q6(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!xE.isNegativeZero(e)}function j6(e){return!(null===e||!EE.test(e)||"_"===e[e.length-1])}function W6(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 U6(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(xE.isNegativeZero(e))return"-0.0";return t=e.toString(10),_E.test(t)?t.replace("e",".e"):t}function G6(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||xE.isNegativeZero(e))}function V6(e){return null!==e&&(null!==RE.exec(e)||null!==LE.exec(e))}function Y6(e){var t,r,i,n,a,s=0,o=null,l=RE.exec(e);if(null===(l=null===l?LE.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 H6(e){return e.toISOString()}function X6(e){return"<<"===e||null===e}function K6(e){if(null===e)return!1;for(var t,r=0,i=e.length,n=DE,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 Z6(e){for(var t=e.replace(/[\r\n=]/g,""),r=t.length,i=DE,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 Q6(e){for(var t,r="",i=0,n=e.length,a=DE,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 J6(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}function eS(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]"!==PE.call(t))return!1;for(r in t)if(OE.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 tS(e){return null!==e?e:[]}function rS(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]"!==$E.call(t)||1!==(r=Object.keys(t)).length)return!1;n[a]=[r[0],t[r[0]]]}return!0}function iS(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 nS(e){if(null!==e){var t,r=e;for(t in r)if(zE.call(r,t)&&null!==r[t])return!1}return!0}function aS(e){return null!==e?e:{}}function sS(e){return Object.prototype.toString.call(e)}function oS(e){return 10===e||13===e}function lS(e){return 9===e||32===e}function cS(e){return 9===e||32===e||10===e||13===e}function hS(e){return 44===e||91===e||93===e||123===e||125===e}function uS(e){return 48<=e&&e<=57?e-48:97<=(e|=32)&&e<=102?e-97+10:-1}function dS(e){return 120===e?2:117===e?4:85===e?8:0}function pS(e){return 48<=e&&e<=57?e-48:-1}function gS(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 fS(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}function mS(e,t,r){"__proto__"===t?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}function yS(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||jE,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 vS(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=kE(e),new TE(t,e)}function bS(e,t){throw vS(e,t)}function xS(e,t){e.onWarning&&e.onWarning.call(null,vS(e,t))}function TS(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||bS(e,"expected valid JSON character");else ZE.test(o)&&bS(e,"the stream contains non-printable characters");e.result+=o}}function kS(e,t,r,i){var n,a,s,o;for(xE.isObject(r)||bS(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],WE.call(t,a)||(mS(t,a,r[a]),i[a]=!0)}function wS(e,t,r,i,n,a,s,o,l){var c,h;if(Array.isArray(n))for(c=0,h=(n=Array.prototype.slice.call(n)).length;c<h;c+=1)Array.isArray(n[c])&&bS(e,"nested arrays are not supported inside keys"),"object"==typeof n&&"[object Object]"===sS(n[c])&&(n[c]="[object Object]");if("object"==typeof n&&"[object Object]"===sS(n)&&(n="[object Object]"),n=String(n),null===t&&(t={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)kS(e,t,a[c],r);else kS(e,t,a,r);else e.json||WE.call(r,n)||!WE.call(t,n)||(e.line=s||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,bS(e,"duplicated mapping key")),mS(t,n,a),delete r[n];return t}function CS(e){var t=e.input.charCodeAt(e.position);10===t?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):bS(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function SS(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);0!==n;){for(;lS(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(!oS(n))break;for(CS(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&&xS(e,"deficient indentation"),i}function ES(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))&&!cS(r))}function _S(e,t){1===t?e.result+=" ":1<t&&(e.result+=xE.repeat(`
|
||
`,t-1))}function AS(e,t,r){var i,n,a,s,o,l,c,h=e.kind,u=e.result,d=e.input.charCodeAt(e.position);if(cS(d)||hS(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)&&(cS(i=e.input.charCodeAt(e.position+1))||r&&hS(i)))return!1;for(e.kind="scalar",e.result="",n=a=e.position,s=!1;0!==d;){if(58===d){if(cS(i=e.input.charCodeAt(e.position+1))||r&&hS(i))break}else if(35===d){if(cS(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&ES(e)||r&&hS(d))break;if(oS(d)){if(o=e.line,l=e.lineStart,c=e.lineIndent,SS(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=c;break}}s&&(TS(e,n,a,!1),_S(e,e.line-o),n=a=e.position,s=!1),lS(d)||(a=e.position+1),d=e.input.charCodeAt(++e.position)}return TS(e,n,a,!1),!!e.result||(e.kind=h,e.result=u,!1)}function RS(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(TS(e,r,e.position,!0),39!==(n=e.input.charCodeAt(++e.position)))return!0;r=e.position,e.position++,i=e.position}else oS(n)?(TS(e,r,i,!0),_S(e,SS(e,!1,t)),r=i=e.position):e.position===e.lineStart&&ES(e)?bS(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);bS(e,"unexpected end of the stream within a single quoted scalar")}function LS(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 TS(e,r,e.position,!0),e.position++,!0;if(92===o){if(TS(e,r,e.position,!0),oS(o=e.input.charCodeAt(++e.position)))SS(e,!1,t);else if(o<256&&r_[o])e.result+=i_[o],e.position++;else if(0<(s=dS(o))){for(n=s,a=0;0<n;n--)0<=(s=uS(o=e.input.charCodeAt(++e.position)))?a=(a<<4)+s:bS(e,"expected hexadecimal character");e.result+=fS(a),e.position++}else bS(e,"unknown escape sequence");r=i=e.position}else oS(o)?(TS(e,r,i,!0),_S(e,SS(e,!1,t)),r=i=e.position):e.position===e.lineStart&&ES(e)?bS(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}bS(e,"unexpected end of the stream within a double quoted scalar")}function IS(e,t){var r,i,n,a,s,o,l,c,h,u,d,p=!0,g=e.tag,f=e.anchor,m=Object.create(null),y=e.input.charCodeAt(e.position);if(91===y)c=!(s=93),a=[];else{if(123!==y)return!1;s=125,c=!0,a={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),y=e.input.charCodeAt(++e.position);0!==y;){if(SS(e,!0,t),(y=e.input.charCodeAt(e.position))===s)return e.position++,e.tag=g,e.anchor=f,e.kind=c?"mapping":"sequence",e.result=a,!0;p?44===y&&bS(e,"expected the node content, but found ','"):bS(e,"missed comma between flow collection entries"),d=null,o=l=!1,63===y&&cS(e.input.charCodeAt(e.position+1))&&(o=l=!0,e.position++,SS(e,!0,t)),r=e.line,i=e.lineStart,n=e.position,$S(e,t,UE,!1,!0),u=e.tag,h=e.result,SS(e,!0,t),y=e.input.charCodeAt(e.position),!l&&e.line!==r||58!==y||(o=!0,y=e.input.charCodeAt(++e.position),SS(e,!0,t),$S(e,t,UE,!1,!0),d=e.result),c?wS(e,a,m,u,h,d,r,i,n):o?a.push(wS(e,null,m,u,h,d,r,i,n)):a.push(h),SS(e,!0,t),44===(y=e.input.charCodeAt(e.position))?(p=!0,y=e.input.charCodeAt(++e.position)):p=!1}bS(e,"unexpected end of the stream within a flow collection")}function NS(e,t){var r,i,n,a=HE,s=!1,o=!1,l=t,c=0,h=!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)HE===a?a=43===u?KE:XE:bS(e,"repeat of a chomping mode identifier");else{if(!(0<=(n=pS(u))))break;0===n?bS(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?bS(e,"repeat of an indentation width identifier"):(l=t+n-1,o=!0)}if(lS(u)){for(;lS(u=e.input.charCodeAt(++e.position)););if(35===u)for(;!oS(u=e.input.charCodeAt(++e.position))&&0!==u;);}for(;0!==u;){for(CS(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),oS(u))c++;else{if(e.lineIndent<l){a===KE?e.result+=xE.repeat(`
|
||
`,s?1+c:c):a===HE&&s&&(e.result+=`
|
||
`);break}for(i?lS(u)?(h=!0,e.result+=xE.repeat(`
|
||
`,s?1+c:c)):h?(h=!1,e.result+=xE.repeat(`
|
||
`,c+1)):0===c?s&&(e.result+=" "):e.result+=xE.repeat(`
|
||
`,c):e.result+=xE.repeat(`
|
||
`,s?1+c:c),o=s=!0,c=0,r=e.position;!oS(u)&&0!==u;)u=e.input.charCodeAt(++e.position);TS(e,r,e.position,!1)}}return!0}function DS(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,bS(e,"tab characters must not be used in indentation")),45===i)&&cS(e.input.charCodeAt(e.position+1));)if(o=!0,e.position++,SS(e,!0,-1)&&e.lineIndent<=t)s.push(null),i=e.input.charCodeAt(e.position);else if(r=e.line,$S(e,t,VE,!1,!0),s.push(e.result),SS(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==i)bS(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 MS(e,t,r){var i,n,a,s,o,l,c,h=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),c=e.input.charCodeAt(e.position);0!==c;){if(y||-1===e.firstTabInLine||(e.position=e.firstTabInLine,bS(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,63!==c&&58!==c||!cS(i)){if(s=e.line,o=e.lineStart,l=e.position,!$S(e,r,GE,!1,!0))break;if(e.line===a){for(c=e.input.charCodeAt(e.position);lS(c);)c=e.input.charCodeAt(++e.position);if(58===c)cS(c=e.input.charCodeAt(++e.position))||bS(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(wS(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=h,e.anchor=u,!0;bS(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!v)return e.tag=h,e.anchor=u,!0;bS(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(wS(e,d,p,g,f,null,s,o,l),g=f=m=null),n=y=v=!0):y?n=!(y=!1):bS(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,c=i;if((e.line===a||e.lineIndent>t)&&(y&&(s=e.line,o=e.lineStart,l=e.position),$S(e,t,YE,!0,n)&&(y?f=e.result:m=e.result),y||(wS(e,d,p,g,f,m,s,o,l),g=f=m=null),SS(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&0!==c)bS(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&wS(e,d,p,g,f,null,s,o,l),v&&(e.tag=h,e.anchor=u,e.kind="mapping",e.result=d),v}function OS(e){var t,r,i,n=!1,a=!1,s=e.input.charCodeAt(e.position);if(33!==s)return!1;if(null!==e.tag&&bS(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)):bS(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==s&&!cS(s);)33===s&&(a?bS(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),e_.test(r)||bS(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),JE.test(i)&&bS(e,"tag suffix cannot contain flow indicator characters")}i&&!t_.test(i)&&bS(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{bS(e,"tag name is malformed: "+i)}return n?e.tag=i:WE.call(e.tagMap,r)?e.tag=e.tagMap[r]+i:"!"===r?e.tag="!"+i:"!!"===r?e.tag="tag:yaml.org,2002:"+i:bS(e,'undeclared tag handle "'+r+'"'),!0}function PS(e){var t,r=e.input.charCodeAt(e.position);if(38!==r)return!1;for(null!==e.anchor&&bS(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!cS(r)&&!hS(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&bS(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function BS(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&&!cS(r)&&!hS(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&bS(e,"name of an alias node must contain at least one character"),t=e.input.slice(t,e.position),WE.call(e.anchorMap,t)||bS(e,'unidentified alias "'+t+'"'),e.result=e.anchorMap[t],SS(e,!0,-1),!0}function $S(e,t,r,i,n){var a,s,o,l,c,h,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=YE===r||VE===r,i&&SS(e,!0,-1)&&(p=!0,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)),1===d)for(;OS(e)||PS(e);)SS(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&&YE!==r||(i=UE===r||GE===r?t:t+1,n=e.position-e.lineStart,1===d?o&&(DS(e,n)||MS(e,n,i))||IS(e,i)?g=!0:(s&&NS(e,i)||RS(e,i)||LS(e,i)?g=!0:BS(e)?(g=!0,null===e.tag&&null===e.anchor||bS(e,"alias node should not have any properties")):AS(e,i,UE===r)&&(g=!0,null===e.tag)&&(e.tag="?"),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===d&&(g=o&&DS(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&&bS(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),l=0,c=e.implicitTypes.length;l<c;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(WE.call(e.typeMap[e.kind||"fallback"],e.tag))u=e.typeMap[e.kind||"fallback"][e.tag];else for(u=null,l=0,c=(h=e.typeMap.multi[e.kind||"fallback"]).length;l<c;l+=1)if(e.tag.slice(0,h[l].tag.length)===h[l].tag){u=h[l];break}u||bS(e,"unknown tag !<"+e.tag+">"),null!==e.result&&u.kind!==e.kind&&bS(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)):bS(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 FS(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))&&(SS(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&&!cS(n);)n=e.input.charCodeAt(++e.position);for(i=[],(r=e.input.slice(t,e.position)).length<1&&bS(e,"directive name must not be less than one character in length");0!==n;){for(;lS(n);)n=e.input.charCodeAt(++e.position);if(35===n){for(;0!==(n=e.input.charCodeAt(++e.position))&&!oS(n););break}if(oS(n))break;for(t=e.position;0!==n&&!cS(n);)n=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==n&&CS(e),WE.call(a_,r)?a_[r](e,r,i):xS(e,'unknown document directive "'+r+'"')}SS(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,SS(e,!0,-1)):s&&bS(e,"directives end mark is expected"),$S(e,e.lineIndent-1,YE,!1,!0),SS(e,!0,-1),e.checkLineBreaks&&QE.test(e.input.slice(a,e.position))&&xS(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ES(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,SS(e,!0,-1)):e.position<e.length-1&&bS(e,"end of the stream or a document separator is expected")}function zS(e,t){t=t||{};var r=new yS(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,bS(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;)FS(r);return r.documents}function qS(e,t,r){null!==t&&"object"==typeof t&&"u"<typeof r&&(r=t,t=null);var i=zS(e,r);if("function"!=typeof t)return i;for(var n=0,a=i.length;n<a;n+=1)t(i[n])}function jS(e,t){if(0!==(e=zS(e,t)).length){if(1===e.length)return e[0];throw new TE("expected a single document in the stream, but found more")}}function WS(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])&&l_.call(l.styleAliases,o)&&(o=l.styleAliases[o]),r[s]=o;return r}function US(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 TE("code point within a string may not be greater than 0xFFFFFFFF");t="U",r=8}return"\\"+t+xE.repeat("0",r-i.length)+i}function GS(e){this.schema=e.schema||jE,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=xE.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=WS(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?g_: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 VS(e,t){for(var r,i,n=xE.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 YS(e,t){return`
|
||
`+xE.repeat(" ",e.indent*t)}function HS(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 XS(e){return 32===e||9===e}function KS(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&e!==c_||65536<=e&&e<=1114111}function ZS(e){return KS(e)&&e!==c_&&13!==e&&e!==h_}function QS(e,t,r){var i=ZS(e),n=i&&!XS(e);return(r?i:i&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!n)||ZS(t)&&!XS(t)&&35===e||58===t&&n}function JS(e){return KS(e)&&e!==c_&&!XS(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 eE(e){return!XS(e)&&58!==e}function tE(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 rE(e){return/^\n* /.test(e)}function iE(e,t,r,i,n,a,s,o){var l,c=0,h=null,u=!1,d=!1,p=-1!==i,g=-1,f=JS(tE(e,0))&&eE(tE(e,e.length-1));if(t||s)for(l=0;l<e.length;65536<=c?l+=2:l++){if(!KS(c=tE(e,l)))return b_;f=f&&QS(c,h,o),h=c}else{for(l=0;l<e.length;65536<=c?l+=2:l++){if((c=tE(e,l))===h_)u=!0,p&&(d=d||i<l-g-1&&" "!==e[g+1],g=l);else if(!KS(c))return b_;f=f&&QS(c,h,o),h=c}d=d||p&&i<l-g-1&&" "!==e[g+1]}return u||d?9<r&&rE(e)?b_:s?a===g_?b_:m_:d?v_:y_:!f||s||n(e)?a===g_?b_:m_:f_}function nE(n,a,s,o,l){n.dump=(()=>{if(0===a.length)return n.quotingType===g_?'""':"''";if(!n.noCompatMode&&(-1!==d_.indexOf(a)||p_.test(a)))return n.quotingType===g_?'"'+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 HS(n,e)}switch(mt(i,"testAmbiguity"),iE(a,r,n.indent,t,i,n.quotingType,n.forceQuotes&&!o,l)){case f_:return a;case m_:return"'"+a.replace(/'/g,"''")+"'";case y_:return"|"+aE(a,n.indent)+sE(VS(a,e));case v_:return">"+aE(a,n.indent)+sE(VS(oE(a,t),e));case b_:return'"'+cE(a)+'"';default:throw new TE("impossible error: invalid scalar style")}})()}function aE(e,t){var t=rE(e)?String(t):"",r=e[e.length-1]===`
|
||
`;return t+(!r||e[e.length-2]!==`
|
||
`&&e!==`
|
||
`?r?"":"-":"+")+`
|
||
`}function sE(e){return e[e.length-1]===`
|
||
`?e.slice(0,-1):e}function oE(e,t){for(var r,i=/(\n+)([^\n]*)/g,n=(r=-1!==(r=e.indexOf(`
|
||
`))?r:e.length,i.lastIndex=r,lE(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?"":`
|
||
`)+lE(o,t),a=l}return n}function lE(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 cE(e){for(var t,r,i="",n=0;n<e.length;65536<=t?n+=2:n++)t=tE(e,n),!(r=u_[t])&&KS(t)?(i+=e[n],65536<=t&&(i+=e[n+1])):i+=r||US(t);return i}function hE(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)),(fE(e,t,i,!1,!1)||"u"<typeof i&&fE(e,t,null,!1,!1))&&(""!==n&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=a,e.dump="["+n+"]"}function uE(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)),(fE(e,t+1,n,!0,!0,!1,!0)||"u"<typeof n&&fE(e,t+1,null,!0,!0,!1,!0))&&(i&&""===a||(a+=YS(e,t)),e.dump&&h_===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}function dE(e,t,r){for(var i,n,a,s="",o=e.tag,l=Object.keys(r),c=0,h=l.length;c<h;c+=1)(a="")!==s&&(a+=", "),e.condenseFlow&&(a+='"'),n=r[i=l[c]],e.replacer&&(n=e.replacer.call(r,i,n)),fE(e,t,i,!1,!1)&&(1024<e.dump.length&&(a+="? "),a+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),fE(e,t,n,!1,!1))&&(s+=a+=e.dump);e.tag=o,e.dump="{"+s+"}"}function pE(e,t,r,i){var n,a,s,o,l,c="",h=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 TE("sortKeys must be a boolean or a function");for(n=0,a=u.length;n<a;n+=1)l="",i&&""===c||(l+=YS(e,t)),s=r[o=u[n]],e.replacer&&(s=e.replacer.call(r,o,s)),fE(e,t+1,o,!0,!0,!0)&&((o=null!==e.tag&&"?"!==e.tag||e.dump&&1024<e.dump.length)&&(e.dump&&h_===e.dump.charCodeAt(0)?l+="?":l+="? "),l+=e.dump,o&&(l+=YS(e,t)),fE(e,t+1,s,!0,o))&&(e.dump&&h_===e.dump.charCodeAt(0)?l+=":":l+=": ",c+=l+=e.dump);e.tag=h,e.dump=c||"{}"}function gE(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]"===o_.call(n.represent))i=n.represent(t,a);else{if(!l_.call(n.represent,a))throw new TE("!<"+n.tag+'> tag resolver accepts not "'+a+'" style');i=n.represent[a](t,a)}e.dump=i}return!0}return!1}function fE(e,t,r,i,n,a,s){e.tag=null,e.dump=r,gE(e,r,!1)||gE(e,r,!0);var o,l,c=o_.call(e.dump),h=i,u=(i=i&&(e.flowLevel<0||e.flowLevel>t),"[object Object]"===c||"[object Array]"===c);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]"===c)i&&0!==Object.keys(e.dump).length?(pE(e,t,e.dump,n),l&&(e.dump="&ref_"+o+e.dump)):(dE(e,t,e.dump),l&&(e.dump="&ref_"+o+" "+e.dump));else if("[object Array]"===c)i&&0!==e.dump.length?(e.noArrayIndent&&!s&&0<t?uE(e,t-1,e.dump,n):uE(e,t,e.dump,n),l&&(e.dump="&ref_"+o+e.dump)):(hE(e,t,e.dump),l&&(e.dump="&ref_"+o+" "+e.dump));else{if("[object String]"!==c){if("[object Undefined]"===c)return!1;if(e.skipInvalid)return!1;throw new TE("unacceptable kind of an object to dump "+c)}"?"!==e.tag&&nE(e,e.dump,t,a,h)}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 mE(e,t){var r,i,n=[],a=[];for(yE(e,n,a),r=0,i=a.length;r<i;r+=1)t.duplicates.push(n[a[r]]);t.usedDuplicates=new Array(i)}function yE(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)yE(e[n],t,r);else for(n=0,a=(i=Object.keys(e)).length;n<a;n+=1)yE(e[i[n]],t,r)}function vE(e,t){return(t=new GS(t=t||{})).noRefs||mE(e,t),t.replacer&&(e=t.replacer.call({"":e},"",e)),fE(t,0,e,!0,!0)?t.dump+`
|
||
`:""}function bE(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 xE,TE,kE,wE,CE,SE,EE,_E,AE,RE,LE,IE,NE,DE,ME,OE,PE,BE,$E,FE,zE,qE,jE,WE,UE,GE,VE,YE,HE,XE,KE,ZE,QE,JE,e_,t_,r_,i_,n_,a_,s_,o_,l_,c_,h_,u_,d_,p_,g_,f_,m_,y_,v_,b_,x_,T_,k_=r(()=>{for(mt(g6,"isNothing"),mt(f6,"isObject"),mt(m6,"toArray"),mt(y6,"extend"),mt(v6,"repeat"),mt(b6,"isNegativeZero"),xE={isNothing:g6,isObject:f6,toArray:m6,repeat:v6,isNegativeZero:b6,extend:y6},mt(x6,"formatError"),mt(T6,"YAMLException$1"),((T6.prototype=Object.create(Error.prototype)).constructor=T6).prototype.toString=mt(function(e){return this.name+": "+x6(this,e)},"toString"),TE=T6,mt(k6,"getLine"),mt(w6,"padStart"),mt(C6,"makeSnippet"),kE=C6,wE=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],CE=["scalar","sequence","mapping"],mt(S6,"compileStyleAliases"),mt(E6,"Type$1"),SE=E6,mt(_6,"compileList"),mt(A6,"compileMap"),mt(R6,"Schema$1"),R6.prototype.extend=mt(function(e){var t=[],r=[];if(e instanceof SE)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 TE("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 SE))throw new TE("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new TE("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 TE("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 SE))throw new TE("Specified list of YAML types (or a single Type object) contains a non-Type object.")}),(e=Object.create(R6.prototype)).implicit=(this.implicit||[]).concat(t),e.explicit=(this.explicit||[]).concat(r),e.compiledImplicit=_6(e,"implicit"),e.compiledExplicit=_6(e,"explicit"),e.compiledTypeMap=A6(e.compiledImplicit,e.compiledExplicit),e},"extend"),AE=R6,s_=new SE("tag:yaml.org,2002:str",{kind:"scalar",construct:mt(function(e){return null!==e?e:""},"construct")}),IE=new SE("tag:yaml.org,2002:seq",{kind:"sequence",construct:mt(function(e){return null!==e?e:[]},"construct")}),NE=new SE("tag:yaml.org,2002:map",{kind:"mapping",construct:mt(function(e){return null!==e?e:{}},"construct")}),AE=new AE({explicit:[s_,IE,NE]}),mt(L6,"resolveYamlNull"),mt(I6,"constructYamlNull"),mt(N6,"isNull"),s_=new SE("tag:yaml.org,2002:null",{kind:"scalar",resolve:L6,construct:I6,predicate:N6,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(D6,"resolveYamlBoolean"),mt(M6,"constructYamlBoolean"),mt(O6,"isBoolean"),IE=new SE("tag:yaml.org,2002:bool",{kind:"scalar",resolve:D6,construct:M6,predicate:O6,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(P6,"isHexCode"),mt(B6,"isOctCode"),mt($6,"isDecCode"),mt(F6,"resolveYamlInteger"),mt(z6,"constructYamlInteger"),mt(q6,"isInteger"),NE=new SE("tag:yaml.org,2002:int",{kind:"scalar",resolve:F6,construct:z6,predicate:q6,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"]}}),EE=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),mt(j6,"resolveYamlFloat"),mt(W6,"constructYamlFloat"),_E=/^[-+]?[0-9]+e/,mt(U6,"representYamlFloat"),mt(G6,"isFloat"),ME=new SE("tag:yaml.org,2002:float",{kind:"scalar",resolve:j6,construct:W6,predicate:G6,represent:U6,defaultStyle:"lowercase"}),AE=AE.extend({implicit:[s_,IE,NE,ME]}),s_=AE,RE=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),LE=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(V6,"resolveYamlTimestamp"),mt(Y6,"constructYamlTimestamp"),mt(H6,"representYamlTimestamp"),IE=new SE("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:V6,construct:Y6,instanceOf:Date,represent:H6}),mt(X6,"resolveYamlMerge"),NE=new SE("tag:yaml.org,2002:merge",{kind:"scalar",resolve:X6}),DE=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
||
\r`,mt(K6,"resolveYamlBinary"),mt(Z6,"constructYamlBinary"),mt(Q6,"representYamlBinary"),mt(J6,"isBinary"),ME=new SE("tag:yaml.org,2002:binary",{kind:"scalar",resolve:K6,construct:Z6,predicate:J6,represent:Q6}),OE=Object.prototype.hasOwnProperty,PE=Object.prototype.toString,mt(eS,"resolveYamlOmap"),mt(tS,"constructYamlOmap"),BE=new SE("tag:yaml.org,2002:omap",{kind:"sequence",resolve:eS,construct:tS}),$E=Object.prototype.toString,mt(rS,"resolveYamlPairs"),mt(iS,"constructYamlPairs"),FE=new SE("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:rS,construct:iS}),zE=Object.prototype.hasOwnProperty,mt(nS,"resolveYamlSet"),mt(aS,"constructYamlSet"),qE=new SE("tag:yaml.org,2002:set",{kind:"mapping",resolve:nS,construct:aS}),jE=s_.extend({implicit:[IE,NE],explicit:[ME,BE,FE,qE]}),WE=Object.prototype.hasOwnProperty,YE=4,HE=UE=1,XE=GE=2,KE=VE=3,ZE=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,QE=/[\x85\u2028\u2029]/,JE=/[,\[\]\{\}]/,e_=/^(?:!|!!|![a-z\-]+!)$/i,t_=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,mt(sS,"_class"),mt(oS,"is_EOL"),mt(lS,"is_WHITE_SPACE"),mt(cS,"is_WS_OR_EOL"),mt(hS,"is_FLOW_INDICATOR"),mt(uS,"fromHexCode"),mt(dS,"escapedHexLen"),mt(pS,"fromDecimalCode"),mt(gS,"simpleEscapeSequence"),mt(fS,"charFromCodepoint"),mt(mS,"setProperty"),r_=new Array(256),i_=new Array(256),n_=0;n_<256;n_++)r_[n_]=gS(n_)?1:0,i_[n_]=gS(n_);mt(yS,"State$1"),mt(vS,"generateError"),mt(bS,"throwError"),mt(xS,"throwWarning"),a_={YAML:mt(function(e,t,r){var i,n;null!==e.version&&bS(e,"duplication of %YAML directive"),1!==r.length&&bS(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&bS(e,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),n=parseInt(n[2],10),1!==i&&bS(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=n<2,1!==n&&2!==n&&xS(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:mt(function(e,t,r){var i;2!==r.length&&bS(e,"TAG directive accepts exactly two arguments"),i=r[1],e_.test(r=r[0])||bS(e,"ill-formed tag handle (first argument) of the TAG directive"),WE.call(e.tagMap,r)&&bS(e,'there is a previously declared suffix for "'+r+'" tag handle'),t_.test(i)||bS(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch{bS(e,"tag prefix is malformed: "+i)}e.tagMap[r]=i},"handleTagDirective")},mt(TS,"captureSegment"),mt(kS,"mergeMappings"),mt(wS,"storeMappingPair"),mt(CS,"readLineBreak"),mt(SS,"skipSeparationSpace"),mt(ES,"testDocumentSeparator"),mt(_S,"writeFoldedLines"),mt(AS,"readPlainScalar"),mt(RS,"readSingleQuotedScalar"),mt(LS,"readDoubleQuotedScalar"),mt(IS,"readFlowCollection"),mt(NS,"readBlockScalar"),mt(DS,"readBlockSequence"),mt(MS,"readBlockMapping"),mt(OS,"readTagProperty"),mt(PS,"readAnchorProperty"),mt(BS,"readAlias"),mt($S,"composeNode"),mt(FS,"readDocument"),mt(zS,"loadDocuments"),mt(qS,"loadAll$1"),mt(jS,"load$1"),s_={loadAll:qS,load:jS},o_=Object.prototype.toString,l_=Object.prototype.hasOwnProperty,c_=65279,h_=10,u_={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"},d_=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],p_=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/,mt(WS,"compileStyleMap"),mt(US,"encodeHex"),g_=2,mt(GS,"State"),mt(VS,"indentString"),mt(YS,"generateNextLine"),mt(HS,"testImplicitResolving"),mt(XS,"isWhitespace"),mt(KS,"isPrintable"),mt(ZS,"isNsCharOrWhitespace"),mt(QS,"isPlainSafe"),mt(JS,"isPlainSafeFirst"),mt(eE,"isPlainSafeLast"),mt(tE,"codePointAt"),mt(rE,"needIndentIndicator"),f_=1,m_=2,y_=3,v_=4,b_=5,mt(iE,"chooseScalarStyle"),mt(nE,"writeScalar"),mt(aE,"blockHeader"),mt(sE,"dropEndingNewline"),mt(oE,"foldString"),mt(lE,"foldLine"),mt(cE,"escapeString"),mt(hE,"writeFlowSequence"),mt(uE,"writeBlockSequence"),mt(dE,"writeFlowMapping"),mt(pE,"writeBlockMapping"),mt(gE,"detectType"),mt(fE,"writeNode"),mt(mE,"getDuplicateReferences"),mt(yE,"inspectNode"),mt(vE,"dump$1"),mt(bE,"renamed"),x_=AE,T_=s_.load,bE("safeLoad","load"),bE("safeLoadAll","loadAll"),bE("safeDump","dump")});function w_(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function C_(e){M_=e}function S_(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(P_.caret,"$1"),i=i.replace(e,r),n},"replace"),getRegex:mt(()=>new RegExp(i,t),"getRegex")};return n}function E_(e,t){if(t){if(P_.escapeTest.test(e))return e.replace(P_.escapeReplace,o7)}else if(P_.escapeTestNoEncode.test(e))return e.replace(P_.escapeReplaceNoEncode,o7);return e}function __(e){try{e=encodeURI(e).replace(P_.percentDecode,"%")}catch{return null}return e}function A_(e,t){let r=e.replace(P_.findPipe,(e,t,r)=>{let i=!1,n=t;for(;0<=--n&&"\\"===r[n];)i=!i;return i?"|":" |"}),i=r.split(P_.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(P_.slashPipe,"|");return i}function R_(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 L_(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 I_(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 N_(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 D_(e,t){return f7.parse(e,t)}var M_,O_,P_,B_,$_,F_,z_,q_,j_,W_,U_,G_,V_,Y_,H_,X_,K_,Z_,Q_,J_,e7,t7,r7,i7,n7,a7,s7,o7,l7,c7,h7,u7,d7,p7,g7,f7,m7=r(()=>{mt(w_,"L"),M_=w_(),mt(C_,"G"),O_={exec:mt(()=>null,"exec")},mt(S_,"h"),P_={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")},j_=/^(?:[ \t]*(?:\n|$))+/,W_=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,F_=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Y_=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,z_=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,q_=/(?:[*+-]|\d{1,9}[.)])/,r7=S_(Z_=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,q_).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(),Z_=S_(Z_).replace(/bull/g,q_).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(),e7=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,H_=/^[^\n]+/,Q_=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,$_=S_(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Q_).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),q_=S_(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,q_).getRegex(),t7="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",K_=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,i7=S_("^ {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",K_).replace("tag",t7).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),X_=S_(e7).replace("hr",Y_).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",t7).getRegex(),B_={blockquote:S_(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",X_).getRegex(),code:W_,def:$_,fences:F_,heading:z_,hr:Y_,html:i7,lheading:r7,list:q_,newline:j_,paragraph:X_,table:O_,text:H_},W_=S_("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Y_).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",t7).getRegex(),$_={...B_,lheading:Z_,table:W_,paragraph:S_(e7).replace("hr",Y_).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",W_).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",t7).getRegex()},F_={...B_,html:S_(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",K_).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:O_,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:S_(e7).replace("hr",Y_).replace("heading",` *#{1,6} *[^
|
||
]`).replace("lheading",r7).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},z_=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,i7=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,q_=/^( {2,}|\\)\n(?!\s*$)/,j_=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,X_=/[\p{P}\p{S}]/u,H_=/[\s\p{P}\p{S}]/u,Z_=/[^\s\p{P}\p{S}]/u,W_=S_(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,H_).getRegex(),t7=/(?!~)[\p{P}\p{S}]/u,e7=/(?!~)[\s\p{P}\p{S}]/u,Y_=/(?:[^\s\p{P}\p{S}]|~)/u,r7=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,g7=S_(U_=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,"u").replace(/punct/g,X_).getRegex(),U_=S_(U_,"u").replace(/punct/g,t7).getRegex(),G_=S_(V_="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,Z_).replace(/punctSpace/g,H_).replace(/punct/g,X_).getRegex(),V_=S_(V_,"gu").replace(/notPunctSpace/g,Y_).replace(/punctSpace/g,e7).replace(/punct/g,t7).getRegex(),Y_=S_("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Z_).replace(/punctSpace/g,H_).replace(/punct/g,X_).getRegex(),e7=S_(/\\(punct)/,"gu").replace(/punct/g,X_).getRegex(),t7=S_(/^<(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(),Z_=S_(K_).replace("(?:--\x3e|$)","--\x3e").getRegex(),H_=S_("^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",Z_).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),X_=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,K_=S_(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",X_).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Z_=S_(/^!?\[(label)\]\[(ref)\]/).replace("label",X_).replace("ref",Q_).getRegex(),Q_=S_(/^!?\[(ref)\](?:\[\])?/).replace("ref",Q_).getRegex(),J_=S_("reflink|nolink(?!\\()","g").replace("reflink",Z_).replace("nolink",Q_).getRegex(),t7={...e7={_backpedal:O_,anyPunctuation:e7,autolink:t7,blockSkip:r7,br:q_,code:i7,del:O_,emStrongLDelim:g7,emStrongRDelimAst:G_,emStrongRDelimUnd:Y_,escape:z_,link:K_,nolink:Q_,punctuation:W_,reflink:Z_,reflinkSearch:J_,tag:H_,text:j_,url:O_},link:S_(/^!?\[(label)\]\((.*?)\)/).replace("label",X_).getRegex(),reflink:S_(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",X_).getRegex()},r7={...e7,emStrongRDelimAst:V_,emStrongLDelim:U_,url:S_(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},i7={...r7,br:S_(q_).replace("{2,}","*").getRegex(),text:S_(r7.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},n7={normal:B_,gfm:$_,pedantic:F_},a7={normal:e7,gfm:r7,breaks:i7,pedantic:t7},s7={"&":"&","<":"<",">":">",'"':""","'":"'"},o7=mt(e=>s7[e],"ke"),mt(E_,"w"),mt(__,"J"),mt(A_,"V"),mt(R_,"z"),mt(L_,"ge"),mt(I_,"fe"),mt(N_,"Je"),l7=class{static{mt(this,"y")}options;rules;lexer;constructor(e){this.options=e||M_}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:R_(t,`
|
||
`)}}fences(e){var t,r;if(e=this.rules.block.fences.exec(e))return r=N_(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=R_(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:R_(e[0],`
|
||
`)}}blockquote(e){if(e=this.rules.block.blockquote.exec(e)){let i=R_(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=(c=t.join(`
|
||
`)).replace(this.rules.other.blockquoteSetextReplace,`
|
||
$1`).replace(this.rules.other.blockquoteSetextReplace2,""),c=(n=n?n+`
|
||
`+c:c,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=c,0===i.length)break;if("code"===(l=s.at(-1))?.type)break;if("blockquote"===l?.type){var h=(c=l).raw+`
|
||
`+i.join(`
|
||
`),h=this.blockquote(h);s[s.length-1]=h,n=n.substring(0,n.length-c.raw.length)+h.raw,a=a.substring(0,a.length-c.text.length)+h.text;break}"list"===l?.type&&(h=(c=l).raw+`
|
||
`+i.join(`
|
||
`),o=this.list(h),s[s.length-1]=o,n=n.substring(0,n.length-l.raw.length)+o.raw,a=a.substring(0,a.length-c.raw.length)+o.raw,i=h.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,c={type:"list",raw:"",ordered:t,start:t?+e.slice(0,-1):"",loose:!1,items:[]},h=(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=h.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 b,x=d.split(`
|
||
`,1)[0];if(n=x,b=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(b.search(this.rules.other.nonSpaceChar)>=s||!n.trim())r+=`
|
||
`+b.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+=x+`
|
||
`,d=d.substring(x.length+1),i=b.slice(s)}c.loose||(u?c.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,"")),c.items.push({type:"list_item",raw:t,task:!!o,checked:l,loose:!1,text:r,tokens:[]}),c.raw+=t}var r,i=c.items.at(-1);if(i){i.raw=i.raw.trimEnd(),i.text=i.text.trimEnd(),c.raw=c.raw.trimEnd();for(let e=0;e<c.items.length;e++)this.lexer.state.top=!1,c.items[e].tokens=this.lexer.blockTokens(c.items[e].text,[]),c.loose||(r=0<(r=c.items[e].tokens.filter(e=>"space"===e.type)).length&&r.some(e=>this.rules.other.anyLine.test(e.raw)),c.loose=r);if(c.loose)for(let e=0;e<c.items.length;e++)c.items[e].loose=!0;return c}}}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=A_(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(A_(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=R_(n.slice(0,-1),"\\");if((n.length-a.length)%2==0)return}else{if(-2===(a=L_(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(),I_(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()])?I_(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 c,h;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),c=[...l[0]][0].length,c=s.slice(0,e+l.index+c+r),Math.min(e,r)%2?(h=c.slice(1,-1),{type:"em",raw:c,text:h,tokens:this.lexer.inlineTokens(h)}):(h=c.slice(2,-2),{type:"strong",raw:c,text:h,tokens:this.lexer.inlineTokens(h)})}}}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}}},c7=class r{static{mt(this,"l")}tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||M_,this.options.tokenizer=this.options.tokenizer||new l7,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:P_,block:n7.normal,inline:a7.normal},this.options.pedantic?(e.block=n7.pedantic,e.inline=a7.pedantic):this.options.gfm&&(e.block=n7.gfm,this.options.breaks?e.inline=a7.breaks:e.inline=a7.gfm),this.tokenizer.rules=e}static get rules(){return{block:n7,inline:a7}}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(P_.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(P_.tabCharGlobal," ").replace(P_.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}},h7=class{static{mt(this,"P")}options;parser;constructor(e){this.options=e||M_}space(e){return""}code({text:e,lang:t,escaped:r}){return t=(t||"").match(P_.notSpaceStart)?.[0],e=e.replace(P_.endingNewline,"")+`
|
||
`,t?'<pre><code class="language-'+E_(t)+'">'+(r?e:E_(e,!0))+`</code></pre>
|
||
`:"<pre><code>"+(r?e:E_(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+" "+E_(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>${E_(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=__(e);if(null===i)return r;let n='<a href="'+(e=i)+'"';return t&&(n+=' title="'+E_(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=__(e)))return E_(r);let n=`<img src="${e=i}" alt="${r}"`;return t&&(n+=` title="${E_(t)}"`),n+=">"}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:E_(e.text)}},u7=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""}},d7=class i{static{mt(this,"l")}options;renderer;textRenderer;constructor(e){this.options=e||M_,this.options.renderer=this.options.renderer||new h7,this.renderer=this.options.renderer,this.renderer.options=this.options,(this.renderer.parser=this).textRenderer=new u7}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}},p7=class{static{mt(this,"S")}options;block;constructor(e){this.options=e||M_}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?c7.lex:c7.lexInline}provideParser(){return this.block?d7.parse:d7.parseInline}},g7=class{static{mt(this,"B")}defaults=w_();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=d7;Renderer=h7;TextRenderer=u7;Lexer=c7;Tokenizer=l7;Hooks=p7;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 h7(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 l7(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 p7;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];p7.passThroughHooks.has(t)?n[e]=e=>this.defaults.async&&p7.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 c7.lex(e,t??this.defaults)}parser(e,t){return d7.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?c7.lex:c7.lexInline,s=i.hooks?i.hooks.provideParser():o?d7.parse:d7.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>"+E_(e.message+"",!0)+"</pre>",i?Promise.resolve(t):t;if(i)return Promise.reject(e);throw e}}},f7=new g7,mt(D_,"d"),D_.options=D_.setOptions=function(e){return f7.setOptions(e),C_(D_.defaults=f7.defaults),D_},D_.getDefaults=w_,D_.defaults=M_,D_.use=function(...e){return f7.use(...e),C_(D_.defaults=f7.defaults),D_},D_.walkTokens=function(e,t){return f7.walkTokens(e,t)},D_.parseInline=f7.parseInline,D_.Parser=d7,D_.parser=d7.parse,D_.Renderer=h7,D_.TextRenderer=u7,D_.Lexer=c7,D_.lexer=c7.lex,D_.Tokenizer=l7,D_.Hooks=p7,D_.parse=D_,c7.lex});function y7(e,{}){return ih(e.replace(/<br\/>/g,`
|
||
`).replace(/\n{2,}/g,`
|
||
`))}function v7(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(e=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(e=>({content:e,type:"normal"}))??[])}function b7(e,t={}){let r=y7(e,t),i=D_.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(/'/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 x7(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}function T7(e,{markdownAutoWrap:t}={}){function r(e){return"text"===e.type?!1===t?e.text.replace(/\n */g,"<br/>").replace(/ /g," "):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:(P.warn("Unsupported markdown: "+e.type),e.raw)}return e=D_.lexer(e),mt(r,"output"),e.map(r).join("")}var k7=r(()=>{m7(),bh(),e(),mt(y7,"preprocessMarkdown"),mt(v7,"nonMarkdownToLines"),mt(b7,"markdownToLines"),mt(x7,"nonMarkdownToHTML"),mt(T7,"markdownToHTML")});function w7(e){return Intl.Segmenter?[...(new Intl.Segmenter).segment(e)].map(e=>e.segment):[...e]}function C7(e,t){return S7(e,[],w7(t.content),t.type)}function S7(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}])?S7(e,s,a,i):(0===t.length&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}]))}function E7(e,t){if(e.some(({content:e})=>e.includes(`
|
||
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return _7(e,t)}function _7(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)?_7(e,t,r,s):(0<i.length?(r.push(i),e.unshift(a)):a.content&&([s,i]=C7(t,a),r.push([s]),i.content)&&e.unshift(i),_7(e,t,r))}var A7=r(()=>{mt(w7,"splitTextToChars"),mt(C7,"splitWordToFitWidth"),mt(S7,"splitWordToFitWidthRecursion"),mt(E7,"splitLineToFitWidth"),mt(_7,"splitLineToFitWidthRecursion")});function R7(e,t){t&&e.attr("style",t)}async function L7(e,t,r,i,n=!1,a=vr()){(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=Uc(t.label)?await Yc(t.label.replace(I.lineBreakRegex,`
|
||
`),a):Rc(t.label,a),o=t.isNode?"nodeLabel":"edgeLabel",l=s.append("span");return l.html(a),R7(l,t.labelStyle),l.attr("class",o+" "+i),R7(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 I7(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 N7(e,t,r){return P7(t=I7(e=e.append("text"),1,t),r),r=t.node().getComputedTextLength(),e.remove(),r}function D7(e,t,r){return P7(t=I7(e=e.append("text"),1,t),[{content:r,type:"normal"}]),(r=t.node()?.getBoundingClientRect())&&e.remove(),r}function M7(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 c of r){var h,u=mt(e=>N7(a,1.1,e)<=t,"checkWidth");for(h of u(c)?[c]:E7(c,u))P7(I7(o,l,1.1,n),h),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 O7(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 P7(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(O7(e.content)):r.text(" "+O7(e.content))})}async function B7(e,n={}){let a=[],t=(e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,r,i)=>(a.push((async()=>{var e=r+":"+i;return await Jc(e)?await eh(e,void 0,{class:"label-icon"}):`<i class='${Rc(t,n).replace(":"," ")}'></i>`})()),t)),await Promise.all(a));return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>t.shift()??"")}var $7,F7=r(()=>{bk(),th(),e(),k7(),zC(),rh(),A7(),wi(),mt(R7,"applyStyle"),mt(L7,"addHtmlSpan"),mt(I7,"createTspan"),mt(N7,"computeWidthOfText"),mt(D7,"computeDimensionOfText"),mt(M7,"createFormattedText"),mt(O7,"decodeHTMLEntities"),mt(P7,"updateTextContentAndStyles"),mt(B7,"replaceIconSubstring"),$7=mt(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,markdown:s=!0,isNode:o=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{var u;return P.debug("XYZ createText",t,r,i,n,a,o,"addSvgBackground: ",c),a?(a=s?T7(t,h):x7(t),a=await B7($C(a),h),u=t.replace(/\\\\/g,"\\"),L7(e,{isNode:o,label:Uc(t)?u:a,labelStyle:r.replace("fill:","color:")},l,n,c,h)):(u=$C(t.replace(/<br\s*\/?>/g,"<br/>")),a=M7(l,e,s?b7(u.replace("<br>","<br/>"),h):v7(u),!!t&&c,!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 z7(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=(B().fontSize?B():window.getComputedStyle(document.body)).fontSize,[e=ir.fontSize]=OC(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 q7=r(()=>{Uu(),Ti(),zC(),mt(z7,"configureLabelImages")});function j7(e){return(e=e.map((e,t)=>(0===t?"M":"L")+e.x+","+e.y)).push("Z"),e.join(" ")}function W7(t,e,r,i,n,a){var s=[],o=r-t,l=2*Math.PI/(o/a),c=e+(i-e)/2;for(let e=0;e<=50;e++){var h=t+e/50*o,u=c+n*Math.sin(l*(h-t));s.push({x:h,y:u})}return s}function U7(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 c=o+e*l,h=t+i*Math.cos(c),c=r+i*Math.sin(c);s.push({x:-h,y:-c})}return s}function G7(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 V7,Y7,H7,X7,K7=r(()=>{F7(),Uu(),wi(),bk(),th(),zC(),q7(),V7=mt(async(e,t,r)=>{let i,n=t.useHtmlLabels||or(B()?.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",cC(t.labelStyle)),o,l=(o=void 0===t.label?"":"string"==typeof t.label?t.label:t.label[0],!!t.icon||!!t.img),c="markdown"===t.labelType,h=await $7(s,Rc($C(o),B()),{useHtmlLabels:n,width:t.width||B().flowchart?.wrappingWidth,classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},B()),u=h.getBBox(),d=(t?.padding??0)/2;return n&&(r=h.children[0],e=Q(h),await z7(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"),Y7=mt(async(e,t,r)=>{let i=r.useHtmlLabels??_r(B()),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await $7(n,Rc($C(t),B()),{useHtmlLabels:i,width:r.width||B()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=a.getBBox(),o=r.padding/2,l;return _r(B())&&(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"),H7=mt((e,t)=>{t=t.node().getBBox(),e.width=t.width,e.height=t.height},"updateNodeBounds"),X7=mt((e,t)=>("handDrawn"===e.look?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses"),mt(j7,"createPathFromPoints"),mt(W7,"generateFullSineWavePoints"),mt(U7,"generateCirclePoints"),mt(G7,"mergePaths")});function Z7(e,t){return e.intersect(t)}var Q7,J7=r(()=>{mt(Z7,"intersectNode"),Q7=Z7});function e8(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 t8,r8=r(()=>{mt(e8,"intersectEllipse"),t8=e8});function i8(e,t,r){return t8(e,t,t,r)}var n8,a8=r(()=>{r8(),mt(i8,"intersectCircle"),n8=i8});function s8(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 o8(e,t){return 0<e*t}var l8,c8=r(()=>{mt(s8,"intersectLine"),mt(o8,"sameSign"),l8=s8});function h8(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,c=n-t.height/2-o;for(let e=0;e<r.length;e++){var h=r[e],u=r[e<r.length-1?e+1:0];(h=l8(t,i,{x:l+h.x,y:c+h.y},{x:l+u.x,y:c+u.y}))&&a.push(h)}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 u8,d8,p8,J,g8,f8,m8,y8,v8,b8,x8,T8=r(()=>{c8(),mt(h8,"intersectPolygon"),u8=h8}),k8=r(()=>{d8=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"),p8=d8}),w8=r(()=>{J7(),a8(),r8(),T8(),k8(),J={node:Q7,circle:n8,ellipse:t8,polygon:u8,rect:p8}}),C8=r(()=>{Uu(),g8=mt(e=>({fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:B().handDrawnSeed}),"solidStateFill"),f8=mt(e=>({stylesMap:e=m8([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]),stylesArray:[...e]}),"compileStyles"),m8=mt(e=>{let r=new Map;return e.forEach(e=>{var[e,t]=e.split(":");r.set(e.trim(),t?.trim())}),r},"styles2Map"),y8=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"),v8=mt(e=>{let t=f8(e).stylesArray,r=[],i=[],n=[],a=[];return t.forEach(e=>{var t=e[0];y8(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"),b8=mt((e,t)=>{var{themeVariables:r,handDrawnSeed:i}=B(),{nodeBorder:r,mainBkg:n}=r,e=f8(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:x8(e.get("stroke-dasharray"))},t)},"userNodeOverrides"),x8=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 S8(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,c]=i;i[0]=(l-n)*s-(c-a)*o+n,i[1]=(l-n)*o+(c-a)*s+a}}}function E8(e,t){return e[0]===t[0]&&e[1]===t[1]}function _8(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)S8(s,a,n);if(r=((t,n)=>{var e,r=[];for(e of p){var i=[...e];E8(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,c=a[e],h=a[e+1];c[1]!==h[1]&&(l=Math.min(c[1],h[1]),o.push({ymin:l,ymax:Math.max(c[1],h[1]),x:(l===c[1]?c:h)[0],islope:(h[0]-c[0])/(h[1]-c[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)S8(o,a,-n);{e=a,i=-n;let t=[];r.forEach(e=>t.push(...e)),S8(t,e,i)}}return r}function A8(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),_8(e,n,i,a||1)}function R8(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 L8(e,t){return e.type===t}function I8(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:xA,text:RegExp.$1};else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:TA,text:""+parseFloat(RegExp.$1)}}e=e.substr(RegExp.$1.length)}return t[t.length]={type:kA,text:""},t})(e),a="BOD",s=0,o=n[s];for(;!L8(o,kA);){let t=0,r=[];if("BOD"===a){if("M"!==o.text&&"m"!==o.text)return I8("M0,0"+e);s++,t=wA[o.text],a=o.text}else L8(o,TA)?t=wA[a]:(s++,t=wA[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(!L8(l,TA))throw new Error("Param not a number: "+a+","+l.text);r[r.length]=+l.text}if("number"!=typeof wA[a])throw new Error("Bad segment: "+a);var c={key:a,data:r};i.push(c),s+=t,o=n[s],"m"===(a="M"===a?"L":a)&&(a="l")}return i}function N8(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 c=o.map((e,t)=>t%2?e+i:e+r);a.push({key:"S",data:c}),r=c[2],i=c[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 D8(e){let n=[],a="",s=0,o=0,t=0,r=0,l=0,c=0;for(var{key:i,data:h}of e){switch(i){case"M":n.push({key:"M",data:[...h]}),[s,o]=h,[t,r]=h;break;case"C":n.push({key:"C",data:[...h]}),s=h[4],o=h[5],l=h[2],c=h[3];break;case"L":n.push({key:"L",data:[...h]}),[s,o]=h;break;case"H":s=h[0],n.push({key:"L",data:[s,o]});break;case"V":o=h[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-c)):(e=s,o),n.push({key:"C",data:[e,t,...h]}),l=h[0],c=h[1],s=h[2],o=h[3];break}case"T":{let[e,t]=h,r=0,i;i="Q"===a||"T"===a?(r=s+(s-l),o+(o-c)):(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,c=i,s=e,o=t;break}case"Q":var[u,d,p,g]=h,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,c=d,s=p,o=g;break;case"A":var f=Math.abs(h[0]),m=Math.abs(h[1]),y=h[2],v=h[3],b=h[4],x=h[5],T=h[6];0===f||0===m?(n.push({key:"C",data:[s,o,x,T,x,T]}),s=x,o=T):s===x&&o===T||(O8(s,o,x,T,f,m,y,v,b).forEach(function(e){n.push({key:"C",data:e})}),s=x,o=T);break;case"Z":n.push({key:"Z",data:[]}),s=t,o=r}a=i}return n}function M8(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function O8(e,t,r,i,n,a,s,o,l,c){let h=Math.PI*s/180,u=[],d=0,p=0,g=0,f=0;c?[d,p,g,f]=c:([e,t]=M8(e,t,-h),[r,i]=M8(r,i,-h),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,b=a*a,o=(o===l?-1:1)*Math.sqrt(Math.abs((m*b-m*v*v-b*y*y)/(m*v*v+b*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&&(b=p,v=r,o=i,p=l&&p>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,u=O8(r=g+n*Math.cos(p),i=f+a*Math.sin(p),v,o,n,a,s,0,l,[p,b,g,f])),m=p-d,Math.cos(d)),v=Math.sin(d),o=Math.cos(p),s=Math.sin(p),b=4/3*n*(l=Math.tan(m/4)),n=[e,t],a=[e+b*v,t-(m=4/3*a*l)*y],l=[r+b*s,i-m*o],e=[r,i];if(a[0]=2*n[0]-a[0],a[1]=2*n[1]-a[1],c)return[a,l,e].concat(u);u=[a,l,e].concat(u);var x=[];for(let e=0;e<u.length;e+=3){var T=M8(u[e][0],u[e][1],h),k=M8(u[e+1][0],u[e+1][1],h),w=M8(u[e+2][0],u[e+2][1],h);x.push([T[0],T[1],k[0],k[1],w[0],w[1]])}return x}function P8(e,t,r,i,n){return{type:"path",ops:K8(e,t,r,i,n)}}function B8(t,e,r){var i=(t||[]).length;if(2<i){var n=[];for(let e=0;e<i-1;e++)n.push(...K8(t[e][0],t[e][1],t[e+1][0],t[e+1][1],r));return e&&n.push(...K8(t[i-1][0],t[i-1][1],t[0][0],t[0][1],r)),{type:"path",ops:n}}return 2===i?P8(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function $8(e,t,r,i,n){return B8([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],!0,n)}function F8(e,t){if(e.length){var r="number"==typeof e[0][0]?[e]:e,i=Q8(r[0],1+.2*t.roughness,t),n=t.disableMultiStroke?[]:Q8(r[0],1.5*(1+.22*t.roughness),V8(t));for(let e=1;e<r.length;e++)if((l=r[e]).length){var a,s,o=Q8(l,1+.2*t.roughness,t),l=t.disableMultiStroke?[]:Q8(l,1.5*(1+.22*t.roughness),V8(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 z8(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+=X8(e*n,r),ry:t+=X8(t*n,r)}}function q8(e,t,r,i){let[n,a]=eA(i.increment,e,t,i.rx,i.ry,1,i.increment*H8(.1,H8(.4,1,r),r),r),s=J8(n,null,r);return r.disableMultiStroke||0===r.roughness||([e]=eA(i.increment,e,t,i.rx,i.ry,1.5,0,r),t=J8(e,null,r),s=s.concat(t)),{estimatedPoints:a,opset:{type:"path",ops:s}}}function j8(e,t,r,i,n,a,s,o,l){r=Math.abs(r/2),i=Math.abs(i/2),r+=X8(.01*r,l),i+=X8(.01*i,l);let c=n,h=a;for(;c<0;)c+=2*Math.PI,h+=2*Math.PI;return h-c>2*Math.PI&&(c=0,h=2*Math.PI),n=2*Math.PI/l.curveStepCount,n=tA(a=Math.min(n/2,(h-c)/2),e,t,r,i,c,h,1,l),l.disableMultiStroke||(a=tA(a,e,t,r,i,c,h,1.5,l),n.push(...a)),s&&(o?n.push(...K8(e,t,e+r*Math.cos(c),t+i*Math.sin(c),l),...K8(e,t,e+r*Math.cos(h),t+i*Math.sin(h),l)):n.push({op:"lineTo",data:[e,t]},{op:"lineTo",data:[e+r*Math.cos(c),t+i*Math.sin(c)]})),{type:"path",ops:n}}function W8(e,t){let r=D8(N8(I8(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(...K8(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case"C":var[l,c,h,u,d,p]=o;i.push(...rA(l,c,h,u,d,p,a,t)),a=[d,p];break;case"Z":i.push(...K8(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function U8(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]+X8(n,t),r[0][1]+X8(n,t)]});for(let e=1;e<a;e++)i.push({op:"lineTo",data:[r[e][0]+X8(n,t),r[e][1]+X8(n,t)]})}}return{type:"fillPath",ops:i}}function G8(e,r){return(e=>{let t=r.fillStyle||"hachure";if(!vA[t])switch(t){case"zigzag":vA[t]||(vA[t]=new pA(e));break;case"cross-hatch":vA[t]||(vA[t]=new gA(e));break;case"dots":vA[t]||(vA[t]=new fA(e));break;case"dashed":vA[t]||(vA[t]=new mA(e));break;case"zigzag-line":vA[t]||(vA[t]=new yA(e));break;default:t="hachure",vA[t]||(vA[t]=new dA(e))}return vA[t]})(CA).fillPolygons(e,r)}function V8(e){var t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Y8(e){return e.randomizer||(e.randomizer=new bA(e.seed||0)),e.randomizer.next()}function H8(e,t,r,i=1){return r.roughness*i*(Y8(r)*(t-e)+e)}function X8(e,t,r=1){return H8(-e,e,t,r)}function K8(e,t,r,i,n,a=!1){var a=a?n.disableMultiStrokeFill:n.disableMultiStroke,s=Z8(e,t,r,i,n,!0,!1);return a?s:(a=Z8(e,t,r,i,n,!0,!0),s.concat(a))}function Z8(e,t,r,i,n,a,s){let o=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(o),c,h=(c=l<200?1:500<l?.4:-.0016668*l+1.233334,n.maxRandomnessOffset||0),u=(h=h*h*100>o?l/10:h)/2,d=.2+.2*Y8(n),p=n.bowing*n.maxRandomnessOffset*(i-t)/200,g=n.bowing*n.maxRandomnessOffset*(e-r)/200;p=X8(p,n,c),g=X8(g,n,c);var f=[],m=mt(()=>X8(u,n,c),"M"),y=mt(()=>X8(h,n,c),"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:X8(h,n,c)),t+(v?0:X8(h,n,c))]}),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 Q8(t,r,i){if(!t.length)return[];var n=[];n.push([t[0][0]+X8(r,i),t[0][1]+X8(r,i)]),n.push([t[0][0]+X8(r,i),t[0][1]+X8(r,i)]);for(let e=1;e<t.length;e++)n.push([t[e][0]+X8(r,i),t[e][1]+X8(r,i)]),e===t.length-1&&n.push([t[e][0]+X8(r,i),t[e][1]+X8(r,i)]);return J8(n,null,i)}function J8(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]+X8(a,r),e[1]+X8(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(...Z8(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return n}function eA(t,r,i,n,a,s,e,o){var l=[],c=[];if(0===o.roughness){t/=4,c.push([r+n*Math.cos(-t),i+a*Math.sin(-t)]);for(let e=0;e<=2*Math.PI;e+=t){var h=[r+n*Math.cos(e),i+a*Math.sin(e)];l.push(h),c.push(h)}c.push([r+n*Math.cos(0),i+a*Math.sin(0)]),c.push([r+n*Math.cos(t),i+a*Math.sin(t)])}else{var u=X8(.5,o)-Math.PI/2,d=(c.push([X8(s,o)+r+.9*n*Math.cos(u-t),X8(s,o)+i+.9*a*Math.sin(u-t)]),2*Math.PI+u-.01);for(let e=u;e<d;e+=t){var p=[X8(s,o)+r+n*Math.cos(e),X8(s,o)+i+a*Math.sin(e)];l.push(p),c.push(p)}c.push([X8(s,o)+r+n*Math.cos(u+2*Math.PI+.5*e),X8(s,o)+i+a*Math.sin(u+2*Math.PI+.5*e)]),c.push([X8(s,o)+r+.98*n*Math.cos(u+e),X8(s,o)+i+.98*a*Math.sin(u+e)]),c.push([X8(s,o)+r+.9*n*Math.cos(u+.5*e),X8(s,o)+i+.9*a*Math.sin(u+.5*e)])}return[c,l]}function tA(t,r,i,n,a,s,o,l,c){var s=s+X8(.1,c),h=[];h.push([X8(l,c)+r+.9*n*Math.cos(s-t),X8(l,c)+i+.9*a*Math.sin(s-t)]);for(let e=s;e<=o;e+=t)h.push([X8(l,c)+r+n*Math.cos(e),X8(l,c)+i+a*Math.sin(e)]);return h.push([r+n*Math.cos(o),i+a*Math.sin(o)]),h.push([r+n*Math.cos(o),i+a*Math.sin(o)]),J8(h,null,c)}function rA(t,r,i,n,a,s,o,l){var c,h=[],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?h.push({op:"move",data:[o[0],o[1]]}):h.push({op:"move",data:[o[0]+(p?0:X8(u[0],l)),o[1]+(p?0:X8(u[0],l))]}),c=p?[a,s]:[a+X8(u[e],l),s+X8(u[e],l)],h.push({op:"bcurveTo",data:[t+X8(u[e],l),r+X8(u[e],l),i+X8(u[e],l),n+X8(u[e],l),c[0],c[1]]});return h}function iA(e){return[...e]}function nA(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(iA(t[0]),iA(t[1]),iA(t[2]),iA(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(iA(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 aA(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function sA(e,t,r){var i=aA(t,r);return 0===i?aA(e,t):(i=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i,aA(e,oA(t,r,Math.max(0,Math.min(1,i)))))}function oA(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function lA(l,c,e,t){var r,i,n,a,s,o,t=t||[];return(()=>{let e=l[c+0],t=l[c+1],r=l[c+2],i=l[c+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[c+0],(!t.length||(o=t[t.length-1],1<Math.sqrt(aA(o,r))))&&t.push(r),t.push(l[c+3])):(i=oA(o=l[c+0],r=l[c+1],.5),s=oA(r,r=l[c+2],.5),n=oA(r,r=l[c+3],.5),a=oA(i,s,.5),s=oA(s,n,.5),lA([o,i,a,o=oA(a,s,.5)],0,e,t),lA([o,s,n,r],0,e,t)),t}function cA(e,t){return hA(e,0,e.length,t)}function hA(t,r,i,e,n){let a=n||[],s=t[r],o=t[i-1],l=0,c=1;for(let e=r+1;e<i-1;++e){var h=sA(t[e],s,o);h>l&&(l=h,c=e)}return Math.sqrt(l)>e?(hA(t,r,c+1,e,a),hA(t,c,i,e,a)):(a.length||a.push(s),a.push(o)),a}function uA(t,r=.15,e){var i=[],n=(t.length-1)/3;for(let e=0;e<n;e++)lA(t,3*e,r,i);return e&&0<e?hA(i,0,i.length,e):i}var dA,pA,gA,fA,mA,yA,vA,bA,xA,TA,kA,wA,CA,SA,EA,_A,AA,RA,LA,IA=r(()=>{mt(S8,"t"),mt(E8,"e"),mt(_8,"s"),mt(A8,"n"),dA=class{static{mt(this,"o")}constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){return e=A8(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(R8,"a"),pA=class extends dA{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=A8(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)R8([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)}}},gA=class extends dA{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}},fA=class{static{mt(this,"i")}constructor(e){this.helper=e}fillPolygons(e,t){return e=A8(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=R8(a),l=o/i,c=Math.ceil(l)-1,h=o-c*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<c;e++){var p=d+h+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}}},mA=class{static{mt(this,"c")}constructor(e){this.helper=e}fillPolygons(e,t){return e=A8(e,t),{type:"fillSketch",ops:this.dashedLine(e,t)}}dashedLine(e,c){let h=c.dashOffset<0?c.hachureGap<0?4*c.strokeWidth:c.hachureGap:c.dashOffset,u=c.dashGap<0?c.hachureGap<0?4*c.strokeWidth:c.hachureGap:c.dashGap,d=[];return e.forEach(e=>{let t=R8(e),r=Math.floor(t/(h+u)),i=(t+u-r*(h+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*(h+u))+h,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],c))}}),d}},yA=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=A8(e,t=Object.assign({},t,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(e,i,t)}}zigzagLines(e,c,h){let u=[];return e.forEach(e=>{let t=R8(e),r=Math.round(t/(2*c)),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*c,o=2*(e+1)*c,l=Math.sqrt(2*Math.pow(c,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],h),...this.helper.doubleLineOps(l[0],l[1],o[0],o[1],h))}}),u}},vA={},bA=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()}},wA={A:7,a:7,C:6,c:6,H:TA=1,h:1,L:kA=2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:xA=0,z:0},mt(L8,"k"),mt(I8,"b"),mt(N8,"y"),mt(D8,"m"),mt(M8,"w"),mt(O8,"x"),CA={randOffset:mt(function(e,t){return X8(e,t)},"randOffset"),randOffsetWithRange:mt(function(e,t,r){return H8(e,t,r)},"randOffsetWithRange"),ellipse:mt(function(e,t,r,i,n){return q8(e,t,n,z8(r,i,n)).opset},"ellipse"),doubleLineOps:mt(function(e,t,r,i,n){return K8(e,t,r,i,n,!0)},"doubleLineOps")},mt(P8,"v"),mt(B8,"S"),mt($8,"O"),mt(F8,"L"),mt(z8,"T"),mt(q8,"D"),mt(j8,"A"),mt(W8,"_"),mt(U8,"I"),mt(G8,"C"),mt(V8,"z"),mt(Y8,"W"),mt(H8,"E"),mt(X8,"G"),mt(K8,"$"),mt(Z8,"R"),mt(Q8,"j"),mt(J8,"q"),mt(eA,"F"),mt(tA,"V"),mt(rA,"Z"),mt(iA,"Q"),mt(nA,"H"),mt(aA,"N"),mt(sA,"B"),mt(oA,"J"),mt(lA,"K"),mt(cA,"U"),mt(hA,"X"),mt(uA,"Y"),SA="none",EA=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",[P8(e,t,r,i,n)],n)}rectangle(e,t,r,i,n){var a=[],s=$8(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(U8([r],n)):a.push(G8([r],n))),n.stroke!==SA&&a.push(s),this._d("rectangle",a,n)}ellipse(e,t,r,i,n){var a=[],i=q8(e,t,n=this._o(n),r=z8(r,i,n));return n.fill&&("solid"===n.fillStyle?((e=q8(e,t,n,r).opset).type="fillPath",a.push(e)):a.push(G8([i.estimatedPoints],n))),n.stroke!==SA&&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",[B8(e,!1,t)],t)}arc(d,p,g,e,t,r,i=!1,n){var n=this._o(n),a=[],s=j8(d,p,g,e,t,r,i,!0,n);return i&&n.fill&&("solid"===n.fillStyle?(i=Object.assign({},n),(i=j8(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+=X8(.01*s,i),o+=X8(.01*o,i);let l=t,c=r;for(;l<0;)l+=2*Math.PI,c+=2*Math.PI;c-l>2*Math.PI&&(l=0,c=2*Math.PI);var h=(c-l)/i.curveStepCount,u=[];for(let e=l;e<=c;e+=h)u.push([n+s*Math.cos(e),a+o*Math.sin(e)]);return u.push([n+s*Math.cos(c),a+o*Math.sin(c)]),u.push([n,a]),G8([u],i)})(e,t,r,n))),n.stroke!==SA&&a.push(s),this._d("arc",a,n)}curve(e,t){var r=this._o(t),t=[],i=F8(e,r);if(r.fill&&r.fill!==SA)if("solid"===r.fillStyle){var n=F8(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(...uA(nA([a[0],a[0],a[1],a[2]]),10,(1+r.roughness)/2)):s.push(...uA(nA(a),10,(1+r.roughness)/2));s.length&&t.push(G8([s],r))}return r.stroke!==SA&&t.push(i),this._d("curve",t,r)}polygon(e,t){var r=[],i=B8(e,!0,t=this._o(t));return t.fill&&("solid"===t.fillStyle?r.push(U8([e],t)):r.push(G8([e],t))),t.stroke!==SA&&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!==SA,n=r.stroke!==SA,s=((e,t)=>{let r=D8(N8(I8(e))),i=[],n=[],a=[0,0],s=[],o=mt(()=>{4<=s.length&&n.push(...uA(s,1)),s=[]},"i"),l=mt(()=>{o(),n.length&&(i.push(n),n=[])},"c");for(var{key:c,data:h}of r)switch(c){case"M":l(),a=[h[0],h[1]],n.push(a);break;case"L":o(),n.push([h[0],h[1]]);break;case"C":var u;s.length||(u=n.length?n[n.length-1]:a,s.push([u[0],u[1]])),s.push([h[0],h[1]]),s.push([h[2],h[3]]),s.push([h[4],h[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=cA(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=W8(e,r),t&&("solid"===r.fillStyle?1===s.length?(t=W8(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(U8(s,r)):i.push(G8(s,r))),n)&&(a?s.forEach(e=>{i.push(B8(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:SA};break;case"fillPath":e={d:this.opsToPath(t),stroke:SA,strokeWidth:0,fill:i.fill||SA};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||SA,strokeWidth:r,fill:SA}}_mergedShape(e){return e.filter((e,t)=>0===t||"move"!==e.op)}},_A=class{static{mt(this,"st")}constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new EA(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}},AA="http://www.w3.org/2000/svg",RA=class{static{mt(this,"ot")}constructor(e,t){this.svg=e,this.gen=new EA(t)}draw(t){var r,e=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(AA,"g"),s=t.options.fixedDecimalPlaceDigits;for(r of e){let e=null;switch(r.type){case"path":(e=n.createElementNS(AA,"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(AA,"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(AA,"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)}},LA={canvas:mt((e,t)=>new _A(e,t),"canvas"),svg:mt((e,t)=>new RA(e,t),"svg"),generator:mt(e=>new EA(e),"generator"),newSeed:mt(()=>EA.newSeed(),"newSeed")}});function NA(e,t){var r=v8(t).labelStyles;t.labelStyle=r;let i=X7(t),n=i,a=(i||(n="anchor"),e.insert("g").attr("class",n).attr("id",t.domId||t.id)),s=t.cssStyles,o=LA.svg(a),l=b8(t,{fill:"black",stroke:"none",fillStyle:"solid"}),c=("handDrawn"!==t.look&&(l.roughness=0),o.circle(0,0,2,l)),h=a.insert(()=>c,":first-child");return h.attr("class","anchor").attr("style",cC(s)),H7(t,h),t.intersect=function(e){return P.info("Circle intersect",t,1,e),J.circle(t,1,e)},a}var DA=r(()=>{e(),K7(),w8(),C8(),IA(),zC(),mt(NA,"anchor")});function MA(e,t,r,i,n,a,s){var o=(e+r)/2,l=(t+i)/2,c=Math.atan2(i-t,r-e),h=Math.sqrt(((r-e)/2/n)**2+((i-t)/2/a)**2);if(1<h)throw new Error("The given radii are too small to create an arc between the points.");let u=Math.sqrt(1-h**2),d=o+u*a*Math.sin(c)*(s?-1:1),p=l-u*n*Math.cos(c)*(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 OA(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 PA(e,t){var{labelStyles:r,nodeStyles:i}=v8(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:c,bbox:h}=await V7(e,t,X7(t)),u=o(t?.height||h.height),[d,p]=l(u),g=OA(u,d,p),f=(t?.width||h.width)+2*a+g-g,m=u,y=t.cssStyles,v=[{x:f/2,y:-m/2},{x:-f/2,y:-m/2},...MA(-f/2,-m/2,-f/2,m/2,d,p,!1),{x:f/2,y:m/2},...MA(f/2,m/2,f/2,-m/2,d,p,!0)],b=LA.svg(c),x=b8(t,{}),T=("handDrawn"!==t.look&&(x.roughness=0,x.fillStyle="solid"),j7(v)),k=b.path(T,x),w=c.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)`),H7(t,w),t.intersect=function(e){return J.polygon(t,v,e)},c}var BA=r(()=>{K7(),w8(),C8(),IA(),mt(MA,"generateArcPoints"),mt(OA,"calculateArcSagitta"),mt(PA,"bowTieRect")});function $A(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 FA=r(()=>{mt($A,"insertPolygonShape")});async function zA(e,n){var{labelStyles:t,nodeStyles:r}=v8(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 V7(e,n,X7(n)),c=(n?.width??l.width)+("neo"===n.look?2*a:a+qA),h=(n?.height??l.height)+("neo"===n.look?2*s:s),u=c,d=-h,p=[{x:0+qA,y:d},{x:u,y:d},{x:u,y:0},{x:0,y:0},{x:0,y:d+qA},{x:0+qA,y:d}],g,f=n.cssStyles;if("handDrawn"===n.look){let e=LA.svg(o),t=b8(n,{}),r=j7(p),i=e.path(r,t);g=o.insert(()=>i,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),f&&g.attr("style",f)}else g=$A(o,c,h,p);return r&&g.attr("style",r),H7(n,g),n.intersect=function(e){return J.polygon(n,p,e)},o}var qA,jA=r(()=>{K7(),w8(),C8(),IA(),FA(),K7(),qA=12,mt(zA,"card")});function WA(e,t){var r=v8(t).nodeStyles;t.label="";let i=e.insert("g").attr("class",X7(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=LA.svg(i),l=b8(t,{}),c=("handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid"),j7(s)),h=o.path(c,l),u=i.insert(()=>h,":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 UA=r(()=>{w8(),IA(),C8(),K7(),mt(WA,"choice")});async function GA(e,i,t){var{labelStyles:r,nodeStyles:n}=v8(i);i.labelStyle=r;let{shapeSvg:a,bbox:s,halfPadding:o}=await V7(e,i,X7(i)),l=t?.padding??o,c="neo"===i.look?s.width/2+32:s.width/2+l,h,u=i.cssStyles;if("handDrawn"===i.look){let e=LA.svg(a),t=b8(i,{}),r=e.circle(0,0,2*c,t);(h=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",cC(u))}else h=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0);return H7(i,h),i.calcIntersect=function(e,t){var r=e.width/2;return J.circle(e,r,t)},i.intersect=function(e){return P.info("Circle intersect",i,c,e),J.circle(i,c,e)},a}var VA=r(()=>{IA(),e(),zC(),w8(),C8(),K7(),mt(GA,"circle")});function YA(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 HA(e,t){var{labelStyles:r,nodeStyles:i}=v8(t);t.labelStyle=r,t.label="";let n=e.insert("g").attr("class",X7(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),s=t.cssStyles,o=LA.svg(n),l=b8(t,{}),c=("handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid"),o.circle(0,0,2*a,l)),h=YA(a),u=o.path(h,l),d=n.insert(()=>c,":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),H7(t,d),t.intersect=function(e){return P.info("crossedCircle intersect",t,{radius:a,point:e}),J.circle(t,a,e)},n}var XA=r(()=>{e(),K7(),C8(),IA(),w8(),mt(YA,"createLine"),mt(HA,"crossedCircle")});function KA(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 c=o+e*l,h=t+i*Math.cos(c),c=r+i*Math.sin(c);s.push({x:-h,y:-c})}return s}async function ZA(e,t){var{labelStyles:r,nodeStyles:i}=v8(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await V7(e,t,X7(t)),o="neo"===t.look?18:t.padding??0,l="neo"===t.look?12:t.padding??0,c=a.width+o,h=a.height+l,u=Math.max(5,.1*h),d=t.cssStyles,p=[...KA(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...KA(c/2+2*u,-u,u,20,-180,-270),...KA(c/2+2*u,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...KA(c/2,h/2,u,20,0,90)],g=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...KA(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...KA(c/2+.1*c,-u,u,20,-180,-270),...KA(c/2+.1*c,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...KA(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2,y:h/2+u}],f=LA.svg(n),m=b8(t,{fill:"none"}),y=("handDrawn"!==t.look&&(m.roughness=0,m.fillStyle="solid"),j7(p).replace("Z","")),v=f.path(y,m),b=j7(g),x=f.path(b,{...m}),T=n.insert("g",":first-child");return T.insert(()=>x,":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(${-c/2+u-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),H7(t,T),t.intersect=function(e){return J.polygon(t,g,e)},n}var QA=r(()=>{K7(),w8(),C8(),IA(),mt(KA,"generateCirclePoints"),mt(ZA,"curlyBraceLeft")});function JA(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 c=o+e*l,h=t+i*Math.cos(c),c=r+i*Math.sin(c);s.push({x:h,y:c})}return s}async function eR(e,t){var{labelStyles:r,nodeStyles:i}=v8(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await V7(e,t,X7(t)),o="neo"===t.look?18:t.padding??0,l="neo"===t.look?12:t.padding??0,c=a.width+("neo"===t.look?2*o:o),h=a.height+("neo"===t.look?2*l:l),u=Math.max(5,.1*h),d=t.cssStyles,p=[...JA(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...JA(c/2+2*u,-u,u,20,-180,-270),...JA(c/2+2*u,u,u,20,-90,-180),{x:c/2+u,y:h/2},...JA(c/2,h/2,u,20,0,90)],g=[{x:-c/2,y:-h/2-u},{x:c/2,y:-h/2-u},...JA(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...JA(c/2+2*u,-u,u,20,-180,-270),...JA(c/2+2*u,u,u,20,-90,-180),{x:c/2+u,y:h/2},...JA(c/2,h/2,u,20,0,90),{x:c/2,y:h/2+u},{x:-c/2,y:h/2+u}],f=LA.svg(n),m=b8(t,{fill:"none"}),y=("handDrawn"!==t.look&&(m.roughness=0,m.fillStyle="solid"),j7(p).replace("Z","")),v=f.path(y,m),b=j7(g),x=f.path(b,{...m}),T=n.insert("g",":first-child");return T.insert(()=>x,":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(${-c/2+(t.padding??0)/2-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),H7(t,T),t.intersect=function(e){return J.polygon(t,g,e)},n}var tR=r(()=>{K7(),w8(),C8(),IA(),mt(JA,"generateCirclePoints"),mt(eR,"curlyBraceRight")});function rR(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 c=o+e*l,h=t+i*Math.cos(c),c=r+i*Math.sin(c);s.push({x:-h,y:-c})}return s}async function iR(e,t){var{labelStyles:r,nodeStyles:i}=v8(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await V7(e,t,X7(t)),o="neo"===t.look?18:t.padding??0,l="neo"===t.look?12:t.padding??0,c=a.width+("neo"===t.look?2*o:o),h=a.height+("neo"===t.look?2*l:l),u=Math.max(5,.1*h),d=t.cssStyles,p=[...rR(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...rR(c/2+2*u,-u,u,20,-180,-270),...rR(c/2+2*u,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...rR(c/2,h/2,u,20,0,90)],g=[...rR(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...rR(-c/2-u/2,-u,u,20,0,90),...rR(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...rR(-c/2+u+u/2,h/2,u,30,-180,-270)],f=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...rR(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...rR(c/2+2*u,-u,u,20,-180,-270),...rR(c/2+2*u,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...rR(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2-u-u/2,y:h/2+u},...rR(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...rR(-c/2-u/2,-u,u,20,0,90),...rR(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...rR(-c/2+u+u/2,h/2,u,30,-180,-270)],m=LA.svg(n),y=b8(t,{fill:"none"}),v=("handDrawn"!==t.look&&(y.roughness=0,y.fillStyle="solid"),j7(p).replace("Z","")),b=m.path(v,y),x=j7(g).replace("Z",""),T=m.path(x,y),k=j7(f),w=m.path(k,{...y}),C=n.insert("g",":first-child");return C.insert(()=>w,":first-child").attr("stroke-opacity",0),C.insert(()=>b,":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(${-c/2+(t.padding??0)/2-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),H7(t,C),t.intersect=function(e){return J.polygon(t,f,e)},n}var nR=r(()=>{K7(),w8(),C8(),IA(),mt(rR,"generateCirclePoints"),mt(iR,"curlyBraces")});async function aR(e,t){var{labelStyles:r,nodeStyles:i}=v8(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 V7(e,t,X7(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=LA.svg(e),l=b8(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");let c=n,h=a,u=c-r,d=h/4,p=[{x:u,y:0},{x:d,y:0},{x:0,y:h/2},{x:d,y:h},{x:u,y:h},...U7(-u,-h/2,r,50,270,90)],g=j7(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})`),H7(t,m),t.intersect=function(e){return J.polygon(t,p,e)},e}var sR=r(()=>{K7(),w8(),C8(),IA(),mt(aR,"curvedTrapezoid")});async function oR(e,s){var{labelStyles:t,nodeStyles:r}=v8(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<dR&&(s.width=dR),s.height=(s.height??0)-i-g/2/(2.5+g/50)*3,s.height<uR)&&(s.height=uR);let{shapeSvg:o,bbox:n,label:a}=await V7(e,s,X7(s)),l=(s.width||n.width)+t,c=l/2,h=c/(2.5+l/50),u=(s.height||n.height)+i+h,d,p=s.cssStyles;if("handDrawn"===s.look){let e=LA.svg(o),t=cR(0,0,l,u,c,h),r=hR(0,h,l,u,c,h),i=b8(s,{}),n=e.path(t,i),a=e.path(r,b8(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=lR(0,0,l,u,c,h);d=o.insert("path",":first-child").attr("d",g).attr("class","basic label-container outer-path").attr("style",cC(p)).attr("style",r)}return d.attr("label-offset-y",h),d.attr("transform",`translate(${-l/2}, ${-(u/2+h)})`),H7(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!=c&&(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-h)){let e=h*h*(1-i*i/(c*c));0<e&&(e=Math.sqrt(e)),e=h-e,0<t.y-(s.y??0)&&(e=-e),r.y+=e}return r},o}var lR,cR,hR,uR,dR,pR,gR=r(()=>{K7(),w8(),C8(),IA(),zC(),lR=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"),cR=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"),hR=mt((e,t,r,i,n,a)=>[`M${e-r/2},`+-i/2,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),dR=uR=8,mt(oR,"cylinder")}),fR=r(()=>{pR=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 mR(e,i,t){var{labelStyles:r,nodeStyles:n}=v8(i);i.labelStyle=r;let{shapeSvg:a,bbox:s}=await V7(e,i,X7(i)),o=Math.max(s.width+2*t.labelPaddingX,i?.width||0),l=Math.max(s.height+2*t.labelPaddingY,i?.height||0),c=-o/2,h=-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=LA.svg(a),t=b8(i,{}),r=d||p?e.path(pR(c,h,o,l,d||0),t):e.rectangle(c,h,o,l,t);(u=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",cC(g))}else(u=a.insert("rect",":first-child")).attr("class","basic label-container").attr("style",n).attr("rx",cC(d)).attr("ry",cC(p)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return H7(i,u),i.calcIntersect=function(e,t){return J.rect(e,t)},i.intersect=function(e){return J.rect(i,e)},a}var yR=r(()=>{K7(),w8(),fR(),C8(),IA(),zC(),mt(mR,"drawRect")});async function vR(a,e){var{cssClasses:t,labelPaddingX:r,labelPaddingY:i,padding:n,width:s,height:o}=e,a=await mR(a,e,{rx:0,ry:0,classes:t??"",labelPaddingX:r??2*(n??0),labelPaddingY:i??n??0});if("handDrawn"===e.look){let t=LA.svg(a),r=b8(e,{}),i=a.select(".basic.label-container > path:nth-child(2)"),n=i.node();if(n){let e;n instanceof SVGGraphicsElement&&(e=n.getBBox(),a.insert(()=>t.line(e.x,e.y,e.x+e.width,e.y,r),".basic.label-container g.label"),a.insert(()=>t.line(e.x,e.y+e.height,e.x+e.width,e.y+e.height,r),".basic.label-container g.label"),i.remove())}}else t=a.select(".basic.label-container"),r=(Number(t.attr("width"))||s)??0,i=(Number(t.attr("height"))||o)??0,0<r&&0<i&&t.attr("stroke-dasharray",r+" "+i);return a}var bR=r(()=>{yR(),C8(),IA(),mt(vR,"datastore")});async function xR(e,t){var{labelStyles:r,nodeStyles:i}=v8(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 V7(e,t,X7(t)),r=a.width+r,o=.2*(n=a.height+n),r=-r/2,n=-n/2-o/2,l=t.cssStyles,c=LA.svg(e),h=b8(t,{});"handDrawn"!==t.look&&(h.roughness=0,h.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=c.polygon(u.map(e=>[e.x,e.y]),h),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))})`),H7(t,p),t.intersect=function(e){return J.rect(t,e)},e}var TR=r(()=>{K7(),w8(),C8(),IA(),mt(xR,"dividedRectangle")});async function kR(e,t){var{labelStyles:r,nodeStyles:i}=v8(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 V7(e,t,X7(t)),c=(t?.width?t?.width/2:l.width/2)+(s??0),h=c-n,u,d=t.cssStyles;return"handDrawn"===t.look?(r=LA.svg(o),e=b8(t,{roughness:.2,strokeWidth:2.5}),n=b8(t,{roughness:.2,strokeWidth:1.5}),e=r.circle(0,0,2*c,e),r=r.circle(0,0,2*h,n),(u=o.insert("g",":first-child")).attr("class",cC(t.cssClasses)).attr("style",cC(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",c).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)),H7(t,u),t.intersect=function(e){return P.info("DoubleCircle intersect",t,c,e),J.circle(t,c,e)},o}var wR=r(()=>{e(),K7(),w8(),C8(),IA(),zC(),mt(kR,"doublecircle")});function CR(e,t,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:n}=v8(t);t.label="",t.labelStyle=i;let a=e.insert("g").attr("class",X7(t)).attr("id",t.domId??t.id),s=t.cssStyles,o=LA.svg(a),l=r.nodeBorder,c=b8(t,{fillStyle:"solid"}),h=("handDrawn"!==t.look&&(c.roughness=0),o.circle(0,0,14,c)),u=a.insert(()=>h,":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),H7(t,u),t.intersect=function(e){return P.info("filledCircle intersect",t,{radius:7,point:e}),J.circle(t,7,e)},a}var SR=r(()=>{IA(),e(),w8(),C8(),K7(),mt(CR,"filledCircle")});async function ER(e,t){var{labelStyles:r,nodeStyles:i}=v8(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<_R&&(t.height=_R),t.width=(t?.width??0)-r-r/2,t.width<AR)&&(t.width=AR);let{shapeSvg:n,bbox:a,label:s}=await V7(e,t,X7(t)),o=(t?.width||a.width)+(r??0),l=t?.height||o+a.height,c=l,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],u=t.cssStyles,d=LA.svg(n),p=b8(t,{}),g=("handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid"),j7(h)),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,H7(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 P.info("Triangle intersect",t,h,e),J.polygon(t,h,e)},n}var _R,AR,RR=r(()=>{e(),K7(),w8(),C8(),IA(),K7(),AR=_R=10,mt(ER,"flippedTriangle")});function LR(e,t,{dir:r,config:{state:i,themeVariables:n}}){var a=v8(t).nodeStyles;t.label="";let s=e.insert("g").attr("class",X7(t)).attr("id",t.domId??t.id),o=t.cssStyles,l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);"LR"===r&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));var e=-1*l/2,r=-1*c/2,h=LA.svg(s),n=b8(t,{stroke:n.lineColor,fill:n.lineColor});"handDrawn"!==t.look&&(n.roughness=0,n.fillStyle="solid");let u=h.rectangle(e,r,l,c,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),H7(t,d),h=i?.padding??0,t.width&&t.height&&(t.width+=h/2||0,t.height+=h/2||0),t.intersect=function(e){return J.rect(t,e)},s}var IR=r(()=>{IA(),w8(),C8(),K7(),mt(LR,"forkJoin")});async function NR(e,t){var{labelStyles:r,nodeStyles:i}=v8(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 V7(e,t,X7(t)),o=(t?.width||Math.max(15,s.width))+2*r,l=(t?.height||Math.max(10,s.height))+2*n,c=l/2,h=t.cssStyles,u=LA.svg(a),d=b8(t,{}),p=("handDrawn"!==t.look&&(d.roughness=0,d.fillStyle="solid"),[{x:-o/2,y:-l/2},{x:o/2-c,y:-l/2},...U7(-o/2+c,0,c,50,90,270),{x:o/2-c,y:l/2},{x:-o/2,y:l/2}]),g=j7(p),f=u.path(g,d),m=a.insert(()=>f,":first-child");return m.attr("class","basic label-container outer-path"),h&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",h),i&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",i),H7(t,m),t.intersect=function(e){return P.info("Pill intersect",t,{radius:c,point:e}),J.polygon(t,p,e)},a}var DR=r(()=>{e(),K7(),w8(),C8(),IA(),mt(NR,"halfRoundedRectangle")});async function MR(e,n){var t,{labelStyles:r,nodeStyles:i}=v8(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 V7(e,n,X7(n)),c=(n?.height||l.height)+s,h=c/a,u=(n?.width||l.width)+2*h+r,d=[{x:h,y:0},{x:u-h,y:0},{x:u,y:-c/2},{x:u-h,y:-c},{x:h,y:-c},{x:0,y:-c/2}],p,g=n.cssStyles;if("handDrawn"===n.look){let e=LA.svg(o),t=b8(n,{}),r=OR(0,0,u,c,h),i=e.path(r,t);p=o.insert(()=>i,":first-child").attr("transform",`translate(${-u/2}, ${c/2})`),g&&p.attr("style",g)}else p=$A(o,u,c,d);return i&&p.attr("style",i),n.width=u,n.height=c,H7(n,p),n.intersect=function(e){return J.polygon(n,d,e)},o}var OR,PR=r(()=>{K7(),w8(),C8(),IA(),FA(),OR=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(MR,"hexagon")});async function BR(e,t){var{labelStyles:r,nodeStyles:i}=v8(t),r=(t.label="",t.labelStyle=r,(await V7(e,t,X7(t))).shapeSvg),e=Math.max(30,t?.width??0),n=Math.max(30,t?.height??0),a=t.cssStyles,s=LA.svg(r),o=b8(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}],c=j7(l),h=s.path(c,o),u=r.insert(()=>h,":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})`),H7(t,u),t.intersect=function(e){return P.info("Pill intersect",t,{points:l}),J.polygon(t,l,e)},r}var $R=r(()=>{e(),K7(),w8(),C8(),IA(),mt(BR,"hourglass")});async function FR(e,n,{config:{themeVariables:t,flowchart:r}}){var i,a=v8(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 V7(e,n,"icon-shape default"),c="t"===n.pos,h=a,u=a,d=t.nodeBorder,p=f8(n).stylesMap,g=-u/2,f=-h/2,m=n.label?8:0,y=LA.svg(s),v=b8(n,{stroke:"none",fill:"none"}),b=("handDrawn"!==n.look&&(v.roughness=0,v.fillStyle="solid"),y.rectangle(g,f,u,h,v)),x=Math.max(u,o.width),T=h+o.height+m,k=y.rectangle(-x/2,-T/2,x,T,{...v,fill:"transparent",stroke:"none"}),w=s.insert(()=>b,":first-child"),C=s.insert(()=>k);return n.icon&&((r=s.append("g")).html(`<g>${await eh(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},${c?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))},${c?-T/2:T/2-o.height})`),w.attr("transform",`translate(0,${c?o.height/2+m/2:-o.height/2-m/2})`),H7(n,C),n.intersect=function(e){var t,r,i;return P.info("iconSquare intersect",n,e),n.label?(i=n.x??0,t=n.y??0,r=n.height??0,i=c?[{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+h},{x:i+o.width/2,y:t-r/2+h},{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+h},{x:i-u/2,y:t-r/2+h}],J.polygon(n,i,e)):J.rect(n,e)},s}var zR=r(()=>{IA(),e(),rh(),w8(),C8(),K7(),mt(FR,"icon")});async function qR(e,t,{config:{themeVariables:r,flowchart:i}}){var n=v8(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 V7(e,t,"icon-shape default")),s=t.label?8:0,o="t"===t.pos,{nodeBorder:r,mainBkg:l}=r,c=f8(t).stylesMap,h=LA.svg(i),u=b8(t,{}),d=("handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid"),c.get("fill")),d=(u.stroke=d??l,i.append("g"));t.icon&&d.html(`<g>${await eh(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,b=h.circle(0,0,v,u),x=Math.max(v,e.width),T=v+e.height+s,k=h.rectangle(-x/2,-T/2,x,T,{...u,fill:"transparent",stroke:"none"}),w=i.insert(()=>b,":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: ${c.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})`),H7(t,C),t.intersect=function(e){return P.info("iconSquare intersect",t,e),J.rect(t,e)},i}var jR=r(()=>{IA(),e(),rh(),w8(),C8(),K7(),mt(qR,"iconCircle")});async function WR(e,n,{config:{themeVariables:t,flowchart:r}}){var i=v8(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 V7(e,n,"icon-shape default"),c="t"===n.pos,h=i+2*o,u=i+2*o,{nodeBorder:d,mainBkg:p}=t,g=f8(n).stylesMap,f=-u/2,m=-h/2,y=n.label?8:0,v=LA.svg(a),b=b8(n,{});"handDrawn"!==n.look&&(b.roughness=0,b.fillStyle="solid");var x,r=g.get("fill");b.stroke=r??p;let T=v.path(pR(f,m,u,h,5),b),k=Math.max(u,s.width),w=h+s.height+y,C=v.rectangle(-k/2,-w/2,k,w,{...b,fill:"transparent",stroke:"none"}),S=a.insert(()=>T,":first-child").attr("class","icon-shape2"),E=a.insert(()=>C);return n.icon&&((e=a.append("g")).html(`<g>${await eh(n.icon,{height:i,width:i,fallbackPrefix:""})}</g>`),r=(t=e.node().getBBox()).width,i=t.height,x=t.y,e.attr("transform",`translate(${-r/2-t.x},${c?s.height/2+y/2-i/2-x:-s.height/2-y/2-i/2-x})`),e.attr("style",`color: ${g.get("stroke")??d};`)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-w/2:w/2-s.height})`),S.attr("transform",`translate(0,${c?s.height/2+y/2:-s.height/2-y/2})`),H7(n,E),n.intersect=function(e){var t,r,i;return P.info("iconSquare intersect",n,e),n.label?(i=n.x??0,t=n.y??0,r=n.height??0,i=c?[{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+h},{x:i+s.width/2,y:t-r/2+h},{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+h},{x:i-u/2,y:t-r/2+h}],J.polygon(n,i,e)):J.rect(n,e)},a}var UR=r(()=>{IA(),e(),rh(),w8(),C8(),fR(),K7(),mt(WR,"iconRounded")});async function GR(e,n,{config:{themeVariables:t,flowchart:r}}){var i=v8(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 V7(e,n,"icon-shape default"),c="t"===n.pos,h=i+2*o,u=i+2*o,{nodeBorder:d,mainBkg:p}=t,g=f8(n).stylesMap,f=-u/2,m=-h/2,y=n.label?8:0,v=LA.svg(a),b=b8(n,{});"handDrawn"!==n.look&&(b.roughness=0,b.fillStyle="solid");var x,r=g.get("fill");b.stroke=r??p;let T=v.path(pR(f,m,u,h,.1),b),k=Math.max(u,s.width),w=h+s.height+y,C=v.rectangle(-k/2,-w/2,k,w,{...b,fill:"transparent",stroke:"none"}),S=a.insert(()=>T,":first-child"),E=a.insert(()=>C);return n.icon&&((e=a.append("g")).html(`<g>${await eh(n.icon,{height:i,width:i,fallbackPrefix:""})}</g>`),r=(t=e.node().getBBox()).width,i=t.height,x=t.y,e.attr("transform",`translate(${-r/2-t.x},${c?s.height/2+y/2-i/2-x:-s.height/2-y/2-i/2-x})`),e.attr("style",`color: ${g.get("stroke")??d};`)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-w/2:w/2-s.height})`),S.attr("transform",`translate(0,${c?s.height/2+y/2:-s.height/2-y/2})`),H7(n,E),n.intersect=function(e){var t,r,i;return P.info("iconSquare intersect",n,e),n.label?(i=n.x??0,t=n.y??0,r=n.height??0,i=c?[{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+h},{x:i+s.width/2,y:t-r/2+h},{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+h},{x:i-u/2,y:t-r/2+h}],J.polygon(n,i,e)):J.rect(n,e)},a}var VR=r(()=>{IA(),e(),rh(),w8(),fR(),C8(),K7(),mt(GR,"iconSquare")});async function YR(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,v8(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:c,bbox:h,label:u}=(n.width=Math.max(o,a??0),await V7(e,n,"image-shape default")),d="t"===n.pos,p=-o/2,g=-l/2,f=n.label?8:0,m=LA.svg(c),y=b8(n,{}),v=("handDrawn"!==n.look&&(y.roughness=0,y.fillStyle="solid"),m.rectangle(p,g,o,l,y)),b=Math.max(o,h.width),x=l+h.height+f,T=m.rectangle(-b/2,-x/2,b,x,{...y,fill:"none",stroke:"none"}),k=c.insert(()=>v,":first-child"),w=c.insert(()=>T);return n.img&&((t=c.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?x/2-l:-x/2})`)),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-l/2-h.height/2-f/2:l/2-h.height/2+f/2})`),k.attr("transform",`translate(0,${d?h.height/2+f/2:-h.height/2-f/2})`),H7(n,w),n.intersect=function(e){var t,r,i;return P.info("iconSquare intersect",n,e),n.label?(i=n.x??0,t=n.y??0,r=n.height??0,i=d?[{x:i-h.width/2,y:t-r/2},{x:i+h.width/2,y:t-r/2},{x:i+h.width/2,y:t-r/2+h.height+f},{x:i+o/2,y:t-r/2+h.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+h.height+f},{x:i-h.width/2,y:t-r/2+h.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+h.width/2,y:t-r/2+l},{x:i+h.width/2/2,y:t+r/2},{x:i-h.width/2,y:t+r/2},{x:i-h.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)},c}var HR=r(()=>{IA(),e(),w8(),C8(),K7(),mt(YR,"imageSquare")});async function XR(e,n){var{labelStyles:t,nodeStyles:r}=v8(n);n.labelStyle=t;let i=n.padding??0,a=i,s="neo"===n.look?2*i:i,{shapeSvg:o,bbox:l}=await V7(e,n,X7(n)),c=Math.max(l.width+2*(s??0),n?.width??0),h=Math.max(l.height+2*(a??0),n?.height??0),u=[{x:0,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:-3*h/6,y:-h}],d,p=n.cssStyles;if("handDrawn"===n.look){let e=LA.svg(o),t=b8(n,{}),r=j7(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=$A(o,c,h,u);return r&&d.attr("style",r),n.width=c,n.height=h,H7(n,d),n.intersect=function(e){return J.polygon(n,u,e)},o}var KR=r(()=>{K7(),w8(),C8(),IA(),FA(),mt(XR,"inv_trapezoid")});async function ZR(e,t){var{shapeSvg:e,bbox:r,label:i}=await V7(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))})`),H7(t,n),t.intersect=function(e){return J.rect(t,e)},e}var QR=r(()=>{yR(),K7(),w8(),mt(ZR,"labelRect")});async function JR(e,n){var{labelStyles:t,nodeStyles:r}=v8(n);n.labelStyle=t;let i=n.padding??0,a=i,s="neo"===n.look?2*i:i,{shapeSvg:o,bbox:l}=await V7(e,n,X7(n)),c=(n?.height??l.height)+a,h=(n?.width??l.width)+s,u=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-3*c/6,y:-c}],d,p=n.cssStyles;if("handDrawn"===n.look){let e=LA.svg(o),t=b8(n,{}),r=j7(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=$A(o,h,c,u);return r&&d.attr("style",r),n.width=h,n.height=c,H7(n,d),n.intersect=function(e){return J.polygon(n,u,e)},o}var eL=r(()=>{K7(),w8(),C8(),IA(),FA(),mt(JR,"lean_left")});async function tL(e,n){var{labelStyles:t,nodeStyles:r}=v8(n);n.labelStyle=t;let i=n.padding??0,a=i,s="neo"===n.look?2*i:i,{shapeSvg:o,bbox:l}=await V7(e,n,X7(n)),c=(n?.height??l.height)+a,h=(n?.width??l.width)+s,u=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}],d,p=n.cssStyles;if("handDrawn"===n.look){let e=LA.svg(o),t=b8(n,{}),r=j7(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=$A(o,h,c,u);return r&&d.attr("style",r),n.width=h,n.height=c,H7(n,d),n.intersect=function(e){return J.polygon(n,u,e)},o}var rL=r(()=>{K7(),w8(),C8(),IA(),FA(),mt(tL,"lean_right")});function iL(e,t){var{labelStyles:r,nodeStyles:i}=v8(t);t.label="",t.labelStyle=r;let n=e.insert("g").attr("class",X7(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}],c=LA.svg(n),h=b8(t,{}),u=("handDrawn"!==t.look&&(h.roughness=0,h.fillStyle="solid"),j7(l)),d=c.path(u,h),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})`),H7(t,p),t.intersect=function(e){return P.info("lightningBolt intersect",t,e),J.polygon(t,l,e)},n}var nL=r(()=>{e(),K7(),C8(),IA(),w8(),K7(),mt(iL,"lightningBolt")});async function aL(e,s){var{labelStyles:t,nodeStyles:r}=v8(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<hL&&(s.width=hL),s.height=(s.height??0)-t-f/2/(2.5+f/50)*3,s.height<cL)&&(s.height=cL);let{shapeSvg:o,bbox:n,label:a}=await V7(e,s,X7(s)),l=(s?.width||n.width)+2*i,c=l/2,h=c/(2.5+l/50),u=(s?.height||n.height)+h+2*t,d=.1*u,p,g=s.cssStyles;if("handDrawn"===s.look){let e=LA.svg(o),t=oL(0,0,l,u,c,h,d),r=lL(0,h,l,u,c,h),i=b8(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=sL(0,0,l,u,c,h,d);p=o.insert("path",":first-child").attr("d",f).attr("class","basic label-container outer-path").attr("style",cC(g)).attr("style",r)}return p.attr("label-offset-y",h),p.attr("transform",`translate(${-l/2}, ${-(u/2+h)})`),H7(s,p),a.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+h-(n.y-(n.top??0))})`),s.intersect=function(t){var r=J.rect(s,t),i=r.x-(s.x??0);if(0!=c&&(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-h)){let e=h*h*(1-i*i/(c*c));0<e&&(e=Math.sqrt(e)),e=h-e,0<t.y-(s.y??0)&&(e=-e),r.y+=e}return r},o}var sL,oL,lL,cL,hL,uL=r(()=>{K7(),w8(),C8(),IA(),zC(),sL=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"),oL=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"),lL=mt((e,t,r,i,n,a)=>[`M${e-r/2},`+-i/2,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),hL=cL=10,mt(aL,"linedCylinder")});async function dL(e,t){var{labelStyles:r,nodeStyles:i}=v8(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 V7(e,t,X7(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,c=t.cssStyles,h=LA.svg(a),u=b8(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},...W7(-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=h.polygon(d.map(e=>[e.x,e.y]),u),g=a.insert(()=>p,":first-child");return g.attr("class","basic label-container outer-path"),c&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",c),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))})`),H7(t,g),t.intersect=function(e){return J.polygon(t,d,e)},a}var pL=r(()=>{K7(),w8(),IA(),C8(),mt(dL,"linedWaveEdgedRect")});async function gL(e,t){var{labelStyles:r,nodeStyles:i}=v8(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 V7(e,t,X7(t)),c=(t?.width||o.width)+2*n+2*a,h=(t?.height||o.height)+2*r+2*a,u=c-2*a,d=h-2*a,p=-u/2,g=-d/2,f=t.cssStyles,m=LA.svg(s),y=b8(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}],b=[{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}],x=("handDrawn"!==t.look&&(y.roughness=0,y.fillStyle="solid"),j7(v)),T=m.path(x,y),k=j7(b),w=m.path(k,y);return"handDrawn"!==t.look&&(T=G7(T),w=G7(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))})`),H7(t,e),t.intersect=function(e){return J.polygon(t,v,e)},s}var fL=r(()=>{K7(),C8(),IA(),w8(),mt(gL,"multiRect")});async function mL(e,t){var{labelStyles:r,nodeStyles:i}=v8(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await V7(e,t,X7(t)),o=t.padding??0,l="neo"===t.look?16:o,c="neo"===t.look?12:o,h=!0,u=((t.width||t.height)&&(h=!1,t.width=(t?.width??0)-2*l,t.height=(t?.height??0)-3*c),Math.max(a.width,t?.width??0)+2*l),d=Math.max(a.height,t?.height??0)+3*c,p="neo"===t.look?d/4:d/8,g=d+(h?p/2:-p/2),f=-u/2,m=-g/2,y=t.cssStyles,v=W7(f-10,m+g+10,f+u-10,m+g+10,p,.8),b=v?.[v.length-1],x=[{x:f-10,y:10+m},{x:f-10,y:m+g+10},...v,{x:f+u-10,y:b.y-10},{x:f+u,y:b.y-10},{x:f+u,y:b.y-20},{x:f+u+10,y:b.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:b.y-10},{x:f+u,y:b.y-10},{x:f+u,y:m},{x:f,y:m}],k=LA.svg(n),w=b8(t,{}),C=("handDrawn"!==t.look&&(w.roughness=0,w.fillStyle="solid"),j7(x)),S=k.path(C,w),E=j7(T),_=k.path(E,w),A=n.insert(()=>S,":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))})`),H7(t,A),t.intersect=function(e){return J.polygon(t,x,e)},n}var yL=r(()=>{K7(),w8(),IA(),C8(),mt(mL,"multiWaveEdgedRectangle")});async function vL(e,t,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:n}=v8(t),{shapeSvg:i,bbox:e,label:a}=(t.labelStyle=i,t.useHtmlLabels||_r(vr())||(t.centerLabel=!0),await V7(e,t,X7(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,c=-o/2,h=t.cssStyles,u=LA.svg(i),r=b8(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==t.look&&(r.roughness=0,r.fillStyle="solid");let d=u.rectangle(l,c,s,o,r),p=i.insert(()=>d,":first-child");return p.attr("class","basic label-container outer-path"),a.attr("class","label noteLabel"),h&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",h),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))})`),H7(t,p),t.intersect=function(e){return J.rect(t,e)},i}var bL=r(()=>{IA(),w8(),C8(),K7(),wi(),wi(),mt(vL,"note")});async function xL(e,n){var{labelStyles:t,nodeStyles:r}=v8(n);n.labelStyle=t;let{shapeSvg:a,bbox:i}=await V7(e,n,X7(n)),s=i.width+(n.padding??0),o=i.height+(n.padding??0),l=s+o,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}],h,u=n.cssStyles;if("handDrawn"===n.look){let e=LA.svg(a),t=b8(n,{}),r=TL(0,0,l),i=e.path(r,t);h=a.insert(()=>i,":first-child").attr("transform",`translate(${-l/2+.5}, ${l/2})`),u&&h.attr("style",u)}else(h=$A(a,l,l,c)).attr("transform",`translate(${-l/2+.5}, ${l/2})`);return r&&h.attr("style",r),H7(n,h),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 TL,kL=r(()=>{K7(),w8(),C8(),IA(),FA(),TL=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(xL,"question")});async function wL(e,t){var{labelStyles:r,nodeStyles:i}=v8(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:c}=await V7(e,t,X7(t)),h=(t?.width??l.width)+("neo"===t.look?2*a:a),u=(t?.height??l.height)+("neo"===t.look?2*s:s),d=-h/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=LA.svg(o),v=b8(t,{}),b=("handDrawn"!==t.look&&(v.roughness=0,v.fillStyle="solid"),j7(f)),x=y.path(b,v),T=o.insert(()=>x,":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)`),c.attr("transform",`translate(${-g/2-l.width/2-(l.x-(l.left??0))}, ${-l.height/2-(l.y-(l.top??0))})`),H7(t,T),t.intersect=function(e){return J.polygon(t,f,e)},o}var CL,SL,EL=r(()=>{K7(),w8(),C8(),IA(),mt(wL,"rect_left_inv_arrow")}),_L=r(()=>{wi(),Uu(),F7(),CL=mt(async(e,t,r,i=!1,n=!1)=>{let a=t||"";"object"==typeof a&&(a=a[0]);var t=B(),s=_r(t);return $7(e,a,{style:r,isTitle:i,useHtmlLabels:s,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},t)},"createLabel"),SL=CL});async function AL(n,a){var{labelStyles:e,nodeStyles:t}=v8(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,c=a.label,h=await SL(o,c,a.labelStyle,!0,!0),u={width:0,height:0};_r(B())&&(e=h.children[0],n=Q(h),u=e.getBoundingClientRect(),n.attr("width",u.width),n.attr("height",u.height)),P.info("Text 2",l);var e=l||[],n=h.getBBox(),d=(e=await SL(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(h).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,b;if("handDrawn"===a.look){let e=LA.svg(s),t=b8(a,{}),r=e.path(pR(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);b=s.insert(()=>(P.debug("Rough node insert CXC",r),i),":first-child"),v=s.insert(()=>(P.debug("Rough node insert CXC",r),r),":first-child")}else v=i.insert("rect",":first-child"),b=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)),b.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 H7(a,v),a.intersect=function(e){return J.rect(a,e)},s}var RL=r(()=>{bk(),K7(),_L(),w8(),C8(),IA(),Uu(),fR(),e(),wi(),mt(AL,"rectWithTitle")});async function LL(e,t,{config:{themeVariables:r}}){return mR(e,t,{rx:r=r?.radius??5,ry:r,classes:"",labelPaddingX:+(t?.padding??0),labelPaddingY:+(t?.padding??0)})}var IL=r(()=>{yR(),mt(LL,"roundedRect")});async function NL(e,t){var{labelStyles:r,nodeStyles:i}=v8(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 V7(e,t,X7(t)),r=(t?.width??a.width)+2*r+("neo"===t.look?DL:2*DL),n=(t?.height??a.height)+2*n,o=r-DL,l=n,r=DL-r/2,n=-n/2,c=t.cssStyles,h=LA.svg(e),u=b8(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-DL,y:n+l},{x:r-DL,y:n},{x:r,y:n},{x:r,y:n+l}],p=h.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",cC(c)),i&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",i),c&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",i),s.attr("transform",`translate(${DL/2-a.width/2-(a.x-(a.left??0))}, ${-a.height/2-(a.y-(a.top??0))})`),H7(t,g),t.intersect=function(e){return J.rect(t,e)},e}var DL,ML=r(()=>{K7(),w8(),C8(),IA(),zC(),DL=8,mt(NL,"shadedProcess")});async function OL(e,t){var{labelStyles:r,nodeStyles:i}=v8(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 V7(e,t,X7(t))),o=-(n=(t?.width||a.width)+2*n)/2,l=-(r=1.5*((t?.height||a.height)+2*r)/1.5)/2,c=t.cssStyles,h=LA.svg(e),u=b8(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=j7(d),g=h.path(p,u),f=e.insert(()=>g,":first-child");return f.attr("class","basic label-container outer-path"),c&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",c),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))})`),H7(t,f),t.intersect=function(e){return J.polygon(t,d,e)},e}var PL=r(()=>{K7(),w8(),C8(),IA(),mt(OL,"slopedRect")});async function BL(e,t){var r=t.padding??0;return mR(e,t,{rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??("neo"===t.look?16:2*r),labelPaddingY:"neo"===t.look?12:r})}var $L=r(()=>{yR(),mt(BL,"squareRect")});async function FL(e,t){var{labelStyles:r,nodeStyles:i}=v8(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 V7(e,t,X7(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=LA.svg(e),l=b8(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");let c=[{x:-a/2+n,y:-r/2},{x:a/2-n,y:-r/2},...U7(-a/2+n,0,n,50,90,270),{x:a/2-n,y:r/2},...U7(a/2-n,0,n,50,270,450)],h=j7(c),u=o.path(h,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),H7(t,d),t.intersect=function(e){return J.polygon(t,c,e)},e}var zL=r(()=>{K7(),w8(),C8(),IA(),mt(FL,"stadium")});async function qL(e,t){return mR(e,t,{rx:"neo"===t.look?3:5,ry:"neo"===t.look?3:5,classes:"flowchart-node"})}var jL=r(()=>{yR(),mt(qL,"state")});function WL(e,t,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:n}=v8(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)),c=LA.svg(l),h=b8(t,{});"handDrawn"!==t.look&&(h.roughness=0,h.fillStyle="solid");let u=c.circle(0,0,t.width,{...h,stroke:r,strokeWidth:2}),d=a??s,p=5*(t.width??0)/14,g=c.circle(0,0,p,{...h,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"})`)),H7(t,f),t.intersect=function(e){return J.circle(t,(t.width??0)/2,e)},l}var UL=r(()=>{IA(),w8(),C8(),K7(),mt(WL,"stateEnd")});function GL(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=LA.svg(n).circle(0,0,t.width,g8(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"})`)),H7(t,a),t.intersect=function(e){return J.circle(t,(t.width??7)/2,e)},n}var VL=r(()=>{IA(),w8(),C8(),K7(),mt(GL,"stateStart")});async function YL(a,s){var{labelStyles:o,nodeStyles:e}=v8(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 V7(a,s,X7(s)),c=(s?.width??n.width)+2*HL+r,h=(s?.height??n.height)+i,u=c-2*HL,d=h,p=-c/2,g=-h/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=LA.svg(l),t=b8(s,{}),r=e.rectangle(p,g,16+u,d,t),i=e.line(p+HL,g,p+HL,g+d,t),n=e.line(p+HL+u,g,p+HL+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",cC(a)),H7(s,o)}else a=$A(l,u,d,f),e&&a.attr("style",e),H7(s,a);return s.intersect=function(e){return J.polygon(s,f,e)},l}var HL,XL=r(()=>{K7(),w8(),C8(),IA(),FA(),zC(),HL=8,mt(YL,"subroutine")});async function KL(e,t){var{labelStyles:r,nodeStyles:i}=v8(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-ZL*(t.height+2*r),10));let{shapeSvg:a,bbox:s}=await V7(e,t,X7(t)),o=(t?.height||s.height)+2*r,l=ZL*o,c=ZL*o,h=(t?.width||s.width)+2*n+l-l,u=o,d=-h/2,p=-u/2,g=t.cssStyles,f=LA.svg(a),m=b8(t,{}),y=[{x:d-l/2,y:p},{x:d+h+l/2,y:p},{x:d+h+l/2,y:p+u},{x:d-l/2,y:p+u}],v=[{x:d+h-l/2,y:p+u},{x:d+h+l/2,y:p+u},{x:d+h+l/2,y:p+u-c}],b=("handDrawn"!==t.look&&(m.roughness=0,m.fillStyle="solid"),j7(y)),x=f.path(b,m),T=j7(v),k=f.path(T,{...m,fillStyle:"solid"}),w=a.insert(()=>k,":first-child");return w.insert(()=>x,":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),H7(t,w),t.intersect=function(e){return J.polygon(t,y,e)},a}var ZL,QL=r(()=>{K7(),C8(),IA(),w8(),ZL=.2,mt(KL,"taggedRect")});async function JL(e,t){var{labelStyles:r,nodeStyles:i}=v8(t),{shapeSvg:r,bbox:e,label:n}=(t.labelStyle=r,await V7(e,t,X7(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,c=.2*s,h=s+o,u=t.cssStyles,d=LA.svg(r),p=b8(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-a/2-a/2*.1,y:h/2},...W7(-a/2-a/2*.1,h/2,a/2+a/2*.1,h/2,o,.8),{x:a/2+a/2*.1,y:-h/2},{x:-a/2-a/2*.1,y:-h/2}],f=-a/2+a/2*.1,m=-h/2-.4*c,y=[{x:f+a-l,y:1.3*(m+s)},{x:f+a,y:m+s-c},{x:f+a,y:.9*(m+s)},...W7(f+a,1.25*(m+s),f+a-l,1.3*(m+s),.02*-s,.5)],v=j7(g),b=d.path(v,p),x=j7(y),T=d.path(x,{...p,fillStyle:"solid"}),k=r.insert(()=>T,":first-child");return k.insert(()=>b,":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))})`),H7(t,k),t.intersect=function(e){return J.polygon(t,g,e)},r}var e9=r(()=>{K7(),w8(),IA(),C8(),mt(JL,"taggedWaveEdgedRectangle")});async function t9(e,t){var{labelStyles:r,nodeStyles:i}=v8(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await V7(e,t,X7(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),H7(t,o),t.intersect=function(e){return J.rect(t,e)},r}var r9=r(()=>{K7(),w8(),C8(),mt(t9,"text")});async function i9(e,a){var{labelStyles:t,nodeStyles:r}=v8(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<o9&&(a.height=o9),a.width=(a.width??0)-t-p/2/(2.5+p/50)*3,a.width<l9)&&(a.width=l9);let{shapeSvg:s,bbox:i,label:n}=await V7(e,a,X7(a)),o=(a.height||i.height)+t,l=o/2,c=l/(2.5+o/50),h=(a.width||i.width)+c+t,u=a.cssStyles,d;if("handDrawn"===a.look){let e=LA.svg(s),t=a9(0,0,h,o,c,l),r=s9(0,0,h,o,c,l),i=e.path(t,b8(a,{})),n=e.path(r,b8(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=n9(0,0,h,o,c,l);(d=s.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",cC(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",c),d.attr("transform",`translate(${-h/2}, ${o/2} )`),n.attr("transform",`translate(${-i.width/2-c-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),H7(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-c)){let e=c*c*(1-i*i/(l*l));0!=e&&(e=Math.sqrt(Math.abs(e))),e=c-e,0<t.x-(a.x??0)&&(e=-e),r.x+=e}return r},s}var n9,a9,s9,o9,l9,c9=r(()=>{K7(),C8(),IA(),w8(),zC(),n9=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"),a9=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"),s9=mt((e,t,r,i,n,a)=>[`M${e+r/2},`+-i/2,`a${n},${a} 0,0,0 0,`+i].join(" "),"createInnerCylinderPathD"),o9=5,l9=10,mt(i9,"tiltedCylinder")});async function h9(e,n){var{labelStyles:t,nodeStyles:r}=v8(n);n.labelStyle=t;let i=n.padding??0,a=i,s="neo"===n.look?2*i:i,{shapeSvg:o,bbox:l}=await V7(e,n,X7(n)),c=(n?.height??l.height)+a,h=(n?.width??l.width)+s,u=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}],d,p=n.cssStyles;if("handDrawn"===n.look){let e=LA.svg(o),t=b8(n,{}),r=j7(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=$A(o,h,c,u);return r&&d.attr("style",r),n.width=h,n.height=c,H7(n,d),n.intersect=function(e){return J.polygon(n,u,e)},o}var u9=r(()=>{K7(),w8(),C8(),IA(),FA(),mt(h9,"trapezoid")});async function d9(e,t){var{labelStyles:r,nodeStyles:i}=v8(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 V7(e,t,X7(t))),n=(t?.width||a.width)+2*n,a=(t?.height||a.height)+2*r,r=t.cssStyles,s=LA.svg(e),o=b8(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}],c=j7(l),h=s.path(c,o),u=e.insert(()=>h,":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),H7(t,u),t.intersect=function(e){return J.polygon(t,l,e)},e}var p9=r(()=>{K7(),w8(),C8(),IA(),mt(d9,"trapezoidalPentagon")});async function g9(e,t){var{labelStyles:r,nodeStyles:i}=v8(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<m9&&(t.width=m9),t.height=t?.height??0,t.height<f9)&&(t.height=f9);let{shapeSvg:n,bbox:a,label:s}=await V7(e,t,X7(t)),o=or(B().flowchart?.htmlLabels),l=(t?.width||a.width)+r,c=t?.height||l+a.height,h=c,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],d=t.cssStyles,p=LA.svg(n),g=b8(t,{}),f=("handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid"),j7(u)),m=p.path(f,g),y=n.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/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=c,H7(t,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(t.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(e){return P.info("Triangle intersect",t,u,e),J.polygon(t,u,e)},n}var f9,m9,y9=r(()=>{e(),K7(),w8(),C8(),IA(),K7(),th(),Uu(),m9=f9=10,mt(g9,"triangle")});async function v9(e,t){var{labelStyles:r,nodeStyles:i}=v8(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 V7(e,t,X7(t)),c=(t?.width||e.width)+2*(a??0),h=(t?.height||e.height)+2*(s??0),u="neo"===t.look?h/4:h/8,d=h+(o?u:-u),p=t.cssStyles,g=0<(g=14-c)?g/2:0,f=LA.svg(r),m=b8(t,{});"handDrawn"!==t.look&&(m.roughness=0,m.fillStyle="solid");let y=[{x:-c/2-g,y:d/2},...W7(-c/2-g,d/2,c/2+g,d/2,u,.8),{x:c/2+g,y:-d/2},{x:-c/2-g,y:-d/2}],v=j7(y),b=f.path(v,m),x=r.insert(()=>b,":first-child");return x.attr("class","basic label-container outer-path"),p&&"handDrawn"!==t.look&&x.selectAll("path").attr("style",p),i&&"handDrawn"!==t.look&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(0,${-u/2})`),l.attr("transform",`translate(${-c/2+(t.padding??0)-(e.x-(e.left??0))},${-h/2+(t.padding??0)-u-(e.y-(e.top??0))})`),H7(t,x),t.intersect=function(e){return J.polygon(t,y,e)},r}var b9=r(()=>{K7(),w8(),IA(),C8(),mt(v9,"waveEdgedRectangle")});async function x9(e,t){var{labelStyles:r,nodeStyles:i}=v8(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 V7(e,t,X7(t))),n=(t?.width||e.width)+2*n,e=(e=(t?.height||e.height)+r)+2*(r=e/8),s=t.cssStyles,o=LA.svg(a),l=b8(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");let c=[{x:-n/2,y:e/2},...W7(-n/2,e/2,n/2,e/2,r,1),{x:n/2,y:-e/2},...W7(n/2,-e/2,-n/2,-e/2,r,-1)],h=j7(c),u=o.path(h,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),H7(t,d),t.intersect=function(e){return J.polygon(t,c,e)},a}var T9=r(()=>{K7(),w8(),C8(),IA(),mt(x9,"waveRectangle")});async function k9(e,t){var{labelStyles:r,nodeStyles:i}=v8(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-w9,10),t.height=Math.max((t?.height??0)-2*n-w9,10));let{shapeSvg:a,bbox:s,label:o}=await V7(e,t,X7(t)),l=(t?.width||s.width)+2*r+w9,c=(t?.height||s.height)+2*n+w9,h=l-w9,u=c-w9,d=-h/2,p=-u/2,g=t.cssStyles,f=LA.svg(a),m=b8(t,{}),y=[{x:d-w9,y:p-w9},{x:d-w9,y:p+u},{x:d+h,y:p+u},{x:d+h,y:p-w9}],v=`M${d-w9},${p-w9} L${d+h},${p-w9} L${d+h},${p+u} L${d-w9},${p+u} L${d-w9},${p-w9}
|
||
M${d-w9},${p} L${d+h},${p}
|
||
M${d},${p-w9} L${d},`+(p+u),b=("handDrawn"!==t.look&&(m.roughness=0,m.fillStyle="solid"),f.path(v,m)),x=a.insert(()=>b,":first-child");return x.attr("transform",`translate(${w9/2}, ${w9/2})`),x.attr("class","basic label-container outer-path"),g&&"handDrawn"!==t.look&&x.selectAll("path").attr("style",g),i&&"handDrawn"!==t.look&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${-s.width/2+w9/2-(s.x-(s.left??0))}, ${-s.height/2+w9/2-(s.y-(s.top??0))})`),H7(t,x),t.intersect=function(e){return J.polygon(t,y,e)},a}var w9,C9=r(()=>{K7(),C8(),IA(),w8(),w9=10,mt(k9,"windowPane")});async function S9(e,t){var r,i=t,{theme:n,themeVariables:a}=(i.alias&&(t.label=i.alias),vr()),{rowEven:P,rowOdd:B,nodeBorder:$,borderColorArray:a}=a,s=("handDrawn"===t.look&&(_=(_=vr().themeVariables).background,await S9(e,{...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none","fill: "+_]})),vr());t.useHtmlLabels=s.htmlLabels;let o=s.er?.diagramPadding??10,l=s.er?.entityPadding??6,c=t.cssStyles,{labelStyles:h,nodeStyles:u}=v8(t);if(0===i.attributes.length&&t.label)return _={rx:0,ry:0,labelPaddingX:o,labelPaddingY:1.5*o,classes:""},sC(t.label,s)+2*_.labelPaddingX<s.er.minEntityWidth&&(t.width=s.er.minEntityWidth),_=await mR(e,t,_),null!=n&&A9.has(n)&&(E=i.colorIndex??0,_.attr("data-color-id","color-"+E%a.length)),or(s.htmlLabels)||(S=(E=_.select("text")).node()?.getBBox(),E.attr("transform",`translate(${-S.width/2}, 0)`)),_;s.htmlLabels||(o*=1.25,l*=1.25);let d=X7(t),p=(d=d||"node default",e.insert("g").attr("class",d).attr("id",t.domId||t.id)),g=await E9(p,t.label??"",s,0,0,["name"],h),f=(g.height+=l,0),m=[],y=[],v=0,b=0,x=0,T=0,F=!0,z=!0;for(r of i.attributes){var k=await E9(p,r.type,s,0,f,["attribute-type"],h),q=(v=Math.max(v,k.width+o),await E9(p,r.name,s,0,f,["attribute-name"],h)),j=(b=Math.max(b,q.width+o),await E9(p,r.keys.join(),s,0,f,["attribute-keys"],h)),W=(x=Math.max(x,j.width+o),await E9(p,r.comment,s,0,f,["attribute-comment"],h)),k=(T=Math.max(T,W.width+o),Math.max(k.height,q.height,j.height,W.height)+l);y.push({yOffset:f,rowHeight:k}),f+=k}let w=4;x<=o&&(F=!1,x=0,w--),T<=o&&(z=!1,T=0,w--);var U,C,S,G,E=p.node().getBBox(),_=(0<g.width+2*o-(v+b+x+T)&&(S=g.width+2*o-(v+b+x+T),v+=S/w,b+=S/w,0<x&&(x+=S/w),0<T)&&(T+=S/w),v+b+x+T),A=LA.svg(p),R=b8(t,{});"handDrawn"!==t.look&&(R.roughness=0,R.fillStyle="solid");let V=0,L=(0<y.length&&(V=y.reduce((e,t)=>e+(t?.rowHeight??0),0)),Math.max(E.width+2*o,t?.width||0,_)),I=Math.max((V??0)+g.height,t?.height||0),N=-L/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+b:i.attr("class").includes("attribute-comment")&&(a+=v+b+x)),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&&A9.has(n)&&(e=i.colorIndex??0,p.attr("data-color-id","color-"+e%a.length)),A.rectangle(N,D,L,I,R)),H=p.insert(()=>Y,":first-child").attr("class","outer-path").attr("style",c.join(""));m.push(0);for([U,C]of y.entries()){let e=(U+1)%2==0&&0!==C.yOffset,t=A.rectangle(N,g.height+D+C?.yOffset,L,C?.rowHeight,{...R,fill:e?P:B,stroke:$});p.insert(()=>t,"g.label").attr("style",c.join("")).attr("class","row-rect-"+(e?"even":"odd"))}let M=_9(N,g.height+D,L+N,g.height+D,1e-4),O=A.polygon(M.map(e=>[e.x,e.y]),R);p.insert(()=>O).attr("class","divider"),M=_9(v+N,g.height+D,v+N,I+D,1e-4),O=A.polygon(M.map(e=>[e.x,e.y]),R),p.insert(()=>O).attr("class","divider"),F&&(S=v+b+N,M=_9(S,g.height+D,S,I+D,1e-4),O=A.polygon(M.map(e=>[e.x,e.y]),R),p.insert(()=>O).attr("class","divider")),z&&(E=v+b+x+N,M=_9(E,g.height+D,E,I+D,1e-4),O=A.polygon(M.map(e=>[e.x,e.y]),R),p.insert(()=>O).attr("class","divider"));for(G of m){var X=g.height+D+G;M=_9(N,X,L+N,X,1e-4),O=A.polygon(M.map(e=>[e.x,e.y]),R),p.insert(()=>O).attr("class","divider")}return H7(t,H),u&&"handDrawn"!==t.look&&(null!=n&&R9.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 E9(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!==$c(t)&&(t=(t=$c(t)).replaceAll("<","<").replaceAll(">",">")),a=e.node().appendChild(await $7(e,t,{width:sC(t,r)+100,style:s,useHtmlLabels:r.htmlLabels},r)),t.includes("<")||t.includes(">")){let e=a.children[0];for(e.textContent=e.textContent.replaceAll("<","<").replaceAll(">",">");e.childNodes[0];)(e=e.childNodes[0]).textContent=e.textContent.replaceAll("<","<").replaceAll(">",">")}let o=a.getBBox();return or(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 _9(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 A9,R9,L9=r(()=>{K7(),w8(),C8(),IA(),yR(),wi(),F7(),th(),bk(),zC(),A9=new Set(["redux-color","redux-dark-color"]),R9=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),mt(S9,"erBox"),mt(E9,"addText"),mt(_9,"lineToPolygon")});async function I9(e,t,r,i,n=r.class.padding??12){let a=i?0:3,s=e.insert("g").attr("class",X7(t)).attr("id",t.domId||t.id),o=null,l=null,c=null,h=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 N9(o,{text:`«${i}»`},0),u=o.node().getBBox().height),await N9(l=s.insert("g").attr("class","label-group text"),t,0,["font-weight: bolder"]),d=(e=l.node().getBBox()).height,c=s.insert("g").attr("class","members-group text");let m=0;for(g of t.members){var y=await N9(c,g,m,[g.parseClassifier()]);m+=y+a}(p=c.node().getBBox().height)<=0&&(p=n/2),h=s.insert("g").attr("class","methods-group text");let v=0;for(f of t.methods){var b=await N9(h,f,v,[f.parseClassifier()]);v+=b+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(),c.attr("transform",`translate(0, ${u+d+2*n})`),s.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(p?p+4*n:2*n)})`),t=s.node().getBBox(),{shapeSvg:s,bbox:t}}async function N9(e,t,r,i=[]){let n=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=vr(),s="useHtmlLabels"in t?t.useHtmlLabels:or(a.htmlLabels)??!0,o="",l=(o="text"in t?t.text:t.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),Uc(o)&&(s=!0),await $7(n,Yh($C(o)),{width:sC(o,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a)),c,h=1;if(s){var e=l.children[0],t=Q(l),u=(h=e.innerHTML.split("<br>").length,e.innerHTML.includes("</math>")&&(h+=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)})))}c=e.getBoundingClientRect(),t.attr("width",c.width),t.attr("height",c.height)}else i.includes("font-weight: bolder")&&Q(l).selectAll("tspan").attr("font-weight",""),h=l.children.length,u=l.children[0],""!==l.textContent&&!l.textContent.includes(">")||(u.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim()," "!==o[1])||(u.textContent=u.textContent[0]+" "+u.textContent.substring(1)),"undefined"===u.textContent&&(u.textContent=""),c=l.getBBox();return n.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}var D9=r(()=>{bk(),wi(),K7(),zC(),Uu(),F7(),th(),mt(I9,"textHelper"),mt(N9,"addText")});async function M9(r,i){let o=B(),e=o.themeVariables,n=e.useGradient,l=o.class.padding??12,c=l,h=i.useHtmlLabels??or(o.htmlLabels)??!0,u=i,{shapeSvg:d,bbox:t}=(u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[],await I9(r,i,o,h,c)),{labelStyles:a,nodeStyles:s}=v8(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=LA.svg(d),m=b8(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),b=(i.height??0)>t.height,x=(0===u.members.length&&0===u.methods.length?v+=c:0<u.members.length&&0===u.methods.length&&(v+=2*c),-y/2),T=-v/2,k=g?2*l:0===u.members.length&&0===u.methods.length?-l:0,w=(b&&(k=2*l),f.rectangle(x-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"),S=(C.attr("class","basic label-container outer-path"),C.node().getBBox()),E=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,R=(E+_+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,c/2),a=b?Math.max(R,E+_+t+T+2*c+l)+2*c:E+_+t+T+4*c+l),0===u.members.length&&0===u.methods.length&&o.class?.hideEmptyMembersBox&&(a=0<u.annotations.length?n-c:n),h||(a-=4),x);(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=E+_+T+l,t=f.line(S.x,e,S.x+S.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=E+_+A+T+2*c+l,t=f.line(S.x,b?Math.max(R,e):e,S.x+S.width,(b?Math.max(R,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),h||((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))),H7(i,C),i.intersect=function(e){return J.rect(i,e)},d}var O9=r(()=>{K7(),Uu(),bk(),IA(),C8(),w8(),D9(),th(),mt(M9,"classBox")});async function P9(r,i){var{labelStyles:e,nodeStyles:t}=v8(i);i.labelStyle=e;let n=i,a=i,s="verifyMethod"in i,o=X7(i),l=B().themeVariables,{borderColorArray:c,requirementEdgeLabelBackground:h}=l,u=r.insert("g").attr("class",o).attr("id",i.domId??i.id),d,p=d=s?await B9(u,`<<${n.type}>>`,0,i.labelStyle):await B9(u,"<<Element>>",0,i.labelStyle),g=await B9(u,n.name,p,i.labelStyle+"; font-weight: bold;"),f=(p+=g+20,s?(e=await B9(u,n.requirementId?"ID: "+n.requirementId:"",p,i.labelStyle),p+=e,r=await B9(u,n.text?"Text: "+n.text:"",p,i.labelStyle),p+=r,e=await B9(u,n.risk?"Risk: "+n.risk:"",p,i.labelStyle),p+=e,await B9(u,n.verifyMethod?"Verification: "+n.verifyMethod:"",p,i.labelStyle)):(r=await B9(u,a.type?"Type: "+a.type:"",p,i.labelStyle),p+=r,await B9(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,b=LA.svg(u),x=b8(i,{}),T=("handDrawn"!==i.look&&(x.roughness=0,x.fillStyle="solid"),b.rectangle(y,v,f,m,x)),k=u.insert(()=>T,":first-child");if(k.attr("class","basic label-container outer-path").attr("style",t),c?.length&&(e=i.colorIndex??0,u.attr("data-color-id","color-"+e%c.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]],b.polygon(r,x)):b.line(y,e,y+f,e,x),u.insert(()=>t).attr("class","divider")}return H7(i,k),i.intersect=function(e){return J.rect(i,e)},t&&"handDrawn"!==i.look&&(h||c?.length)&&u.selectAll("path").attr("style",t),u}async function B9(e,t,r,i=""){if(""===t)return 0;let n=e.insert("g").attr("class","label").attr("style",i),a=B(),s=a.htmlLabels??!0,o=await $7(n,Yh($C(t)),{width:sC(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 c;for(c of o.children[0].children)i&&c.setAttribute("style",i);(l=o.getBBox()).height+=6}return n.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}var $9=r(()=>{K7(),w8(),C8(),IA(),zC(),Uu(),F7(),bk(),mt(P9,"requirementBox"),mt(B9,"addText")});async function F9(e,i,{config:t}){var{labelStyles:n,nodeStyles:r}=v8(i),n=(i.labelStyle=n||"",i.width);i.width=(i.width??200)-10;let{shapeSvg:a,bbox:s,label:o}=await V7(e,i,X7(i)),l=i.padding||10,c,h,u=("ticket"in i&&i.ticket&&t?.kanban?.ticketBaseUrl&&(c=t?.kanban?.ticketBaseUrl.replace("#TICKET#",i.ticket),h=a.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",c).attr("target","_blank")),{useHtmlLabels:i.useHtmlLabels,labelStyle:i.labelStyle||"",width:i.width,img:i.img,padding:i.padding||8,centerLabel:!1}),d,p;h?{label:d,bbox:p}=await Y7(h,"ticket"in i&&i.ticket||"",u):{label:d,bbox:p}=await Y7(a,"ticket"in i&&i.ticket||"",u);var{label:e,bbox:t}=await Y7(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:b,ry:x}=i,T=i.cssStyles;if("handDrawn"===i.look){let e=LA.svg(a),t=b8(i,{}),r=b||x?e.path(pR(m,y,n,f,b||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",b??5).attr("ry",x??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((b??0)/2),n=y+f-Math.floor((b??0)/2),t.attr("x1",g).attr("y1",r).attr("x2",g).attr("y2",n).attr("stroke-width","4").attr("stroke",z9(e)));return H7(i,v),i.height=f,i.intersect=function(e){return J.rect(i,e)},a}var z9,q9=r(()=>{K7(),w8(),fR(),C8(),IA(),z9=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(F9,"kanbanItem")});async function j9(e,i){var{labelStyles:n,nodeStyles:t}=v8(i),{shapeSvg:n,bbox:e,halfPadding:r,label:a}=(i.labelStyle=n,await V7(e,i,X7(i))),s=e.width+10*r,r=e.height+8*r,o=.15*s,l=i.cssStyles,c=e.height+20,s=Math.max(s,e.width+20),r=Math.max(r,c);a.attr("transform",`translate(${-e.width/2}, ${-e.height/2})`);let h,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=LA.svg(n),t=b8(i,{}),r=e.path(u,t);(h=n.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",cC(l))}else h=n.insert("path",":first-child").attr("class","basic label-container").attr("style",t).attr("d",u);return h.attr("transform",`translate(${-s/2}, ${-r/2})`),H7(i,h),i.calcIntersect=function(e,t){return J.rect(e,t)},i.intersect=function(e){return P.info("Bang intersect",i,e),J.rect(i,e)},n}var W9=r(()=>{e(),K7(),w8(),C8(),IA(),zC(),mt(j9,"bang")});async function U9(e,i){var{labelStyles:t,nodeStyles:r}=v8(i);i.labelStyle=t;let{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await V7(e,i,X7(i)),l=a.width+2*s,c=a.height+2*s,h=.15*l,u=.25*l,d=.35*l,p=.2*l,g=i.cssStyles,f,m=`M0 0
|
||
a${h},${h} 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${h},${h} 1 0,1 ${.15*l},${.35*c}
|
||
a${p},${p} 1 0,1 ${-1*l*.15},${.65*c}
|
||
|
||
a${u},${h} 1 0,1 ${-1*l*.25},${.15*l}
|
||
a${d},${d} 1 0,1 ${-1*l*.5},0
|
||
a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
||
|
||
a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
|
||
a${p},${p} 1 0,1 ${.1*l},${-1*c*.65}
|
||
H0 V0 Z`;if("handDrawn"===i.look){let e=LA.svg(n),t=b8(i,{}),r=e.path(m,t);(f=n.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",cC(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}, ${-c/2})`),H7(i,f),i.calcIntersect=function(e,t){return J.rect(e,t)},i.intersect=function(e){return P.info("Cloud intersect",i,e),J.rect(i,e)},n}var G9=r(()=>{IA(),e(),zC(),w8(),C8(),K7(),mt(U9,"cloud")});async function V9(e,t){var{labelStyles:r,nodeStyles:i}=v8(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await V7(e,t,X7(t)),l=a.width+8*s,c=a.height+2*s,h="neo"===t.look?`
|
||
M${-l/2} ${c/2-5}
|
||
v${10-c}
|
||
q0,-5 5,-5
|
||
h${l-10}
|
||
q5,0 5,5
|
||
v${c-5}
|
||
H${-l/2}
|
||
Z
|
||
`:`
|
||
M${-l/2} ${c/2-5}
|
||
v${10-c}
|
||
q0,-5 5,-5
|
||
h${l-10}
|
||
q5,0 5,5
|
||
v${c-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",h),n.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),n.append(()=>o.node()),H7(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 Y9=r(()=>{w8(),C8(),K7(),mt(V9,"defaultMindmapNode")});async function H9(e,t){return GA(e,t,{padding:t.padding??0})}var X9=r(()=>{VA(),mt(H9,"mindmapCircle")});function K9(e){return e in J9}var Z9,Q9,J9,eI,tI,rI,iI,nI,aI,sI,oI,lI,cI,hI,uI,dI,pI=r(()=>{DA(),BA(),jA(),UA(),VA(),XA(),QA(),tR(),nR(),sR(),gR(),bR(),TR(),wR(),SR(),RR(),IR(),DR(),PR(),$R(),zR(),jR(),UR(),VR(),HR(),KR(),QR(),eL(),rL(),nL(),uL(),pL(),fL(),yL(),bL(),kL(),EL(),RL(),IL(),ML(),PL(),$L(),zL(),jL(),UL(),VL(),XL(),QL(),e9(),r9(),c9(),u9(),p9(),y9(),b9(),T9(),C9(),L9(),O9(),$9(),q9(),W9(),G9(),Y9(),X9(),Z9=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:BL},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:LL},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:FL},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:YL},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:oR},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:vR},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:GA},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:j9},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:U9},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:xL},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:MR},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:tL},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:JR},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:h9},{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:XR},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:kR},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:t9},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:zA},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:NL},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:GL},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:WL},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:LR},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:BR},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:ZA},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:eR},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:iR},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:iL},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:v9},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:NR},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:i9},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:aL},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:aR},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:xR},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:g9},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:k9},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:CR},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:d9},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:ER},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:OL},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:mL},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:gL},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:PA},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:HA},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:JL},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:KL},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:x9},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:wL},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:dL}],Q9=mt(()=>{var e=[...Object.entries({state:qL,choice:WA,note:vL,rectWithTitle:AL,labelRect:ZR,iconSquare:GR,iconCircle:qR,icon:FR,iconRounded:WR,imageSquare:YR,anchor:NA,kanbanItem:F9,mindmapCircle:H9,defaultMindmapNode:V9,classBox:M9,erBox:S9,requirementBox:P9}),...Z9.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap"),J9=Q9(),mt(K9,"isValidShape")}),gI=r(()=>{bk(),k_(),Uu(),e(),pI(),zC(),th(),Wu(),kk(),An(),eI=class{constructor(){this.vertexCounter=0,this.config=B(),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=Bh,this.setAccDescription=Fh,this.setDiagramTitle=qh,this.getAccTitle=$h,this.getAccDescription=zh,this.getDiagramTitle=jh,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,c={},e){if(i&&0!==i.trim().length){let r;var t;if(void 0!==e&&(t=e.includes(`
|
||
`)?e+`
|
||
`:`{
|
||
`+e+`
|
||
}`,r=T_(t,{schema:x_})),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&&P.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=B(),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=c:void 0!==c&&Object.assign(t.props,c),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(!K9(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(P.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=FC(n.start,n.end,{counter:0,prefix:"L"}):n.id=FC(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.`);P.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;P.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"===B().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",()=>{PC.runFunc(i,...r)},!1)}))}}setLink(e,t,r){e.split(",").forEach(e=>{void 0!==(e=this.vertices.get(e))&&(e.link=PC.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=Q3();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(_n.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=B(),Ph()}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=B().flowchart??{},t=t??(e.inheritDir?this.getDirection()??B().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)},P.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=B(),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 c=r[e];t.push({id:c.id,label:c.title,labelStyle:"",labelType:c.labelType,parentId:i.get(c.id),padding:8,cssCompiledStyles:this.getCompiledStyles(c.classes),cssClasses:c.classes.join(" "),shape:"rect",dir:c.dir,isGroup:!0,look:a.look})}this.getVertices().forEach(e=>{this.addNodeFromVertex(e,t,i,n,a,a.look||"classic")});let h=this.getEdges();return h.forEach((e,t)=>{var{arrowTypeStart:r,arrowTypeEnd:i}=this.destructEdgeType(e.type),n=[...h.defaultStyle??[]],t=(e.style&&n.push(...e.style),{id:FC(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 Vh.flowchart}}}),fI=r(()=>{bk(),tI=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")}),mI=r(()=>{rI=mt(({flowchart:e})=>{var t=e?.subGraphTitleMargin?.top??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:e=e?.subGraphTitleMargin?.bottom??0,subGraphTitleTotalMargin:t+e}},"getSubGraphTitleMargins")}),yI=r(()=>{Uu(),wi(),e(),mI(),bk(),IA(),F7(),k8(),_L(),fR(),C8(),iI=mt(async(i,n)=>{P.info("Creating subgraph rect for ",n.id,n);let e=B(),{themeVariables:t,handDrawnSeed:a}=e,{clusterBkg:s,clusterBorder:o}=t,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=v8(n),u=i.insert("g").attr("class","cluster "+n.cssClasses).attr("id",n.domId).attr("data-look",n.look),d=_r(e),p=u.insert("g").attr("class","cluster-label "),g,f=(g="markdown"===n.labelType?await $7(p,n.label,{style:n.labelStyle,useHtmlLabels:d,isNode:!0,width:n.width}):await SL(p,n.label,n.labelStyle||"",!1,!0)).getBBox();_r(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;P.trace("Data ",n,JSON.stringify(n));let b;if("handDrawn"===n.look){let e=LA.svg(u),t=b8(n,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),r=e.path(pR(y,v,i,m,0),t);(b=u.insert(()=>(P.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",c.join(";")),b.select("path").attr("style",h.join(";").replace("fill","stroke"))}else(b=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=rI(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=b.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 p8(n,e)},{cluster:u,labelBBox:f}},"rect"),nI=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 p8(t,e)},{cluster:e,labelBBox:{width:0,height:0}}},"noteGroup"),aI=mt(async(n,a)=>{let e=B(),{themeVariables:t,handDrawnSeed:s}=e,{altBackground:o,compositeBackground:l,compositeTitleBackground:c,nodeBorder:h}=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 SL(i,a.label,a.labelStyle,void 0,!0),g=p.getBBox();_r(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,b=a.y-y/2;a.width=m;let x=a.y-a.height/2-f+g.height+2,T;if("handDrawn"===a.look){let e=a.cssClasses.includes("statediagram-cluster-alt"),t=LA.svg(u),r=a.rx||a.ry?t.path(pR(v,b,m,y,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:h,seed:s}):t.rectangle(v,b,m,y,{seed:s}),i=(T=u.insert(()=>r,":first-child"),t.rectangle(v,x,m,n,{fill:e?o:l,fillStyle:e?"hachure":"solid",stroke:h,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",b).attr("width",m).attr("height",y).attr("data-look",a.look),d.attr("class","inner").attr("x",v).attr("y",x).attr("width",m).attr("height",n);return i.attr("transform",`translate(${a.x-g.width/2}, ${1+b-(_r(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 p8(a,e)},{cluster:u,labelBBox:g}},"roundedWithTitle"),sI=mt(async(i,n)=>{P.info("Creating subgraph rect for ",n.id,n);let e=B(),{themeVariables:t,handDrawnSeed:a}=e,{clusterBkg:s,clusterBorder:o}=t,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=v8(n),u=i.insert("g").attr("class","cluster "+n.cssClasses).attr("id",n.domId).attr("data-look",n.look),d=_r(e),p=u.insert("g").attr("class","cluster-label "),g=await $7(p,n.label,{style:n.labelStyle,useHtmlLabels:d,isNode:!0,width:n.width}),f=g.getBBox();_r(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;P.trace("Data ",n,JSON.stringify(n));let b;if("handDrawn"===n.look){let e=LA.svg(u),t=b8(n,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:a}),r=e.path(pR(y,v,i,m,n.rx),t);(b=u.insert(()=>(P.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",c.join(";")),b.select("path").attr("style",h.join(";").replace("fill","stroke"))}else(b=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=rI(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=b.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 p8(n,e)},{cluster:u,labelBBox:f}},"kanbanSection"),oI=mt((t,r)=>{var{themeVariables:i,handDrawnSeed:n}=B(),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 c;if("handDrawn"===r.look){let e=LA.svg(t).rectangle(o,l,s,a,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:i,seed:n});c=t.insert(()=>e,":first-child")}else c=e.insert("rect",":first-child"),r.look,c.attr("class","divider").attr("x",o).attr("y",l).attr("width",s).attr("height",a).attr("data-look",r.look);return i=c.node().getBBox(),r.height=i.height,r.offsetX=0,r.offsetY=0,r.intersect=function(e){return p8(r,e)},{cluster:t,labelBBox:{}}},"divider"),lI={rect:iI,squareRect:iI,roundedWithTitle:aI,noteGroup:nI,divider:oI,kanbanSection:sI},cI=new Map,hI=mt(async(e,t)=>{var r=t.shape||"rect",r=await lI[r](e,t);return cI.set(t.id,r),r},"insertCluster"),uI=mt(()=>{cI=new Map},"clear")}),vI=r(()=>{dI=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 bI(e,t){if(void 0===e||void 0===t)return{angle:0,deltaX:0,deltaY:0};e=kI(e),t=kI(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 xI,TI,kI,wI,CI,SI,EI,_I,AI=r(()=>{xI={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},TI={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5},mt(bI,"calculateDeltaAndAngle"),kI=mt(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),wI=mt(c=>({x:mt(function(e,t,r){let i=0,n=kI(r[0]).x<kI(r[r.length-1]).x?"left":"right";0===t&&Object.hasOwn(xI,c.arrowTypeStart)?({angle:a,deltaX:s}=bI(r[0],r[1]),i=xI[c.arrowTypeStart]*Math.cos(a)*(0<=s?1:-1)):t===r.length-1&&Object.hasOwn(xI,c.arrowTypeEnd)&&({angle:a,deltaX:s}=bI(r[r.length-1],r[r.length-2]),i=xI[c.arrowTypeEnd]*Math.cos(a)*(0<=s?1:-1));var t=Math.abs(kI(e).x-kI(r[r.length-1]).x),a=Math.abs(kI(e).y-kI(r[r.length-1]).y),s=Math.abs(kI(e).x-kI(r[0]).x),r=Math.abs(kI(e).y-kI(r[0]).y),o=xI[c.arrowTypeStart],l=xI[c.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),kI(e).x+i},"x"),y:mt(function(e,t,r){let i=0,n=kI(r[0]).y<kI(r[r.length-1]).y?"down":"up";0===t&&Object.hasOwn(xI,c.arrowTypeStart)?({angle:a,deltaY:s}=bI(r[0],r[1]),i=xI[c.arrowTypeStart]*Math.abs(Math.sin(a))*(0<=s?1:-1)):t===r.length-1&&Object.hasOwn(xI,c.arrowTypeEnd)&&({angle:a,deltaY:s}=bI(r[r.length-1],r[r.length-2]),i=xI[c.arrowTypeEnd]*Math.abs(Math.sin(a))*(0<=s?1:-1));var t=Math.abs(kI(e).y-kI(r[r.length-1]).y),a=Math.abs(kI(e).x-kI(r[r.length-1]).x),s=Math.abs(kI(e).y-kI(r[0]).y),r=Math.abs(kI(e).x-kI(r[0]).x),o=xI[c.arrowTypeStart],l=xI[c.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),kI(e).y+i},"y")}),"getLineFunctionsWithOffset")}),RI=r(()=>{e(),CI=mt((e,t,r,i,n,a=!1,s)=>{t.arrowTypeStart&&_I(e,"start",t.arrowTypeStart,r,i,n,a,s),t.arrowTypeEnd&&_I(e,"end",t.arrowTypeEnd,r,i,n,a,s)},"addEdgeMarkers"),SI={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}},EI=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],_I=mt((e,t,r,i,n,a,s=!1,o)=>{let l=SI[r],c=l&&EI.includes(l.type),h;l?(n=n+`_${a}-`+l.type+("start"===t?"Start":"End")+(s&&c?"-margin":""),o&&""!==o.trim()?(a=n+"_"+o.replace(/[^\dA-Za-z]/g,"_"),document.getElementById(a)||(s=document.getElementById(n))&&((h=s.cloneNode(!0)).id=a,h.querySelectorAll("path, circle, line").forEach(e=>{e.setAttribute("stroke",o),l.fill&&e.setAttribute("fill",o)}),s.parentNode?.appendChild(h)),e.attr("marker-"+t,`url(${i}#${a})`)):e.attr("marker-"+t,`url(${i}#${n})`)):P.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function LI(e,t){_r(B())&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}function II(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 NI(t,r){if(t.length<2)return"";let i="",n=t.length;for(let e=0;e<n;e++){var a,s,o,l,c,h=t[e],u=t[e-1],d=t[e+1];0===e?i+=`M${h.x},`+h.y:e===n-1||(c=h.x-u.x,u=h.y-u.y,a=d.x-h.x,d=d.y-h.y,o=Math.hypot(c,u),l=Math.hypot(a,d),o<1e-5)||l<1e-5||(c/=o,u/=o,a/=l,d/=l,s=Math.max(-1,Math.min(1,c*a+u*d)),(s=Math.acos(s))<1e-5)||Math.abs(Math.PI-s)<1e-5?i+=`L${h.x},`+h.y:(s=Math.min(r/Math.sin(s/2),o/2,l/2),o=h.x-c*s,l=h.y-u*s,c=h.x+a*s,u=h.y+d*s,i=(i+=`L${o},`+l)+`Q${h.x},${h.y} ${c},`+u)}return i}function DI(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 MI(e,t){var r,i,n,a=e.map(e=>({...e})),s=(2<=e.length&&xI[t.arrowTypeStart]&&(n=xI[t.arrowTypeStart],s=DI(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&&xI[t.arrowTypeEnd]&&(r=xI[t.arrowTypeEnd],i=e[s-1],n=DI(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 OI,PI,BI,$I,FI,zI,qI,jI,WI,UI,GI,VI,YI,HI,XI,KI,ZI,QI,JI,eN,tN,rN,iN,nN,aN,sN,oN,lN,cN,hN,uN,dN,pN,gN,fN,mN,yN,vN,bN,xN=r(()=>{Uu(),wi(),e(),F7(),vI(),zC(),AI(),mI(),bk(),IA(),_L(),RI(),C8(),OI=mt(e=>"string"==typeof e?e:B()?.flowchart?.curve,"resolveEdgeCurveType"),PI=new Map,BI=new Map,$I=mt(()=>{PI.clear(),BI.clear()},"clear"),FI=mt(e=>e?"string"==typeof e?e:e.reduce((e,t)=>e+";"+t,""):"","getLabelStyles"),zI=mt(async(t,r)=>{var i=B(),n=_r(i),a=v8(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 $7(t,r.label,{style:FI(r.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1,markdown:e,width:void 0},i);s.node().appendChild(e),P.info("abc82",r,r.labelType);let o=e.getBBox(),l=o;n?(i=e.children[0],h=Q(e),o=i.getBoundingClientRect(),l=o,h.attr("width",o.width),h.attr("height",o.height)):(i=Q(e).select("text").node())&&"function"==typeof i.getBBox&&(l=i.getBBox()),s.attr("transform",dI(l,n)),PI.set(r.id,a),r.width=o.width,r.height=o.height;let c;if(r.startLabelLeft){var h=t.insert("g").attr("class","edgeTerminals"),i=h.insert("g").attr("class","inner"),s=await SL(i,r.startLabelLeft,FI(r.labelStyle)||"",!1,!1);let e=(c=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",dI(e,n)),BI.get(r.id)||BI.set(r.id,{}),BI.get(r.id).startLeft=h,LI(c,r.startLabelLeft)}if(r.startLabelRight){s=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),i=await SL(s,r.startLabelRight,FI(r.labelStyle)||"",!1,!1);let e=(c=i).getBBox();n&&(h=i.children[0],i=Q(i),e=h.getBoundingClientRect(),i.attr("width",e.width),i.attr("height",e.height)),s.attr("transform",dI(e,n)),BI.get(r.id)||BI.set(r.id,{}),BI.get(r.id).startRight=a,LI(c,r.startLabelRight)}if(r.endLabelLeft){i=(h=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),s=await SL(h,r.endLabelLeft,FI(r.labelStyle)||"",!1,!1);let e=(c=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",dI(e,n)),BI.get(r.id)||BI.set(r.id,{}),BI.get(r.id).endLeft=h,LI(c,r.endLabelLeft)}if(r.endLabelRight){s=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),i=await SL(a,r.endLabelRight,FI(r.labelStyle)||"",!1,!1);let e=(c=i).getBBox();n&&(h=i.children[0],t=Q(i),e=h.getBoundingClientRect(),t.attr("width",e.width),t.attr("height",e.height)),s.attr("transform",dI(e,n)),BI.get(r.id)||BI.set(r.id,{}),BI.get(r.id).endRight=a,LI(c,r.endLabelRight)}return e},"insertEdgeLabel"),mt(LI,"setTerminalWidth"),qI=mt((i,n)=>{P.debug("Moving label abc88 ",i.id,i.label,PI.get(i.id),n);var a,s=n.updatedPath||n.originalPath,o=B(),o=rI(o).subGraphTitleTotalMargin;if(i.label){let e=PI.get(i.id),t=i.x,r=i.y;s&&(a=PC.calcLabelPosition(s),P.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=BI.get(i.id).startLeft,t=i.x,r=i.y;s&&(n=PC.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=BI.get(i.id).startRight,t=i.x,r=i.y;s&&(a=PC.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=BI.get(i.id).endLeft,t=i.x,r=i.y;s&&(o=PC.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=BI.get(i.id).endRight,t=i.x,r=i.y;s&&(n=PC.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_right",s),t=n.x,r=n.y),e.attr("transform",`translate(${t}, ${r})`)}},"positionEdgeLabel"),jI=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"),WI=mt((e,i,n)=>{P.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,c=Math.abs(i.y-n.y),h=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=h*e/c,u={x:n.x<i.x?n.x+o:n.x-h+o,y:n.y<i.y?n.y+c-e:n.y-c+e},0===o&&(u.x=i.x,u.y=i.y),0===h&&(u.x=i.x),0===c&&(u.y=i.y),P.debug(`abc89 top/bottom calc, Q ${c}, q ${e}, R ${h}, r `+o,u),u;{let e=c*(o=n.x<i.x?i.x-s-a:a-s-i.x)/h,t=n.x<i.x?n.x+h-o:n.x-h+o,r=n.y<i.y?n.y+e:n.y-e;return P.debug(`sides calc abc89, Q ${c}, q ${e}, R ${h}, r `+o,{_x:t,_y:r}),0===o&&(t=i.x,r=i.y),0===h&&(t=i.x),0===c&&(r=i.y),{x:t,y:r}}},"intersection"),UI=mt((e,i)=>{P.warn("abc88 cutPathAtIntersect",e,i);let n=[],a=e[0],s=!1;return e.forEach(e=>{if(P.info("abc88 checking point",e,i),jI(i,e)||s)P.warn("abc88 outside",e,a),a=e,s||n.push(e);else{let t=WI(i,a,e),r=(P.debug("abc88 inside",e,a,t),P.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)?P.warn("abc88 no intersect",t,n):n.push(t),s=!0}}),P.debug("returning points",n),n},"cutPathAtIntersect"),mt(II,"extractCornerPoints"),GI=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"),VI=mt(function(i){var e=II(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=GI(a,o,5),c=GI(s,o,5),h=c.x-l.x,u=c.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)?(P.debug("Corner point fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y)),t=o.x===l.x?{x:h<0?l.x-5+e:l.x+5-e,y:u<0?l.y-e:l.y+e}:{x:h<0?l.x-e:l.x+e,y:u<0?l.y-5+e:l.y+5-e}):P.debug("Corner point skipping fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y)),n.push(t,c)}else n.push(i[r]);return n},"fixCorners"),YI=mt((e,t,r)=>(e=Math.floor((e-t-r)/4),`0 ${t} ${Array(e).fill("2 2").join(" ")} `+r),"generateDashArray"),HI=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=B().handDrawnSeed,c=e.points,h=!1,u=n,d=a;var p,g=[];for(p in e.cssCompiledStyles)y8(p)||g.push(e.cssCompiledStyles[p]);P.debug("UIO intersect check",e.points,d.x,u.x),d.intersect&&u.intersect&&!o&&((c=c.slice(1,e.points.length-1)).unshift(u.intersect(c[0])),P.debug("Last point UIO",e.start,"--\x3e",e.end,c[c.length-1],d,d.intersect(c[c.length-1])),c.push(d.intersect(c[c.length-1]))),n=btoa(JSON.stringify(c)),e.toCluster&&(P.info("to cluster abc88",r.get(e.toCluster)),c=UI(e.points,r.get(e.toCluster).node),h=!0),e.fromCluster&&(P.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(c,null,2)),c=UI(c.reverse(),r.get(e.fromCluster).node).reverse(),h=!0);let f=c.filter(e=>!Number.isNaN(e.y)),m=OI(e.curve),y=("rounded"!==m&&(f=VI(f)),v5);switch(m){case"linear":y=v5;break;case"basis":y=F5;break;case"cardinal":y=Q5;break;case"bumpX":y=I5;break;case"bumpY":y=N5;break;case"catmullRom":y=l3;break;case"monotoneX":y=E3;break;case"monotoneY":y=_3;break;case"natural":y=I3;break;case"step":y=M3;break;case"stepAfter":y=P3;break;case"stepBefore":y=O3;break;case"rounded":y=v5;break;default:y=F5}let{x:v,y:b}=wI(e),x=w5().x(v).y(b).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?NI(MI(f,e),5):x(f),C=Array.isArray(e.style)?e.style:[e.style],S=C.find(e=>e?.startsWith("stroke:")),E="",_=(e.animate&&(E="edge-animation-fast"),e.animation&&(E="edge-animation-"+e.animation),!1),A=("handDrawn"===e.look?(a=LA.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:"")+(E?" "+E:"")).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:"")+(E?" "+E:"")).attr("style",r),S=r.match(/stroke:([^;]+)/)?.[1],_=!0===e.animate||!!e.animation||a.includes("animation"),r="function"==typeof(o=k.node()).getTotalLength?o.getTotalLength():0,a=TI[e.arrowTypeStart]||0,o=TI[e.arrowTypeEnd]||0,"neo"!==e.look||_||(r=`stroke-dasharray: ${"dotted"===e.pattern||"dashed"===e.pattern?YI(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",cC(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(B().flowchart.arrowMarkerAbsolute||B().state.arrowMarkerAbsolute)&&(A=(A=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(").replace(/\)/g,"\\)")),P.info("arrowTypeStart",e.arrowTypeStart),P.info("arrowTypeEnd",e.arrowTypeEnd),a=!_&&"neo"===e?.look,CI(k,e,A,s,i,a,S),o=Math.floor(c.length/2),r=c[o],n={},(h=!PC.isLabelCoordinateInPath(r,k.attr("d"))||h)&&(n.updatedPath=c),n.originalPath=e.points,n},"insertEdge"),mt(NI,"generateRoundedPath"),mt(DI,"calculateDeltaAndAngle"),mt(MI,"applyMarkerOffsetsToPoints")}),TN=r(()=>{e(),wi(),XI=mt((t,e,r,i)=>{e.forEach(e=>{vN[e](t,r,i)})},"insertMarkers"),KI=mt((e,t,r)=>{P.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),ZI=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"),QI=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"),JI=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"),eN=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"),tN=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"),rN=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"),iN=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"),nN=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"),aN=mt((e,t,r)=>{var i=vr().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"),sN=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"),oN=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"),lN=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"),cN=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"),hN=mt((e,t,r)=>{var i=vr().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"),uN=mt((e,t,r)=>{var{strokeWidth:i,mainBkg:n}=vr().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"),dN=mt((e,t,r)=>{var i=vr().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"),pN=mt((e,t,r)=>{var{strokeWidth:i,mainBkg:n}=vr().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"),gN=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"),fN=mt((e,t,r)=>{var i=vr().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"),mN=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"),yN=mt((e,t,r)=>{var i=vr().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"),vN={extension:KI,composition:ZI,aggregation:QI,dependency:JI,lollipop:eN,point:tN,circle:rN,cross:iN,barb:nN,barbNeo:aN,only_one:sN,zero_or_one:oN,one_or_more:lN,zero_or_more:cN,only_one_neo:hN,zero_or_one_neo:uN,one_or_more_neo:dN,zero_or_more_neo:pN,requirement_arrow:gN,requirement_contains:mN,requirement_arrow_neo:fN,requirement_contains_neo:yN},bN=XI});async function kN(t,r,i){let n,a;"rect"===r.shape&&(r.rx&&r.ry?r.shape="roundedRect":r.shape="squareRect");var s=r.shape?J9[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",cC(r.look)),r.tooltip&&a.attr("title",r.tooltip),wN.set(r.id,n),r.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var wN,CN,SN,EN,_N,AN,RN,LN,IN,NN,DN,MN=r(()=>{e(),pI(),zC(),wN=new Map,mt(kN,"insertNode"),CN=mt((e,t)=>{wN.set(t.id,e)},"setNodeElem"),SN=mt(()=>{wN.clear()},"clear"),EN=mt(e=>{var t=wN.get(e.id),r=(P.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")}),ON=r(()=>{wi(),th(),e(),yI(),xN(),TN(),MN(),K7(),zC(),_N={common:I,getConfig:vr,insertCluster:hI,insertEdge:HI,insertEdgeLabel:zI,insertMarkers:bN,insertNode:kN,interpolateToCurve:Zw,labelHelper:V7,log:P,positionEdgeLabel:qI}}),PN=r(()=>{AN="object"==typeof global&&global&&global.Object===Object&&global,RN=AN}),BN=r(()=>{PN(),LN="object"==typeof self&&self&&self.Object===Object&&self,LN=RN||LN||Function("return this")(),IN=LN}),$N=r(()=>{BN(),NN=IN.Symbol,DN=NN});function FN(e){var t=qN.call(e,WN),r=e[WN];try{var i=!(e[WN]=void 0)}catch{}var n=jN.call(e);return i&&(t?e[WN]=r:delete e[WN]),n}var zN,qN,jN,WN,UN,GN=r(()=>{$N(),zN=Object.prototype,qN=zN.hasOwnProperty,jN=zN.toString,WN=DN?DN.toStringTag:void 0,mt(FN,"getRawTag"),UN=FN});function VN(e){return HN.call(e)}var YN,HN,XN,KN=r(()=>{YN=Object.prototype,HN=YN.toString,mt(VN,"objectToString"),XN=VN});function ZN(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":(QN&&QN in Object(e)?UN:XN)(e)}var QN,JN,eD=r(()=>{$N(),GN(),KN(),QN=DN?DN.toStringTag:void 0,mt(ZN,"baseGetTag"),JN=ZN});function tD(e){return null!=e&&"object"==typeof e}var rD,iD=r(()=>{mt(tD,"isObjectLike"),rD=tD});function nD(e){return"symbol"==typeof e||rD(e)&&"[object Symbol]"==JN(e)}var aD,sD=r(()=>{eD(),iD(),mt(nD,"isSymbol"),aD=nD});function oD(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 lD,cD,hD,uD=r(()=>{mt(oD,"arrayMap"),lD=oD}),dD=r(()=>{cD=Array.isArray,hD=cD});function pD(e){var t;return"string"==typeof e?e:hD(e)?lD(e,pD)+"":aD(e)?mD?mD.call(e):"":"0"==(t=e+"")&&1/e==-gD?"-0":t}var gD,fD,mD,yD,vD=r(()=>{$N(),uD(),dD(),sD(),gD=1/0,fD=DN?DN.prototype:void 0,mD=fD?fD.toString:void 0,mt(pD,"baseToString"),yD=pD});function bD(e){for(var t=e.length;t--&&xD.test(e.charAt(t)););return t}var xD,TD,kD=r(()=>{xD=/\s/,mt(bD,"trimmedEndIndex"),TD=bD});function wD(e){return e&&e.slice(0,TD(e)+1).replace(CD,"")}var CD,SD,ED=r(()=>{kD(),CD=/^\s+/,mt(wD,"baseTrim"),SD=wD});function _D(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var AD,RD=r(()=>{mt(_D,"isObject"),AD=_D});function LD(e){if("number"==typeof e)return e;if(aD(e))return ID;if(AD(e)&&(t="function"==typeof e.valueOf?e.valueOf():e,e=AD(t)?t+"":t),"string"!=typeof e)return 0===e?e:+e;e=SD(e);var t=DD.test(e);return t||MD.test(e)?OD(e.slice(2),t?2:8):ND.test(e)?ID:+e}var ID,ND,DD,MD,OD,PD,BD=r(()=>{ED(),RD(),sD(),ID=NaN,ND=/^[-+]0x[0-9a-f]+$/i,DD=/^0b[01]+$/i,MD=/^0o[0-7]+$/i,OD=parseInt,mt(LD,"toNumber"),PD=LD});function $D(e){return e?(e=PD(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}var FD,zD=r(()=>{BD(),mt($D,"toFinite"),FD=$D});function qD(e){var t=(e=FD(e))%1;return e==e?t?e-t:e:0}var jD,WD=r(()=>{zD(),mt(qD,"toInteger"),jD=qD});function UD(e){return e}var GD,VD=r(()=>{mt(UD,"identity"),GD=UD});function YD(e){return!!AD(e)&&("[object Function]"==(e=JN(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}var HD,XD,KD,ZD=r(()=>{eD(),RD(),mt(YD,"isFunction"),HD=YD}),QD=r(()=>{BN(),XD=IN["__core-js_shared__"],KD=XD});function JD(e){return!!eM&&eM in e}var eM,tM,rM=r(()=>{var e;QD(),e=/[^.]+$/.exec(KD&&KD.keys&&KD.keys.IE_PROTO||""),eM=e?"Symbol(src)_1."+e:"",mt(JD,"isMasked"),tM=JD});function iM(e){if(null!=e){try{return aM.call(e)}catch{}try{return e+""}catch{}}return""}var nM,aM,sM,oM=r(()=>{nM=Function.prototype,aM=nM.toString,mt(iM,"toSource"),sM=iM});function lM(e){return!(!AD(e)||tM(e))&&(HD(e)?pM:hM).test(sM(e))}var cM,hM,uM,dM,pM,gM,fM=r(()=>{ZD(),rM(),RD(),oM(),cM=/[\\^$.*+?()[\]{}|]/g,hM=/^\[object .+?Constructor\]$/,uM=Function.prototype,dM=Object.prototype,uM=uM.toString,dM=dM.hasOwnProperty,pM=RegExp("^"+uM.call(dM).replace(cM,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt(lM,"baseIsNative"),gM=lM});function mM(e,t){return e?.[t]}var yM,vM=r(()=>{mt(mM,"getValue"),yM=mM});function bM(e,t){return e=yM(e,t),gM(e)?e:void 0}var xM,TM,kM,wM,CM,SM=r(()=>{fM(),vM(),mt(bM,"getNative"),xM=bM}),EM=r(()=>{SM(),BN(),TM=xM(IN,"WeakMap"),kM=TM}),_M=r(()=>{function t(){}RD(),wM=Object.create,mt(t,"object"),CM=function(e){return AD(e)?wM?wM(e):(t.prototype=e,e=new t,t.prototype=void 0,e):{}}});function AM(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 RM,LM=r(()=>{mt(AM,"apply"),RM=AM});function IM(){}var NM,DM=r(()=>{mt(IM,"noop"),NM=IM});function MM(e,t){var r=-1,i=e.length;for(t=t||Array(i);++r<i;)t[r]=e[r];return t}var OM,PM=r(()=>{mt(MM,"copyArray"),OM=MM});function BM(r){var i=0,n=0;return function(){var e=$M(),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 $M,FM,zM=r(()=>{$M=Date.now,mt(BM,"shortOut"),FM=BM});function qM(e){return function(){return e}}var jM,WM,UM,GM,VM,YM,HM=r(()=>{mt(qM,"constant"),jM=qM}),XM=r(()=>{SM(),WM=(()=>{try{var e=xM(Object,"defineProperty");return e({},"",{}),e}catch{}})(),UM=WM}),KM=r(()=>{HM(),XM(),VD(),GM=UM?function(e,t){return UM(e,"toString",{configurable:!0,enumerable:!1,value:jM(t),writable:!0})}:GD}),ZM=r(()=>{KM(),zM(),VM=FM(GM),YM=VM});function QM(e,t){for(var r=-1,i=null==e?0:e.length;++r<i&&!1!==t(e[r],r,e););return e}var JM,eO=r(()=>{mt(QM,"arrayEach"),JM=QM});function tO(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 rO,iO=r(()=>{mt(tO,"baseFindIndex"),rO=tO});function nO(e){return e!=e}var aO,sO=r(()=>{mt(nO,"baseIsNaN"),aO=nO});function oO(e,t,r){for(var i=r-1,n=e.length;++i<n;)if(e[i]===t)return i;return-1}var lO,cO=r(()=>{mt(oO,"strictIndexOf"),lO=oO});function hO(e,t,r){return t==t?lO(e,t,r):rO(e,aO,r)}var uO,dO=r(()=>{iO(),sO(),cO(),mt(hO,"baseIndexOf"),uO=hO});function pO(e,t){return!(null==e||!e.length)&&-1<uO(e,t,0)}var gO,fO=r(()=>{dO(),mt(pO,"arrayIncludes"),gO=pO});function mO(e,t){var r=typeof e;return!!(t=t??9007199254740991)&&("number"==r||"symbol"!=r&&yO.test(e))&&-1<e&&e%1==0&&e<t}var yO,vO,bO=r(()=>{yO=/^(?:0|[1-9]\d*)$/,mt(mO,"isIndex"),vO=mO});function xO(e,t,r){"__proto__"==t&&UM?UM(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var TO,kO=r(()=>{XM(),mt(xO,"baseAssignValue"),TO=xO});function wO(e,t){return e===t||e!=e&&t!=t}var CO,SO=r(()=>{mt(wO,"eq"),CO=wO});function EO(e,t,r){var i=e[t];AO.call(e,t)&&CO(i,r)&&(void 0!==r||t in e)||TO(e,t,r)}var _O,AO,RO,LO=r(()=>{kO(),SO(),_O=Object.prototype,AO=_O.hasOwnProperty,mt(EO,"assignValue"),RO=EO});function IO(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?TO:RO)(r,o,l)}return r}var NO,DO=r(()=>{LO(),kO(),mt(IO,"copyObject"),NO=IO});function MO(a,s,o){return s=OO(void 0===s?a.length-1:s,0),function(){for(var e=arguments,t=-1,r=OO(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),RM(a,this,n)}}var OO,PO,BO=r(()=>{LM(),OO=Math.max,mt(MO,"overRest"),PO=MO});function $O(e,t){return YM(PO(e,t,GD),e+"")}var FO,zO=r(()=>{VD(),BO(),ZM(),mt($O,"baseRest"),FO=$O});function qO(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=9007199254740991}var jO,WO=r(()=>{mt(qO,"isLength"),jO=qO});function UO(e){return null!=e&&jO(e.length)&&!HD(e)}var GO,VO=r(()=>{ZD(),WO(),mt(UO,"isArrayLike"),GO=UO});function YO(e,t,r){var i;return!!AD(r)&&!!("number"==(i=typeof t)?GO(r)&&vO(t,r.length):"string"==i&&t in r)&&CO(r[t],e)}var HO,XO=r(()=>{SO(),VO(),bO(),RD(),mt(YO,"isIterateeCall"),HO=YO});function KO(o){return FO(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&&HO(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 ZO,QO=r(()=>{zO(),XO(),mt(KO,"createAssigner"),ZO=KO});function JO(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||eP)}var eP,tP,rP=r(()=>{eP=Object.prototype,mt(JO,"isPrototype"),tP=JO});function iP(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var nP,aP=r(()=>{mt(iP,"baseTimes"),nP=iP});function sP(e){return rD(e)&&"[object Arguments]"==JN(e)}var oP,lP,cP,hP,uP,dP=r(()=>{eD(),iD(),mt(sP,"baseIsArguments"),oP=sP}),pP=r(()=>{dP(),iD(),hP=Object.prototype,lP=hP.hasOwnProperty,cP=hP.propertyIsEnumerable,hP=oP(function(){return arguments}())?oP:function(e){return rD(e)&&lP.call(e,"callee")&&!cP.call(e,"callee")},uP=hP});function gP(){return!1}var fP,mP,yP,vP,bP=r(()=>{mt(gP,"stubFalse"),fP=gP}),xP=r(()=>{BN(),bP(),yP="object"==typeof exports&&exports&&!exports.nodeType&&exports,mP=(mP=yP&&"object"==typeof module&&module&&!module.nodeType&&module)&&mP.exports===yP?IN.Buffer:void 0,yP=mP?mP.isBuffer:void 0,vP=yP||fP});function TP(e){return rD(e)&&jO(e.length)&&!!kP[JN(e)]}var kP,wP,CP=r(()=>{eD(),WO(),iD(),(kP={})["[object Float32Array]"]=kP["[object Float64Array]"]=kP["[object Int8Array]"]=kP["[object Int16Array]"]=kP["[object Int32Array]"]=kP["[object Uint8Array]"]=kP["[object Uint8ClampedArray]"]=kP["[object Uint16Array]"]=kP["[object Uint32Array]"]=!0,kP["[object Arguments]"]=kP["[object Array]"]=kP["[object ArrayBuffer]"]=kP["[object Boolean]"]=kP["[object DataView]"]=kP["[object Date]"]=kP["[object Error]"]=kP["[object Function]"]=kP["[object Map]"]=kP["[object Number]"]=kP["[object Object]"]=kP["[object RegExp]"]=kP["[object Set]"]=kP["[object String]"]=kP["[object WeakMap]"]=!1,mt(TP,"baseIsTypedArray"),wP=TP});function SP(t){return function(e){return t(e)}}var EP,_P,AP,RP,LP,IP,NP,DP=r(()=>{mt(SP,"baseUnary"),EP=SP}),MP=r(()=>{PN(),RP="object"==typeof exports&&exports&&!exports.nodeType&&exports,_P=RP&&"object"==typeof module&&module&&!module.nodeType&&module,RP=_P&&_P.exports===RP,AP=RP&&RN.process,RP=(()=>{try{return _P&&_P.require&&_P.require("util").types||AP&&AP.binding&&AP.binding("util")}catch{}})(),LP=RP}),OP=r(()=>{CP(),DP(),MP(),IP=(IP=LP&&LP.isTypedArray)?EP(IP):wP,NP=IP});function PP(e,t){var r,i=hD(e),n=!i&&uP(e),a=!i&&!n&&vP(e),s=!i&&!n&&!a&&NP(e),o=i||n||a||s,l=o?nP(e.length,String):[],c=l.length;for(r in e)!t&&!$P.call(e,r)||o&&("length"==r||a&&("offset"==r||"parent"==r)||s&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||vO(r,c))||l.push(r);return l}var BP,$P,FP,zP=r(()=>{aP(),pP(),dD(),xP(),bO(),OP(),BP=Object.prototype,$P=BP.hasOwnProperty,mt(PP,"arrayLikeKeys"),FP=PP});function qP(t,r){return function(e){return t(r(e))}}var jP,WP,UP,GP=r(()=>{mt(qP,"overArg"),jP=qP}),VP=r(()=>{GP(),WP=jP(Object.keys,Object),UP=WP});function YP(e){if(!tP(e))return UP(e);var t,r=[];for(t in Object(e))XP.call(e,t)&&"constructor"!=t&&r.push(t);return r}var HP,XP,KP,ZP=r(()=>{rP(),VP(),HP=Object.prototype,XP=HP.hasOwnProperty,mt(YP,"baseKeys"),KP=YP});function QP(e){return(GO(e)?FP:KP)(e)}var JP,eB=r(()=>{zP(),ZP(),VO(),mt(QP,"keys"),JP=QP});function tB(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}var rB,iB=r(()=>{mt(tB,"nativeKeysIn"),rB=tB});function nB(e){if(!AD(e))return rB(e);var t,r=tP(e),i=[];for(t in e)("constructor"!=t||!r&&sB.call(e,t))&&i.push(t);return i}var aB,sB,oB,lB=r(()=>{RD(),rP(),iB(),aB=Object.prototype,sB=aB.hasOwnProperty,mt(nB,"baseKeysIn"),oB=nB});function cB(e){return GO(e)?FP(e,!0):oB(e)}var hB,uB=r(()=>{zP(),lB(),VO(),mt(cB,"keysIn"),hB=cB});function dB(e,t){var r;return!hD(e)&&(!("number"!=(r=typeof e)&&"symbol"!=r&&"boolean"!=r&&null!=e&&!aD(e))||gB.test(e)||!pB.test(e)||null!=t&&e in Object(t))}var pB,gB,fB,mB,yB,vB=r(()=>{dD(),sD(),pB=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,gB=/^\w*$/,mt(dB,"isKey"),fB=dB}),bB=r(()=>{SM(),mB=xM(Object,"create"),yB=mB});function xB(){this.__data__=yB?yB(null):{},this.size=0}var TB,kB=r(()=>{bB(),mt(xB,"hashClear"),TB=xB});function wB(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e}var CB,SB=r(()=>{mt(wB,"hashDelete"),CB=wB});function EB(e){var t,r=this.__data__;return yB?"__lodash_hash_undefined__"===(t=r[e])?void 0:t:AB.call(r,e)?r[e]:void 0}var _B,AB,RB,LB=r(()=>{bB(),_B=Object.prototype,AB=_B.hasOwnProperty,mt(EB,"hashGet"),RB=EB});function IB(e){var t=this.__data__;return yB?void 0!==t[e]:DB.call(t,e)}var NB,DB,MB,OB=r(()=>{bB(),NB=Object.prototype,DB=NB.hasOwnProperty,mt(IB,"hashHas"),MB=IB});function PB(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=yB&&void 0===t?"__lodash_hash_undefined__":t,this}var BB,$B=r(()=>{bB(),mt(PB,"hashSet"),BB=PB});function FB(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 zB,qB=r(()=>{kB(),SB(),LB(),OB(),$B(),mt(FB,"Hash"),FB.prototype.clear=TB,FB.prototype.delete=CB,FB.prototype.get=RB,FB.prototype.has=MB,FB.prototype.set=BB,zB=FB});function jB(){this.__data__=[],this.size=0}var WB,UB=r(()=>{mt(jB,"listCacheClear"),WB=jB});function GB(e,t){for(var r=e.length;r--;)if(CO(e[r][0],t))return r;return-1}var VB,YB=r(()=>{SO(),mt(GB,"assocIndexOf"),VB=GB});function HB(e){var t=this.__data__;return!((e=VB(t,e))<0||(e==t.length-1?t.pop():KB.call(t,e,1),--this.size,0))}var XB,KB,ZB,QB=r(()=>{YB(),XB=Array.prototype,KB=XB.splice,mt(HB,"listCacheDelete"),ZB=HB});function JB(e){var t=this.__data__;return(e=VB(t,e))<0?void 0:t[e][1]}var e$,t$=r(()=>{YB(),mt(JB,"listCacheGet"),e$=JB});function r$(e){return-1<VB(this.__data__,e)}var i$,n$=r(()=>{YB(),mt(r$,"listCacheHas"),i$=r$});function a$(e,t){var r=this.__data__,i=VB(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}var s$,o$=r(()=>{YB(),mt(a$,"listCacheSet"),s$=a$});function l$(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 c$,h$,u$,d$=r(()=>{UB(),QB(),t$(),n$(),o$(),mt(l$,"ListCache"),l$.prototype.clear=WB,l$.prototype.delete=ZB,l$.prototype.get=e$,l$.prototype.has=i$,l$.prototype.set=s$,c$=l$}),p$=r(()=>{SM(),BN(),h$=xM(IN,"Map"),u$=h$});function g$(){this.size=0,this.__data__={hash:new zB,map:new(u$||c$),string:new zB}}var f$,m$=r(()=>{qB(),d$(),p$(),mt(g$,"mapCacheClear"),f$=g$});function y$(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var v$,b$=r(()=>{mt(y$,"isKeyable"),v$=y$});function x$(e,t){return e=e.__data__,v$(t)?e["string"==typeof t?"string":"hash"]:e.map}var T$,k$=r(()=>{b$(),mt(x$,"getMapData"),T$=x$});function w$(e){return e=T$(this,e).delete(e),this.size-=e?1:0,e}var C$,S$=r(()=>{k$(),mt(w$,"mapCacheDelete"),C$=w$});function E$(e){return T$(this,e).get(e)}var _$,A$=r(()=>{k$(),mt(E$,"mapCacheGet"),_$=E$});function R$(e){return T$(this,e).has(e)}var L$,I$=r(()=>{k$(),mt(R$,"mapCacheHas"),L$=R$});function N$(e,t){var r=T$(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}var D$,M$=r(()=>{k$(),mt(N$,"mapCacheSet"),D$=N$});function O$(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 P$,B$=r(()=>{m$(),S$(),A$(),I$(),M$(),mt(O$,"MapCache"),O$.prototype.clear=f$,O$.prototype.delete=C$,O$.prototype.get=_$,O$.prototype.has=L$,O$.prototype.set=D$,P$=O$});function $$(i,n){if("function"!=typeof i||null!=n&&"function"!=typeof n)throw new TypeError(F$);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($$.Cache||P$),a}var F$,z$,q$=r(()=>{B$(),F$="Expected a function",mt($$,"memoize"),$$.Cache=P$,z$=$$});function j$(e){var t=(e=z$(e,function(e){return 500===t.size&&t.clear(),e})).cache;return e}var W$,U$,G$,V$,Y$,H$=r(()=>{q$(),mt(j$,"memoizeCapped"),W$=j$}),X$=r(()=>{H$(),U$=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,G$=/\\(\\)?/g,V$=W$(function(e){var n=[];return 46===e.charCodeAt(0)&&n.push(""),e.replace(U$,function(e,t,r,i){n.push(r?i.replace(G$,"$1"):t||e)}),n}),Y$=V$});function K$(e){return null==e?"":yD(e)}var Z$,Q$=r(()=>{vD(),mt(K$,"toString"),Z$=K$});function J$(e,t){return hD(e)?e:fB(e,t)?[e]:Y$(Z$(e))}var eF,tF=r(()=>{dD(),vB(),X$(),Q$(),mt(J$,"castPath"),eF=J$});function rF(e){var t;return"string"==typeof e||aD(e)?e:"0"==(t=e+"")&&1/e==-1/0?"-0":t}var iF,nF=r(()=>{sD(),mt(rF,"toKey"),iF=rF});function aF(e,t){for(var r=0,i=(t=eF(t,e)).length;null!=e&&r<i;)e=e[iF(t[r++])];return r&&r==i?e:void 0}var sF,oF=r(()=>{tF(),nF(),mt(aF,"baseGet"),sF=aF});function lF(e,t,r){return void 0===(e=null==e?void 0:sF(e,t))?r:e}var cF,hF=r(()=>{oF(),mt(lF,"get"),cF=lF});function uF(e,t){for(var r=-1,i=t.length,n=e.length;++r<i;)e[n+r]=t[r];return e}var dF,pF=r(()=>{mt(uF,"arrayPush"),dF=uF});function gF(e){return hD(e)||uP(e)||!!(fF&&e&&e[fF])}var fF,mF,yF=r(()=>{$N(),pP(),dD(),fF=DN?DN.isConcatSpreadable:void 0,mt(gF,"isFlattenable"),mF=gF});function vF(e,t,r,i,n){var a=-1,s=e.length;for(r=r||mF,n=n||[];++a<s;){var o=e[a];0<t&&r(o)?1<t?vF(o,t-1,r,i,n):dF(n,o):i||(n[n.length]=o)}return n}var bF,xF=r(()=>{pF(),yF(),mt(vF,"baseFlatten"),bF=vF});function TF(e){return null!=e&&e.length?bF(e,1):[]}var kF,wF=r(()=>{xF(),mt(TF,"flatten"),kF=TF});function CF(e){return YM(PO(e,void 0,kF),e+"")}var SF,EF,_F,AF=r(()=>{wF(),BO(),ZM(),mt(CF,"flatRest"),SF=CF}),RF=r(()=>{GP(),EF=jP(Object.getPrototypeOf,Object),_F=EF});function LF(e){return!(!rD(e)||"[object Object]"!=JN(e))&&(null===(e=_F(e))||"function"==typeof(e=MF.call(e,"constructor")&&e.constructor)&&e instanceof e&&DF.call(e)==OF)}var IF,NF,DF,MF,OF,PF,BF=r(()=>{eD(),RF(),iD(),IF=Function.prototype,NF=Object.prototype,DF=IF.toString,MF=NF.hasOwnProperty,OF=DF.call(Object),mt(LF,"isPlainObject"),PF=LF});function $F(e){return FF.test(e)}var FF,zF,qF=r(()=>{FF=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),mt($F,"hasUnicode"),zF=$F});function jF(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 WF,UF=r(()=>{mt(jF,"arrayReduce"),WF=jF});function GF(){this.__data__=new c$,this.size=0}var VF,YF=r(()=>{d$(),mt(GF,"stackClear"),VF=GF});function HF(e){var t=this.__data__,e=t.delete(e);return this.size=t.size,e}var XF,KF=r(()=>{mt(HF,"stackDelete"),XF=HF});function ZF(e){return this.__data__.get(e)}var QF,JF=r(()=>{mt(ZF,"stackGet"),QF=ZF});function ez(e){return this.__data__.has(e)}var tz,rz=r(()=>{mt(ez,"stackHas"),tz=ez});function iz(e,t){var r=this.__data__;if(r instanceof c$){var i=r.__data__;if(!u$||i.length<199)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new P$(i)}return r.set(e,t),this.size=r.size,this}var nz,az=r(()=>{d$(),p$(),B$(),mt(iz,"stackSet"),nz=iz});function sz(e){e=this.__data__=new c$(e),this.size=e.size}var oz,lz=r(()=>{d$(),YF(),KF(),JF(),rz(),az(),mt(sz,"Stack"),sz.prototype.clear=VF,sz.prototype.delete=XF,sz.prototype.get=QF,sz.prototype.has=tz,sz.prototype.set=nz,oz=sz});function cz(e,t){return e&&NO(t,JP(t),e)}var hz,uz=r(()=>{DO(),eB(),mt(cz,"baseAssign"),hz=cz});function dz(e,t){return e&&NO(t,hB(t),e)}var pz,gz=r(()=>{DO(),uB(),mt(dz,"baseAssignIn"),pz=dz});function fz(e,t){return t?e.slice():(t=e.length,t=vz?vz(t):new e.constructor(t),e.copy(t),t)}var mz,yz,vz,bz,xz=r(()=>{BN(),mz="object"==typeof exports&&exports&&!exports.nodeType&&exports,yz=(yz=mz&&"object"==typeof module&&module&&!module.nodeType&&module)&&yz.exports===mz?IN.Buffer:void 0,vz=yz?yz.allocUnsafe:void 0,mt(fz,"cloneBuffer"),bz=fz});function Tz(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 kz,wz=r(()=>{mt(Tz,"arrayFilter"),kz=Tz});function Cz(){return[]}var Sz,Ez,_z,Az,Rz,Lz=r(()=>{mt(Cz,"stubArray"),Sz=Cz}),Iz=r(()=>{wz(),Lz(),Ez=Object.prototype,_z=Ez.propertyIsEnumerable,Rz=(Az=Object.getOwnPropertySymbols)?function(t){return null==t?[]:(t=Object(t),kz(Az(t),function(e){return _z.call(t,e)}))}:Sz});function Nz(e,t){return NO(e,Rz(e),t)}var Dz,Mz,Oz,Pz=r(()=>{DO(),Iz(),mt(Nz,"copySymbols"),Dz=Nz}),Bz=r(()=>{pF(),RF(),Iz(),Lz(),Mz=Object.getOwnPropertySymbols,Oz=Mz?function(e){for(var t=[];e;)dF(t,Rz(e)),e=_F(e);return t}:Sz});function $z(e,t){return NO(e,Oz(e),t)}var Fz,zz=r(()=>{DO(),Bz(),mt($z,"copySymbolsIn"),Fz=$z});function qz(e,t,r){return t=t(e),hD(e)?t:dF(t,r(e))}var jz,Wz=r(()=>{pF(),dD(),mt(qz,"baseGetAllKeys"),jz=qz});function Uz(e){return jz(e,JP,Rz)}var Gz,Vz=r(()=>{Wz(),Iz(),eB(),mt(Uz,"getAllKeys"),Gz=Uz});function Yz(e){return jz(e,hB,Oz)}var Hz,Xz,Kz,Zz,Qz,Jz,eq,tq,rq,iq,nq,aq,sq,oq,lq,cq,hq,uq,dq,pq=r(()=>{Wz(),Bz(),uB(),mt(Yz,"getAllKeysIn"),Hz=Yz}),gq=r(()=>{SM(),BN(),Xz=xM(IN,"DataView"),Kz=Xz}),fq=r(()=>{SM(),BN(),Zz=xM(IN,"Promise"),Qz=Zz}),mq=r(()=>{SM(),BN(),Jz=xM(IN,"Set"),eq=Jz}),yq=r(()=>{gq(),p$(),fq(),mq(),EM(),eD(),oM(),tq="[object Map]",rq="[object Promise]",iq="[object Set]",nq="[object WeakMap]",aq="[object DataView]",sq=sM(Kz),oq=sM(u$),lq=sM(Qz),cq=sM(eq),hq=sM(kM),uq=JN,(Kz&&uq(new Kz(new ArrayBuffer(1)))!=aq||u$&&uq(new u$)!=tq||Qz&&uq(Qz.resolve())!=rq||eq&&uq(new eq)!=iq||kM&&uq(new kM)!=nq)&&(uq=mt(function(e){var t=JN(e);if(e=(e="[object Object]"==t?e.constructor:void 0)?sM(e):"")switch(e){case sq:return aq;case oq:return tq;case lq:return rq;case cq:return iq;case hq:return nq}return t},"getTag")),dq=uq});function vq(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&xq.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var bq,xq,Tq,kq,wq,Cq=r(()=>{bq=Object.prototype,xq=bq.hasOwnProperty,mt(vq,"initCloneArray"),Tq=vq}),Sq=r(()=>{BN(),kq=IN.Uint8Array,wq=kq});function Eq(e){var t=new e.constructor(e.byteLength);return new wq(t).set(new wq(e)),t}var _q,Aq=r(()=>{Sq(),mt(Eq,"cloneArrayBuffer"),_q=Eq});function Rq(e,t){return t=t?_q(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.byteLength)}var Lq,Iq=r(()=>{Aq(),mt(Rq,"cloneDataView"),Lq=Rq});function Nq(e){var t=new e.constructor(e.source,Dq.exec(e));return t.lastIndex=e.lastIndex,t}var Dq,Mq,Oq=r(()=>{Dq=/\w*$/,mt(Nq,"cloneRegExp"),Mq=Nq});function Pq(e){return $q?Object($q.call(e)):{}}var Bq,$q,Fq,zq=r(()=>{$N(),Bq=DN?DN.prototype:void 0,$q=Bq?Bq.valueOf:void 0,mt(Pq,"cloneSymbol"),Fq=Pq});function qq(e,t){return t=t?_q(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.length)}var jq,Wq=r(()=>{Aq(),mt(qq,"cloneTypedArray"),jq=qq});function Uq(e,t,r){var i=e.constructor;switch(t){case"[object ArrayBuffer]":return _q(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return Lq(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 jq(e,r);case"[object Map]":return new i;case"[object Number]":case"[object String]":return new i(e);case"[object RegExp]":return Mq(e);case"[object Set]":return new i;case"[object Symbol]":return Fq(e)}}var Gq,Vq=r(()=>{Aq(),Iq(),Oq(),zq(),Wq(),mt(Uq,"initCloneByTag"),Gq=Uq});function Yq(e){return"function"!=typeof e.constructor||tP(e)?{}:CM(_F(e))}var Hq,Xq=r(()=>{_M(),RF(),rP(),mt(Yq,"initCloneObject"),Hq=Yq});function Kq(e){return rD(e)&&"[object Map]"==dq(e)}var Zq,Qq,Jq,ej=r(()=>{yq(),iD(),mt(Kq,"baseIsMap"),Zq=Kq}),tj=r(()=>{ej(),DP(),MP(),Qq=(Qq=LP&&LP.isMap)?EP(Qq):Zq,Jq=Qq});function rj(e){return rD(e)&&"[object Set]"==dq(e)}var ij,nj,aj,sj=r(()=>{yq(),iD(),mt(rj,"baseIsSet"),ij=rj}),oj=r(()=>{sj(),DP(),MP(),nj=(nj=LP&&LP.isSet)?EP(nj):ij,aj=nj});function lj(r,i,n,e,t,a){var s,o=i&cj,l=i&hj,c=i&uj;if(void 0===(s=n?t?n(r,e,t,a):n(r):s)){if(!AD(r))return r;if(e=hD(r)){if(s=Tq(r),!o)return OM(r,s)}else{var h=dq(r),u=h==pj||h==gj;if(vP(r))return bz(r,o);if(h==fj||h==dj||u&&!t){if(s=l||u?{}:Hq(r),!o)return l?Fz(r,pz(s,r)):Dz(r,hz(s,r))}else{if(!mj[h])return t?r:{};s=Gq(r,h,o)}}if(u=(a=a||new oz).get(r))return u;a.set(r,s),aj(r)?r.forEach(function(e){s.add(lj(e,i,n,e,r,a))}):Jq(r)&&r.forEach(function(e,t){s.set(t,lj(e,i,n,t,r,a))});var d=e?void 0:(c?l?Hz:Gz:l?hB:JP)(r);JM(d||r,function(e,t){d&&(e=r[t=e]),RO(s,t,lj(e,i,n,t,r,a))})}return s}var cj,hj,uj,dj,pj,gj,fj,mj,yj,vj=r(()=>{lz(),eO(),LO(),uz(),gz(),xz(),PM(),Pz(),zz(),Vz(),pq(),yq(),Cq(),Vq(),Xq(),dD(),xP(),tj(),RD(),oj(),eB(),uB(),cj=1,hj=2,uj=4,pj="[object Function]",gj="[object GeneratorFunction]",fj="[object Object]",(mj={})[dj="[object Arguments]"]=mj["[object Array]"]=mj["[object ArrayBuffer]"]=mj["[object DataView]"]=mj["[object Boolean]"]=mj["[object Date]"]=mj["[object Float32Array]"]=mj["[object Float64Array]"]=mj["[object Int8Array]"]=mj["[object Int16Array]"]=mj["[object Int32Array]"]=mj["[object Map]"]=mj["[object Number]"]=mj[fj]=mj["[object RegExp]"]=mj["[object Set]"]=mj["[object String]"]=mj["[object Symbol]"]=mj["[object Uint8Array]"]=mj["[object Uint8ClampedArray]"]=mj["[object Uint16Array]"]=mj["[object Uint32Array]"]=!0,mj["[object Error]"]=mj[pj]=mj["[object WeakMap]"]=!1,mt(lj,"baseClone"),yj=lj});function bj(e){return yj(e,4)}var xj,Tj=r(()=>{vj(),mt(bj,"clone"),xj=bj});function kj(e){return yj(e,5)}var wj,Cj=r(()=>{vj(),mt(kj,"cloneDeep"),wj=kj});function Sj(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}var Ej,_j=r(()=>{mt(Sj,"setCacheAdd"),Ej=Sj});function Aj(e){return this.__data__.has(e)}var Rj,Lj=r(()=>{mt(Aj,"setCacheHas"),Rj=Aj});function Ij(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new P$;++t<r;)this.add(e[t])}var Nj,Dj=r(()=>{B$(),_j(),Lj(),mt(Ij,"SetCache"),Ij.prototype.add=Ij.prototype.push=Ej,Ij.prototype.has=Rj,Nj=Ij});function Mj(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 Oj,Pj=r(()=>{mt(Mj,"arraySome"),Oj=Mj});function Bj(e,t){return e.has(t)}var $j,Fj=r(()=>{mt(Bj,"cacheHas"),$j=Bj});function zj(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),c=a.get(t);if(l&&c)return l==t&&c==e;var h=-1,u=!0,d=2&r?new Nj:void 0;for(a.set(e,t),a.set(t,e);++h<o;){var p,g=e[h],f=t[h];if(void 0!==(p=i?s?i(f,g,h,t,e,a):i(g,f,h,e,t,a):p)){if(p)continue;u=!1;break}if(d){if(!Oj(t,function(e,t){if(!$j(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 qj,jj=r(()=>{Dj(),Pj(),Fj(),mt(zj,"equalArrays"),qj=zj});function Wj(e){var r=-1,i=Array(e.size);return e.forEach(function(e,t){i[++r]=[t,e]}),i}var Uj,Gj=r(()=>{mt(Wj,"mapToArray"),Uj=Wj});function Vj(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var Yj,Hj=r(()=>{mt(Vj,"setToArray"),Yj=Vj});function Xj(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 wq(e),new wq(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return CO(+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=Uj;case"[object Set]":var l,o=o||Yj;return!!(e.size==t.size||1&i)&&((l=s.get(e))?l==t:(i|=2,s.set(e,t),l=qj(o(e),o(t),i,n,a,s),s.delete(e),l));case"[object Symbol]":if(Zj)return Zj.call(e)==Zj.call(t)}return!1}var Kj,Zj,Qj,Jj=r(()=>{$N(),Sq(),SO(),jj(),Gj(),Hj(),Kj=DN?DN.prototype:void 0,Zj=Kj?Kj.valueOf:void 0,mt(Xj,"equalByTag"),Qj=Xj});function eW(e,t,r,i,n,a){var s=1&r,o=Gz(e),l=o.length;if(l!=Gz(t).length&&!s)return!1;for(var c=l;c--;){var h=o[c];if(!(s?h in t:rW.call(t,h)))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;++c<l;){var f,m=e[h=o[c]],y=t[h];if(!(void 0===(f=i?s?i(y,m,h,t,e,a):i(m,y,h,e,t,a):f)?m===y||n(m,y,r,i,a):f)){p=!1;break}g=g||"constructor"==h}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 tW,rW,iW,nW=r(()=>{Vz(),tW=Object.prototype,rW=tW.hasOwnProperty,mt(eW,"equalObjects"),iW=eW});function aW(e,t,r,i,n,a){var s=hD(e),o=hD(t),l=s?oW:dq(e),o=o?oW:dq(t),c=(l=l==sW?lW:l)==lW,h=(o=o==sW?lW:o)==lW;if((o=l==o)&&vP(e)){if(!vP(t))return!1;c=!(s=!0)}return o&&!c?(a=a||new oz,s||NP(e)?qj(e,t,r,i,n,a):Qj(e,t,l,r,i,n,a)):1&r||(s=c&&hW.call(e,"__wrapped__"),l=h&&hW.call(t,"__wrapped__"),!s&&!l)?o&&(a=a||new oz,iW(e,t,r,i,n,a)):n(s?e.value():e,l?t.value():t,r,i,a=a||new oz)}var sW,oW,lW,cW,hW,uW,dW=r(()=>{lz(),jj(),Jj(),nW(),yq(),dD(),xP(),OP(),sW="[object Arguments]",oW="[object Array]",lW="[object Object]",cW=Object.prototype,hW=cW.hasOwnProperty,mt(aW,"baseIsEqualDeep"),uW=aW});function pW(e,t,r,i,n){return e===t||(null==e||null==t||!rD(e)&&!rD(t)?e!=e&&t!=t:uW(e,t,r,i,pW,n))}var gW,fW=r(()=>{dW(),iD(),mt(pW,"baseIsEqual"),gW=pW});function mW(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],c=e[l],h=o[1];if(s&&o[2]){if(void 0===c&&!(l in e))return!1}else{var u,d=new oz;if(!(void 0===(u=i?i(c,h,l,e,t,d):u)?gW(h,c,3,i,d):u))return!1}}return!0}var yW,vW=r(()=>{lz(),fW(),mt(mW,"baseIsMatch"),yW=mW});function bW(e){return e==e&&!AD(e)}var xW,TW=r(()=>{RD(),mt(bW,"isStrictComparable"),xW=bW});function kW(e){for(var t=JP(e),r=t.length;r--;){var i=t[r],n=e[i];t[r]=[i,n,xW(n)]}return t}var wW,CW=r(()=>{TW(),eB(),mt(kW,"getMatchData"),wW=kW});function SW(t,r){return function(e){return null!=e&&e[t]===r&&(void 0!==r||t in Object(e))}}var EW,_W=r(()=>{mt(SW,"matchesStrictComparable"),EW=SW});function AW(t){var r=wW(t);return 1==r.length&&r[0][2]?EW(r[0][0],r[0][1]):function(e){return e===t||yW(e,t,r)}}var RW,LW=r(()=>{vW(),CW(),_W(),mt(AW,"baseMatches"),RW=AW});function IW(e,t){return null!=e&&t in Object(e)}var NW,DW=r(()=>{mt(IW,"baseHasIn"),NW=IW});function MW(e,t,r){for(var i=-1,n=(t=eF(t,e)).length,a=!1;++i<n;){var s=iF(t[i]);if(!(a=null!=e&&r(e,s)))break;e=e[s]}return a||++i!=n?a:!!(n=null==e?0:e.length)&&jO(n)&&vO(s,n)&&(hD(e)||uP(e))}var OW,PW=r(()=>{tF(),pP(),dD(),bO(),WO(),nF(),mt(MW,"hasPath"),OW=MW});function BW(e,t){return null!=e&&OW(e,t,NW)}var $W,FW=r(()=>{DW(),PW(),mt(BW,"hasIn"),$W=BW});function zW(r,i){return fB(r)&&xW(i)?EW(iF(r),i):function(e){var t=cF(e,r);return void 0===t&&t===i?$W(e,r):gW(i,t,3)}}var qW,jW=r(()=>{fW(),hF(),FW(),vB(),TW(),_W(),nF(),mt(zW,"baseMatchesProperty"),qW=zW});function WW(t){return function(e){return e?.[t]}}var UW,GW=r(()=>{mt(WW,"baseProperty"),UW=WW});function VW(t){return function(e){return sF(e,t)}}var YW,HW=r(()=>{oF(),mt(VW,"basePropertyDeep"),YW=VW});function XW(e){return fB(e)?UW(iF(e)):YW(e)}var KW,ZW=r(()=>{GW(),HW(),vB(),nF(),mt(XW,"property"),KW=XW});function QW(e){return"function"==typeof e?e:null==e?GD:"object"==typeof e?hD(e)?qW(e[0],e[1]):RW(e):KW(e)}var JW,eU=r(()=>{LW(),jW(),VD(),dD(),ZW(),mt(QW,"baseIteratee"),JW=QW});function tU(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 rU,iU,nU,aU=r(()=>{mt(tU,"createBaseFor"),rU=tU}),sU=r(()=>{aU(),iU=rU(),nU=iU});function oU(e,t){return e&&nU(e,t,JP)}var lU,cU=r(()=>{sU(),eB(),mt(oU,"baseForOwn"),lU=oU});function hU(a,s){return function(e,t){if(null!=e){if(!GO(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 uU,dU,pU,gU,fU,mU,yU,vU,bU,xU=r(()=>{VO(),mt(hU,"createBaseEach"),uU=hU}),TU=r(()=>{cU(),xU(),dU=uU(lU),pU=dU}),kU=r(()=>{BN(),gU=mt(function(){return IN.Date.now()},"now"),fU=gU}),wU=r(()=>{zO(),SO(),XO(),uB(),mU=Object.prototype,yU=mU.hasOwnProperty,vU=FO(function(e,t){e=Object(e);var r=-1,i=t.length,n=2<i?t[2]:void 0;for(n&&HO(t[0],t[1],n)&&(i=1);++r<i;)for(var a=t[r],s=hB(a),o=-1,l=s.length;++o<l;){var c=s[o],h=e[c];(void 0===h||CO(h,mU[c])&&!yU.call(e,c))&&(e[c]=a[c])}return e}),bU=vU});function CU(e,t,r){(void 0===r||CO(e[t],r))&&(void 0!==r||t in e)||TO(e,t,r)}var SU,EU=r(()=>{kO(),SO(),mt(CU,"assignMergeValue"),SU=CU});function _U(e){return rD(e)&&GO(e)}var AU,RU=r(()=>{VO(),iD(),mt(_U,"isArrayLikeObject"),AU=_U});function LU(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var IU,NU=r(()=>{mt(LU,"safeGet"),IU=LU});function DU(e){return NO(e,hB(e))}var MU,OU=r(()=>{DO(),uB(),mt(DU,"toPlainObject"),MU=DU});function PU(e,t,r,i,n,a,s){var o,l,c,h=IU(e,r),u=IU(t,r),d=s.get(u);d||((t=void 0===(d=a?a(h,u,r+"",e,t,s):void 0))&&(l=!(o=hD(u))&&vP(u),c=!o&&!l&&NP(u),d=u,o||l||c?d=hD(h)?h:AU(h)?OM(h):l?bz(u,!(t=!1)):c?jq(u,!(t=!1)):[]:PF(u)||uP(u)?uP(d=h)?d=MU(h):AD(h)&&!HD(h)||(d=Hq(u)):t=!1),t&&(s.set(u,d),n(d,u,i,a,s),s.delete(u))),SU(e,r,d)}var BU,$U=r(()=>{EU(),xz(),Wq(),PM(),Xq(),pP(),dD(),RU(),xP(),ZD(),RD(),BF(),OP(),NU(),OU(),mt(PU,"baseMergeDeep"),BU=PU});function FU(i,n,a,s,o){i!==n&&nU(n,function(e,t){var r;o=o||new oz,AD(e)?BU(i,n,t,a,FU,s,o):(r=s?s(IU(i,t),e,t+"",i,n,o):void 0,SU(i,t,void 0===r?e:r))},hB)}var zU,qU=r(()=>{lz(),EU(),sU(),$U(),RD(),uB(),NU(),mt(FU,"baseMerge"),zU=FU});function jU(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 WU,UU=r(()=>{mt(jU,"arrayIncludesWith"),WU=jU});function GU(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var VU,YU=r(()=>{mt(GU,"last"),VU=GU});function HU(e){return"function"==typeof e?e:GD}var XU,KU=r(()=>{VD(),mt(HU,"castFunction"),XU=HU});function ZU(e,t){return(hD(e)?JM:pU)(e,XU(t))}var y,QU=r(()=>{eO(),TU(),KU(),dD(),mt(ZU,"forEach"),y=ZU}),JU=r(()=>{QU()});function eG(e,i){var n=[];return pU(e,function(e,t,r){i(e,t,r)&&n.push(e)}),n}var tG,rG=r(()=>{TU(),mt(eG,"baseFilter"),tG=eG});function iG(e,t){return(hD(e)?kz:tG)(e,JW(t,3))}var nG,aG=r(()=>{wz(),rG(),eU(),dD(),mt(iG,"filter"),nG=iG});function sG(a){return function(e,t,r){var i,n=Object(e);return GO(e)||(i=JW(t,3),e=JP(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 oG,lG=r(()=>{eU(),VO(),eB(),mt(sG,"createFind"),oG=sG});function cG(e,t,r){var i=null==e?0:e.length;return i?((r=null==r?0:jD(r))<0&&(r=hG(i+r,0)),rO(e,JW(t,3),r)):-1}var hG,uG,dG,pG,gG=r(()=>{iO(),eU(),WD(),hG=Math.max,mt(cG,"findIndex"),uG=cG}),fG=r(()=>{lG(),gG(),dG=oG(uG),pG=dG});function mG(e,i){var n=-1,a=GO(e)?Array(e.length):[];return pU(e,function(e,t,r){a[++n]=i(e,t,r)}),a}var yG,vG=r(()=>{TU(),VO(),mt(mG,"baseMap"),yG=mG});function bG(e,t){return(hD(e)?lD:yG)(e,JW(t,3))}var xG,TG=r(()=>{uD(),eU(),vG(),dD(),mt(bG,"map"),xG=bG});function kG(e,t){return null==e?e:nU(e,XU(t),hB)}var wG,CG=r(()=>{sU(),KU(),uB(),mt(kG,"forIn"),wG=kG});function SG(e,t){return e&&lU(e,XU(t))}var EG,_G=r(()=>{cU(),KU(),mt(SG,"forOwn"),EG=SG});function AG(e,t){return t<e}var RG,LG=r(()=>{mt(AG,"baseGt"),RG=AG});function IG(e,t){return null!=e&&DG.call(e,t)}var NG,DG,MG,OG=r(()=>{NG=Object.prototype,DG=NG.hasOwnProperty,mt(IG,"baseHas"),MG=IG});function PG(e,t){return null!=e&&OW(e,t,MG)}var BG,$G=r(()=>{OG(),PW(),mt(PG,"has"),BG=PG});function FG(e){return"string"==typeof e||!hD(e)&&rD(e)&&"[object String]"==JN(e)}var zG,qG=r(()=>{eD(),dD(),iD(),mt(FG,"isString"),zG=FG});function jG(t,e){return lD(e,function(e){return t[e]})}var WG,UG=r(()=>{uD(),mt(jG,"baseValues"),WG=jG});function GG(e){return null==e?[]:WG(e,JP(e))}var VG,YG=r(()=>{UG(),eB(),mt(GG,"values"),VG=GG});function HG(e){if(null!=e){if(GO(e)&&(hD(e)||"string"==typeof e||"function"==typeof e.splice||vP(e)||NP(e)||uP(e)))return!e.length;var t,r=dq(e);if("[object Map]"==r||"[object Set]"==r)return!e.size;if(tP(e))return!KP(e).length;for(t in e)if(KG.call(e,t))return!1}return!0}var XG,KG,ZG,QG=r(()=>{ZP(),yq(),pP(),dD(),VO(),xP(),rP(),OP(),XG=Object.prototype,KG=XG.hasOwnProperty,mt(HG,"isEmpty"),ZG=HG});function JG(e){return void 0===e}var eV,tV=r(()=>{mt(JG,"isUndefined"),eV=JG});function rV(e,t){return e<t}var iV,nV=r(()=>{mt(rV,"baseLt"),iV=rV});function aV(e,i){var n={};return i=JW(i,3),lU(e,function(e,t,r){TO(n,t,i(e,t,r))}),n}var sV,oV=r(()=>{kO(),cU(),eU(),mt(aV,"mapValues"),sV=aV});function lV(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&&!aD(l):r(l,a))&&(a=l,s=o)}return s}var cV,hV=r(()=>{sD(),mt(lV,"baseExtremum"),cV=lV});function uV(e){return e&&e.length?cV(e,GD,RG):void 0}var dV,pV,gV,fV=r(()=>{hV(),LG(),VD(),mt(uV,"max"),dV=uV}),mV=r(()=>{qU(),QO(),pV=ZO(function(e,t,r){zU(e,t,r)}),gV=pV});function yV(e){return e&&e.length?cV(e,GD,iV):void 0}var vV,bV=r(()=>{hV(),nV(),VD(),mt(yV,"min"),vV=yV});function xV(e,t){return e&&e.length?cV(e,JW(t,2),iV):void 0}var TV,kV=r(()=>{hV(),eU(),nV(),mt(xV,"minBy"),TV=xV});function wV(e,t,r,i){if(AD(e))for(var n=-1,a=(t=eF(t,e)).length,s=a-1,o=e;null!=o&&++n<a;){var l,c=iF(t[n]),h=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;n!=s&&(l=o[c],void 0===(h=i?i(l,c,o):void 0))&&(h=AD(l)?l:vO(t[n+1])?[]:{}),RO(o,c,h),o=o[c]}return e}var CV,SV=r(()=>{LO(),tF(),bO(),RD(),nF(),mt(wV,"baseSet"),CV=wV});function EV(e,t,r){for(var i=-1,n=t.length,a={};++i<n;){var s=t[i],o=sF(e,s);r(o,s)&&CV(a,eF(s,e),o)}return a}var _V,AV=r(()=>{oF(),SV(),tF(),mt(EV,"basePickBy"),_V=EV});function RV(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var LV,IV=r(()=>{mt(RV,"baseSortBy"),LV=RV});function NV(e,t){if(e!==t){var r=void 0!==e,i=null===e,n=e==e,a=aD(e),s=void 0!==t,o=null===t,l=t==t,c=aD(t);if(!o&&!c&&!a&&t<e||a&&s&&l&&!o&&!c||i&&s&&l||!r&&l||!n)return 1;if(!i&&!a&&!c&&e<t||c&&r&&n&&!i&&!a||o&&r&&n||!s&&n||!l)return-1}return 0}var DV,MV=r(()=>{sD(),mt(NV,"compareAscending"),DV=NV});function OV(e,t,r){for(var i=-1,n=e.criteria,a=t.criteria,s=n.length,o=r.length;++i<s;){var l=DV(n[i],a[i]);if(l)return o<=i?l:l*("desc"==r[i]?-1:1)}return e.index-t.index}var PV,BV=r(()=>{MV(),mt(OV,"compareMultiple"),PV=OV});function $V(e,i,r){i=i.length?lD(i,function(t){return hD(t)?function(e){return sF(e,1===t.length?t[0]:t)}:t}):[GD];var n=-1,e=(i=lD(i,EP(JW)),yG(e,function(t,e,r){return{criteria:lD(i,function(e){return e(t)}),index:++n,value:t}}));return LV(e,function(e,t){return PV(e,t,r)})}var FV,zV,qV,jV=r(()=>{uD(),oF(),eU(),vG(),IV(),DP(),BV(),VD(),dD(),mt($V,"baseOrderBy"),FV=$V}),WV=r(()=>{GW(),zV=UW("length"),qV=zV});function UV(e){for(var t=QV.lastIndex=0;QV.test(e);)++t;return t}var GV,VV,YV,HV,XV,KV,ZV,QV,JV,eY=r(()=>{GV="["+(HV="\\ud800-\\udfff")+"]",VV="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",YV="\\ud83c[\\udffb-\\udfff]",ZV="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",KV="[\\ufe0e\\ufe0f]?",XV="(?:\\u200d(?:"+[HV="[^"+HV+"]","(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]"].join("|")+")"+KV+ZV+")*",KV=KV+ZV+XV,ZV="(?:"+[HV+VV+"?",VV,"(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]",GV].join("|")+")",QV=RegExp(YV+"(?="+YV+")|"+ZV+KV,"g"),mt(UV,"unicodeSize"),JV=UV});function tY(e){return(zF(e)?JV:qV)(e)}var rY,iY=r(()=>{WV(),qF(),eY(),mt(tY,"stringSize"),rY=tY});function nY(r,e){return _V(r,e,function(e,t){return $W(r,t)})}var aY,sY,oY,lY=r(()=>{AV(),FW(),mt(nY,"basePick"),aY=nY}),cY=r(()=>{lY(),AF(),sY=SF(function(e,t){return null==e?{}:aY(e,t)}),oY=sY});function hY(e,t,r,i){for(var n=-1,a=dY(uY((t-e)/(r||1)),0),s=Array(a);a--;)s[i?a:++n]=e,e+=r;return s}var uY,dY,pY,gY=r(()=>{uY=Math.ceil,dY=Math.max,mt(hY,"baseRange"),pY=hY});function fY(i){return function(e,t,r){return r&&"number"!=typeof r&&HO(e,t,r)&&(t=r=void 0),e=FD(e),void 0===t?(t=e,e=0):t=FD(t),r=void 0===r?e<t?1:-1:FD(r),pY(e,t,r,i)}}var mY,yY,vY,bY=r(()=>{gY(),XO(),zD(),mt(fY,"createRange"),mY=fY}),xY=r(()=>{bY(),yY=mY(),vY=yY});function TY(e,i,n,a,t){return t(e,function(e,t,r){n=a?(a=!1,e):i(n,e,t,r)}),n}var kY,wY=r(()=>{mt(TY,"baseReduce"),kY=TY});function CY(e,t,r){var i=hD(e)?WF:kY,n=arguments.length<3;return i(e,JW(t,4),r,n,pU)}var SY,EY=r(()=>{UF(),TU(),eU(),wY(),dD(),mt(CY,"reduce"),SY=CY});function _Y(e){var t;return null==e?0:GO(e)?zG(e)?rY(e):e.length:"[object Map]"==(t=dq(e))||"[object Set]"==t?e.size:KP(e).length}var AY,RY,LY,IY,NY,DY=r(()=>{ZP(),yq(),VO(),qG(),iY(),mt(_Y,"size"),AY=_Y}),MY=r(()=>{xF(),jV(),zO(),XO(),RY=FO(function(e,t){var r;return null==e?[]:(1<(r=t.length)&&HO(e,t[0],t[1])?t=[]:2<r&&HO(t[0],t[1],t[2])&&(t=[t[0]]),FV(e,bF(t,1),[]))}),LY=RY}),OY=r(()=>{mq(),DM(),Hj(),IY=eq&&1/Yj(new eq([,-0]))[1]==1/0?function(e){return new eq(e)}:NM,NY=IY});function PY(e,t,r){var i=-1,n=gO,a=e.length,s=!0,o=[],l=o;if(r)s=!1,n=WU;else if(200<=a){var c=t?null:NY(e);if(c)return Yj(c);s=!1,n=$j,l=new Nj}else l=t?[]:o;e:for(;++i<a;){var h=e[i],u=t?t(h):h,h=r||0!==h?h:0;if(s&&u==u){for(var d=l.length;d--;)if(l[d]===u)continue e;t&&l.push(u),o.push(h)}else n(l,u,r)||(l!==o&&l.push(u),o.push(h))}return o}var BY,$Y,FY,zY=r(()=>{Dj(),fO(),UU(),Fj(),OY(),Hj(),mt(PY,"baseUniq"),BY=PY}),qY=r(()=>{xF(),zO(),zY(),RU(),$Y=FO(function(e){return BY(bF(e,1,AU,!0))}),FY=$Y});function jY(e){var t=++WY;return Z$(e)+t}var WY,UY,GY=r(()=>{Q$(),WY=0,mt(jY,"uniqueId"),UY=jY});function VY(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 YY,HY=r(()=>{mt(VY,"baseZipObject"),YY=VY});function XY(e,t){return YY(e||[],t||[],RO)}var KY,ZY=r(()=>{LO(),HY(),mt(XY,"zipObject"),KY=XY}),QY=r(()=>{Tj(),Cj(),HM(),wU(),JU(),aG(),fG(),wF(),QU(),CG(),_G(),$G(),dD(),QG(),ZD(),tV(),eB(),YU(),TG(),oV(),fV(),mV(),bV(),kV(),kU(),cY(),xY(),EY(),DY(),MY(),qY(),GY(),YG(),ZY()});function JY(e,t){e[t]?e[t]++:e[t]=1}function eH(e,t){--e[t]||delete e[t]}function tH(e,t,r,i){return t=""+t,r=""+r,!e&&r<t&&(e=t,t=r,r=e),t+""+r+""+(eV(i)?"\0":i)}function rH(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 iH(e,t){return tH(e,t.v,t.w,t.name)}var nH,aH=r(()=>{QY(),(nH=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=jM(void 0),this._defaultEdgeLabelFn=jM(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 HD(e)||(e=jM(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return JP(this._nodes)}sources(){var t=this;return nG(this.nodes(),function(e){return ZG(t._in[e])})}sinks(){var t=this;return nG(this.nodes(),function(e){return ZG(t._out[e])})}setNodes(e,t){var r=arguments,i=this;return y(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],y(this.children(e),e=>{this.setParent(e)}),delete this._children[e]),y(JP(this._in[e]),t),delete this._in[e],delete this._preds[e],y(JP(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(eV(t))t="\0";else{for(var r=t+="";!eV(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 eV(e)&&(e="\0"),this._isCompound?(t=this._children[e])?JP(t):void 0:"\0"===e?this.nodes():this.hasNode(e)?[]:void 0}predecessors(e){if(e=this._preds[e])return JP(e)}successors(e){if(e=this._sucs[e])return JP(e)}neighbors(e){var t=this.predecessors(e);if(t)return FY(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=(y(this._nodes,function(e,t){r(t)&&i.setNode(t,e)}),y(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&&y(i.nodes(),function(e){i.setParent(e,s(e))}),i}setDefaultEdgeLabel(e){return HD(e)||(e=jM(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return VG(this._edgeObjs)}setPath(e,r){var i=this,n=arguments;return SY(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,eV(e)||(e=""+e),tH(this._isDirected,n,a,e));if(Object.prototype.hasOwnProperty.call(this._edgeLabels,i))r&&(this._edgeLabels[i]=t);else{if(!eV(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=rH(this._isDirected,n,a,e)).v,a=r.w;Object.freeze(r),this._edgeObjs[i]=r,JY(this._preds[a],n),JY(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?iH(this._isDirected,e):tH(this._isDirected,e,t,r),this._edgeLabels[e]}hasEdge(e,t,r){return e=1===arguments.length?iH(this._isDirected,e):tH(this._isDirected,e,t,r),Object.prototype.hasOwnProperty.call(this._edgeLabels,e)}removeEdge(e,t,r){var r=1===arguments.length?iH(this._isDirected,arguments[0]):tH(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],eH(this._preds[t],e),eH(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=VG(e),t?nG(e,function(e){return e.v===t}):e}outEdges(e,t){if(e=this._out[e])return e=VG(e),t?nG(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,nH.prototype._edgeCount=0,mt(JY,"incrementOrInitEntry"),mt(eH,"decrementOrRemoveEntry"),mt(tH,"edgeArgsToId"),mt(rH,"edgeArgsToObj"),mt(iH,"edgeObjToId")}),sH=r(()=>{aH()});function oH(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function lH(e,t){if("_next"!==e&&"_prev"!==e)return t}var cH,hH=r(()=>{cH=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 oH(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&oH(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,lH)),r=r._prev;return"["+e.join(", ")+"]"}},mt(oH,"unlink"),mt(lH,"filterOutLinks")});function uH(t,e){return t.nodeCount()<=1?[]:(e=dH((e=gH(t,e||mH)).graph,e.buckets,e.zeroIdx),kF(xG(e,function(e){return t.outEdges(e.v,e.w)})))}function dH(e,t,r){for(var i,n=[],a=t[t.length-1],s=t[0];e.nodeCount();){for(;i=s.dequeue();)pH(e,t,r,i);for(;i=a.dequeue();)pH(e,t,r,i);if(e.nodeCount())for(var o=t.length-2;0<o;--o)if(i=t[o].dequeue()){n=n.concat(pH(e,t,r,i,!0));break}}return n}function pH(i,n,a,e,s){var o=s?[]:void 0;return y(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,fH(n,a,r)}),y(i.outEdges(e.v),function(e){var t=i.edge(e),e=e.w;(e=i.node(e)).in-=t,fH(n,a,e)}),i.removeNode(e.v),o}function gH(e,i){var n=new nH,a=0,s=0,t=(y(e.nodes(),function(e){n.setNode(e,{v:e,in:0,out:0})}),y(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)}),vY(s+a+3).map(function(){return new cH})),r=a+1;return y(n.nodes(),function(e){fH(t,r,n.node(e))}),{graph:n,buckets:t,zeroIdx:r}}function fH(e,t,r){(r.out?r.in?e[r.out-r.in+t]:e[e.length-1]:e[0]).enqueue(r)}var mH,yH=r(()=>{QY(),sH(),hH(),mH=jM(1),mt(uH,"greedyFAS"),mt(dH,"doGreedyFAS"),mt(pH,"removeNode"),mt(gH,"buildState"),mt(fH,"assignBucket")});function vH(r){var e="greedy"===r.graph().acyclicer?uH(r,t(r)):bH(r);function t(t){return function(e){return t.edge(e).weight}}y(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,UY("rev"))}),mt(t,"weightFn")}function bH(t){var r=[],i={},n={};function a(e){Object.prototype.hasOwnProperty.call(n,e)||(n[e]=!0,i[e]=!0,y(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"),y(t.nodes(),a),r}function xH(i){y(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 TH=r(()=>{QY(),yH(),mt(vH,"run"),mt(bH,"dfsFAS"),mt(xH,"undo")});function kH(e,t,r,i){for(var n;n=UY(i),e.hasNode(n););return r.dummy=t,e.setNode(n,r),n}function wH(i){var n=(new nH).setGraph(i.graph());return y(i.nodes(),function(e){n.setNode(e,i.node(e))}),y(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 CH(t){var r=new nH({multigraph:t.isMultigraph()}).setGraph(t.graph());return y(t.nodes(),function(e){t.children(e).length||r.setNode(e,t.node(e))}),y(t.edges(),function(e){r.setEdge(e,t.edge(e))}),r}function SH(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 EH(i){var n=xG(vY(LH(i)+1),function(){return[]});return y(i.nodes(),function(e){var t=i.node(e),r=t.rank;eV(r)||(n[r][t.order]=e)}),n}function _H(t){var r=vV(xG(t.nodes(),function(e){return t.node(e).rank}));y(t.nodes(),function(e){e=t.node(e),BG(e,"rank")&&(e.rank-=r)})}function AH(r){var i=vV(xG(r.nodes(),function(e){return r.node(e).rank})),n=[],a=(y(r.nodes(),function(e){var t=r.node(e).rank-i;n[t]||(n[t]=[]),n[t].push(e)}),0),s=r.graph().nodeRankFactor;y(n,function(e,t){eV(e)&&t%s!=0?--a:a&&y(e,function(e){r.node(e).rank+=a})})}function RH(e,t,r,i){var n={width:0,height:0};return 4<=arguments.length&&(n.rank=r,n.order=i),kH(e,"border",n,t)}function LH(t){return dV(xG(t.nodes(),function(e){if(e=t.node(e).rank,!eV(e))return e}))}function IH(e,t){var r={lhs:[],rhs:[]};return y(e,function(e){(t(e)?r.lhs:r.rhs).push(e)}),r}function NH(e,t){var r=fU();try{return t()}finally{console.log(e+" time: "+(fU()-r)+"ms")}}function DH(e,t){return t()}var MH=r(()=>{QY(),sH(),mt(kH,"addDummyNode"),mt(wH,"simplify"),mt(CH,"asNonCompoundGraph"),mt(SH,"intersectRect"),mt(EH,"buildLayerMatrix"),mt(_H,"normalizeRanks"),mt(AH,"removeEmptyRanks"),mt(RH,"addBorderNode"),mt(LH,"maxRank"),mt(IH,"partition"),mt(NH,"time"),mt(DH,"notime")});function OH(a){function s(e){var t=a.children(e),r=a.node(e);if(t.length&&y(t,s),Object.prototype.hasOwnProperty.call(r,"minRank")){r.borderLeft=[],r.borderRight=[];for(var i=r.minRank,n=r.maxRank+1;i<n;++i)PH(a,"borderLeft","_bl",e,r,i),PH(a,"borderRight","_br",e,r,i)}}mt(s,"dfs"),y(a.children(),s)}function PH(e,t,r,i,n,a){var s=n[t][a-1],r=kH(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 BH=r(()=>{QY(),MH(),mt(OH,"addBorderSegments"),mt(PH,"addBorderNode")});function $H(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||zH(e)}function FH(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||jH(e),"lr"!==t&&"rl"!==t||(UH(e),zH(e))}function zH(t){y(t.nodes(),function(e){qH(t.node(e))}),y(t.edges(),function(e){qH(t.edge(e))})}function qH(e){var t=e.width;e.width=e.height,e.height=t}function jH(t){y(t.nodes(),function(e){WH(t.node(e))}),y(t.edges(),function(e){e=t.edge(e),y(e.points,WH),Object.prototype.hasOwnProperty.call(e,"y")&&WH(e)})}function WH(e){e.y=-e.y}function UH(t){y(t.nodes(),function(e){GH(t.node(e))}),y(t.edges(),function(e){e=t.edge(e),y(e.points,GH),Object.prototype.hasOwnProperty.call(e,"x")&&GH(e)})}function GH(e){var t=e.x;e.x=e.y,e.y=t}var VH=r(()=>{QY(),mt($H,"adjust"),mt(FH,"undo"),mt(zH,"swapWidthHeight"),mt(qH,"swapWidthHeightOne"),mt(jH,"reverseY"),mt(WH,"reverseYOne"),mt(UH,"swapXY"),mt(GH,"swapXYOne")});function YH(t){t.graph().dummyChains=[],y(t.edges(),function(e){HH(t,e)})}function HH(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 c,h=void 0,u=0;for(++i;i<a;++u,++i)o.points=[],c=kH(e,"edge",h={width:0,height:0,edgeLabel:o,edgeObj:t,rank:i},"_d"),i===l&&(h.width=o.width,h.height=o.height,h.dummy="edge-label",h.labelpos=o.labelpos),e.setEdge(r,c,{weight:o.weight},s),0===u&&e.graph().dummyChains.push(c),r=c;e.setEdge(r,n,{weight:o.weight},s)}}function XH(n){y(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 KH=r(()=>{QY(),MH(),mt(YH,"run"),mt(HH,"normalizeEdge"),mt(XH,"undo")});function ZH(r){var i={};function n(e){var t=r.node(e);return Object.prototype.hasOwnProperty.call(i,e)?t.rank:(i[e]=!0,(e=vV(xG(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"),y(r.sources(),n)}function QH(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var JH=r(()=>{QY(),mt(ZH,"longestPath"),mt(QH,"slack")});function eX(e){var t,r=new nH({directed:!1}),i=e.nodes()[0],n=e.nodeCount();for(r.setNode(i,{});tX(r,e)<n;)t=rX(r,e),t=r.hasNode(t.v)?QH(e,t):-QH(e,t),iX(r,e,t);return r}function tX(i,n){function a(r){y(n.nodeEdges(r),function(e){var t=e.v,t=r===t?e.w:t;i.hasNode(t)||QH(n,e)||(i.setNode(t,{}),i.setEdge(r,t,{}),a(t))})}return mt(a,"dfs"),y(i.nodes(),a),i.nodeCount()}function rX(t,r){return TV(r.edges(),function(e){if(t.hasNode(e.v)!==t.hasNode(e.w))return QH(r,e)})}function iX(e,t,r){y(e.nodes(),function(e){t.node(e).rank+=r})}var nX=r(()=>{QY(),sH(),JH(),mt(eX,"feasibleTree"),mt(tX,"tightTree"),mt(rX,"findMinSlackEdge"),mt(iX,"shiftRanks")}),aX=r(()=>{}),sX=r(()=>{}),oX=r(()=>{QY(),sX(),jM(1)}),lX=r(()=>{oX()}),cX=r(()=>{}),hX=r(()=>{cX()}),uX=r(()=>{QY(),jM(1)});function dX(t){var r={},i={},n=[];function a(e){if(Object.prototype.hasOwnProperty.call(i,e))throw new pX;Object.prototype.hasOwnProperty.call(r,e)||(i[e]=!0,r[e]=!0,y(t.predecessors(e),a),delete i[e],n.push(e))}if(mt(a,"visit"),y(t.sinks(),a),AY(r)!==t.nodeCount())throw new pX;return n}function pX(){}var gX=r(()=>{QY(),dX.CycleException=pX,mt(dX,"topsort"),mt(pX,"CycleException"),pX.prototype=new Error}),fX=r(()=>{gX()});function mX(t,e,r){hD(e)||(e=[e]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),n=[],a={};return y(e,function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);yX(t,e,"post"===r,a,i,n)}),n}function yX(t,e,r,i,n,a){Object.prototype.hasOwnProperty.call(i,e)||(i[e]=!0,r||a.push(e),y(n(e),function(e){yX(t,e,r,i,n,a)}),r&&a.push(e))}var vX=r(()=>{QY(),mt(mX,"dfs"),mt(yX,"doDfs")});function bX(e,t){return mX(e,t,"post")}var xX=r(()=>{vX(),mt(bX,"postorder")});function TX(e,t){return mX(e,t,"pre")}var kX=r(()=>{vX(),mt(TX,"preorder")}),wX=r(()=>{sX(),aH()}),CX=r(()=>{aX(),oX(),lX(),hX(),uX(),fX(),xX(),kX(),wX(),cX(),gX()});function SX(e){ZH(e=wH(e));var t,r=eX(e);for(RX(r),EX(r,e);t=IX(r);)DX(r,e,t,NX(r,e,t))}function EX(t,r){var e=(e=bX(t,t.nodes())).slice(0,e.length-1);y(e,function(e){_X(t,r,e)})}function _X(e,t,r){var i=e.node(r).parent;e.edge(r,i).cutvalue=AX(e,t,r)}function AX(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,y(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,OX(i,a,r))&&(e=i.edge(a,r).cutvalue,l+=t?-e:e)}),l}function RX(e,t){arguments.length<2&&(t=e.nodes()[0]),LX(e,{},1,t)}function LX(t,r,i,n,e){var a=i,s=t.node(n);return r[n]=!0,y(t.neighbors(n),function(e){Object.prototype.hasOwnProperty.call(r,e)||(i=LX(t,r,i,e,n))}),s.low=a,s.lim=i++,e?s.parent=e:delete s.parent,i}function IX(t){return pG(t.edges(),function(e){return t.edge(e).cutvalue<0})}function NX(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),nG(r.edges(),function(e){return s===PX(0,t.node(e.v),a)&&s!==PX(0,t.node(e.w),a)}));return TV(n,function(e){return QH(r,e)})}function DX(e,t,r,i){var n=r.v;e.removeEdge(n,r.w),e.setEdge(i.v,i.w,{}),RX(e),EX(e,t),MX(e,t)}function MX(n,a){var e=pG(n.nodes(),function(e){return!a.node(e).parent}),e=(e=TX(n,e)).slice(1);y(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 OX(e,t,r){return e.hasEdge(t,r)}function PX(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var BX=r(()=>{QY(),CX(),MH(),nX(),JH(),SX.initLowLimValues=RX,SX.initCutValues=EX,SX.calcCutValue=AX,SX.leaveEdge=IX,SX.enterEdge=NX,SX.exchangeEdges=DX,mt(SX,"networkSimplex"),mt(EX,"initCutValues"),mt(_X,"assignCutValue"),mt(AX,"calcCutValue"),mt(RX,"initLowLimValues"),mt(LX,"dfsAssignLowLim"),mt(IX,"leaveEdge"),mt(NX,"enterEdge"),mt(DX,"exchangeEdges"),mt(MX,"updateRanks"),mt(OX,"isTreeEdge"),mt(PX,"isDescendant")});function $X(e){switch(e.graph().ranker){case"network-simplex":zX(e);break;case"tight-tree":FX(e);break;case"longest-path":qX(e);break;default:zX(e)}}function FX(e){ZH(e),eX(e)}function zX(e){SX(e)}var qX,jX=r(()=>{nX(),BX(),JH(),mt($X,"rank"),qX=ZH,mt(FX,"tightTreeRanker"),mt(zX,"networkSimplexRanker")});function WX(t){var r=kH(t,"root",{},"_root"),i=GX(t),n=dV(VG(i))-1,a=2*n+1,s=(t.graph().nestingRoot=r,y(t.edges(),function(e){t.edge(e).minlen*=a}),VX(t)+1);y(t.children(),function(e){UX(t,r,a,s,n,i,e)}),t.graph().nodeRankFactor=a}function UX(n,a,s,o,l,c,h){var u,d,e,t=n.children(h);t.length?(u=RH(n,"_bt"),d=RH(n,"_bb"),e=n.node(h),n.setParent(u,h),e.borderTop=u,n.setParent(d,h),e.borderBottom=d,y(t,function(e){UX(n,a,s,o,l,c,e);var t=n.node(e),r=t.borderTop||e,i=r!==(e=t.borderBottom||e)?1:l-c[h]+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(h)||n.setEdge(a,u,{weight:0,minlen:l+c[h]})):h!==a&&n.setEdge(a,h,{weight:0,minlen:s})}function GX(i){var n={};function a(e,t){var r=i.children(e);r&&r.length&&y(r,function(e){a(e,t+1)}),n[e]=t}return mt(a,"dfs"),y(i.children(),function(e){a(e,1)}),n}function VX(r){return SY(r.edges(),function(e,t){return e+r.edge(t).weight},0)}function YX(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,y(t.edges(),function(e){t.edge(e).nestingEdge&&t.removeEdge(e)})}var HX=r(()=>{QY(),MH(),mt(WX,"run"),mt(UX,"dfs"),mt(GX,"treeDepths"),mt(VX,"sumWeights"),mt(YX,"cleanup")});function XX(n,a,e){var s,o={};y(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 KX=r(()=>{QY(),mt(XX,"addSubgraphConstraints")});function ZX(n,r,a){var s=QX(n),o=new nH({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(e){return n.node(e)});return y(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),y(n[a](i),function(e){var t=e.v===i?e.w:e.v,r=o.edge(t,i),r=eV(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 QX(e){for(var t;e.hasNode(t=UY("_root")););return t}var JX=r(()=>{QY(),sH(),mt(ZX,"buildLayerGraph"),mt(QX,"createRootNode")});function eK(e,t){for(var r=0,i=1;i<t.length;++i)r+=tK(e,t[i-1],t[i]);return r}function tK(t,e,r){for(var i=KY(r,xG(r,function(e,t){return t})),e=kF(xG(e,function(e){return LY(xG(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,xG(new Array(a),function(){return 0})),o=0;return y(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 rK=r(()=>{QY(),mt(eK,"crossCount"),mt(tK,"twoLayerCrossCount")});function iK(r){var i={},e=nG(r.nodes(),function(e){return!r.children(e).length}),t=dV(xG(e,function(e){return r.node(e).rank})),n=xG(vY(t+1),function(){return[]});function a(e){var t;BG(i,e)||(i[e]=!0,t=r.node(e),n[t.rank].push(e),y(r.successors(e),a))}return mt(a,"dfs"),t=LY(e,function(e){return r.node(e).rank}),y(t,a),n}var nK=r(()=>{QY(),mt(iK,"initOrder")});function aK(i,e){return xG(e,function(e){var t=i.inEdges(e);return t.length?{v:e,barycenter:(t=SY(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 sK=r(()=>{QY(),mt(aK,"barycenter")});function oK(e,t){var i={};return y(e,function(e,t){t=i[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t},eV(e.barycenter)||(t.barycenter=e.barycenter,t.weight=e.weight)}),y(t.edges(),function(e){var t=i[e.v],r=i[e.w];eV(t)||eV(r)||(r.indegree++,t.out.push(i[e.w]))}),lK(nG(i,function(e){return!e.indegree}))}function lK(r){var e=[];function t(t){return function(e){e.merged||(eV(e.barycenter)||eV(t.barycenter)||e.barycenter>=t.barycenter)&&cK(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),y(n.in.reverse(),t(n)),y(n.out,i(n))}return xG(nG(e,function(e){return!e.merged}),function(e){return oY(e,["vs","i","barycenter","weight"])})}function cK(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 hK=r(()=>{QY(),mt(oK,"resolveConflicts"),mt(lK,"doResolveConflicts"),mt(cK,"mergeEntries")});function uK(e,t){var r=(e=IH(e,function(e){return Object.prototype.hasOwnProperty.call(e,"barycenter")})).lhs,i=LY(e.rhs,function(e){return-e.i}),n=[],a=0,s=0,o=0,e=(r.sort(pK(!!t)),o=dK(n,i,o),y(r,function(e){o+=e.vs.length,n.push(e.vs),a+=e.barycenter*e.weight,s+=e.weight,o=dK(n,i,o)}),{vs:kF(n)});return s&&(e.barycenter=a/s,e.weight=s),e}function dK(e,t,r){for(var i;t.length&&(i=VU(t)).i<=r;)t.pop(),e.push(i.vs),r++;return r}function pK(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 gK=r(()=>{QY(),MH(),mt(uK,"sort"),mt(dK,"consumeUnsortable"),mt(pK,"compareWithBias")});function fK(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=nG(a,function(e){return e!==s&&e!==o})),aK(r,a));return y(e,function(e){var t;r.children(e.v).length&&(t=fK(r,e.v,i,n),l[e.v]=t,Object.prototype.hasOwnProperty.call(t,"barycenter"))&&yK(e,t)}),mK(a=oK(e,i),l),e=uK(a,n),s&&(e.vs=kF([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 mK(e,t){y(e,function(e){e.vs=kF(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}function yK(e,t){eV(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 vK=r(()=>{QY(),sK(),hK(),gK(),mt(fK,"sortSubgraph"),mt(mK,"expandSubgraphs"),mt(yK,"mergeBarycenters")});function bK(e){var t=LH(e),r=xK(e,vY(1,t+1),"inEdges"),i=xK(e,vY(t-1,-1,-1),"outEdges");kK(e,iK(e));for(var n,a=Number.POSITIVE_INFINITY,s=0,o=0;o<4;++s,++o){TK(s%2?r:i,2<=s%4);var l,c=eK(e,l=EH(e));c<a&&(o=0,n=wj(l),a=c)}kK(e,n)}function xK(t,e,r){return xG(e,function(e){return ZX(t,e,r)})}function TK(e,t){var i=new nH;y(e,function(r){var e=r.graph().root,e=fK(r,e,i,t);y(e.vs,function(e,t){r.node(e).order=t}),XX(r,i,e.vs)})}function kK(r,e){y(e,function(e){y(e,function(e,t){r.node(e).order=t})})}var wK=r(()=>{QY(),sH(),MH(),KX(),JX(),rK(),nK(),vK(),mt(bK,"order"),mt(xK,"buildLayerGraphs"),mt(TK,"sweepLayerGraphs"),mt(kK,"assignOrder")});function CK(c){var h=EK(c);y(c.graph().dummyChains,function(e){for(var t,r=c.node(e).edgeObj,i=SK(c,h,r.v,r.w),n=i.path,a=i.lca,s=0,o=n[s],l=!0;e!==r.w;){if(t=c.node(e),l){for(;(o=n[s])!==a&&c.node(o).maxRank<t.rank;)s++;o===a&&(l=!1)}if(!l){for(;s<n.length-1&&c.node(o=n[s+1]).minRank<=t.rank;)s++;o=n[s]}c.setParent(e,o),e=c.successors(e)[0]}})}function SK(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),c=r;c=e.parent(c),a.push(c),c&&(t[c].low>o||l>t[c].lim););for(n=c,c=i;(c=e.parent(c))!==n;)s.push(c);return{path:a.concat(s.reverse()),lca:n}}function EK(r){var i={},n=0;function a(e){var t=n;y(r.children(e),a),i[e]={low:t,lim:n++}}return mt(a,"dfs"),y(r.children(),a),i}var _K=r(()=>{QY(),mt(CK,"parentDummyChains"),mt(SK,"findPath"),mt(EK,"postorder")});function AK(c,e){var h={};function t(e,i){var a=0,s=0,o=e.length,l=VU(i);return y(i,function(e,t){var r=LK(c,e),n=r?c.node(r).order:o;!r&&e!==l||(y(i.slice(s,t+1),function(i){y(c.predecessors(i),function(e){var t=c.node(e),r=t.order;!(r<a||n<r)||t.dummy&&c.node(i).dummy||IK(h,e,i)})}),s=t+1,a=n)}),i}return mt(t,"visitLayer"),SY(e,t),h}function RK(o,e){var s={};function l(t,e,r,i,n){var a;y(vY(e,r),function(e){a=t[e],o.node(a).dummy&&y(o.predecessors(a),function(e){var t=o.node(e);t.dummy&&(t.order<i||t.order>n)&&IK(s,e,a)})})}function t(r,i){var n,a=-1,s=0;return y(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"),SY(e,t),s}function LK(t,e){if(t.node(e).dummy)return pG(t.predecessors(e),function(e){return t.node(e).dummy})}function IK(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 NK(e,t,r){var i;return r<t&&(i=t,t=r,r=i),!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],r)}function DK(e,t,o,l){var c={},h={},u={};return y(t,function(e){y(e,function(e,t){u[h[c[e]=e]=e]=t})}),y(t,function(e){var s=-1;y(e,function(e){var t=l(e);if(t.length)for(var r=((t=LY(t,function(e){return u[e]})).length-1)/2,i=Math.floor(r),n=Math.ceil(r);i<=n;++i){var a=t[i];h[e]===e&&s<u[a]&&!NK(o,e,a)&&(h[a]=e,h[e]=c[e]=c[a],s=u[a])}})}),{root:c,align:h}}function MK(i,e,t,r,n){var a={},s=OK(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 c(e){a[e]=s.inEdges(e).reduce(function(e,t){return Math.max(e,a[t.v]+s.edge(t))},0)}function h(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(c,"pass1"),mt(h,"pass2"),l(c,s.predecessors.bind(s)),l(h,s.successors.bind(s)),y(r,function(e){a[e]=a[t[e]]}),a}function OK(a,e,s,t){var o=new nH,r=a.graph(),l=zK(r.nodesep,r.edgesep,t);return y(e,function(e){var n;y(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 PK(n,e){return TV(VG(e),function(e){var r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return wG(e,function(e,t){t=qK(n,t)/2,r=Math.max(e+t,r),i=Math.min(e-t,i)}),r-i})}function BK(s,o){var e=VG(o),l=vV(e),c=dV(e);y(["u","d"],function(a){y(["l","r"],function(e){var t,r,i=a+e,n=s[i];n!==o&&(t=VG(n),r="l"===e?l-vV(t):c-dV(t))&&(s[i]=sV(n,function(e){return e+r}))})})}function $K(r,i){return sV(r.ul,function(e,t){return i?r[i.toLowerCase()][t]:((t=LY(xG(r,t)))[1]+t[2])/2})}function FK(i){var n,e=EH(i),a=gV(AK(i,e),RK(i,e)),s={},t=(y(["u","d"],function(r){n="u"===r?e:VG(e).reverse(),y(["l","r"],function(e){"r"===e&&(n=xG(n,function(e){return VG(e).reverse()}));var t=("u"===r?i.predecessors:i.successors).bind(i),t=DK(0,n,a,t),t=MK(i,n,t.root,t.align,"r"===e);"r"===e&&(t=sV(t,function(e){return-e})),s[r+e]=t})}),PK(i,s));return BK(s,t),$K(s,i.graph().align)}function zK(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 qK(e,t){return e.node(t).width}var jK=r(()=>{QY(),sH(),MH(),mt(AK,"findType1Conflicts"),mt(RK,"findType2Conflicts"),mt(LK,"findOtherInnerSegmentNode"),mt(IK,"addConflict"),mt(NK,"hasConflict"),mt(DK,"verticalAlignment"),mt(MK,"horizontalCompaction"),mt(OK,"buildBlockGraph"),mt(PK,"findSmallestWidthAlignment"),mt(BK,"alignCoordinates"),mt($K,"balance"),mt(FK,"positionX"),mt(zK,"sep"),mt(qK,"width")});function WK(r){UK(r=CH(r)),EG(FK(r),function(e,t){r.node(t).x=e})}function UK(r){var e=EH(r),i=r.graph().ranksep,n=0;y(e,function(e){var t=dV(xG(e,function(e){return r.node(e).height}));y(e,function(e){r.node(e).y=n+t/2}),n+=t+i})}var GK=r(()=>{QY(),MH(),jK(),mt(WK,"position"),mt(UK,"positionY")});function VK(t,e){var r=e&&e.debugTiming?NH:DH;r("layout",()=>{var e=r(" buildLayoutGraph",()=>XK(t));r(" runLayout",()=>YK(e,r)),r(" updateInputGraph",()=>HK(t,e))})}function YK(e,t){t(" makeSpaceForEdgeLabels",()=>KK(e)),t(" removeSelfEdges",()=>aZ(e)),t(" acyclic",()=>vH(e)),t(" nestingGraph.run",()=>WX(e)),t(" rank",()=>$X(CH(e))),t(" injectEdgeLabelProxies",()=>ZK(e)),t(" removeEmptyRanks",()=>AH(e)),t(" nestingGraph.cleanup",()=>YX(e)),t(" normalizeRanks",()=>_H(e)),t(" assignRankMinMax",()=>QK(e)),t(" removeEdgeLabelProxies",()=>JK(e)),t(" normalize.run",()=>YH(e)),t(" parentDummyChains",()=>CK(e)),t(" addBorderSegments",()=>OH(e)),t(" order",()=>bK(e)),t(" insertSelfEdges",()=>sZ(e)),t(" adjustCoordinateSystem",()=>$H(e)),t(" position",()=>WK(e)),t(" positionSelfEdges",()=>oZ(e)),t(" removeBorderNodes",()=>nZ(e)),t(" normalize.undo",()=>XH(e)),t(" fixupEdgeLabelCoords",()=>rZ(e)),t(" undoCoordinateSystem",()=>FH(e)),t(" translateGraph",()=>eZ(e)),t(" assignNodeIntersects",()=>tZ(e)),t(" reversePoints",()=>iZ(e)),t(" acyclic.undo",()=>xH(e))}function HK(i,n){y(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)}),y(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 XK(r){var i=new nH({multigraph:!0,compound:!0}),e=cZ(r.graph());return i.setGraph(gV({},uZ,lZ(e,hZ),oY(e,dZ))),y(r.nodes(),function(e){var t=cZ(r.node(e));i.setNode(e,bU(lZ(t,pZ),gZ)),i.setParent(e,r.parent(e))}),y(r.edges(),function(e){var t=cZ(r.edge(e));i.setEdge(e,gV({},mZ,lZ(t,fZ),oY(t,yZ)))}),i}function KK(t){var r=t.graph();r.ranksep/=2,y(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 ZK(r){y(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},kH(r,"edge-proxy",t,"_ep"))})}function QK(t){var r=0;y(t.nodes(),function(e){(e=t.node(e)).borderTop&&(e.minRank=t.node(e.borderTop).rank,e.maxRank=t.node(e.borderBottom).rank,r=dV(r,e.maxRank))}),t.graph().maxRank=r}function JK(r){y(r.nodes(),function(e){var t=r.node(e);"edge-proxy"===t.dummy&&(r.edge(t.e).labelRank=t.rank,r.removeNode(e))})}function eZ(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"),y(t.nodes(),function(e){l(t.node(e))}),y(t.edges(),function(e){e=t.edge(e),Object.prototype.hasOwnProperty.call(e,"x")&&l(e)}),n-=r,s-=i,y(t.nodes(),function(e){(e=t.node(e)).x-=n,e.y-=s}),y(t.edges(),function(e){e=t.edge(e),y(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 tZ(a){y(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(SH(i,t)),r.points.push(SH(e,n))})}function rZ(r){y(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 iZ(t){y(t.edges(),function(e){(e=t.edge(e)).reversed&&e.points.reverse()})}function nZ(a){y(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(VU(e.borderLeft)),n=a.node(VU(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)}),y(a.nodes(),function(e){"border"===a.node(e).dummy&&a.removeNode(e)})}function aZ(r){y(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 sZ(n){var e=EH(n);y(e,function(e){var i=0;y(e,function(e,t){var r=n.node(e);r.order=t+i,y(r.selfEdges,function(e){kH(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 oZ(s){y(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 lZ(e,t){return sV(oY(e,t),Number)}function cZ(e){var r={};return y(e,function(e,t){r[t.toLowerCase()]=e}),r}var hZ,uZ,dZ,pZ,gZ,fZ,mZ,yZ,vZ=r(()=>{QY(),sH(),BH(),VH(),TH(),KH(),jX(),HX(),wK(),_K(),GK(),MH(),mt(VK,"layout"),mt(YK,"runLayout"),mt(HK,"updateInputGraph"),hZ=["nodesep","edgesep","ranksep","marginx","marginy"],uZ={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},dZ=["acyclicer","ranker","rankdir","align"],pZ=["width","height"],gZ={width:0,height:0},fZ=["minlen","weight","width","height","labeloffset"],mZ={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},yZ=["labelpos"],mt(XK,"buildLayoutGraph"),mt(KK,"makeSpaceForEdgeLabels"),mt(ZK,"injectEdgeLabelProxies"),mt(QK,"assignRankMinMax"),mt(JK,"removeEdgeLabelProxies"),mt(eZ,"translateGraph"),mt(tZ,"assignNodeIntersects"),mt(rZ,"fixupEdgeLabelCoords"),mt(iZ,"reversePointsForReversedEdges"),mt(nZ,"removeBorderNodes"),mt(aZ,"removeSelfEdges"),mt(sZ,"insertSelfEdges"),mt(oZ,"positionSelfEdges"),mt(lZ,"selectNumberAttrs"),mt(cZ,"canonicalize")}),bZ=r(()=>{TH(),vZ(),KH(),jX()});function xZ(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:TZ(e),edges:kZ(e)};return eV(e.graph())||(t.value=xj(e.graph())),t}function TZ(i){return xG(i.nodes(),function(e){var t=i.node(e),r=i.parent(e),e={v:e};return eV(t)||(e.value=t),eV(r)||(e.parent=r),e})}function kZ(i){return xG(i.edges(),function(e){var t=i.edge(e),r={v:e.v,w:e.w};return eV(e.name)||(r.name=e.name),eV(t)||(r.value=t),r})}var wZ,CZ,SZ,EZ,_Z,AZ,RZ,LZ,IZ,NZ,DZ,MZ,OZ,PZ,BZ,$Z=r(()=>{QY(),aH(),mt(xZ,"write"),mt(TZ,"writeNodes"),mt(kZ,"writeEdges")}),FZ=r(()=>{e(),sH(),$Z(),wZ=new Map,CZ=new Map,SZ=new Map,EZ=mt(()=>{CZ.clear(),SZ.clear(),wZ.clear()},"clear"),_Z=mt((e,t)=>{var r=CZ.get(t)||[];return P.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),AZ=mt((e,t)=>{var r=CZ.get(t)||[];return P.info("Descendants of ",t," is ",r),P.info("Edge is ",e),e.v!==t&&e.w!==t&&(r?r.includes(e.v)||_Z(e.v,t)||_Z(e.w,t)||r.includes(e.w):(P.debug("Tilt, ",t,",not in descendants"),!1))},"edgeInCluster"),RZ=mt((r,i,n,a)=>{P.warn("Copying children of ",r,"root",a,"data",i.node(r),a);var e=i.children(r)||[];r!==a&&e.push(r),P.warn("Copying (nodes) clusterId",r,"nodes",e),e.forEach(e=>{var t;0<i.children(e).length?RZ(e,i,n,a):(t=i.node(e),P.info("cp ",e," to ",a," with parent ",r),n.setNode(e,t),a!==i.parent(e)&&(P.warn("Setting parent",e,i.parent(e)),n.setParent(e,i.parent(e))),r!==a&&e!==r?(P.debug("Setting parent",e,r),n.setParent(e,r)):(P.info("In copy ",r,"root",a,"data",i.node(r),a),P.debug("Not Setting parent for node=",e,"cluster!==rootId",r!==a,"node!==clusterId",e!==r)),t=i.edges(e),P.debug("Copying Edges",t),t.forEach(e=>{P.info("Edge",e);var t=i.edge(e.v,e.w,e.name);P.info("Edge data",t,a);try{AZ(e,a)?(P.info("Copying as ",e.v,e.w,t,e.name),n.setEdge(e.v,e.w,t,e.name),P.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):P.info("Skipping copy of edge ",e.v,"--\x3e",e.w," rootId: ",a," clusterId:",r)}catch(e){P.error(e)}})),P.debug("Removing node",e),i.removeNode(e)})},"copy"),LZ=mt((e,t)=>{let r=t.children(e),i=[...r];for(var n of r)SZ.set(n,e),i=[...i,...LZ(n,t)];return i},"extractDescendants"),IZ=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"),NZ=mt((e,t,r)=>{var i,n=t.children(e);if(P.trace("Searching children of id ",e,n),n.length<1)return e;let a;for(i of n){var s=NZ(i,t,r),o=IZ(t,r,s);if(s){if(!(0<o.length))return s;a=s}}return a},"findNonClusterChild"),DZ=mt(e=>wZ.has(e)&&wZ.get(e).externalConnections&&wZ.has(e)?wZ.get(e).id:e,"getAnchorId"),MZ=mt((a,e)=>{if(!a||10<e)P.debug("Opting out, no graph ");else{P.debug("Opting in, graph "),a.nodes().forEach(function(e){0<a.children(e).length&&(P.warn("Cluster identified",e," Replacement id in edges: ",NZ(e,a,e)),CZ.set(e,LZ(e,a)),wZ.set(e,{id:NZ(e,a,e),clusterData:a.node(e)}))}),a.nodes().forEach(function(t){var e=a.children(t),r=a.edges();0<e.length?(P.debug("Cluster identified",t,CZ),r.forEach(e=>{_Z(e.v,t)^_Z(e.w,t)&&(P.warn("Edge: ",e," leaves cluster ",t),P.warn("Descendants of XXX ",t,": ",CZ.get(t)),wZ.get(t).externalConnections=!0)})):P.debug("Not a cluster ",t,CZ)});for(var t of wZ.keys()){var r=wZ.get(t).id;(r=a.parent(r))!==t&&wZ.has(r)&&!wZ.get(r).externalConnections&&(wZ.get(t).id=r)}a.edges().forEach(function(e){var t,r,i,n=a.edge(e);P.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),P.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(a.edge(e))),e.v,P.warn("Fix XXX",wZ,"ids:",e.v,e.w,"Translating: ",wZ.get(e.v)," --- ",wZ.get(e.w)),(wZ.get(e.v)||wZ.get(e.w))&&(P.warn("Fixing and trying - removing XXX",e.v,e.w,e.name),t=DZ(e.v),r=DZ(e.w),a.removeEdge(e.v,e.w,e.name),t!==e.v&&(i=a.parent(t),wZ.get(i).externalConnections=!0,n.fromCluster=e.v),r!==e.w&&(i=a.parent(r),wZ.get(i).externalConnections=!0,n.toCluster=e.w),P.warn("Fix Replacing with XXX",t,r,e.name),a.setEdge(t,r,n,e.name))}),P.warn("Adjusted Graph",xZ(a)),OZ(a,0),P.trace(wZ)}},"adjustClustersAndEdges"),OZ=mt((r,i)=>{if(P.warn("extractor - ",i,xZ(r),r.children("D")),10<i)P.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){P.debug("Nodes = ",e,i);for(var a of e)if(P.debug("Extracting node",a,wZ,wZ.has(a)&&!wZ.get(a).externalConnections,!r.parent(a),r.node(a),r.children("D")," Depth ",i),wZ.has(a))if(!wZ.get(a).externalConnections&&r.children(a)&&0<r.children(a).length){P.warn("Cluster without external connections, without a parent and with children",a,i);let e="TB"===r.graph().rankdir?"LR":"TB";wZ.get(a)?.clusterData?.dir&&(e=wZ.get(a).clusterData.dir,P.warn("Fixing dir",wZ.get(a).clusterData.dir,e));var s=new nH({multigraph:!0,compound:!0}).setGraph({rankdir:e,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});P.warn("Old graph before copy",xZ(r)),RZ(a,r,s,a),r.setNode(a,{clusterNode:!0,id:a,clusterData:wZ.get(a).clusterData,label:wZ.get(a).label,graph:s}),P.warn("New graph after copy node: (",a,")",xZ(s)),P.debug("Old graph after copy",xZ(r))}else P.warn("Cluster ** ",a," **not meeting the criteria !externalConnections:",!wZ.get(a).externalConnections," no parent: ",!r.parent(a)," children ",r.children(a)&&0<r.children(a).length,r.children("D"),i),P.debug(wZ);else P.debug("Not a cluster",a,i);e=r.nodes(),P.warn("New list of nodes",e);for(var o of e){var l=r.node(o);P.warn(" Now next level",o,l),l?.clusterNode&&OZ(l.graph,i+1)}}else P.debug("Done, no node has children",r.nodes())}},"extractor"),PZ=mt((t,e)=>{if(0===e.length)return[];let r=Object.assign([],e);return e.forEach(e=>{e=t.children(e),e=PZ(t,e),r=[...r,...e]}),r},"sorter"),BZ=mt(e=>PZ(e,e.children()),"sortNodesByHierarchy")}),zZ={};Vat(zZ,{render:()=>jZ});var qZ,jZ,WZ=r(()=>{bZ(),$Z(),sH(),TN(),K7(),FZ(),MN(),yI(),xN(),e(),mI(),Uu(),qZ=mt(async(e,n,a,s,o,l)=>{P.warn("Graph in recursive render:XAX",xZ(n),o);let c=n.graph().rankdir,i=(P.trace("Dir in recursive render - dir:",c),e=e.insert("g").attr("class","root"),n.nodes()?P.info("Recursive render XXX",n.nodes()):P.info("No nodes found for",n),0<n.edges().length&&P.info("Recursive edges",n.edge(n.edges()[0])),e.insert("g").attr("class","clusters")),h=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)),P.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)||(P.trace("Setting parent",e,o.id),n.setParent(e,o.id,t))),P.info("(Insert) Node XXX"+e+": "+JSON.stringify(n.node(e))),i?.clusterNode?(P.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 qZ(u,i.graph,a,s,n.node(e),l)).elem,H7(i,r),i.diff=t.diff||0,P.info("New compound node after recursive render XAX",e,"width",i.width,"height",i.height),CN(r,i)):0<n.children(e).length?(P.trace("Cluster - the non recursive path XBX",e,i.id,i,i.width,"Graph:",n),P.trace(NZ(i.id,n)),wZ.set(i.id,{id:NZ(i.id,n),node:i})):(P.trace("Node - the non recursive path XAX",e,u,n.node(e),c),await kN(u,n.node(e),{config:l,dir:c}))})),await mt(async()=>{var e=n.edges().map(async function(e){var t=n.edge(e.v,e.w,e.name);P.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),P.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(n.edge(e))),P.info("Fix",wZ,"ids:",e.v,e.w,"Translating: ",wZ.get(e.v),wZ.get(e.w)),await zI(r,t)});await Promise.all(e)},"processEdges")(),P.info("Graph before layout:",JSON.stringify(xZ(n))),P.info("############################################# XXX"),P.info("### Layout ### XXX"),P.info("############################################# XXX"),VK(n),P.info("Graph after layout:",JSON.stringify(xZ(n))),0),p=rI(l).subGraphTitleTotalMargin;return await Promise.all(BZ(n).map(async function(e){var t,r=n.node(e);P.info("Position XBX => "+e+": ("+r.x,","+r.y,") width: ",r.width," height: ",r.height),r?.clusterNode?(r.y+=p,P.info("A tainted cluster node XBX1",e,r.id,r.width,r.height,r.x,r.y,n.parent(e)),wZ.get(r.id).node=r,EN(r)):0<n.children(e).length?(P.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,P.debug("OffsetY",t-e||0,"labelHeight",t,"halfPadding",e),await hI(i,r),wZ.get(r.id).node=r):(t=n.node(r.parentId),r.y+=p/2,P.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),EN(r))})),n.edges().forEach(function(e){var t=n.edge(e),r=(P.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=HI(h,t,wZ,a,r,e,s);qI(t,r)}),n.nodes().forEach(function(e){var t=n.node(e);P.info(e,t.type,t.diff),t.isGroup&&(d=t.diff)}),P.warn("Returning from recursive render XAX",e,d),{elem:e,diff:d}},"recursiveRender"),jZ=mt(async(e,t)=>{let l=new nH({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");bN(r,e.markers,e.type,e.diagramId),SN(),$I(),uI(),EZ(),e.nodes.forEach(e=>{l.setNode(e.id,{...e}),e.parentId&&l.setParent(e.id,e.parentId)}),P.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.endLabelLeft="",a.endLabelRight="",a.startLabelLeft="",a.id=t+"-cyclic-special-1",s.startLabelRight="",s.startLabelLeft="",s.endLabelLeft="",s.endLabelRight="",s.arrowTypeStart="none",s.arrowTypeEnd="none",s.id=t+"-cyclic-special-mid",o.label="",o.startLabelRight="",o.startLabelLeft="",o.arrowTypeStart="none",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)}),P.warn("Graph at first:",JSON.stringify(xZ(l))),MZ(l),P.warn("Graph after XAX:",JSON.stringify(xZ(l))),t=B(),await qZ(r,l,e.type,e.diagramId,void 0,t)},"render")});function UZ(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 GZ(e){if(Array.isArray(e))return e}function VZ(e){if(Array.isArray(e))return UZ(e)}function YZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HZ(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,aQ(i.key),i)}}function XZ(e,t,r){return t&&HZ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function KZ(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=oQ(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 ZZ(e,t,r){return(t=aQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QZ(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function JZ(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,c=!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){c=!0,n=e}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw n}}return o}}function eQ(){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 tQ(){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 rQ(e,t){return GZ(e)||JZ(e,t)||oQ(e,t)||eQ()}function iQ(e){return VZ(e)||QZ(e)||oQ(e)||tQ()}function nQ(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 aQ(e){return"symbol"==typeof(e=nQ(e,"string"))?e:e+""}function sQ(e){return(sQ="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 oQ(e,t){var r;if(e)return"string"==typeof e?UZ(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)?UZ(e,t):void 0}function lQ(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function cQ(){return ore||(ore=1,mt(e,"isObject"),sre=e),sre;function e(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}}function hQ(){var e;return cre||(cre=1,e="object"==typeof are&&are&&are.Object===Object&&are,lre=e),lre}function uQ(){var e,t;return ure||(ure=1,t=hQ(),e="object"==typeof self&&self&&self.Object===Object&&self,t=t||e||Function("return this")(),hre=t),hre}function dQ(){var e,t;return pre||(pre=1,e=uQ(),t=mt(function(){return e.Date.now()},"now"),dre=t),dre}function pQ(){var r;return fre||(fre=1,r=/\s/,mt(e,"trimmedEndIndex"),gre=e),gre;function e(e){for(var t=e.length;t--&&r.test(e.charAt(t)););return t}}function gQ(){var t,r;return yre||(yre=1,t=pQ(),r=/^\s+/,mt(e,"baseTrim"),mre=e),mre;function e(e){return e&&e.slice(0,t(e)+1).replace(r,"")}}function fQ(){var e;return bre||(bre=1,e=uQ().Symbol,vre=e),vre}function mQ(){var e,t,a,s,o;return Tre||(Tre=1,e=fQ(),t=Object.prototype,a=t.hasOwnProperty,s=t.toString,o=e?e.toStringTag:void 0,mt(r,"getRawTag"),xre=r),xre;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 yQ(){var t;return wre||(wre=1,t=Object.prototype.toString,mt(e,"objectToString"),kre=e),kre;function e(e){return t.call(e)}}function vQ(){var e,t,r,i;return Sre||(Sre=1,e=fQ(),t=mQ(),r=yQ(),i=e?e.toStringTag:void 0,mt(n,"baseGetTag"),Cre=n),Cre;function n(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":(i&&i in Object(e)?t:r)(e)}}function bQ(){return _re||(_re=1,mt(e,"isObjectLike"),Ere=e),Ere;function e(e){return null!=e&&"object"==typeof e}}function xQ(){var t,r;return Rre||(Rre=1,t=vQ(),r=bQ(),mt(e,"isSymbol"),Are=e),Are;function e(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==t(e)}}function TQ(){var r,i,n,a,s,o,l;return Ire||(Ire=1,r=gQ(),i=cQ(),n=xQ(),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt,mt(e,"toNumber"),Lre=e),Lre;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 kQ(){var k,w,C,S,E;return Dre||(Dre=1,k=cQ(),w=dQ(),C=TQ(),S=Math.max,E=Math.min,mt(e,"debounce"),Nre=e),Nre;function e(i,r,e){var n,a,s,o,l,c,h=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,h=e,o=i.apply(r,t)}function g(e){return h=e,l=setTimeout(y,r),t?p(e):o}function f(e){var t=r-(e-c);return u?E(t,s-(e-h)):t}function m(e){var t=e-c;return void 0===c||r<=t||t<0||u&&s<=e-h}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 b(){void 0!==l&&clearTimeout(l),n=c=a=l=void(h=0)}function x(){return void 0===l?o:v(w())}function T(){var e=w(),t=m(e);if(n=arguments,a=this,c=e,t){if(void 0===l)return g(c);if(u)return clearTimeout(l),l=setTimeout(y,r),p(c)}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?S(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(b,"cancel"),mt(x,"flush"),mt(T,"debounced"),T.cancel=b,T.flush=x,T}}function wQ(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 CQ(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=wQ(e.x,e.y,i,e=(t.y1+t.y2)/2,r),{x:(r=Kre(t.x,t.y,i,e,n,a)).x,y:r.y})}function SQ(){return Cie||(Cie=1,s=kie,function(){var d,l,p,g,t,c,r,f,m,e,i,n,h,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),h(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"),c=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 h(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],c(n,i,r);return n.sort(r).reverse()},"nlargest"),i=mt(function(e,t,r){var i,n,a,s,o,l,c,h,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=(c=e.slice(t)).length;s<l;s++)r(i=c[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,h=m(t,e.length);0<=h?o<h:h<o;0<=h?++o:--o)u.push(g(e,r));return u},"nsmallest"),h=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,h(e,o,t,r)},"_siftup"),a.push=t,a.pop=g,a.replace=r,a.pushpop=c,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 c(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(wie)),kie.exports;var s}function EQ(){return Eie||(Eie=1,Sie=SQ()),Sie}function _Q(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=dne(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"),c=e.map(function(e){return{x:e.x,y:e.y}});i(c)<0&&c.reverse();for(var h=c.length,u=[],d=0;d<h;d++){var p=c[d],g=c[(d+1)%h],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(c[t],o(e,r)),p2:a(c[(t+1)%h],o(e,r))}}),m=[],y=0;y<h;y++){var v=f[(y-1+h)%h],b=f[y],v=n(v.p1,v.p2,b.p1,b.p2);m.push(v)}return m}function AQ(e,t,r,i,n,a){var e=_Q(Lne(e,t,r,i,n),a),s=ene();return e.forEach(function(e){return nne(s,e.x,e.y)}),s}function RQ(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=KZ(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=KZ([].concat(iQ(r(e)),iQ(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 LQ(e,t,r,i,n,a){var s=Cte(e)?e:uae[e]||uae.euclidean;return 0===t&&Cte(e)?s(n,a):s(t,r,i,n,a)}function IQ(){var e;return Zae||(Zae=1,e=Array.isArray,Kae=e),Kae}function NQ(){var i,n,a,s;return Jae||(Jae=1,i=IQ(),n=xQ(),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/,mt(e,"isKey"),Qae=e),Qae;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 DQ(){var t,r;return tse||(tse=1,t=vQ(),r=cQ(),mt(e,"isFunction"),ese=e),ese;function e(e){return!!r(e)&&("[object Function]"==(e=t(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}}function MQ(){var e;return ise||(ise=1,e=uQ()["__core-js_shared__"],rse=e),rse}function OQ(){var t,e;return ase||(ase=1,e=MQ(),t=(e=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"",mt(r,"isMasked"),nse=r),nse;function r(e){return!!t&&t in e}}function PQ(){var t;return ose||(ose=1,t=Function.prototype.toString,mt(e,"toSource"),sse=e),sse;function e(e){if(null!=e){try{return t.call(e)}catch{}try{return e+""}catch{}}return""}}function BQ(){var t,r,i,n,a,e,s,o;return cse||(cse=1,t=DQ(),r=OQ(),i=cQ(),n=PQ(),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"),lse=l),lse;function l(e){return!(!i(e)||r(e))&&(t(e)?o:a).test(n(e))}}function $Q(){return use||(use=1,mt(e,"getValue"),hse=e),hse;function e(e,t){return e?.[t]}}function FQ(){var r,i;return pse||(pse=1,r=BQ(),i=$Q(),mt(e,"getNative"),dse=e),dse;function e(e,t){return e=i(e,t),r(e)?e:void 0}}function zQ(){var e;return fse||(fse=1,e=FQ()(Object,"create"),gse=e),gse}function qQ(){var e;return yse||(yse=1,e=zQ(),mt(t,"hashClear"),mse=t),mse;function t(){this.__data__=e?e(null):{},this.size=0}}function jQ(){return bse||(bse=1,mt(e,"hashDelete"),vse=e),vse;function e(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e}}function WQ(){var i,n;return Tse||(Tse=1,i=zQ(),n=Object.prototype.hasOwnProperty,mt(e,"hashGet"),xse=e),xse;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 UQ(){var r,i;return wse||(wse=1,r=zQ(),i=Object.prototype.hasOwnProperty,mt(e,"hashHas"),kse=e),kse;function e(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}}function GQ(){var i;return Sse||(Sse=1,i=zQ(),mt(e,"hashSet"),Cse=e),Cse;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 VQ(){var e,t,r,i,n;return _se||(_se=1,e=qQ(),t=jQ(),r=WQ(),i=UQ(),n=GQ(),mt(a,"Hash"),a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=i,a.prototype.set=n,Ese=a),Ese;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 YQ(){return Rse||(Rse=1,mt(e,"listCacheClear"),Ase=e),Ase;function e(){this.__data__=[],this.size=0}}function HQ(){return Ise||(Ise=1,mt(e,"eq"),Lse=e),Lse;function e(e,t){return e===t||e!=e&&t!=t}}function XQ(){var i;return Dse||(Dse=1,i=HQ(),mt(e,"assocIndexOf"),Nse=e),Nse;function e(e,t){for(var r=e.length;r--;)if(i(e[r][0],t))return r;return-1}}function KQ(){var r,i;return Ose||(Ose=1,r=XQ(),i=Array.prototype.splice,mt(e,"listCacheDelete"),Mse=e),Mse;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 ZQ(){var r;return Bse||(Bse=1,r=XQ(),mt(e,"listCacheGet"),Pse=e),Pse;function e(e){var t=this.__data__;return(e=r(t,e))<0?void 0:t[e][1]}}function QQ(){var t;return Fse||(Fse=1,t=XQ(),mt(e,"listCacheHas"),$se=e),$se;function e(e){return-1<t(this.__data__,e)}}function JQ(){var n;return qse||(qse=1,n=XQ(),mt(e,"listCacheSet"),zse=e),zse;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 eJ(){var e,t,r,i,n;return Wse||(Wse=1,e=YQ(),t=KQ(),r=ZQ(),i=QQ(),n=JQ(),mt(a,"ListCache"),a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=i,a.prototype.set=n,jse=a),jse;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 tJ(){var e;return Gse||(Gse=1,e=FQ()(uQ(),"Map"),Use=e),Use}function rJ(){var e,t,r;return Yse||(Yse=1,e=VQ(),t=eJ(),r=tJ(),mt(i,"mapCacheClear"),Vse=i),Vse;function i(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}}function iJ(){return Xse||(Xse=1,mt(e,"isKeyable"),Hse=e),Hse;function e(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}}function nJ(){var r;return Zse||(Zse=1,r=iJ(),mt(e,"getMapData"),Kse=e),Kse;function e(e,t){return e=e.__data__,r(t)?e["string"==typeof t?"string":"hash"]:e.map}}function aJ(){var t;return Jse||(Jse=1,t=nJ(),mt(e,"mapCacheDelete"),Qse=e),Qse;function e(e){return e=t(this,e).delete(e),this.size-=e?1:0,e}}function sJ(){var t;return toe||(toe=1,t=nJ(),mt(e,"mapCacheGet"),eoe=e),eoe;function e(e){return t(this,e).get(e)}}function oJ(){var t;return ioe||(ioe=1,t=nJ(),mt(e,"mapCacheHas"),roe=e),roe;function e(e){return t(this,e).has(e)}}function lJ(){var n;return aoe||(aoe=1,n=nJ(),mt(e,"mapCacheSet"),noe=e),noe;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 cJ(){var e,t,r,i,n;return ooe||(ooe=1,e=rJ(),t=aJ(),r=sJ(),i=oJ(),n=lJ(),mt(a,"MapCache"),a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=i,a.prototype.set=n,soe=a),soe;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 hJ(){var e;return coe||(coe=1,e=cJ(),mt(t,"memoize"),t.Cache=e,loe=t),loe;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 uJ(){var r;return uoe||(uoe=1,r=hJ(),mt(e,"memoizeCapped"),hoe=e),hoe;function e(e){var t=(e=r(e,function(e){return 500===t.size&&t.clear(),e})).cache;return e}}function dJ(){var t,a,e;return poe||(poe=1,e=uJ(),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}),doe=e),doe}function pJ(){return foe||(foe=1,mt(e,"arrayMap"),goe=e),goe;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 gJ(){var r,i,n,e,a;return yoe||(yoe=1,e=fQ(),r=pJ(),i=IQ(),n=xQ(),e=e?e.prototype:void 0,a=e?e.toString:void 0,mt(s,"baseToString"),moe=s),moe;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 fJ(){var t;return boe||(boe=1,t=gJ(),mt(e,"toString"),voe=e),voe;function e(e){return null==e?"":t(e)}}function mJ(){var r,i,n,a;return Toe||(Toe=1,r=IQ(),i=NQ(),n=dJ(),a=fJ(),mt(e,"castPath"),xoe=e),xoe;function e(e,t){return r(e)?e:i(e,t)?[e]:n(a(e))}}function yJ(){var r;return woe||(woe=1,r=xQ(),mt(e,"toKey"),koe=e),koe;function e(e){var t;return"string"==typeof e||r(e)?e:"0"==(t=e+"")&&1/e==-1/0?"-0":t}}function vJ(){var n,a;return Soe||(Soe=1,n=mJ(),a=yJ(),mt(e,"baseGet"),Coe=e),Coe;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 bJ(){var i;return _oe||(_oe=1,i=vJ(),mt(e,"get"),Eoe=e),Eoe;function e(e,t,r){return void 0===(e=null==e?void 0:i(e,t))?r:e}}function xJ(){var t,e;return Loe||(Loe=1,t=FQ(),e=(()=>{try{var e=t(Object,"defineProperty");return e({},"",{}),e}catch{}})(),Roe=e),Roe}function TJ(){var i;return Noe||(Noe=1,i=xJ(),mt(e,"baseAssignValue"),Ioe=e),Ioe;function e(e,t,r){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}}function kJ(){var n,a,s;return Moe||(Moe=1,n=TJ(),a=HQ(),s=Object.prototype.hasOwnProperty,mt(e,"assignValue"),Doe=e),Doe;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 wJ(){var i;return Poe||(Poe=1,i=/^(?:0|[1-9]\d*)$/,mt(e,"isIndex"),Ooe=e),Ooe;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 CJ(){var u,d,p,g,f;return $oe||($oe=1,u=kJ(),d=mJ(),p=wJ(),g=cQ(),f=yJ(),mt(e,"baseSet"),Boe=e),Boe;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,c=f(t[n]),h=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;n!=s&&(l=o[c],void 0===(h=i?i(l,c,o):void 0))&&(h=g(l)?l:p(t[n+1])?[]:{}),u(o,c,h),o=o[c]}return e}}function SJ(){var i;return zoe||(zoe=1,i=CJ(),mt(e,"set"),Foe=e),Foe;function e(e,t,r){return null==e?e:i(e,t,r)}}function EJ(){return Woe||(Woe=1,mt(e,"copyArray"),joe=e),joe;function e(e,t){var r=-1,i=e.length;for(t=t||Array(i);++r<i;)t[r]=e[r];return t}}function _J(){var t,r,i,n,a,s,o;return Goe||(Goe=1,t=pJ(),r=EJ(),i=IQ(),n=xQ(),a=dJ(),s=yJ(),o=fJ(),mt(e,"toPath"),Uoe=e),Uoe;function e(e){return i(e)?t(e,s):n(e)?[e]:r(a(o(e)))}}function AJ(e,t,r,i){for(var n=[],a=new xie,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 c=n.shift();t(c),a.add(c.id()),s&&i(n,a,c)}return e}function RJ(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 LJ(e,t,r){r.isChild()&&(r=r._private.parent,t.has(r.id())||e.push(r))}function IJ(e,t,r){LJ(e,t,r),RJ(e,t,r)}function NJ(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 DJ(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 MJ(){return!1}function OJ(){return!0}function PJ(){for(var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:qle,t=1<arguments.length?arguments[1]:void 0,r=0;r<zle.length;r++){var i=zle[r];this[i]=e[i]||Fle[i]}this.context=t||this.context,this.listeners=[],this.emitting=0}function BJ(e,t,r){var i,n=r._private;return null==(i=(n=n.styleCache=n.styleCache||[])[e])?n[e]=t(r):i}function $J(t,r){return t=Yre(t),mt(function(e){return BJ(t,r,e)},"cachedStyleFunction")}function FJ(t,r){t=Yre(t);var i=mt(function(e){return r.call(e)},"selfFn");return mt(function(){var e=this[0];if(e)return BJ(t,i,e)},"cachedPrototypeStyleFunction")}function zJ(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 qJ(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||zJ(e,a):(e=t.source,t=t.target,n(e)&&(!r||zJ(e,n))&&(e===t||n(t)&&(!r||zJ(t,n)))))):void 0)}}function jJ(l){return function(){var e=[];if(2===(t=arguments).length)this.on(l.event,t[0],t[1]);else if(1===t.length&&Cte(t[0]))this.on(l.event,t[0]);else if(0===t.length||1===t.length&&Ste(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 WJ(r){Zle[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]}},Zle[r.on]=jJ({event:r.on,field:r.field,ableField:r.ableField,overrideAble:r.overrideAble,value:!0}),Zle[r.off]=jJ({event:r.off,field:r.field,ableField:r.ableField,overrideAble:r.overrideAble,value:!1})}function UJ(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 GJ(h){return mt(function(e){var t=[],r=this._private.cy,i=h||{};wte(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,c=this.hasElementWithId(l.source)&&e.hasElementWithId(l.target),l=e.hasElementWithId(l.source)&&this.hasElementWithId(l.target);!c&&!l||(i.thisIsSrc||i.thisIsTgt)&&(i.thisIsSrc&&!c||i.thisIsTgt&&!l)||t.push(o)}return this.spawn(t,!0)},"edgesWithImpl")}function VJ(f){return f=Kte({},{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,c=s._private.edges,h=0;h<c.length;h++){var u=c[h],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 YJ(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 c(e,t,r){return 3*n(t,r)*e*e+2*(3*r-6*t)*e+3*t}function h(e,t){for(var r=0;r<4;++r){var i=c(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=c(i,s,o);return.001<=n?h(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(c,"getSlope"),mt(h,"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 HJ(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 XJ(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function KJ(e,t,r,i,n){var a=null!=n?n.type:null,s=(r<0?r=0:1<r&&(r=1),XJ(e,n)),o=XJ(t,n);if(he(s)&&he(o))return HJ(a,s,o,r,i);if(Ste(s)&&Ste(o)){for(var l=[],c=0;c<o.length;c++){var h=s[c],u=o[c];null!=h&&null!=u?(h=HJ(a,h,u,r,i),l.push(h)):l.push(u)}return l}}function ZJ(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(),c=(s.easingImpl||(null==t?s.easingImpl=tce.linear:(t=wte(t)?l.parse("transition-timing-function",t).value:t,0<(t=wte(t)?(u=t,[]):(u=t[1],t.slice(2).map(function(e){return+e}))).length?("spring"===u&&t.push(s.duration),s.easingImpl=tce[u].apply(null,t)):s.easingImpl=tce[u])),s.easingImpl),h=0===s.duration?1:(r-o)/s.duration;if((h=s.applying?s.progress:h)<0?h=0:1<h&&(h=1),null==s.delay){var t=s.startPosition,o=((u=s.position)&&n&&!e.locked()&&(r={},QJ(t.x,u.x)&&(r.x=KJ(t.x,u.x,h,c)),QJ(t.y,u.y)&&(r.y=KJ(t.y,u.y,h,c)),e.position(r)),s.startPan),t=s.pan,u=a.pan,u=((r=null!=t&&i)&&(QJ(o.x,t.x)&&(u.x=KJ(o.x,t.x,h,c)),QJ(o.y,t.y)&&(u.y=KJ(o.y,t.y,h,c)),e.emit("pan")),s.startZoom),d=((t=null!=(o=s.zoom)&&i)&&(QJ(u,o)&&(a.zoom=Jie(a.minZoom,KJ(u,o,h,c),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=KJ(f,m,h,c,l.properties[f.name]);l.overrideBypass(e,g,m)}e.emit("style")}}return s.progress=h}function QJ(e,t){return!(null==e||null==t||!(he(e)&&he(t)||e&&t))}function JJ(e,t,r,i){(t=t._private).started=!0,t.startTime=r-t.progress*t.duration}function eee(h,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],c=l._private;c.stopped?(i.splice(o,1),c.hooked=!1,c.playing=!1,c.started=!1,s(c.frames)):(c.playing||c.applying)&&(c.playing&&c.applying&&(c.applying=!1),c.started||JJ(0,l,h),ZJ(e,l,h,t),c.applying&&(c.applying=!1),s(c.frames),null!=c.step&&c.step(h),l.completed()&&(i.splice(o,1),c.hooked=!1,c.playing=!1,c.started=!1,s(c.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 tee(e){this.options=Kte({},hce,uce,e)}function ree(e){this.options=Kte({},gce,e)}function iee(e){this.options=Kte({},fce,e)}function nee(e){this.options=Kte({},yce,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 aee(e){this.options=Kte({},Bce,e)}function see(e){this.options=Kte({},$ce,e)}function oee(e){this.options=Kte({},Fce,e)}function lee(e){this.options=Kte({},zce,e)}function cee(e){this.options=e,this.notifications=0}function hee(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 uee(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}:(she(e,t,r,i,!(4<arguments.length&&void 0!==arguments[4])||arguments[4]),{cx:jce,cy:Wce,radius:Xce,startX:Jce,startY:ehe,stopX:the,stopY:rhe,startAngle:Uce.ang+Math.PI/2*Vce,endAngle:Gce.ang-Math.PI/2*Vce,counterClockwise:Yce})}function dee(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 pee(e,t,r){for(var i=mt(function(e,t,r,i){return Kie(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 gee(e,t){for(var r=0;r<t.length;r++){var i=t[r];e.lineTo(i.x,i.y)}}function fee(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 mee(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 yee(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 vee(e,t,r,i){e.arc(t,r,i,0,2*Math.PI,!1)}function bee(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 xee(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 Tee(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 kee(e,t,r){var t=Tee(e,e.VERTEX_SHADER,t),r=Tee(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 wee(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 Cee(e){var t=e.pixelRatio;return{zoom:e.cy.zoom()*t,pan:{x:(e=e.cy.pan()).x*t,y:e.y*t}}}function See(e){var t=e.pixelRatio;return e.cy.zoom()*t}function Eee(e,t,r,i,n){return i=i*r+t.x,n=n*r+t.y,[i,Math.round(e.canvasHeight-n)]}function _ee(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 Aee(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 Ree(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 Lee(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 Iee(e){return e[0]+(e[1]<<8)+(e[2]<<16)+(e[3]<<24)}function Nee(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 Dee(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 Mee(e,t,r){switch(t){case e.FLOAT:return new Float32Array(r);case e.INT:return new Int32Array(r)}}function Oee(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 Pee(e,t,r,i){var n=(t=rQ(Dee(e,t),2))[0],i=Mee(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 Bee(t,e,r,i){var n=(r=rQ(Dee(t,r),3))[0],a=r[1],r=r[2],s=Mee(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 c=new Array(e),h=0;h<e;h++)c[h]=Oee(t,a,s,o,n,h);return l.dataArray=s,l.stride=o,l.size=n,l.getView=function(e){return c[e]},l.setPoint=function(e,t,r){(e=c[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 $ee(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 Fee(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 zee(){var e=new zhe(9);return zhe!=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 qee(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 jee(e,t,r){var i=t[0],n=t[1],a=t[2],s=t[3],o=t[4],l=t[5],c=t[6],h=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*c,e[1]=u*n+d*o+p*h,e[2]=u*a+d*l+p*t,e[3]=g*i+f*s+m*c,e[4]=g*n+f*o+m*h,e[5]=g*a+f*l+m*t,e[6]=y*i+v*s+r*c,e[7]=y*n+v*o+r*h,e[8]=y*a+v*l+r*t,e}function Wee(e,t,r){var i=t[0],n=t[1],a=t[2],s=t[3],o=t[4],l=t[5],c=t[6],h=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+c,e[7]=u*n+r*o+h,e[8]=u*a+r*l+t,e}function Uee(e,t,r){var i=t[0],n=t[1],a=t[2],s=t[3],o=t[4],l=t[5],c=t[6],h=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]=c,e[7]=h,e[8]=t,e}function Gee(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 Vee(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 Yee(e,t){return e.intersection?e.intersection(t):new Set(iQ(e).filter(function(e){return t.has(e)}))}function Hee(e){return e=(e=e.cy.container())&&e.style&&e.style.backgroundColor||"white",tre(e)}function Xee(e,t){return e=e._private.rscratch,yie(e,"labelWrapCachedLines",t)||[]}function Kee(n){var r=n.render,t=(n.render=function(e){e=e||{};var t=n.cy;n.webgl&&(7.99<t.zoom()?(Zee(n),r.call(n,e)):(Qee(n),ote(n,e,Ghe.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 ate(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 Zee(e){(e=e.data.contexts[e.WEBGL]).clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function Qee(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 Jee(e){var t=e.canvasWidth,r=e.canvasHeight,i=(e=Cee(e)).pan,e=e.zoom,n=zee();return Wee(n,n,[i.x,i.y]),Gee(n,n,[e,e]),Vee(i=zee(),t,r),jee(e=zee(),i,n),e}function ete(e,t){var r=e.canvasWidth,i=e.canvasHeight,n=(e=Cee(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 tte(t,e){t.drawSelectionRectangle(e,function(e){return ete(t,e)})}function rte(e){var t=e.data.contexts[e.NODE];t.save(),ete(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 ite(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,c,h=n[a].canvas;h&&(s=h.width,o=h.height,l=s*a,c=h.height*r,i.save(),i.scale(.4,.4),i.drawImage(h,l,c),i.strokeStyle="black",i.rect(l,c,s,o),i.stroke(),i.restore())}},"draw");e(u.drawing,"node",0),e(u.drawing,"label",1)}function nte(e,t,r,i,n){var a=Cee(e),t=(a=rQ(Eee(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),ote(e,null,Ghe.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 c=Iee(s.slice(4*l,4*l+4))-1;0<=c&&o.add(c)}return o}function ate(e,t,r){var i,n,a,t=nte(e,t,r),s=e.getCachedZSortedEles(),o=KZ(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 ste(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 ote(e,t,r){e.webglDebug&&(c=performance.now());var i=e.drawing,n=0;if(r.screen&&e.data.canvasNeedsRedraw[e.SELECT_BOX]&&tte(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),Jee(e)),a=e.getCachedZSortedEles(),n=a.length;if(i.startFrame(t,r),r.screen){for(var s=0;s<a.nondrag.length;s++)ste(e,s,a.nondrag[s]);for(var o=0;o<a.drag.length;o++)ste(e,o,a.drag[o])}else if(r.picking)for(var l=0;l<a.length;l++)ste(e,l,a[l]);i.endFrame(),r.screen&&e.webglDebugShowAtlases&&(rte(e),ite(e)),e.data.canvasNeedsRedraw[e.NODE]=!1,e.data.canvasNeedsRedraw[e.DRAG]=!1}if(e.webglDebug){var t=performance.now(),t=Math.ceil(t-c),c=i.getDebugInfo(),n=["".concat(n," elements"),"".concat(c.totalInstances," instances"),"".concat(c.batchCount," batches"),"".concat(c.totalAtlases," atlases"),"".concat(c.wrappedCount," wrapped textures"),"".concat(c.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 h,u=KZ(c.atlasInfo);try{for(u.s();!(h=u.n()).done;){var d=h.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 lte(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 cte(e){var t=e.indexOf(",");return e.substr(t+1)}function hte(e,i,n){var t=mt(function(){return i.toDataURL(n,e.quality)},"getB64Uri");switch(e.output){case"blob-promise":return new Hae(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 lte(cte(t()),n);case"base64":return cte(t());default:return t()}}function ute(e){var a=this,t=a.cy.window().document,r=(e.webgl&&(oue.CANVAS_LAYERS=a.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),a.data={canvases:new Array(oue.CANVAS_LAYERS),contexts:new Array(oue.CANVAS_LAYERS),canvasNeedsRedraw:new Array(oue.CANVAS_LAYERS),bufferCanvases:new Array(oue.BUFFER_COUNT),bufferContexts:new Array(oue.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"});zte()&&(s["-ms-touch-action"]="none",s["touch-action"]="none");for(var o=0;o<oue.CANVAS_LAYERS;o++){var l=a.data.canvases[o]=t.createElement("canvas"),c=oue.CANVAS_TYPES[o];a.data.contexts[o]=l.getContext(c),a.data.contexts[o]||aie("Could not create canvas of type "+c),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(oue.CANVAS_LAYERS-o),a.data.canvasContainer.appendChild(l),a.data.canvasNeedsRedraw[o]=!1}for(a.data.topCanvas=a.data.canvases[0],a.data.canvases[oue.NODE].setAttribute("data-id","layer"+oue.NODE+"-node"),a.data.canvases[oue.SELECT_BOX].setAttribute("data-id","layer"+oue.SELECT_BOX+"-selectbox"),a.data.canvases[oue.DRAG].setAttribute("data-id","layer"+oue.DRAG+"-drag"),a.data.canvases[oue.WEBGL]&&a.data.canvases[oue.WEBGL].setAttribute("data-id","layer"+oue.WEBGL+"-webgl"),o=0;o<oue.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 h=ene(),P=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"),b=mt(function(e){return e.boundingBox(),e[0]._private.labelBounds.main||h},"getLabelBox"),x=mt(function(e){return e.boundingBox(),e[0]._private.labelBounds.source||h},"getSourceLabelBox"),T=mt(function(e){return e.boundingBox(),e[0]._private.labelBounds.target||h},"getTargetLabelBox"),k=mt(function(e,t){return t},"isLabelVisibleAtScale"),w=mt(function(e){return P(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"),S=mt(function(e,t,r){return{x:(e=e[0]._private.rscratch)[t],y:e[r]}},"getRsPt"),E=mt(function(e){return C("",S(e,"labelX","labelY"),e)},"getLabelRotationPoint"),_=mt(function(e){return C("source",S(e,"sourceLabelX","sourceLabelY"),e)},"getSourceLabelRotationPoint"),A=mt(function(e){return C("target",S(e,"targetLabelX","targetLabelY"),e)},"getTargetLabelRotationPoint"),R=mt(function(e){return u(v(e))},"getElementRotationOffset"),L=mt(function(e){return u(x(e))},"getSourceLabelRotationOffset"),I=mt(function(e){return u(T(e))},"getTargetLabelRotationOffset"),N=mt(function(e){var t=b(e),r=u(b(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 bhe(a,{getKey:r,doesEleInvalidateKey:n,drawElement:g,getBoundingBox:v,getRotationPoint:w,getRotationOffset:R,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),M=a.data.lblTxrCache=new bhe(a,{getKey:i,drawElement:f,getBoundingBox:b,getRotationPoint:E,getRotationOffset:N,isVisible:k}),O=a.data.slbTxrCache=new bhe(a,{getKey:d,drawElement:m,getBoundingBox:x,getRotationPoint:_,getRotationOffset:L,isVisible:k}),B=a.data.tlbTxrCache=new bhe(a,{getKey:p,drawElement:y,getBoundingBox:T,getRotationPoint:A,getRotationOffset:I,isVisible:k}),$=a.data.lyrTxrCache=new xhe(a),n=(a.onUpdateEleCalcs(mt(function(e,t){D.invalidateElements(t),M.invalidateElements(t),O.invalidateElements(t),B.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),B.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:b,getSourceLabelBox:x,getTargetLabelBox:T,getElementRotationPoint:w,getElementRotationOffset:R,getLabelRotationPoint:E,getSourceLabelRotationPoint:_,getTargetLabelRotationPoint:A,getLabelRotationOffset:N,getSourceLabelRotationOffset:L,getTargetLabelRotationOffset:I})}function dte(t,r,i){var e=i,n=mt(function(e){oie("Can not register `"+r+"` for `"+t+"` since `"+e+"` already exists in the prototype and can not be overridden")},"overrideErr");if("core"===t){if(lce.prototype[r])return n(r);lce.prototype[r]=i}else if("collection"===t){if(Qle.prototype[r])return n(r);Qle.prototype[r]=i}else if("layout"===t){for(var a=(g=mt(function(e){this.options=e,i.call(this,e),Ete(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 c=i.prototype.stop,h=(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 c?c.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=h(e),t.target=e},"addEventFields"),bubble:mt(function(){return!0},"bubble"),parent:mt(function(e){return h(e)},"parent")};Kte(a,{createEmitter:mt(function(){return this._private.emitter=new PJ(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")}),Yoe.eventAliasesOn(a),e=g}else if("renderer"===t&&"null"!==r&&"base"!==r){var d,p,g,f=pte("renderer","base"),m=f.prototype,y=i,v=i.prototype,b=(g=mt(function(){f.apply(this,arguments),y.apply(this,arguments)},"Renderer")).prototype;for(d in m){var x=m[d];if(null!=v[d])return n(d);b[d]=x}for(p in v)b[p]=v[p];m.clientFunctions.forEach(function(e){b[e]=b[e]||function(){aie("Renderer does not implement `renderer."+e+"()` on its prototype")}}),e=g}else if("__proto__"===t||"constructor"===t||"prototype"===t)return aie(t+" is an illegal type to be registered, possibly lead to prototype pollutions");return ire({map:hue,keys:[t,r],value:e})}function pte(e,t){return nre({map:hue,keys:[e,t]})}function gte(e,t,r,i,n){return ire({map:uue,keys:[e,t,r,i],value:n})}function fte(e,t,r,i){return nre({map:uue,keys:[e,t,r,i]})}var mte,yte,vte,bte,xte,Tte,kte,wte,Cte,Ste,Ete,_te,he,Ate,Rte,Lte,Ite,Nte,Dte,Mte,Ote,Pte,Bte,$te,Fte,zte,qte,jte,Wte,Ute,Gte,Vte,Yte,Hte,Xte,Kte,Zte,Qte,Jte,ere,tre,rre,ire,nre,are,sre,ore,lre,cre,hre,ure,dre,pre,gre,fre,mre,yre,vre,bre,xre,Tre,kre,wre,Cre,Sre,Ere,_re,Are,Rre,Lre,Ire,Nre,Dre,Mre,Ore,Pre,Bre,$re,Fre,zre,qre,jre,Wre,Ure,Gre,Vre,Yre,Hre,Xre,Kre,Zre,Qre,Jre,eie,tie,rie,iie,nie,aie,sie,oie,lie,cie,hie,uie,die,pie,gie,fie,mie,yie,vie,bie,xie,Tie,kie,wie,Cie,Sie,Eie,_ie,Aie,Rie,Lie,Iie,Nie,Die,Mie,Oie,Pie,Bie,$ie,Fie,zie,qie,jie,Wie,Uie,Gie,Vie,Yie,Hie,Xie,Kie,Zie,Qie,Jie,ene,tne,rne,ine,nne,ane,sne,one,lne,cne,hne,une,dne,pne,gne,fne,mne,yne,vne,bne,xne,Tne,kne,wne,Cne,Sne,Ene,_ne,Ane,Rne,Lne,Ine,Nne,Dne,Mne,One,Pne,Bne,$ne,Fne,zne,qne,jne,Wne,Une,Gne,Vne,Yne,Hne,Xne,Kne,Zne,Qne,Jne,eae,tae,rae,iae,nae,aae,sae,oae,lae,cae,hae,uae,dae,pae,gae,fae,mae,yae,vae,bae,xae,Tae,kae,wae,Cae,Sae,Eae,_ae,Aae,Rae,Lae,Iae,Nae,Dae,Mae,Oae,Pae,Bae,$ae,Fae,zae,qae,jae,Wae,Uae,Gae,Vae,Yae,Hae,Xae,Kae,Zae,Qae,Jae,ese,tse,rse,ise,nse,ase,sse,ose,lse,cse,hse,use,dse,pse,gse,fse,mse,yse,vse,bse,xse,Tse,kse,wse,Cse,Sse,Ese,_se,Ase,Rse,Lse,Ise,Nse,Dse,Mse,Ose,Pse,Bse,$se,Fse,zse,qse,jse,Wse,Use,Gse,Vse,Yse,Hse,Xse,Kse,Zse,Qse,Jse,eoe,toe,roe,ioe,noe,aoe,soe,ooe,loe,coe,hoe,uoe,doe,poe,goe,foe,moe,yoe,voe,boe,xoe,Toe,koe,woe,Coe,Soe,Eoe,_oe,Aoe,Roe,Loe,Ioe,Noe,Doe,Moe,Ooe,Poe,Boe,$oe,Foe,zoe,qoe,joe,Woe,Uoe,Goe,Voe,Yoe,Hoe,Xoe,Koe,Zoe,Qoe,Joe,ele,tle,rle,ile,nle,ale,sle,ole,lle,cle,hle,ule,dle,ple,gle,fle,mle,yle,vle,ble,xle,Tle,kle,wle,Cle,Sle,Ele,_le,Ale,Rle,Lle,Ile,Nle,Dle,Mle,Ole,Ple,Ble,$le,Fle,zle,qle,jle,Wle,Ule,Gle,Vle,Yle,Hle,Xle,Kle,Zle,Qle,Jle,ece,tce,rce,ice,nce,ace,sce,oce,lce,cce,hce,uce,dce,pce,gce,fce,mce,yce,vce,bce,xce,Tce,kce,wce,Cce,Sce,Ece,_ce,Ace,Rce,Lce,Ice,Nce,Dce,Mce,Oce,Pce,Bce,$ce,Fce,zce,qce,jce,Wce,Uce,Gce,Vce,Yce,Hce,Xce,Kce,Zce,Qce,Jce,ehe,the,rhe,ihe,nhe,ahe,she,ohe,lhe,che,hhe,uhe,dhe,phe,ghe,fhe,ee,mhe,yhe,vhe,bhe,xhe,The,khe,whe,Che,She,Ehe,_he,Ahe,Rhe,Lhe,Ihe,Nhe,Dhe,Mhe,Ohe,Phe,Bhe,$he,Fhe,zhe,qhe,jhe,Whe,Uhe,Ghe,Vhe,Yhe,Hhe,Xhe,Khe,Zhe,Qhe,Jhe,eue,tue,rue,iue,nue,aue,sue,oue,lue,cue,hue,uue,due,pue,gue,fue,mue=r(()=>{function i(e){if(YZ(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(){YZ(this,e),this._obj={}}mt(UZ,"_arrayLikeToArray"),mt(GZ,"_arrayWithHoles"),mt(VZ,"_arrayWithoutHoles"),mt(YZ,"_classCallCheck"),mt(HZ,"_defineProperties"),mt(XZ,"_createClass"),mt(KZ,"_createForOfIteratorHelper"),mt(ZZ,"_defineProperty$1"),mt(QZ,"_iterableToArray"),mt(JZ,"_iterableToArrayLimit"),mt(eQ,"_nonIterableRest"),mt(tQ,"_nonIterableSpread"),mt(rQ,"_slicedToArray"),mt(iQ,"_toConsumableArray"),mt(nQ,"_toPrimitive"),mt(aQ,"_toPropertyKey"),mt(sQ,"_typeof"),mt(oQ,"_unsupportedIterableToArray"),mte="u"<typeof window?null:window,yte=mte?mte.navigator:null,mte&&mte.document,vte=sQ(""),bte=sQ({}),xte=sQ(function(){}),Tte="u"<typeof HTMLElement?"undefined":sQ(HTMLElement),kte=mt(function(e){return e&&e.instanceString&&Cte(e.instanceString)?e.instanceString():null},"instanceStr"),wte=mt(function(e){return null!=e&&sQ(e)==vte},"string"),Cte=mt(function(e){return null!=e&&sQ(e)===xte},"fn"),Ste=mt(function(e){return!Lte(e)&&(Array.isArray?Array.isArray(e):null!=e&&e instanceof Array)},"array"),Ete=mt(function(e){return null!=e&&sQ(e)===bte&&!Ste(e)&&e.constructor===Object},"plainObject"),_te=mt(function(e){return null!=e&&sQ(e)===bte},"object"),he=mt(function(e){return null!=e&&sQ(e)===sQ(1)&&!isNaN(e)},"number"),Ate=mt(function(e){return he(e)&&Math.floor(e)===e},"integer"),Rte=mt(function(e){if("undefined"!==Tte)return null!=e&&e instanceof HTMLElement},"htmlElement"),Lte=mt(function(e){return Ite(e)||Nte(e)},"elementOrCollection"),Ite=mt(function(e){return"collection"===kte(e)&&e._private.single},"element"),Nte=mt(function(e){return"collection"===kte(e)&&!e._private.single},"collection"),Dte=mt(function(e){return"core"===kte(e)},"core"),Mte=mt(function(e){return"stylesheet"===kte(e)},"stylesheet"),Ote=mt(function(e){return"event"===kte(e)},"event"),Pte=mt(function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},"emptyString"),Bte=mt(function(e){return!("u"<typeof HTMLElement)&&e instanceof HTMLElement},"domElement"),$te=mt(function(e){return Ete(e)&&he(e.x1)&&he(e.x2)&&he(e.y1)&&he(e.y2)},"boundingBox"),Fte=mt(function(e){return _te(e)&&Cte(e.then)},"promise"),zte=mt(function(){return yte&&yte.userAgent.match(/msie|trident|edge/i)},"ms"),qte=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"),jte=qte(function(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),Wte=qte(function(e){return e.replace(/(-\w)/g,function(e){return e[1].toUpperCase()})}),Ute=qte(function(e,t){return e+t[0].toUpperCase()+t.substring(1)},function(e,t){return e+"$"+t}),Gte=mt(function(e){return Pte(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},"capitalize"),Vte=mt(function(e,t){return e.slice(-1*t.length)===t},"endsWith"),Yte="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",Hte=mt(function(e,t){return e<t?-1:t<e?1:0},"ascending"),Xte=mt(function(e,t){return-1*Hte(e,t)},"descending"),Kte=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},Zte=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"),Qte=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"),Jte=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"),ere=mt(function(e){return rre[e.toLowerCase()]},"colorname2tuple"),tre=mt(function(e){return(Ste(e)?e:null)||ere(e)||Zte(e)||Jte(e)||Qte(e)},"color2tuple"),rre={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]},ire=mt(function(e){for(var t=e.map,r=e.keys,i=r.length,n=0;n<i;n++){var a=r[n];if(Ete(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"),nre=mt(function(e){for(var t=e.map,r=e.keys,i=r.length,n=0;n<i;n++){var a=r[n];if(Ete(a))throw Error("Tried to get map with object key");if(null==(t=t[a]))return t}return t},"getMap"),are=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},mt(lQ,"getDefaultExportFromCjs"),mt(cQ,"requireIsObject"),mt(hQ,"require_freeGlobal"),mt(uQ,"require_root"),mt(dQ,"requireNow"),mt(pQ,"require_trimmedEndIndex"),mt(gQ,"require_baseTrim"),mt(fQ,"require_Symbol"),mt(mQ,"require_getRawTag"),mt(yQ,"require_objectToString"),mt(vQ,"require_baseGetTag"),mt(bQ,"requireIsObjectLike"),mt(xQ,"requireIsSymbol"),mt(TQ,"requireToNumber"),mt(kQ,"requireDebounce"),tie=kQ(),Mre=lQ(tie),Ore=mte?mte.performance:null,Pre=Ore&&Ore.now?function(){return Ore.now()}:function(){return Date.now()},Bre=(()=>{if(mte){if(mte.requestAnimationFrame)return function(e){mte.requestAnimationFrame(e)};if(mte.mozRequestAnimationFrame)return function(e){mte.mozRequestAnimationFrame(e)};if(mte.webkitRequestAnimationFrame)return function(e){mte.webkitRequestAnimationFrame(e)};if(mte.msRequestAnimationFrame)return function(e){mte.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout(function(){e(Pre())},1e3/60)}})(),$re=mt(function(e){return Bre(e)},"requestAnimationFrame"),Fre=Pre,zre=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"),qre=mt(function(e){return 65599*(1<arguments.length&&void 0!==arguments[1]?arguments[1]:9261)+e|0},"hashInt"),jre=mt(function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:5381;return(t<<5)+t+e|0},"hashIntAlt"),Wre=mt(function(e,t){return 2097152*e+t},"combineHashes"),Ure=mt(function(e){return 2097152*e[0]+e[1]},"combineHashesArray"),Gre=mt(function(e,t){return[qre(e[0],t[0]),jre(e[1],t[1])]},"hashArrays"),Vre=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 zre(a,t)},"hashIntsArray"),Yre=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 zre(a,t)},"hashString"),Hre=mt(function(){return Xre(arguments)},"hashStrings"),Xre=mt(function(e){for(var t=0;t<e.length;t++)var r=e[t],i=0===t?Yre(r):Yre(r,i);return i},"hashStringsArray"),mt(wQ,"rotatePoint"),Kre=mt(function(e,t,r,i,n,a){return{x:(e-r)*n+r,y:(t-i)*a+i}},"movePointByBoxAspect"),mt(CQ,"rotatePosAndSkewByBox"),Zre=!0,Qre=null!=console.warn,Jre=null!=console.trace,eie=Number.MAX_SAFE_INTEGER||9007199254740991,tie=mt(function(){return!0},"trueify"),rie=mt(function(){return!1},"falsify"),iie=mt(function(){return 0},"zeroify"),nie=mt(function(){},"noop"),aie=mt(function(e){throw new Error(e)},"error"),sie=mt(function(e){if(void 0===e)return Zre;Zre=!!e},"warnings"),oie=mt(function(e){sie()&&(Qre?console.warn(e):(console.log(e),Jre&&console.trace()))},"warn"),lie=mt(function(e){return Kte({},e)},"clone"),cie=mt(function(e){return null==e?e:Ste(e)?e.slice():Ete(e)?lie(e):e},"copy"),hie=mt(function(e){return e.slice()},"copyArray"),uie=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"),die={},pie=mt(function(){return die},"staticEmptyObject"),sue=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"),gie=mt(function(e,t,r){for(var i=e.length-1;0<=i;i--)e[i]===t&&e.splice(i,1)},"removeFromArray"),fie=mt(function(e){e.splice(0,e.length)},"clearArray"),mie=mt(function(e,t){for(var r=0;r<t.length;r++)e.push(t[r])},"push"),yie=mt(function(e,t,r){return e[t=r?Ute(r,t):t]},"getPrefixedProperty"),vie=mt(function(e,t,r,i){e[t=r?Ute(r,t):t]=i},"setPrefixedProperty"),mt(e,"ObjectMap"),Bhe=XZ(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")}]),bie=typeof Map<"u"?Map:Bhe,mt(i,"ObjectSet"),Bhe=XZ(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")}]),xie="undefined"!==("u"<typeof Set?"undefined":sQ(Set))?Set:Bhe,Tie=mt(function(e,t){var r=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];if(void 0!==e&&void 0!==t&&Dte(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)aie("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 xie,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}),[]);Ste(t.classes)?s=t.classes:wte(t.classes)&&(s=t.classes.split(/\s+/));for(var o=0,l=s.length;o<l;o++){var c=s[o];c&&""!==c&&a.classes.add(c)}this.createEmitter(),void 0!==r&&!r||this.restore(),(i=t.style||t.css)&&(oie("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(i))}}else aie("An element must have a core reference and parameters set")},"Element"),(Bhe={breadthFirstSearch:(Bhe=mt(function(w){return w={bfs:w.bfs||!w.dfs,dfs:w.dfs||!w.bfs},mt(function(e,u,d){Ete(e)&&!Lte(e)&&(e=(t=e).roots||t.root,u=t.visit,d=t.directed),d=2!==arguments.length||Cte(u)?d:u,u=Cte(u)?u:function(){};for(var p,t=this._private.cy,r=e=wte(e)?this.filter(e):e,g=[],f=[],m={},y={},v={},b=0,e=this.byGroup(),x=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,b++,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],c=l.connectedNodes().filter(function(e){return!e.same(t)&&x.has(e)}),h=c.id();0===c.length||v[h]||(c=c[0],g.push(c),w.bfs&&(v[h]=!0,f.push(c)),m[h]=l,y[h]=y[e]+1)}},"_loop");0!==g.length&&(0===(s=o())||1!==s););for(var l=t.collection(),c=0;c<f.length;c++){var h=f[c],k=m[h.id()];null!=k&&l.push(k),l.push(h)}return{path:t.collection(l),found:t.collection(p)}},"searchFn")},"defineSearch"))({bfs:!0}),depthFirstSearch:Bhe({dfs:!0})}).bfs=Bhe.breadthFirstSearch,Bhe.dfs=Bhe.depthFirstSearch,wie=(kie={exports:{}}).exports,mt(SQ,"requireHeap$1"),mt(EQ,"requireHeap"),gue=EQ(),_ie=lQ(gue),Aie=sue({root:null,weight:mt(function(e){return 1},"weight"),directed:!1}),gue={dijkstra:mt(function(e){Ete(e)||(e={root:(t=arguments)[0],weight:t[1],directed:t[2]});var t=Aie(e),e=t.root,l=t.directed,a=this,c=t.weight,r=(wte(e)?this.filter(e):e)[0],i={},s={},n={},o=(t=this.byGroup()).nodes,h=t.edges;h.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 _ie(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(h),n=1/0,a=0;a<i.length;a++){var s=i[a],o=c(s);(o<n||!r)&&(n=o,r=s)}return{edge:r,dist:n}},"distBetween");0<p.size();){var y=p.pop(),v=u(y),b=y.id();if((n[b]=v)!==1/0)for(var x=y.neighborhood().intersect(o),T=0;T<x.length;T++){var k=x[T],w=k.id(),C=m(y,k),S=v+C.dist;S<u(k)&&(d(k,S),s[w]={node:y,edge:C.edge})}}return{distanceTo:mt(function(e){return e=(wte(e)?o.filter(e):e)[0],n[e.id()]},"distanceTo"),pathTo:mt(function(e){var t=[],r=e=(wte(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")},$he={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)}),c=0;c<l.length;c++){var h=l[c],u=h.source()[0],d=h.target()[0],u=s(u),d=s(d),p=n[u],g=n[d];u!==d&&(a.merge(h),p.merge(g),n.splice(d,1))}return a},"kruskal")},Rie=sue({root:null,goal:null,weight:mt(function(e){return 1},"weight"),heuristic:mt(function(e){return 0},"heuristic"),directed:!1}),Ohe={aStar:mt(function(e){var t,r,i=this.cy(),n=(e=Rie(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(),c=a.id(),h={},u={},d={},p=new _ie(function(e,t){return u[e.id()]-u[t.id()]}),g=new xie,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"),b=mt(function(e){return g.has(e)},"isInOpenSet");y(n,e),h[e]=0,u[e]=s(n);for(var x=0;0<p.size();){if(v(),x++,r===c){for(var T=[],k=a,w=c,C=m[w];T.unshift(k),null!=C&&T.unshift(C),null!=(k=f[w]);)C=m[w=k.id()];return{found:!0,distance:h[r],path:this.spawn(T),steps:x}}d[r]=!0;for(var S=t._private.edges,E=0;E<S.length;E++){var _,A,R,L=S[E];!this.hasElementWithId(L.id())||o&&L.data("source")!==r||(_=L.source(),A=L.target(),A=(_=_.id()!==r?_:A).id(),this.hasElementWithId(A)&&!d[A]&&(R=h[r]+l(L),b(A)?R<h[A]&&(u[A]=(h[A]=R)+s(_),f[A]=t,m[A]=L):(u[A]=(h[A]=R)+s(_),y(_,A),f[A]=t,m[A]=L)))}}return{found:!1,distance:void 0,path:void 0,steps:x}},"aStar")},Lie=sue({weight:mt(function(e){return 1},"weight"),directed:!1}),qce={floydWarshall:mt(function(e){for(var s=this.cy(),t=(e=Lie(e)).weight,r=e.directed,i=t,n=(e=this.byGroup()).nodes,a=e.edges,o=n.length,l=o*o,c=mt(function(e){return n.indexOf(e)},"indexOf"),h=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,b=a[m],x=b.source()[0],T=b.target()[0];x!==T&&(x=c(x),T=c(T),v=x*o+T,y=i(b),u[v]>y&&(u[v]=y,g[v]=T,f[v]=b),r||(v=T*o+x,!r&&u[v]>y&&(u[v]=y,g[v]=x,f[v]=b)))}for(var k=0;k<o;k++)for(var w=0;w<o;w++)for(var C=w*o+k,S=0;S<o;S++){var E=w*o+S,_=k*o+S;u[C]+u[_]<u[E]&&(u[E]=u[C]+u[_],g[E]=g[C])}var A=mt(function(e){return(wte(e)?s.filter(e):e)[0]},"getArgEle"),R=mt(function(e){return c(A(e))},"indexOfArgEle");return{distance:mt(function(e,t){return e=R(e),t=R(t),u[e*o+t]},"distance"),path:mt(function(e,t){var r=R(e),i=R(t),e=h(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(h(r));return a},"path")}},"floydWarshall")},Iie=sue({weight:mt(function(e){return 1},"weight"),directed:!1,root:null}),She={bellmanFord:mt(function(e){var P=this,t=(m=Iie(e)).weight,r=m.directed,s=m.root,i=t,o=this,n=this.cy(),a=(m=this.byGroup()).edges,l=m.nodes,c=l.length,h=new bie,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=h.get(e.id());return t||(t={},h.set(e.id(),t)),t},"getInfo"),f=mt(function(e){return(wte(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 P.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<c;y++){var v=l[y],b=g(v);v.same(s)?b.dist=0:b.dist=1/0,b.pred=null,b.edge=null}for(var x=!1,B=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,x=!0)},"checkForEdgeReplacement"),$=1;$<c;$++){for(var x=!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);B(w,C,k,z,q,F),r||B(C,w,k,q,z,F)}if(!x)break}if(x)for(var j=[],S=0;S<p;S++){var W=(E=a[S]).source(),U=E.target(),E=i(E),_=g(W).dist,A=g(U).dist;if(_+E<A||!r&&A+E<_){if(u||(oie("Graph contains a negative weight cycle for Bellman-Ford"),u=!0),!1===e.findNegativeWeightCycles)break;var R=[];_+E<A&&R.push(W),!r&&A+E<_&&R.push(U);for(var G=R.length,L=0;L<G;L++){var I=R[L],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===j.indexOf(I)&&(d.push(o.spawn(N)),j.push(I))}}}return{distanceTo:t,pathTo:m,hasNegativeWeightCycle:u,negativeWeightCycles:d}},"bellmanFord")},Nie=Math.sqrt(2),Die=mt(function(e,t,r){0===r.length&&aie("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 c=0;c<a.length;c++){var h=a[c];h[1]===n?(a[c]=h.slice(),a[c][1]=i):h[2]===n&&(a[c]=h.slice(),a[c][2]=i)}for(var u=0;u<t.length;u++)t[u]===n&&(t[u]=i);return a},"collapse"),Mie=mt(function(e,t,r,i){for(;i<r;){var n=Math.floor(Math.random()*t.length);t=Die(n,e,t),r--}return t},"contractUntil"),Nhe={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/Nie);if(!(n<2)){for(var l=[],c=0;c<a;c++){var h=i[c];l.push([c,t.indexOf(h.source()),t.indexOf(h.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 b=(x=Mie(g,l.slice(),n,o)).slice(),x=(m(g,f),Mie(g,x,o,2)),b=Mie(f,b,o,2);x.length<=b.length&&x.length<u?(u=x.length,d=x,m(g,p)):b.length<=x.length&&b.length<u&&(u=b.length,d=b,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],S=0;S<p.length;S++){var E=p[S],_=t[S];(E===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}}aie("At least 2 nodes are required for Karger-Stein algorithm")},"kargerStein")},Oie=mt(function(e){return{x:e.x,y:e.y}},"copyPosition"),Pie=mt(function(e,t,r){return{x:e.x*t+r.x,y:e.y*t+r.y}},"modelToRenderedPosition"),Bie=mt(function(e,t,r){return{x:(e.x-r.x)/t,y:(e.y-r.y)/t}},"renderedToModelPosition"),$ie=mt(function(e){return{x:e[0],y:e[1]}},"array2point"),Fie=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"),zie=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"),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=0,n=0,a=t;a<r;a++){var s=e[a];isFinite(s)&&(i+=s,n++)}return i/n},"mean"),jie=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"),Wie=mt(function(e){return Math.PI*e/180},"deg2rad"),Uie=mt(function(e,t){return Math.atan2(t,e)-Math.PI/2},"getAngleFromDisp"),Gie=Math.log2||function(e){return Math.log(e)/Math.log(2)},Vie=mt(function(e){return 0<e?1:e<0?-1:0},"signum"),Yie=mt(function(e,t){return Math.sqrt(Hie(e,t))},"dist"),Hie=mt(function(e,t){var r=t.x-e.x;return r*r+(t=t.y-e.y)*t},"sqdist"),Xie=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"),Kie=mt(function(e,t,r,i){return(1-i)*(1-i)*e+2*(1-i)*i*t+i*i*r},"qbezierAt"),Zie=mt(function(e,t,r,i){return{x:Kie(e.x,t.x,r.x,i),y:Kie(e.y,t.y,r.y,i)}},"qbezierPtAt"),Qie=mt(function(e,t,r,i){var n=t.x-e.x,a=t.y-e.y,t=Yie(e,t);return r=r??0,{x:e.x+n/t*(i=i??r*t),y:e.y+a/t*i}},"lineAt"),Jie=mt(function(e,t,r){return Math.max(e,Math.min(r,t))},"bound"),ene=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"),tne=mt(function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},"copyBoundingBox"),rne=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"),ine=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"),nne=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"),ane=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"),sne=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=rQ(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"),one=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"),lne=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"),cne=mt(function(e,t,r){return e.x1<=t&&t<=e.x2&&e.y1<=r&&r<=e.y2},"inBoundingBox"),hne=mt(function(e,t){return cne(e,t.x,t.y)},"pointInBoundingBox"),une=mt(function(e,t){return cne(e,t.x1,t.y1)&&cne(e,t.x2,t.y2)},"boundingBoxInBoundingBox"),dne=null!=(Zhe=Math.hypot)?Zhe:function(e,t){return Math.sqrt(e*e+t*t)},mt(_Q,"inflatePolygon"),mt(AQ,"miterBox"),pne=mt(function(e,t,r,i,n,a,s){var o,l="auto"===(l=7<arguments.length&&void 0!==arguments[7]?arguments[7]:"auto")?Bne(n,a):l,n=n/2,a=a/2,c=(l=Math.min(l,n,a))!==n,h=l!==a;if(c){var u=i-a-s;if(0<(u=Rne(e,t,r,i,r-n+l-s,u,r+n-l+s,u,!1)).length)return u}return h&&0<(u=Rne(e,t,r,i,o=r+n+s,i-a+l-s,o,i+a-l+s,!1)).length||c&&0<(u=Rne(e,t,r,i,r-n+l-s,o=i+a+s,r+n-l+s,o,!1)).length||h&&0<(u=Rne(e,t,r,i,c=r-n-s,i-a+l-s,c,i+a-l+s,!1)).length?u:0<(c=_ne(e,t,r,i,o=r-n+l,h=i-a+l,l+s)).length&&c[0]<=o&&c[1]<=h||0<(c=_ne(e,t,r,i,u=r+n-l,o=i-a+l,l+s)).length&&c[0]>=u&&c[1]<=o||0<(c=_ne(e,t,r,i,h=r+n-l,u=i+a-l,l+s)).length&&c[0]>=h&&c[1]>=u||0<(c=_ne(e,t,r,i,o=r-n+l,h=i+a-l,l+s)).length&&c[0]<=o&&c[1]>=h?[c[0],c[1]]:[]},"roundRectangleIntersectLine"),gne=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"),fne=mt(function(e,t,r,i,n,a,s,o,l){var c=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<c||r<e||t<s||n<t)},"inBezierVicinity"),mne=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"),yne=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"),vne=mt(function(e,t,r,i,n,a,s,o){var l=[];yne(+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 c=[],h=0;h<6;h+=2)Math.abs(l[h+1])<1e-7&&0<=l[h]&&l[h]<=1&&c.push(l[h]);c.push(1),c.push(0);for(var u,d,p=-1,g=0;g<c.length;g++)d=Math.pow(1-c[g],2)*r+2*(1-c[g])*c[g]*n+c[g]*c[g]*s,u=Math.pow(1-c[g],2)*i+2*(1-c[g])*c[g]*a+c[g]*c[g]*o,d=Math.pow(d-e,2)+Math.pow(u-t,2),0<=p&&!(d<p)||(p=d);return p},"sqdistToQuadraticBezier"),bne=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"),xne=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"),Tne=mt(function(e,t,r,i,n,a,s,o,l){var c=new Array(r.length);null!=o[0]?(h=Math.atan(o[1]/o[0]),o[0]<0?h+=Math.PI/2:h=-h-Math.PI/2):h=o;for(var h,u=Math.cos(-h),d=Math.sin(-h),p=0;p<c.length/2;p++)c[2*p]=a/2*(r[2*p]*u-r[2*p+1]*d),c[2*p+1]=s/2*(r[2*p+1]*u+r[2*p]*d),c[2*p]+=i,c[2*p+1]+=n;return h=0<l?(o=Cne(c,-l),wne(o)):c,xne(e,t,h)},"pointInsidePolygon"),kne=mt(function(e,t,r,i,n,a,s,o){for(var l=new Array(2*r.length),c=0;c<o.length;c++){var h=o[c];if(l[4*c+0]=h.startX,l[4*c+1]=h.startY,l[4*c+2]=h.stopX,l[4*c+3]=h.stopY,Math.pow(h.cx-e,2)+Math.pow(h.cy-t,2)<=Math.pow(h.radius,2))return!0}return xne(e,t,l)},"pointInsideRoundPolygon"),wne=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=Rne(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"),Cne=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]),c=-(r-(a=e[2*n])),h=Math.sqrt(l*l+c*c),c=c/h;i[4*n]=a+(l/=h)*t,i[4*n+1]=s+c*t,i[4*n+2]=r+l*t,i[4*n+3]=o+c*t}return i},"expandPolygon"),Sne=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"),Ene=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"),_ne=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"),Ane=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"),Rne=mt(function(e,t,r,i,n,a,s,o,l){var c=e-n,h=r-e,u=s-n,d=i-t,p=o-a,g=u*(f=t-a)-p*c,f=h*f-d*c;return 0!=(c=p*h-u*d)?(p=f/c,-.001<=(u=g/c)&&u<=1.001&&-.001<=p&&p<=1.001||l?[e+u*h,t+u*d]:[]):0==g||0==f?Ane(e,r,s)===s?[s,o]:Ane(e,r,n)===n?[n,a]:Ane(n,s,r)===r?[r,i]:[]:[]},"finiteLinesIntersect"),Lne=mt(function(e,t,r,i,n){var a=[],s=i/2,o=n/2,l=t,c=r;a.push({x:l+s*e[0],y:c+o*e[1]});for(var h=1;h<e.length/2;h++)a.push({x:l+s*e[2*h],y:c+o*e[2*h+1]});return a},"transformPoints"),Ine=mt(function(e,t,r,i,n,a,s,o){var l=[],c=new Array(r.length);if(null!=a){for(var h,u=0;u<c.length/2;u++)c[2*u]=r[2*u]*a+i,c[2*u+1]=r[2*u+1]*s+n;h=0<o?(o=Cne(c,-o),wne(o)):c}else h=r;for(var d,p,g,f,m=0;m<h.length/2;m++)d=h[2*m],p=h[2*m+1],f=m<h.length/2-1?(g=h[2*(m+1)],h[2*(m+1)+1]):(g=h[0],h[1]),0!==(d=Rne(e,t,i,n,d,p,g,f)).length&&l.push(d[0],d[1]);return l},"polygonIntersectLine"),Nne=mt(function(r,i,e,n,a,t,s,o,l){var c,h=[],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!==(c=_ne(r,i,n,a,e.cx,e.cy,e.radius)).length&&h.push(c[0],c[1])});for(var d=0;d<u.length/4;d++)0!==(c=Rne(r,i,n,a,u[4*d],u[4*d+1],u[4*d+2],u[4*d+3],!1)).length&&h.push(c[0],c[1]);if(2<h.length){for(var p=[h[0],h[1]],g=Math.pow(p[0]-r,2)+Math.pow(p[1]-i,2),f=1;f<h.length/2;f++){var m=Math.pow(h[2*f]-r,2)+Math.pow(h[2*f+1]-i,2);m<=g&&(p[0]=h[2*f],p[1]=h[2*f+1],g=m)}return p}return h},"roundPolygonIntersectLine"),Dne=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"),Mne=mt(function(e,t){return e=Pne(e,t),One(e)},"generateUnitNgonPointsFitToSquare"),One=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 c=2/(s-n),h=2/(o-a),u=0;u<i;u++)t=e[2*u]=e[2*u]*c,r=e[2*u+1]=e[2*u+1]*h,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"),Pne=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"),Bne=mt(function(e,t){return Math.min(e/4,t/4,8)},"getRoundRectangleRadius"),$ne=mt(function(e,t){return Math.min(e/10,t/10,8)},"getRoundPolygonRadius"),Fne=mt(function(){return 8},"getCutRectangleCornerLength"),zne=mt(function(e,t,r){return[e-2*t+r,2*(t-e),e]},"bezierPtsToQuadCoeff"),qne=mt(function(e,t){return{heightOffset:Math.min(15,.05*t),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05}},"getBarrelCurveConstants"),mt(RQ,"satPolygonIntersection"),jne=sue({dampingFactor:.8,precision:1e-6,iterations:200,weight:mt(function(e){return 1},"weight")}),Zhe={pageRank:mt(function(e){for(var t=(e=jne(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,c=o.length,h=new Array(l*l),u=new Array(l),d=(1-t)/l,p=0;p<l;p++){for(var g=0;g<l;g++)h[p*l+g]=0;u[p]=0}for(var f=0;f<c;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),h[v*l+y]+=m,u[y]+=m)}for(var b=1/l+d,x=0;x<l;x++)if(0===u[x])for(var T=0;T<l;T++)h[T*l+x]=b;else for(var k=0;k<l;k++){var w=k*l+x;h[w]=h[w]/u[x]+d}for(var C=new Array(l),S=new Array(l),E=0;E<l;E++)C[E]=1;for(var _=0;_<i;_++){for(var A=0;A<l;A++)S[A]=0;for(var R=0;R<l;R++)for(var L=0;L<l;L++)S[R]+=h[R*l+L]*C[L];Xie(S);for(var I=C,C=S,S=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")},Wne=sue({root:null,weight:mt(function(e){return 1},"weight"),directed:!1,alpha:0}),(nue={degreeCentralityNormalized:mt(function(e){e=Wne(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 c=(h=r[l]).id(),h=(e.root=h,this.degreeCentrality(e));s<h.indegree&&(s=h.indegree),o<h.outdegree&&(o=h.outdegree),n[c]=h.indegree,a[c]=h.outdegree}return{indegree:mt(function(e){return 0==s?0:(wte(e)&&(e=t.filter(e)),n[e.id()]/s)},"indegree"),outdegree:mt(function(e){return 0===o?0:(wte(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:(wte(e)&&(e=t.filter(e)),u[e.id()]/d)},"degree")}},"degreeCentralityNormalized"),degreeCentrality:mt(function(e){e=Wne(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,c=0,h=0;h<s.length;h++)l+=n(s[h]);for(var u=0;u<o.length;u++)c+=n(o[u]);return{indegree:Math.pow(a,1-e)*Math.pow(l,e),outdegree:Math.pow(t,1-e)*Math.pow(c,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=nue.degreeCentrality,nue.dcn=nue.degreeCentralityNormalised=nue.degreeCentralityNormalized,Une=sue({harmonic:!0,weight:mt(function(){return 1},"weight"),directed:!1,root:null}),(ee={closenessCentralityNormalized:mt(function(e){for(var t=(e=Une(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 c,h=0,u=s[l],d=0;d<s.length;d++)l!==d&&(c=o.distance(u,s[d]),h+=t?1/c:c);a<(h=t?h:1/h)&&(a=h),n[u.id()]=h}return{closeness:mt(function(e){return 0==a?0:(e=(wte(e)?i.filter(e)[0]:e).id(),n[e]/a)},"closeness")}},"closenessCentralityNormalized"),closenessCentrality:mt(function(e){for(var t=(e=Une(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 c=o[l];c.same(t)||(c=a.distanceTo(c),s+=n?1/c:c)}return n?s:1/s},"closenessCentrality")}).cc=ee.closenessCentrality,ee.ccn=ee.closenessCentralityNormalised=ee.closenessCentralityNormalized,Gne=sue({weight:null,directed:!1}),(ghe={betweennessCentrality:mt(function(e){for(var t=(e=Gne(e)).directed,x=e.weight,T=null!=x,k=this.cy(),w=this.nodes(),C={},r={},i=0,S={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(),S.set(s,0)}for(var o=mt(function(){for(var e=w[E].id(),t=[],r={},i={},n={},a=new _ie(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 c=0;c<C[l].length;c++){var h=C[l][c],u=(0<(d=k.getElementById(l)).edgesTo(h).length?d.edgesTo(h):h.edgesTo(d))[0],d=x(u),h=h.id();n[l]+d<n[h]&&(n[h]=n[l]+d,a.nodes.indexOf(h)<0?a.push(h):a.updateItem(h),i[h]=0,r[h]=[]),n[h]==n[l]+d&&(i[h]=i[h]+i[l],r[h].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 b=r[y][v];f[b]=f[b]+i[b]/i[y]*(1+f[y])}y!=w[E].id()&&S.set(y,S.get(y)+f[y])}},"_loop"),E=0;E<w.length;E++)o();return(e={betweenness:mt(function(e){return e=k.collection(e).id(),S.get(e)},"betweenness"),betweennessNormalized:mt(function(e){return 0==i?0:(e=k.collection(e).id(),S.get(e)/i)},"betweennessNormalized")}).betweennessNormalised=e.betweennessNormalized,e},"betweennessCentrality")}).bc=ghe.betweennessCentrality,Vne=sue({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(e){return 1}]}),Yne=mt(function(e){return Vne(e)},"setOptions"),Hne=mt(function(e,t){for(var r=0,i=0;i<t.length;i++)r+=t[i](e);return r},"getSimilarity"),Xne=mt(function(e,t,r){for(var i=0;i<t;i++)e[i*t+i]=r},"addLoops"),Kne=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"),Zne=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"),Qne=mt(function(e,t,r){for(var i=e.slice(0),n=1;n<r;n++)e=Zne(e,i,t);return e},"expand"),Jne=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 Kne(i,t),i},"inflate"),eae=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"),tae=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"),rae=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"),iae=mt(function(e){for(var t=0;t<e.length;t++)for(var r=0;r<e.length;r++)t!=r&&rae(e[t],e[r])&&e.splice(r,1);return e},"removeDuplicates"),Phe={markovClustering:Phe=mt(function(e){for(var t=this.nodes(),r=this.edges(),i=this.cy(),n=Yne(e),a={},s=0;s<t.length;s++)a[t[s].id()]=s;for(var o,l=t.length,c=l*l,h=new Array(c),u=0;u<c;u++)h[u]=0;for(var d=0;d<r.length;d++){var p=a[(f=r[d]).source().id()],g=a[f.target().id()],f=Hne(f,n.attributes);h[p*l+g]+=f,h[g*l+p]+=f}Xne(h,l,n.multFactor),Kne(h,l);for(var m=!0,y=0;m&&y<n.maxIterations;)m=!1,o=Qne(h,l,n.expandFactor),h=Jne(o,l,n.inflateFactor),eae(h,o,c,4)||(m=!0),y++;return e=tae(h,l,t,i),iae(e)},"markovClustering"),mcl:Phe},nae=mt(function(e){return e},"identity"),aae=mt(function(e,t){return Math.abs(t-e)},"absDiff"),sae=mt(function(e,t,r){return e+aae(t,r)},"addAbsDiff"),oae=mt(function(e,t,r){return e+Math.pow(r-t,2)},"addSquaredDiff"),lae=mt(function(e){return Math.sqrt(e)},"sqrt"),cae=mt(function(e,t,r){return Math.max(e,aae(t,r))},"maxAbsDiff"),hae=mt(function(e,t,r,i,n){for(var a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:nae,s=i,o=0;o<e;o++)s=n(s,t(o),r(o));return a(s)},"getDistance"),(uae={euclidean:mt(function(e,t,r){return 2<=e?hae(e,t,r,0,oae,lae):hae(e,t,r,0,sae)},"euclidean"),squaredEuclidean:mt(function(e,t,r){return hae(e,t,r,0,oae)},"squaredEuclidean"),manhattan:mt(function(e,t,r){return hae(e,t,r,0,sae)},"manhattan"),max:mt(function(e,t,r){return hae(e,t,r,-1/0,cae)},"max")})["squared-euclidean"]=uae.squaredEuclidean,uae.squaredeuclidean=uae.squaredEuclidean,mt(LQ,"clusteringDistance"),dae=sue({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),pae=mt(function(e){return dae(e)},"setOptions"),gae=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 LQ(e,i.length,n,a,r,t)},"getDist"),fae=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 c=0;c<t;c++){for(var o=[],h=0;h<i;h++)o[h]=Math.random()*(a[h]-n[h])+n[h];s[c]=o}return s},"randomCentroids"),mae=mt(function(e,t,r,i,n){for(var a=1/0,s=0,o=0;o<t.length;o++){var l=gae(r,e,t[o],i,n);l<a&&(a=l,s=o)}return s},"classify"),yae=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"),vae=mt(function(e,t,r){return Math.abs(t-e)<=r},"haveValuesConverged"),bae=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"),xae=mt(function(e,t,r){for(var i=0;i<r;i++)if(e===t[i])return!0;return!1},"seenBefore"),Tae=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)];xae(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"),kae=mt(function(e,t,r){for(var i=0,n=0;n<t.length;n++)i+=gae("manhattan",t[n],e,r,"kMedoids");return i},"findCost"),Mhe=mt(function(e){for(var t=this.cy(),r=this.nodes(),i=null,n=pae(e),a=new Array(n.k),s={},o=n.testMode?"number"==typeof n.testCentroids?(n.testCentroids,fae(r,n.k,n.attributes)):"object"===sQ(n.testCentroids)?n.testCentroids:fae(r,n.k,n.attributes):fae(r,n.k,n.attributes),l=!0,c=0;l&&c<n.maxIterations;){for(var h=0;h<r.length;h++)s[(i=r[h]).id()]=mae(i,o,n.distance,n.attributes,"kMeans");for(var l=!1,u=0;u<n.k;u++){var d=yae(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,vae(f[y],g[y],n.sensitivityThreshold)||(l=!0)}o[u]=f,a[u]=t.collection(d)}}c++}return a},"kMeans"),Dhe=mt(function(e){var t,r,i=this.cy(),n=this.nodes(),a=null,s=pae(e),o=new Array(s.k),l={},c=new Array(s.k);s.testMode?"number"!=typeof s.testCentroids&&(t="object"===sQ(s.testCentroids)?s.testCentroids:Tae(n,s.k)):t=Tae(n,s.k);for(var h=!0,u=0;h&&u<s.maxIterations;){for(var d=0;d<n.length;d++)l[(a=n[d]).id()]=mae(a,t,s.distance,s.attributes,"kMedoids");for(var h=!1,p=0;p<t.length;p++){var g=yae(p,n,l);if(0!==g.length){c[p]=kae(t[p],g,s.attributes);for(var f=0;f<g.length;f++)(r=kae(g[f],g,s.attributes))<c[p]&&(c[p]=r,t[p]=g[f],h=!0);o[p]=i.collection(g)}}u++}return o},"kMedoids"),wae=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 c=0,h=0,u=0;u<t.length;u++)c+=i[u][o]*n.attributes[l](t[u]),h+=i[u][o];e[o][l]=c/h}},"updateCentroids"),Cae=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),c=0;c<r.length;c++)for(var h=0;h<i.length;h++){for(var u=0,d=0;d<r.length;d++)s=gae(n.distance,i[h],r[c],n.attributes,"cmeans"),o=gae(n.distance,i[h],r[d],n.attributes,"cmeans"),u+=Math.pow(s/o,l);e[h][c]=1/u}},"updateMembership"),Sae=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,c=0;c<t[0].length;c++)t[s][c]>o&&(o=t[s][c],l=c);n[l].push(e[s])}for(var h=0;h<n.length;h++)n[h]=i.collection(n[h]);return n},"assign"),cue=mt(function(e){for(var t=this.cy(),r=this.nodes(),i=pae(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 c=0,h=0;h<i.k;h++)s[l][h]=Math.random(),c+=s[l][h];for(var u=0;u<i.k;u++)s[l][u]=s[l][u]/c}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,wae(d,r,s,g,i),Cae(s,n,d,r,i),bae(s,n,i.sensitivityThreshold)||(m=!0),y++;return{clusters:Sae(r,s,i,t),degreeOfMembership:s}},"fuzzyCMeans"),Eae=sue({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!(Mhe={kMeans:Mhe,kMedoids:Dhe,fuzzyCMeans:cue,fcm:cue}),dendrogramDepth:0,attributes:[]}),_ae={single:"min",complete:"max"},Aae=mt(function(e){var e=Eae(e),t=_ae[e.linkage];return null!=t&&(e.linkage=t),e},"setOptions"),Rae=mt(function(e,t,r,i,n){for(var a,s=0,o=1/0,l=n.attributes,c=mt(function(t,r){return LQ(n.distance,l.length,function(e){return l[e](t)},function(e){return l[e](r)},t,r)},"getDist"),h=0;h<e.length;h++){var u=e[h].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?c(y.value,p.value):c(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 b=e[v].key;if(i[b]===p.key||i[b]===g.key){for(var x=b,T=0;T<e.length;T++){var k=e[T].key;r[b][k]<r[b][x]&&(x=k)}i[b]=x}e[v].index=v}return!(p.key=g.key=p.index=g.index=null)},"mergeClosest"),Lae=mt(function(e,t,r){e&&(e.value?t.push(e.value):(e.left&&Lae(e.left,t),e.right&&Lae(e.right,t)))},"getAllChildren"),Iae=mt(function(e,t){var r,i,n;return e?e.left&&e.right?(r=Iae(e.left,t),i=Iae(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"),Nae=mt(function(e,t,r){var i,n,a;return e?(i=[],n=[],0===t?(e.left&&Lae(e.left,i),e.right&&Lae(e.right,n),a=i.concat(n),[r.collection(a)]):1===t?e.value?[r.collection(e.value)]:(e.left&&Lae(e.left,i),e.right&&Lae(e.right,n),[r.collection(i),r.collection(n)]):e.value?[r.collection(e.value)]:(e.left&&(i=Nae(e.left,t-1,r)),e.right&&(n=Nae(e.right,t-1,r)),i.concat(n))):[]},"buildClustersFromTree"),Dhe=mt(function(e){for(var r=this.cy(),t=this.nodes(),i=Aae(e),n=i.attributes,a=mt(function(t,r){return LQ(i.distance,n.length,function(e){return n[e](t)},function(e){return n[e](r)},t,r)},"getDist"),s=[],o=[],l=[],c=[],h=0;h<t.length;h++){var u={value:"dendrogram"===i.mode?t[h]:[t[h]],key:h,index:h};c[h]=s[h]=u,o[h]=[],l[h]=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=Rae(s,c,o,l,i);m;)m=Rae(s,c,o,l,i);return"dendrogram"===i.mode?(f=Nae(s[0],i.dendrogramDepth,r),i.addDendrogram&&Iae(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"),cue={hierarchicalClustering:Dhe,hca:Dhe},Dae=sue({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),Mae=mt(function(e){var t=e.damping,r=e.preference;return.5<=t&&t<1||aie("Damping must range on [0.5, 1). Got: ".concat(t)),(t=["median","mean","min","max"]).some(function(e){return e===r})||he(r)||aie("Preference must be one of [".concat(t.map(function(e){return"'".concat(e,"'")}).join(", "),"] or a number. Got: ").concat(r)),Dae(e)},"setOptions"),Oae=mt(function(e,t,r,i){var n=mt(function(e,t){return i[t](e)},"attr");return-LQ(e,i.length,function(e){return n(t,e)},function(e){return n(r,e)},t,r)},"getSimilarity"),Pae=mt(function(e,t){return"median"===t?jie(e):"mean"===t?qie(e):"min"===t?Fie(e):"max"===t?zie(e):t},"getPreference"),Bae=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"),$ae=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 c=0;c<r.length;c++)i[r[c]]=r[c];return i},"assignClusters"),Fae=mt(function(e,t,r){for(var i=$ae(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,c=0;c<a.length;c++){for(var h=0,u=0;u<a.length;u++)h+=t[a[u]*e+a[c]];l<h&&(o=c,l=h)}r[n]=a[o]}return $ae(e,t,r)},"assign"),Dhe=mt(function(P){for(var B=this.cy(),e=this.nodes(),t=Mae(P),$={},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]=Oae(t.distance,e[o],e[l],t.attributes));for(var F=Pae(a,t.preference),c=0;c<i;c++)a[c*i+c]=F;for(var h=new Array(n),u=0;u<n;u++)h[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,b=new Array(i*t.minIterations),z=0;z<b.length;z++)b[z]=0;for(v=0;v<t.maxIterations;v++){for(var x=0;x<i;x++){for(var T,k=-1/0,w=-1/0,C=-1,S=0;S<i;S++)g[S]=h[x*i+S],k<=(T=d[x*i+S]+a[x*i+S])?(w=k,k=T,C=S):w<T&&(w=T);for(var E=0;E<i;E++)h[x*i+E]=(1-t.damping)*(a[x*i+E]-k)+t.damping*g[E];h[x*i+C]=(1-t.damping)*(a[x*i+C]-w)+t.damping*g[C]}for(var _=0;_<i;_++){for(var A=0,R=0;R<i;R++)g[R]=d[R*i+_],f[R]=Math.max(0,h[R*i+_]),A+=f[R];A-=f[_],f[_]=h[_*i+_],A+=f[_];for(var L=0;L<i;L++)d[L*i+_]=(1-t.damping)*Math.min(0,A-f[L])+t.damping*g[L];d[_*i+_]=(1-t.damping)*(A-f[_])+t.damping*g[_]}for(var q=0,I=0;I<i;I++){var j=0<d[I*i+I]+h[I*i+I]?1:0;q+=b[v%t.minIterations*i+I]=j}if(0<q&&(v>=t.minIterations-1||v==t.maxIterations-1)){for(var W=0,N=0;N<i;N++){for(var U=m[N]=0;U<t.minIterations;U++)m[N]+=b[U*i+N];0!==m[N]&&m[N]!==t.minIterations||W++}if(W===i)break}}for(var D=Bae(i,h,d),G=Fae(i,a,D),V={},Y=0;Y<D.length;Y++)V[D[Y]]=[];for(var M=0;M<e.length;M++){var H=G[$[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]=B.collection(V[D[O]]);return X},"affinityPropagation"),zae=sue({root:void 0,directed:!(Dhe={affinityPropagation:Dhe,ap:Dhe})}),whe={hierholzer:mt(function(e){Ete(e)||(e={root:(r=arguments)[0],directed:r[1]});var a,s,t,r=zae(e),e=r.root,o=r.directed,l=!1,c=(e&&(t=(wte(e)?this.filter(e):e)[0].id()),{}),h={},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),c[n]=[],e.outgoers().forEach(function(e){e.isEdge()&&c[n].push(e.id())})):h[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),c[t]=[],e.connectedEdges().forEach(function(e){return c[t].push(e.id())})):h[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];c[n].length;)t=c[n].shift(),r=h[t][0],n!=(i=h[t][1])?(c[i]=c[i].filter(function(e){return e!=t}),n=i):o||n==r||(c[r]=c[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==c[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())),c)if(c[n].length)return i;i.found=!0,i.trail=this.spawn(d,!0)}return i},"hierholzer")},aue={hopcroftTarjanBiconnected:aue=mt(function(){var s=this,o={},l=0,c=0,h=[],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)})}),h.push(n)},"buildComponent"),g=mt(function(t,r,i){t===i&&(c+=1),o[r]={id:l,low:l++,cutVertex:!1};var n,a,e=s.getElementById(r).connectedEdges().intersection(s);0===e.size()?h.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||(c=0,g(e,e),o[e].cutVertex=1<c)}),Object.keys(o).filter(function(e){return o[e].cutVertex}).map(function(e){return s.getElementById(e)}));return{cut:s.spawn(e),components:h}},"hopcroftTarjanBiconnected"),htbc:aue,htb:aue,hopcroftTarjanBiconnectedComponents:aue},Hhe=mt(function(){var n=this,a={},s=0,o=[],l=[],c=n.spawn(n),h=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||h(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),c=c.difference(i)}},"stronglyConnectedSearch");return n.forEach(function(e){!e.isNode()||(e=e.id())in a||h(e)}),{cut:c,components:o}},"tarjanStronglyConnected"),qae={},[Bhe,gue,$he,Ohe,qce,She,Nhe,Zhe,nue,ee,ghe,Phe,Mhe,cue,Dhe,whe,aue,{tarjanStronglyConnected:Hhe,tsc:Hhe,tscc:Hhe,tarjanStronglyConnectedComponents:Hhe}].forEach(function(e){Kte(qae,e)}),(jae=mt(function(e){if(!(this instanceof jae))return new jae(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 Wae(this,1,"fulfillValue",e)},"fulfill"),reject:mt(function(e){return Wae(this,2,"rejectReason",e)},"reject"),then:mt(function(e,t){var r=new jae;return this.onFulfilled.push(Vae(e,r,"fulfill")),this.onRejected.push(Vae(t,r,"reject")),Uae(this),r.proxy},"then")},Wae=mt(function(e,t,r,i){return 0===e.state&&(e.state=t,e[r]=i,Uae(e)),e},"deliver"),Uae=mt(function(e){1===e.state?Gae(e,"onFulfilled",e.fulfillValue):2===e.state&&Gae(e,"onRejected",e.rejectReason)},"execute"),Gae=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"),Vae=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)}Yae(i,t)}}},"resolver"),Yae=mt(function(t,r){if(t===r||t.proxy===r)t.reject(new TypeError("cannot resolve promise with itself"));else{var e;if("object"===sQ(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")):Yae(t,e))},function(e){i||(i=!0,t.reject(e))})}catch(e){i||t.reject(e)}}else t.fulfill(r)}},"resolve"),jae.all=function(o){return new jae(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)})},jae.resolve=function(r){return new jae(function(e,t){e(r)})},jae.reject=function(r){return new jae(function(e,t){t(r)})},Hae=typeof Promise<"u"?Promise:jae,Xae=mt(function(e,t,r){var i=Dte(e),n=!i;(t=this._private=Kte({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&&Cte(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"),Bhe=Xae.prototype,Kte(Bhe,{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),Lte(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 Hae(function(e,t){r.push(function(){e()})})},"promise")}),Bhe.complete=Bhe.completed,Bhe.run=Bhe.play,Bhe.running=Bhe.playing,gue={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=Kte({},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=Bie(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&&Ete(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 Xae(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=Kte({},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(IQ,"requireIsArray"),mt(NQ,"require_isKey"),mt(DQ,"requireIsFunction"),mt(MQ,"require_coreJsData"),mt(OQ,"require_isMasked"),mt(PQ,"require_toSource"),mt(BQ,"require_baseIsNative"),mt($Q,"require_getValue"),mt(FQ,"require_getNative"),mt(zQ,"require_nativeCreate"),mt(qQ,"require_hashClear"),mt(jQ,"require_hashDelete"),mt(WQ,"require_hashGet"),mt(UQ,"require_hashHas"),mt(GQ,"require_hashSet"),mt(VQ,"require_Hash"),mt(YQ,"require_listCacheClear"),mt(HQ,"requireEq"),mt(XQ,"require_assocIndexOf"),mt(KQ,"require_listCacheDelete"),mt(ZQ,"require_listCacheGet"),mt(QQ,"require_listCacheHas"),mt(JQ,"require_listCacheSet"),mt(eJ,"require_ListCache"),mt(tJ,"require_Map"),mt(rJ,"require_mapCacheClear"),mt(iJ,"require_isKeyable"),mt(nJ,"require_getMapData"),mt(aJ,"require_mapCacheDelete"),mt(sJ,"require_mapCacheGet"),mt(oJ,"require_mapCacheHas"),mt(lJ,"require_mapCacheSet"),mt(cJ,"require_MapCache"),mt(hJ,"requireMemoize"),mt(uJ,"require_memoizeCapped"),mt(dJ,"require_stringToPath"),mt(pJ,"require_arrayMap"),mt(gJ,"require_baseToString"),mt(fJ,"requireToString"),mt(mJ,"require_castPath"),mt(yJ,"require_toKey"),mt(vJ,"require_baseGet"),mt(bJ,"requireGet"),$he=bJ(),Aoe=lQ($he),mt(xJ,"require_defineProperty"),mt(TJ,"require_baseAssignValue"),mt(kJ,"require_assignValue"),mt(wJ,"require_isIndex"),mt(CJ,"require_baseSet"),mt(SJ,"requireSet"),Ohe=SJ(),qoe=lQ(Ohe),mt(EJ,"require_copyArray"),mt(_J,"requireToPath"),qce=_J(),Voe=lQ(qce),She={data:mt(function(x){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 x=Kte({},e,x),mt(function(e,t){var r,i=x,n=this,a=void 0!==n.length,s=a?n:[n],o=a?n[0]:n;if(wte(e)){var l,c=-1!==e.indexOf(".")&&Voe(e);if(i.allowGetting&&void 0===t)return o&&(i.beforeGet(o),l=c&&void 0===o._private[i.field][e]?Aoe(o._private[i.field],c):o._private[i.field][e]),l;if(i.allowSetting&&void 0!==t&&!i.immutableKeys[e]){a=ZZ({},e,t),i.beforeSet(n,a);for(var h=0,u=s.length;h<u;h++){var d=s[h];i.canSet(d)&&(c&&void 0===o._private[i.field][e]?qoe(d._private[i.field],c,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&&Ete(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 b=s[v];i.canSet(b)&&(b._private[i.field][m]=y)}}i.updateStyle&&n.updateStyle(),i.onSet(n),i.settingTriggersEvent&&n[i.triggerFnName](i.settingEvent)}else if(i.allowBinding&&Cte(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=Kte({},{field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}},f),mt(function(e){var t=f,r=void 0!==this.length?this:[this];if(wte(e)){for(var i=e.split(/\s+/),n=i.length,a=0;a<n;a++){var s=i[a];if(!Pte(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 c=0,h=r.length;c<h;c++)for(var u=r[c]._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")},Nhe={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 Hae(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")},Yoe={},[gue,She,Nhe].forEach(function(e){Kte(Yoe,e)}),Zhe={animate:Yoe.animate(),animation:Yoe.animation(),animated:Yoe.animated(),clearQueue:Yoe.clearQueue(),delay:Yoe.delay(),delayAnimation:Yoe.delayAnimation(),stop:Yoe.stop()},(nue={classes:mt(function(e){var t;if(void 0===e)return t=[],this[0]._private.classes.forEach(function(e){return t.push(e)}),t;Ste(e)||(e=(e||"").match(/\S+/g)||[]);for(var r=[],i=new xie(e),n=0;n<this.length;n++){for(var a=this[n],s=a._private,o=s.classes,l=!1,c=0;c<e.length;c++){var h=e[c];if(!o.has(h)){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){Ste(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,c=0;c<e.length;c++){var h=e[c],u=o.has(h),d=!1;t||r&&!u?(o.add(h),d=!0):(!t||r&&u)&&(o.delete(h),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=nue.classNames=nue.classes,(Hoe={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:Yte,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"}).variable="(?:[\\w-.]|(?:\\\\"+Hoe.metaChar+"))+",Hoe.className="(?:[\\w-]|(?:\\\\"+Hoe.metaChar+"))+",Hoe.value=Hoe.string+"|"+Hoe.number,Hoe.id=Hoe.variable;for(var t,r=Hoe.comparatorOp.split("|"),n=0;n<r.length;n++)t=r[n],Hoe.comparatorOp+="|@"+t;for(r=Hoe.comparatorOp.split("|"),n=0;n<r.length;n++)0<=(t=r[n]).indexOf("!")||"="===t||(Hoe.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 h(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}Xoe=mt(function(){return{checks:[]}},"newQuery"),Koe={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},Zoe=[{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 Xte(e.selector,t.selector)}),Qoe=(()=>{for(var e,t={},r=0;r<Zoe.length;r++)t[(e=Zoe[r]).selector]=e.matches;return t})(),Joe=mt(function(e,t){return Qoe[e](t)},"stateSelectorMatches"),ee="("+Zoe.map(function(e){return e.selector}).join("|")+")",ele=mt(function(e){return e.replace(new RegExp("\\\\("+Hoe.metaChar+")","g"),function(e,t){return t})},"cleanMetaChars"),tle=mt(function(e,t,r){e[e.length-1]=r},"replaceLastQuery"),(rle=[{name:"group",query:!0,regex:"("+Hoe.group+")",populate:mt(function(e,t,r){r=rQ(r,1)[0],t.checks.push({type:Koe.GROUP,value:"*"===r?r:r+"s"})},"populate")},{name:"state",query:!0,regex:ee,populate:mt(function(e,t,r){r=rQ(r,1)[0],t.checks.push({type:Koe.STATE,value:r})},"populate")},{name:"id",query:!0,regex:"\\#("+Hoe.id+")",populate:mt(function(e,t,r){r=rQ(r,1)[0],t.checks.push({type:Koe.ID,value:ele(r)})},"populate")},{name:"className",query:!0,regex:"\\.("+Hoe.className+")",populate:mt(function(e,t,r){r=rQ(r,1)[0],t.checks.push({type:Koe.CLASS,value:ele(r)})},"populate")},{name:"dataExists",query:!0,regex:"\\[\\s*("+Hoe.variable+")\\s*\\]",populate:mt(function(e,t,r){r=rQ(r,1)[0],t.checks.push({type:Koe.DATA_EXIST,field:ele(r)})},"populate")},{name:"dataCompare",query:!0,regex:"\\[\\s*("+Hoe.variable+")\\s*("+Hoe.comparatorOp+")\\s*("+Hoe.value+")\\s*\\]",populate:mt(function(e,t,r){var i=(r=rQ(r,3))[0],n=r[1],r=r[2],r=null!=new RegExp("^"+Hoe.string+"$").exec(r)?r.substring(1,r.length-1):parseFloat(r);t.checks.push({type:Koe.DATA_COMPARE,field:ele(i),operator:n,value:r})},"populate")},{name:"dataBool",query:!0,regex:"\\[\\s*("+Hoe.boolOp+")\\s*("+Hoe.variable+")\\s*\\]",populate:mt(function(e,t,r){var i=(r=rQ(r,2))[0];t.checks.push({type:Koe.DATA_BOOL,field:ele(r[1]),operator:i})},"populate")},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+Hoe.meta+")\\s*("+Hoe.comparatorOp+")\\s*("+Hoe.number+")\\s*\\]\\]",populate:mt(function(e,t,r){var i=(r=rQ(r,3))[0],n=r[1],r=r[2];t.checks.push({type:Koe.META_COMPARE,field:ele(i),operator:n,value:parseFloat(r)})},"populate")},{name:"nextQuery",separator:!0,regex:Hoe.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++]=Xoe()},"populate")},{name:"directedEdge",separator:!0,regex:Hoe.directedEdge,populate:mt(function(e,t){var r,i,n;return null==e.currentSubject?(i=Xoe(),r=t,n=Xoe(),i.checks.push({type:Koe.DIRECTED_EDGE,source:r,target:n}),tle(e,t,i)):(r=Xoe(),i=t,n=Xoe(),r.checks.push({type:Koe.NODE_SOURCE,source:i,target:n}),tle(e,t,r)),e.edgeCount++,n},"populate")},{name:"undirectedEdge",separator:!0,regex:Hoe.undirectedEdge,populate:mt(function(e,t){var r,i,n;return null==e.currentSubject?(i=Xoe(),r=t,n=Xoe(),i.checks.push({type:Koe.UNDIRECTED_EDGE,nodes:[r,n]}),tle(e,t,i),e.edgeCount++):(r=Xoe(),i=t,n=Xoe(),r.checks.push({type:Koe.NODE_NEIGHBOR,node:i,neighbor:n}),tle(e,t,r)),n},"populate")},{name:"child",separator:!0,regex:Hoe.child,populate:mt(function(e,t){var r,i,n,a,s,o;return null==e.currentSubject?(o=Xoe(),a=Xoe(),r=e[e.length-1],o.checks.push({type:Koe.CHILD,parent:r,child:a}),tle(e,t,o),e.compoundCount++,a):e.currentSubject===t?(r=Xoe(),o=e[e.length-1],a=Xoe(),i=Xoe(),n=Xoe(),s=Xoe(),r.checks.push({type:Koe.COMPOUND_SPLIT,left:o,right:a,subject:i}),i.checks=t.checks,t.checks=[{type:Koe.TRUE}],s.checks.push({type:Koe.TRUE}),a.checks.push({type:Koe.PARENT,parent:s,child:n}),tle(e,o,r),e.currentSubject=i,e.compoundCount++,n):(a=Xoe(),s=Xoe(),o=[{type:Koe.PARENT,parent:a,child:s}],a.checks=t.checks,t.checks=o,e.compoundCount++,s)},"populate")},{name:"descendant",separator:!0,regex:Hoe.descendant,populate:mt(function(e,t){var r,i,n,a,s,o;return null==e.currentSubject?(o=Xoe(),a=Xoe(),r=e[e.length-1],o.checks.push({type:Koe.DESCENDANT,ancestor:r,descendant:a}),tle(e,t,o),e.compoundCount++,a):e.currentSubject===t?(r=Xoe(),o=e[e.length-1],a=Xoe(),i=Xoe(),n=Xoe(),s=Xoe(),r.checks.push({type:Koe.COMPOUND_SPLIT,left:o,right:a,subject:i}),i.checks=t.checks,t.checks=[{type:Koe.TRUE}],s.checks.push({type:Koe.TRUE}),a.checks.push({type:Koe.ANCESTOR,ancestor:s,descendant:n}),tle(e,o,r),e.currentSubject=i,e.compoundCount++,n):(a=Xoe(),s=Xoe(),o=[{type:Koe.ANCESTOR,ancestor:a,descendant:s}],a.checks=t.checks,t.checks=o,e.compoundCount++,s)},"populate")},{name:"subject",modifier:!0,regex:Hoe.subject,populate:mt(function(e,t){if(null!=e.currentSubject&&e.currentSubject!==t)return oie("Redefinition of subject in selector `"+e.toString()+"`"),!1;e.currentSubject=t,(e=null==(t=e[e.length-1].checks[0])?null:t.type)===Koe.DIRECTED_EDGE?t.type=Koe.NODE_TARGET:e===Koe.UNDIRECTED_EDGE&&(t.type=Koe.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)}),ile=mt(function(e){for(var t=0;t<rle.length;t++){var r=(o=rle[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"),nle=mt(function(e){var t=e.match(/^\s+/);return t&&(t=t[0],e=e.substring(t.length)),e},"consumeWhitespace"),ghe=mt(function(e){var t=this,r=t.inputText=e,i=t[0]=Xoe();for(t.length=1,r=nle(r);;){var n=ile(r);if(null==n.expr)return oie("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 oie("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(1<l.edgeCount)return oie("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===l.edgeCount&&oie("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"),Phe=mt(function(){if(null!=this.toStringCache)return this.toStringCache;for(var o=mt(function(e){return e??""},"clean"),l=mt(function(e){return wte(e)?'"'+e+'"':o(e)},"cleanVal"),c=mt(function(e){return" "+e+" "},"space"),a=mt(function(e,t){var r=e.type,i=e.value;switch(r){case Koe.GROUP:return(n=o(i)).substring(0,n.length-1);case Koe.DATA_COMPARE:return"["+e.field+c(o(e.operator))+l(i)+"]";case Koe.DATA_BOOL:var n=e.operator,a=e.field;return"["+o(n)+a+"]";case Koe.DATA_EXIST:return"["+e.field+"]";case Koe.META_COMPARE:return n=e.operator,"[["+e.field+c(o(n))+l(i)+"]]";case Koe.STATE:return i;case Koe.ID:return"#"+i;case Koe.CLASS:return"."+i;case Koe.PARENT:case Koe.CHILD:return h(e.parent,t)+c(">")+h(e.child,t);case Koe.ANCESTOR:case Koe.DESCENDANT:return h(e.ancestor,t)+" "+h(e.descendant,t);case Koe.COMPOUND_SPLIT:var a=h(e.left,t),n=h(e.subject,t),s=h(e.right,t);return a+(0<a.length?" ":"")+n+s;case Koe.TRUE:return""}},"checkToString"),h=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+=h(r,r.subject),1<this.length&&t<this.length-1&&(e+=", ")}return this.toStringCache=e},"toString"),Mhe={parse:ghe,toString:Phe},ale=mt(function(e,t,r){var i,n,a,s=wte(e),o=he(e),l=wte(r),c=!1,h=!1,u=!1;switch(0<=t.indexOf("!")&&(t=t.replace("!",""),h=!0),0<=t.indexOf("@")&&(t=t.replace("@",""),c=!0),(s||l||c)&&(n=s||o?""+e:"",a=""+r),c&&(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!h||null==e&&u?i:!i},"valCmp"),sle=mt(function(e,t){switch(t){case"?":return!!e;case"!":return!e;case"^":return void 0===e}},"boolCmp"),ole=mt(function(e){return void 0!==e},"existCmp"),lle=mt(function(e,t){return e.data(t)},"data"),cle=mt(function(e,t){return e[t]()},"meta"),hle=[],ule=mt(function(e,t){return e.checks.every(function(e){return hle[e.type](e,t)})},"matches"),hle[Koe.GROUP]=function(e,t){return"*"===(e=e.value)||e===t.group()},hle[Koe.STATE]=function(e,t){return e=e.value,Joe(e,t)},hle[Koe.ID]=function(e,t){return e=e.value,t.id()===e},hle[Koe.CLASS]=function(e,t){return e=e.value,t.hasClass(e)},hle[Koe.META_COMPARE]=function(e,t){var r=e.field,i=e.operator,e=e.value;return ale(cle(t,r),i,e)},hle[Koe.DATA_COMPARE]=function(e,t){var r=e.field,i=e.operator,e=e.value;return ale(lle(t,r),i,e)},hle[Koe.DATA_BOOL]=function(e,t){var r=e.field,e=e.operator;return sle(lle(t,r),e)},hle[Koe.DATA_EXIST]=function(e,t){return e=e.field,ole(lle(t,e))},hle[Koe.UNDIRECTED_EDGE]=function(e,t){var r=e.nodes[0],e=e.nodes[1],i=t.source(),t=t.target();return ule(r,i)&&ule(e,t)||ule(e,i)&&ule(r,t)},hle[Koe.NODE_NEIGHBOR]=function(t,e){return ule(t.node,e)&&e.neighborhood().some(function(e){return e.isNode()&&ule(t.neighbor,e)})},hle[Koe.DIRECTED_EDGE]=function(e,t){return ule(e.source,t.source())&&ule(e.target,t.target())},hle[Koe.NODE_SOURCE]=function(t,e){return ule(t.source,e)&&e.outgoers().some(function(e){return e.isNode()&&ule(t.target,e)})},hle[Koe.NODE_TARGET]=function(t,e){return ule(t.target,e)&&e.incomers().some(function(e){return e.isNode()&&ule(t.source,e)})},hle[Koe.CHILD]=function(e,t){return ule(e.child,t)&&ule(e.parent,t.parent())},hle[Koe.PARENT]=function(t,e){return ule(t.parent,e)&&e.children().some(function(e){return ule(t.child,e)})},hle[Koe.DESCENDANT]=function(t,e){return ule(t.descendant,e)&&e.ancestors().some(function(e){return ule(t.ancestor,e)})},hle[Koe.ANCESTOR]=function(t,e){return ule(t.ancestor,e)&&e.descendants().some(function(e){return ule(t.descendant,e)})},hle[Koe.COMPOUND_SPLIT]=function(e,t){return ule(e.subject,t)&&ule(e.left,t)&&ule(e.right,t)},hle[Koe.TRUE]=function(){return!0},hle[Koe.COLLECTION]=function(e,t){return e.value.has(t)},hle[Koe.FILTER]=function(e,t){return(0,e.value)(t)},cue=mt(function(e){var t,i=this;return 1===i.length&&1===i[0].checks.length&&i[0].checks[0].type===Koe.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(ule(r,e))return!0}return!1},"selectorFunction"),null==i.text()&&(t=mt(function(){return!0},"selectorFunction")),e.filter(t))},"filter"),Dhe=mt(function(e){for(var t=0;t<this.length;t++){var r=this[t];if(ule(r,e))return!0}return!1},"matches"),whe={matches:Dhe,filter:cue},dle=mt(function(e){this.inputText=e,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,null==e||wte(e)&&e.match(/^\s*$/)||(Lte(e)?this.addQuery({checks:[{type:Koe.COLLECTION,value:e.collection()}]}):Cte(e)?this.addQuery({checks:[{type:Koe.FILTER,value:e}]}):wte(e)?this.parse(e)||(this.invalid=!0):aie("A selector must be created from a string; found "))},"Selector"),ple=dle.prototype,[Mhe,whe].forEach(function(e){return Kte(ple,e)}),ple.text=function(){return this.inputText},ple.size=function(){return this.length},ple.eq=function(e){return this[e]},ple.sameText=function(e){return!this.invalid&&!e.invalid&&this.text()===e.text()},ple.addQuery=function(e){this[this.length++]=e},ple.selector=ple.toString,(aue={allAre:mt(function(e){var t=new dle(e);return this.every(function(e){return t.matches(e)})},"allAre"),is:mt(function(e){var t=new dle(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=aue.allAreNeighbors,aue.has=aue.contains,aue.equal=aue.equals=aue.same,Hhe=mt(function(s,o){return mt(function(e,t,r,i){var n,a=e;return null==a?n="":Lte(a)&&1===a.length&&(n=a.id()),1===this.length&&n?(a=(a=(a=this[0]._private).traversalCache=a.traversalCache||{})[o]=a[o]||[])[n=Yre(n)]||(a[n]=s.call(this,e,t,r,i)):s.call(this,e,t,r,i)},"traversalCache")},"cache"),Bhe={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:Hhe(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(AJ,"forEachCompound"),mt(RJ,"addChildren"),Bhe.forEachDown=function(e){return AJ(this,e,!(1<arguments.length&&void 0!==arguments[1])||arguments[1],RJ)},mt(LJ,"addParent"),Bhe.forEachUp=function(e){return AJ(this,e,!(1<arguments.length&&void 0!==arguments[1])||arguments[1],LJ)},mt(IJ,"addParentAndChildren"),Bhe.forEachUpAndDown=function(e){return AJ(this,e,!(1<arguments.length&&void 0!==arguments[1])||arguments[1],IJ)},Bhe.ancestors=Bhe.parents,(Ohe=$he={data:Yoe.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:Yoe.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Yoe.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Yoe.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Yoe.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Yoe.removeData({field:"rscratch",triggerEvent:!1}),id:mt(function(){var e=this[0];if(e)return e._private.data.id},"id")}).attr=Ohe.data,Ohe.removeAttr=Ohe.removeData,qce=$he,gue={},mt(NJ,"defineDegreeFunction"),Kte(gue,{degree:NJ(function(e,t){return t.source().same(t.target())?2:1}),indegree:NJ(function(e,t){return t.target().same(e)?1:0}),outdegree:NJ(function(e,t){return t.source().same(e)?1:0})}),mt(DJ,"defineDegreeBoundsFunction"),Kte(gue,{minDegree:DJ("degree",function(e,t){return e<t}),maxDegree:DJ("degree",function(e,t){return t<e}),minIndegree:DJ("indegree",function(e,t){return e<t}),maxIndegree:DJ("indegree",function(e,t){return t<e}),minOutdegree:DJ("outdegree",function(e,t){return e<t}),maxOutdegree:DJ("outdegree",function(e,t){return t<e})}),Kte(gue,{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")}),gle=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"),She={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){gle(e,t,!1)},"beforeSet"),onSet:mt(function(e){e.dirtyCompoundBoundsCache()},"onSet"),canSet:mt(function(e){return!e.locked()},"canSet")},(ee=Nhe={position:Yoe.data(She),silentPosition:Yoe.data(Kte({},She,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:mt(function(e,t){gle(e,t,!0)},"beforeSet"),onSet:mt(function(e){e.dirtyCompoundBoundsCache()},"onSet")})),positions:mt(function(e,t){if(Ete(e))t?this.silentPosition(e):this.position(e);else if(Cte(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(Ete(e)?(i={x:he(e.x)?e.x:0,y:he(e.y)?e.y:0},r=t):wte(e)&&he(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 Ete(e)?this.shift(e,!0):wte(e)&&he(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=Ete(e)?e:void 0,s=void 0!==a||void 0!==t&&wte(e);if(r&&r.isNode()){if(!s)return r=r.position(),a=Pie(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(Bie(a,i,n))}}else if(!s)return;return this},"renderedPosition"),relativePosition:mt(function(e,t){var r,i=this[0],n=this.cy(),a=Ete(e)?e:void 0,s=void 0!==a||void 0!==t&&wte(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 c=this[l],h=o?c.parent():null,u=((u=h&&0<h.length)&&(h=h[0]),u?h.position():{x:0,y:0});void 0!==t?c.position(e,t+u[e]):void 0!==a&&c.position({x:a.x+u.x,y:a.y+u.y})}}else if(!s)return;return this},"relativePosition")}).modelPosition=ee.point=ee.position,ee.modelPositions=ee.points=ee.positions,ee.renderedPoint=ee.renderedPosition,ee.relativePoint=ee.relativePosition,ghe=Nhe,Dhe=Phe={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 c(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 h(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(c,"computeBiasValues"),mt(h,"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=c(r.width.val-i.w,s,a)).biasDiff,s=s.biasComplementDiff,o=(l=c(r.height.val-i.h,l,o)).biasDiff,l=l.biasComplementDiff,t.autoPadding=h(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)}}},fle=mt(function(e){return e===1/0||e===-1/0?0:e},"noninf"),mle=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"),yle=mt(function(e,t){return null==t?e:mle(e,t.x1,t.y1,t.x2,t.y2)},"updateBoundsFromBox"),vle=mt(function(e,t,r){return yie(e,t,r)},"prefixedProperty"),ble=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,ane(s,1),mle(e,s.x1,s.y1,s.x2,s.y2)))},"updateBoundsFromArrow"),xle=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=vle(n,"labelWidth",r),l=vle(n,"labelHeight",r),c=vle(n,"labelX",r),h=vle(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,b=m/2;if(d)C=c-v,S=c+v,E=h-b,_=h+b;else{switch(a.value){case"left":C=c-y,S=c;break;case"center":C=c-v,S=c+v;break;case"right":S=(C=c)+y}switch(s.value){case"top":E=h-m,_=h;break;case"center":E=h-b,_=h+b;break;case"bottom":_=(E=h)+m}}if(C+=l=n-Math.max(g,f)-t-2,S+=o=n+Math.max(g,f)+t+2,E+=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=E,t.x2=S,t.y2=_,t.w=S-C,t.h=_-E,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?vle(i.rstyle,"labelAngle",r):p.pfValue,x=Math.cos(n),T=Math.sin(n),k=(C+S)/2,w=(E+_)/2;if(!d){switch(a.value){case"left":k=S;break;case"right":k=C}switch(s.value){case"top":w=_;break;case"bottom":w=E}}var u=(t=mt(function(e,t){return{x:(e-=k)*x-(t-=w)*T+k,y:e*T+t*x+w}},"rotate"))(C,E),o=t(C,_),l=t(S,E),r=t(S,_),C=Math.min(u.x,o.x,l.x,r.x),S=Math.max(u.x,o.x,l.x,r.x),E=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=E,n.x2=S,n.y2=_,n.w=S-C,n.h=_-E,mle(e,C,E,S,_),mle(i.labelBounds.all,C,E,S,_)}return e}},"updateBoundsFromLabel"),Tle=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,kle(e,t,r,i,"outside",i/2))},"updateBoundsFromOutline"),kle=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),yle(e,n)):null!=a&&0<a&&sne(e,[a,a,a,a]))},"updateBoundsFromMiter"),wle=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,kle(e,t,r,i,n))},"updateBoundsFromMiterBorder"),Cle=mt(function(e,t){var r=(i=e._private.cy).styleEnabled(),i=i.headless(),n=ene(),a=e._private,s=e.isNode(),o=e.isEdge(),l=a.rstyle,c=s&&r?e.pstyle("bounds-expansion").pfValue:[0],h=mt(function(e){return"none"!==e.pstyle("display").value},"isDisplayed");if(h=!r||h(e)&&(!o||h(e.source())&&h(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;mle(n,y=s-g,b=d-f,v=s+g,x=d+f),r&&Tle(n,e),r&&t.includeOutlines&&!i&&Tle(n,e),r&&wle(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),b=Math.min(l.srcY,l.midY,l.tgtY),x=Math.max(l.srcY,l.midY,l.tgtY);if(mle(n,y-=p,b-=p,v+=p,x+=p),"haystack"===s)(g=l.haystackPts)&&2===g.length&&(y=g[0].x,b=g[0].y,(v=g[1].x)<y&&(d=y,y=v,v=d),(x=g[1].y)<b&&(f=b,b=x,x=f),mle(n,y-p,b-p,v+p,x+p));else if("bezier"===s||"unbundled-bezier"===s||Vte(s,"segments")||Vte(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;mle(n,y,b=k.y-p,v=k.x+p,x=k.y+p)}}}else i=e.source().position(),d=e.target().position(),y=i.x,v=d.x,b=i.y,v<y&&(g=y,y=v,v=g),(x=d.y)<b&&(f=b,b=x,x=f),mle(n,y-=p,b-=p,v+=p,x+=p);r&&t.includeEdges&&o&&(ble(n,e,"mid-source"),ble(n,e,"mid-target"),ble(n,e,"source"),ble(n,e,"target")),r&&"yes"===e.pstyle("ghost").value&&(s=e.pstyle("ghost-offset-x").pfValue,i=e.pstyle("ghost-offset-y").pfValue,mle(n,n.x1+s,n.y1+i,n.x2+s,n.y2+i)),g=a.bodyBounds=a.bodyBounds||{},one(g,n),sne(g,c),ane(g,1),r&&(y=n.x1,v=n.x2,b=n.y1,x=n.y2,mle(n,y-u,b-u,v+u,x+u)),d=a.overlayBounds=a.overlayBounds||{},one(d,n),sne(d,c),ane(d,1),null!=(f=a.labelBounds=a.labelBounds||{}).all?rne(f.all):f.all=ene(),r&&t.includeLabels&&(t.includeMainLabels&&xle(n,e,null),o)&&(t.includeSourceLabels&&xle(n,e,"source"),t.includeTargetLabels)&&xle(n,e,"target")}return n.x1=fle(n.x1),n.y1=fle(n.y1),n.x2=fle(n.x2),n.y2=fle(n.y2),n.w=fle(n.x2-n.x1),n.h=fle(n.y2-n.y1),0<n.w&&0<n.h&&h&&(sne(n,c),ane(n,1)),n},"boundingBoxImpl"),Sle=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"),Ele=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(),Vre([i(r.x),i(r.y),i(t.x),i(t.y)])):(r=e.position(),Vre([i(r.x),i(r.y)]))},"getBoundingBoxPosKey"),_le=mt(function(e,t){var r,i=e._private,n=e.isEdge(),a=(null==t?Rle:Sle(t))===Rle;return null==i.bbCache?(r=Cle(e,Ale),i.bbCache=r,i.bbCachePosKey=Ele(e)):r=i.bbCache,a||(a=e.isNode(),r=ene(),(t.includeNodes&&a||t.includeEdges&&!a)&&(t.includeOverlays?yle(r,i.overlayBounds):yle(r,i.bodyBounds)),t.includeLabels&&(t.includeMainLabels&&(!n||t.includeSourceLabels&&t.includeTargetLabels)?yle(r,i.labelBounds.all):(t.includeMainLabels&&yle(r,i.labelBounds.mainRot),t.includeSourceLabels&&yle(r,i.labelBounds.sourceRot),t.includeTargetLabels&&yle(r,i.labelBounds.targetRot))),r.w=r.x2-r.x1,r.h=r.y2-r.y1),r},"cachedBoundingBoxImpl"),Rle=Sle(Ale={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0}),Lle=sue(Ale),Phe.boundingBox=function(e){var t=void 0===e||void 0===e.useCache||!0===e.useCache,r=qte(function(e){var t=e._private;return null==t.bbCache||t.styleDirty||t.bbCachePosKey!==Ele(e)},function(e){return e.id()});if(t&&1===this.length&&!r(this[0]))e=void 0===e?Ale:Lle(e),i=_le(this[0],e);else{var i=ene(),n=Lle(e=e||Ale),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(),yle(i,_le(s,n))}}return i.x1=fle(i.x1),i.y1=fle(i.y1),i.x2=fle(i.x2),i.y2=fle(i.y2),i.w=fle(i.x2-i.x1),i.h=fle(i.y2-i.y1),i},Phe.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},Phe.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)),Ete(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)),tne(this.boundingBox({useCache:!1})));return t.silentPositions(o),n&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0)),i.endBatch(),s},Dhe.boundingbox=Dhe.bb=Dhe.boundingBox,Dhe.renderedBoundingbox=Dhe.renderedBoundingBox,cue=Phe,Ile=Mhe={},(whe=mt(function(i){i.uppercaseName=Gte(i.name),i.autoName="auto"+i.uppercaseName,i.labelName="label"+i.uppercaseName,i.outerName="outer"+i.uppercaseName,i.uppercaseOuterName=Gte(i.outerName),Ile[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"),Ile["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"),Ile["rendered"+i.uppercaseName]=mt(function(){var e=this[0];if(e)return e[i.name]()*this.cy().zoom()},"renderedDimImpl"),Ile["rendered"+i.uppercaseOuterName]=mt(function(){var e=this[0];if(e)return e[i.outerName]()*this.cy().zoom()},"renderedOuterDimImpl")},"defineDimFns"))({name:"width"}),whe({name:"height"}),Mhe.padding=function(){var e=this[0],t=e._private;return e.isParent()&&(e.updateCompoundBounds(),void 0!==t.autoPadding)?t.autoPadding:e.pstyle("padding").pfValue},Mhe.paddedHeight=function(){var e=this[0];return e.height()+2*e.padding()},Mhe.paddedWidth=function(){var e=this[0];return e.width()+2*e.padding()},Ohe=Mhe,Nle=mt(function(e,t){if(e.isEdge()&&e.takesUpSpace())return t(e)},"ifEdge"),Dle=mt(function(e,t){var r;if(e.isEdge()&&e.takesUpSpace())return r=e.cy(),Pie(t(e),r.zoom(),r.pan())},"ifEdgeRenderedPosition"),Mle=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 Pie(e,n,i)})},"ifEdgeRenderedPositions"),$he=mt(function(e){return e.renderer().getControlPoints(e)},"controlPoints"),She=mt(function(e){return e.renderer().getSegmentPoints(e)},"segmentPoints"),ee=mt(function(e){return e.renderer().getSourceEndpoint(e)},"sourceEndpoint"),Nhe=mt(function(e){return e.renderer().getTargetEndpoint(e)},"targetEndpoint"),Dhe=mt(function(e){return e.renderer().getEdgeMidpoint(e)},"midpoint"),Ole={controlPoints:{get:$he,mult:!0},segmentPoints:{get:She,mult:!0},sourceEndpoint:{get:ee},targetEndpoint:{get:Nhe},midpoint:{get:Dhe}},Ple=mt(function(e){return"rendered"+e[0].toUpperCase()+e.substr(1)},"renderedName"),Phe=Object.keys(Ole).reduce(function(e,t){var r=Ole[t],i=Ple(t);return e[t]=function(){return Nle(this,r.get)},r.mult?e[i]=function(){return Mle(this,r.get)}:e[i]=function(){return Dle(this,r.get)},e},{}),whe=Kte({},ghe,cue,Ohe,Phe),Ble=mt(function(e,t){this.recycle(e,t)},"Event"),mt(MJ,"returnFalse"),mt(OJ,"returnTrue"),Ble.prototype={instanceString:mt(function(){return"event"},"instanceString"),recycle:mt(function(e,t){var r,i;this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=MJ,null!=e&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?OJ:MJ):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=OJ;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},"preventDefault"),stopPropagation:mt(function(){this.isPropagationStopped=OJ;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},"stopPropagation"),stopImmediatePropagation:mt(function(){this.isImmediatePropagationStopped=OJ,this.stopPropagation()},"stopImmediatePropagation"),isDefaultPrevented:MJ,isPropagationStopped:MJ,isImmediatePropagationStopped:MJ},$le=/^([^.]+)(\.(?:[^.]+))?$/,Fle={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},zle=Object.keys(Fle),qle={},mt(PJ,"Emitter"),Mhe=PJ.prototype,jle=mt(function(e,t,r,i,n,a,s){Cte(i)&&(n=i,i=null),s&&(a=null==a?s:Kte({},a,s));for(var o=Ste(r)?r:r.split(/\s+/),l=0;l<o.length;l++){var c=o[l];if(!Pte(c)){var h=c.match($le);if(h&&!1===t(e,c,h[1],h[2]||null,i,n,a))break}}},"forEachEvent"),Wle=mt(function(e,t){return e.addEventFields(e.context,t),new Ble(t.type,t)},"makeEventObj"),Ule=mt(function(e,t,r){if(Ote(r))t(e,r);else if(Ete(r))t(e,Wle(e,r));else for(var i=Ste(r)?r:r.split(/\s+/),n=0;n<i.length;n++){var a,s=i[n];Pte(s)||(s=s.match($le))&&(a=s[1],s=s[2]||null,t(e,Wle(e,{type:a,namespace:s,target:e.context})))}},"forEachEventObj"),Mhe.on=Mhe.addListener=function(e,t,r,i,n){return jle(this,function(e,t,r,i,n,a,s){Cte(a)&&e.listeners.push({event:t,callback:a,type:r,namespace:i,qualifier:n,conf:s})},e,t,r,i,n),this},Mhe.one=function(e,t,r,i){return this.on(e,t,r,i,{one:!0})},Mhe.removeListener=Mhe.off=function(l,e,t,r){var i=this;0!==this.emitting&&(this.listeners=hie(this.listeners));for(var c=this.listeners,n=mt(function(s){var o=c[s];jle(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 c.splice(s,1),!1},l,e,t,r)},"_loop"),a=c.length-1;0<=a;a--)n(a);return this},Mhe.removeAllListeners=function(){return this.removeListener("*")},Mhe.emit=Mhe.trigger=function(e,s,t){var o=this.listeners,r=o.length;return this.emitting++,Ste(s)||(s=[s]),Ule(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&&mie(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},Gle={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&&Ite(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")},Vle=mt(function(e){return wte(e)?new dle(e):e},"argSelector"),$he={createEmitter:mt(function(){for(var e=0;e<this.length;e++){var t=this[e],r=t._private;r.emitter||(r.emitter=new PJ(Gle,t))}return this},"createEmitter"),emitter:mt(function(){return this._private.emitter},"emitter"),on:mt(function(e,t,r){for(var i=Vle(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=Vle(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=Vle(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=Vle(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")},Yoe.eventAliasesOn($he),She={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(wte(e)||Lte(e))return new dle(e).filter(this);if(Cte(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){wte(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(wte(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=(wte(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=(wte(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;wte(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){wte(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){wte(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")},(ee=She).u=ee["|"]=ee["+"]=ee.union=ee.or=ee.add,ee["\\"]=ee["!"]=ee["-"]=ee.difference=ee.relativeComplement=ee.subtract=ee.not,ee.n=ee["&"]=ee["."]=ee.and=ee.intersection=ee.intersect,ee["^"]=ee["(+)"]=ee["(-)"]=ee.symmetricDifference=ee.symdiff=ee.xor,ee.fnFilter=ee.filterFn=ee.stdFilter=ee.filter,ee.complement=ee.abscomp=ee.absoluteComplement,Nhe={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")},Yle=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?eie: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"),(Hle={forEach:mt(function(e,t){if(Cte(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 Cte(e)?(e=this.toArray().sort(e),this.spawn(e)):this},"sort"),sortByZIndex:mt(function(){return this.sort(Yle)},"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:eie-1):(r=t.source,e=t.target,t=r.zDepth(),r=e.zDepth(),Math.max(t,r,0))},"zDepth")}).each=Hle.forEach,mt(function(){"undefined"!=("u"<typeof Symbol?"undefined":sQ(Symbol))&&"undefined"!=sQ(Symbol.iterator)&&(Hle[Symbol.iterator]=function(){var e=this,t={value:void 0,done:!1},r=0,i=this.length;return ZZ({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")(),Xle=sue({nodeDimensionsIncludeLabels:!1}),(Dhe={layoutDimensions:mt(function(e){return e=Xle(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=qte(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")),c=i.spacingFactor&&1!==i.spacingFactor,h=mt(function(){if(!c)return null;for(var e=ene(),t=0;t<n.length;t++){var r=n[t],r=o(r,t);nne(e,r.x,r.y)}return e},"spacingBb")(),u=qte(function(e,t){var r,t=o(e,t);return c&&(r=Math.abs(i.spacingFactor),t=l(r,h,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}),Hae.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(Kte({},e,{eles:this}))},"layout")}).createLayout=Dhe.makeLayout=Dhe.layout,mt(BJ,"styleCache"),mt($J,"cacheStyleFunction"),mt(FJ,"cachePrototypeStyleFunction"),ghe={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(Ete(e))i.applyBypass(this,e,!1),this.emitAndNotify("style");else if(wte(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(zJ,"checkCompound"),mt(qJ,"defineDerivedStateFunction"),Kle=$J("eleTakesUpSpace",function(e){return"element"===e.pstyle("display").value&&0!==e.width()&&(!e.isNode()||0!==e.height())}),ghe.takesUpSpace=FJ("takesUpSpace",qJ({ok:Kle})),cue=$J("eleInteractive",function(e){return"yes"===e.pstyle("events").value&&"visible"===e.pstyle("visibility").value&&Kle(e)}),Ohe=$J("parentInteractive",function(e){return"visible"===e.pstyle("visibility").value&&Kle(e)}),ghe.interactive=FJ("interactive",qJ({ok:cue,parentOk:Ohe,edgeOkViaNode:Kle})),ghe.noninteractive=function(){var e=this[0];if(e)return!e.interactive()},Phe=$J("eleVisible",function(e){return"visible"===e.pstyle("visibility").value&&0!==e.pstyle("opacity").pfValue&&Kle(e)}),Mhe=Kle,ghe.visible=FJ("visible",qJ({ok:Phe,edgeOkViaNode:Mhe})),ghe.hidden=function(){var e=this[0];if(e)return!e.visible()},ghe.isBundledBezier=FJ("isBundledBezier",function(){return!!this.cy().styleEnabled()&&!this.removed()&&"bezier"===this.pstyle("curve-style").value&&this.takesUpSpace()}),ghe.bypass=ghe.css=ghe.style,ghe.renderedCss=ghe.renderedStyle,ghe.removeBypass=ghe.removeCss=ghe.removeStyle,ghe.pstyle=ghe.parsedStyle,Zle={},mt(jJ,"defineSwitchFunction"),mt(WJ,"defineSwitchSet"),WJ({field:"locked",overrideField:mt(function(e){return!!e.cy().autolock()||void 0},"overrideField"),on:"lock",off:"unlock"}),WJ({field:"grabbable",overrideField:mt(function(e){return!e.cy().autoungrabify()&&!e.pannable()&&void 0},"overrideField"),on:"grabify",off:"ungrabify"}),WJ({field:"selected",ableField:"selectable",overrideAble:mt(function(e){return!e.cy().autounselectify()&&void 0},"overrideAble"),on:"select",off:"unselect"}),WJ({field:"selectable",overrideField:mt(function(e){return!e.cy().autounselectify()&&void 0},"overrideField"),on:"selectify",off:"unselectify"}),Zle.deselect=Zle.unselect,Zle.grabbed=function(){var e=this[0];if(e)return e._private.grabbed},WJ({field:"active",on:"activate",off:"unactivate"}),WJ({field:"pannable",on:"panify",off:"unpanify"}),Zle.inactive=function(){var e=this[0];if(e)return!e._private.active},ee={},cue=mt(function(c){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(c.noIncomingEdges&&l===i&&o!==i||c.noOutgoingEdges&&o===i&&l!==i){n=!0;break}}n||t.push(i)}}return this.spawn(t,!0).filter(e)},"dagExtremityImpl")},"defineDagExtremity"),Ohe=mt(function(c){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();c.outgoing&&o===i?(t.push(s),t.push(l)):c.incoming&&l===i&&(t.push(s),t.push(o))}}return this.spawn(t,!0).filter(e)}},"defineDagOneHop"),Phe=mt(function(c){return function(e){for(var t=this,r=[],i={};;){var n=c.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"),ee.clearTraversalCache=function(){for(var e=0;e<this.length;e++)this[e]._private.traversalCache=null},Kte(ee,{roots:cue({noIncomingEdges:!0}),leaves:cue({noOutgoingEdges:!0}),outgoers:Hhe(Ohe({outgoing:!0}),"outgoers"),successors:Phe({outgoing:!0}),incomers:Hhe(Ohe({incoming:!0}),"incomers"),predecessors:Phe({})}),Kte(ee,{neighborhood:Hhe(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(),c=o.target();0<(c=n===l?c:l).length&&t.push(c[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")}),ee.neighbourhood=ee.neighborhood,ee.closedNeighbourhood=ee.closedNeighborhood,ee.openNeighbourhood=ee.openNeighborhood,Kte(ee,{source:Hhe(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:Hhe(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:UJ({attr:"source"}),targets:UJ({attr:"target"})}),mt(UJ,"defineSourceFunction"),Kte(ee,{edgesWith:Hhe(GJ(),"edgesWith"),edgesTo:Hhe(GJ({thisIsSrc:!0}),"edgesTo")}),mt(GJ,"defineEdgesWithFunction"),Kte(ee,{connectedEdges:Hhe(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:Hhe(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:Hhe(VJ(),"parallelEdges"),codirectedEdges:Hhe(VJ({codirected:!0}),"codirectedEdges")}),mt(VJ,"defineParallelEdgesFunction"),Kte(ee,{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")}),ee.componentsOf=ee.components,Qle=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)aie("A collection must have a reference to the core");else{var n=new bie,a=!1;if(t){if(0<t.length&&Ete(t[0])&&!Ite(t[0])){for(var a=!0,s=[],o=new xie,l=0,c=t.length;l<c;l++){var h=t[l],u=(null==h.data&&(h.data={}),h.data);if(null==u.id)u.id=uie();else if(e.hasElementWithId(u.id)||o.has(u.id))continue;h=new Tie(e,h,!1),s.push(h),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 bie,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"),(Jle=Tie.prototype=Qle.prototype=Object.create(Array.prototype)).instanceString=function(){return"collection"},Jle.spawn=function(e,t){return new Qle(this.cy(),e,t)},Jle.spawnSelf=function(){return this.spawn(this)},Jle.cy=function(){return this._private.cy},Jle.renderer=function(){return this._private.cy.renderer()},Jle.element=function(){return this[0]},Jle.collection=function(){return Nte(this)?this:new Qle(this._private.cy,[this])},Jle.unique=function(){return new Qle(this._private.cy,this,!0)},Jle.hasElementWithId=function(e){return this._private.map.has(e=""+e)},Jle.getElementById=function(e){var t=this._private.cy;return(e=this._private.map.get(e=""+e))?e.ele:new Qle(t)},Jle.$id=Jle.getElementById,Jle.poolIndex=function(){var e=this._private.cy._private.elements,t=this[0]._private.data.id;return e._private.map.get(t).index},Jle.indexOf=function(e){return e=e[0]._private.data.id,this._private.map.get(e).index},Jle.indexOfId=function(e){return this._private.map.get(e=""+e).index},Jle.json=function(n){var a,e,t,r,i,s,o,l,c=this.element(),h=this.cy();return null==c&&n?this:null!=c?(a=c._private,Ete(n)?(h.startBatch(),n.data&&(c.data(n.data),e=a.data,c.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&&(c=c.move(t))):(r="parent"in n.data,i=n.data.parent,!r||null==i&&null==e.parent||i==e.parent||(c=c.move({parent:i=null!=(i=void 0===i?null:i)?""+i:i})))),n.position&&c.position(n.position),(s=mt(function(e,t,r){var i=n[e];null!=i&&i!==a[e]&&(i?c[t]():c[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&&c.classes(n.classes),h.endBatch(),this):void 0===n?((o={data:cie(a.data),position:cie(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},Jle.jsons=function(){for(var e=[],t=0;t<this.length;t++){var r=this[t].json();e.push(r)}return e},Jle.clone=function(){for(var e=this.cy(),t=[],r=0;r<this.length;r++){var i=this[r].json(),i=new Tie(e,i,!1);t.push(i)}return new Qle(e,t)},Jle.copy=Jle.clone,Jle.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 c=n.concat(a),h=mt(function(){c.splice(u,1),u--},"removeFromElements"),u=0;u<c.length;u++){var d=c[u],p=d._private,g=p.data;if(d.clearTraversalCache(),t||p.removed)if(void 0===g.id)g.id=uie();else if(he(g.id))g.id=""+g.id;else{if(Pte(g.id)||!wte(g.id)){aie("Can not create element with invalid string ID `"+g.id+"`"),h();continue}if(r.hasElementWithId(g.id)){aie("Can not create second element with ID `"+g.id+"`"),h();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,b=!1,x=0;x<v;x++){var T=y[x],k=g[T];null==(k=he(k)?g[T]=""+g[T]:k)||""===k?(aie("Can not create edge `"+f+"` with unspecified "+T),b=!0):r.hasElementWithId(k)||(aie("Can not create edge `"+f+"` with nonexistant "+T+" `"+k+"`"),b=!0)}if(b){h();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 bie,p.map.set(f,{ele:d,index:0}),p.removed=!1,t&&r.addToPool(d)}for(var S=0;S<n.length;S++){var E=n[S],_=E._private.data,A=(he(_.parent)&&(_.parent=""+_.parent),_.parent);if(null!=A||E._private.parent)if((A=E._private.parent?r.collection().merge(E._private.parent):r.getElementById(A)).empty())_.parent=void 0;else if(A[0].removed())oie("Node added with missing parent, reference to parent removed"),_.parent=void 0,E._private.parent=null;else{for(var R=!1,L=A;!L.empty();){if(E.same(L)){R=!0,_.parent=void 0;break}L=L.parent()}R||(A[0]._private.children.push(E),E._private.parent=A[0],i.hasCompoundNodes=!0)}}if(0<c.length){for(var I=c.length===this.length?this:new Qle(r,c),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},Jle.removed=function(){var e=this[0];return e&&e._private.removed},Jle.inside=function(){var e=this[0];return e&&!e._private.removed},Jle.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,c=this.length;l<c;l++)o(this[l]);function h(e,t){var r=e._private.edges;gie(r,t),e.clearTraversalCache()}function u(e){e.clearTraversalCache()}mt(h,"removeEdgeRef"),mt(u,"removeParallelRef");var d=[];function p(e,t){t=t[0];var r=(e=e[0])._private.children,i=e.id();gie(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];h(m,f),h(y,f);for(var v=f.parallelEdges(),b=0;b<v.length;b++){var x=v[b];u(x),x.isBundledBezier()&&x.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 Qle(this.cy(),i);0<w.size()&&(e?w.emitAndNotify("remove"):r&&w.emit("remove"));for(var C=0;C<d.length;C++){var S=d[C];r&&S.removed()||S.updateStyle()}return w},Jle.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},[qae,Zhe,nue,aue,Bhe,qce,gue,whe,$he,She,Nhe,Hle,Dhe,ghe,Zle,ee].forEach(function(e){Kte(Jle,e)}),Mhe={add:mt(function(e){if(Lte(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 Qle(this,r)}}else if(Ste(e))var a=new Qle(this,e);else if(Ete(e)&&(Ste(e.nodes)||Ste(e.edges))){for(var s=e,o=[],l=["nodes","edges"],c=0,h=l.length;c<h;c++){var u=l[c],d=s[u];if(Ste(d))for(var p=0,g=d.length;p<g;p++){var f=Kte({group:u},d[p]);o.push(f)}}a=new Qle(this,o)}else a=new Tie(this,e).collection();return a},"add"),remove:mt(function(e){var t;return Lte(e)||wte(e)&&(t=e,e=this.$(t)),e.remove()},"remove")},mt(YJ,"generateCubicBezier"),mt(o,"springAccelerationForState"),mt(l,"springEvaluateStateWithDerivative"),mt(h,"springIntegrateState"),ece=mt(function e(t,r,i){var n,a,s,o={x:-1,v:0,tension:null,friction:null},l=[0],c=0;for(t=parseFloat(t)||500,r=parseFloat(r)||20,i=i||null,o.tension=t,o.friction=r,a=(n=null!==i)?(c=e(t,r))/i*.016:.016;s=h(s||o,a),l.push(1+s.x),c+=16,1e-4<Math.abs(s.x)&&1e-4<Math.abs(s.v););return n?function(e){return l[e*(l.length-1)|0]}:c},"springRK4Factory"),cue=mt(function(e,t,r,i){var n=YJ(e,t,r,i);return function(e,t,r){return e+(t-e)*n(r)}},"cubicBezier"),tce={linear:mt(function(e,t,r){return e+(t-e)*r},"linear"),ease:cue(.25,.1,.25,1),"ease-in":cue(.42,0,1,1),"ease-out":cue(0,0,.58,1),"ease-in-out":cue(.42,0,.58,1),"ease-in-sine":cue(.47,0,.745,.715),"ease-out-sine":cue(.39,.575,.565,1),"ease-in-out-sine":cue(.445,.05,.55,.95),"ease-in-quad":cue(.55,.085,.68,.53),"ease-out-quad":cue(.25,.46,.45,.94),"ease-in-out-quad":cue(.455,.03,.515,.955),"ease-in-cubic":cue(.55,.055,.675,.19),"ease-out-cubic":cue(.215,.61,.355,1),"ease-in-out-cubic":cue(.645,.045,.355,1),"ease-in-quart":cue(.895,.03,.685,.22),"ease-out-quart":cue(.165,.84,.44,1),"ease-in-out-quart":cue(.77,0,.175,1),"ease-in-quint":cue(.755,.05,.855,.06),"ease-out-quint":cue(.23,1,.32,1),"ease-in-out-quint":cue(.86,0,.07,1),"ease-in-expo":cue(.95,.05,.795,.035),"ease-out-expo":cue(.19,1,.22,1),"ease-in-out-expo":cue(1,0,0,1),"ease-in-circ":cue(.6,.04,.98,.335),"ease-out-circ":cue(.075,.82,.165,1),"ease-in-out-circ":cue(.785,.135,.15,.86),spring:mt(function(e,t,r){var i;return 0===r?tce.linear:(i=ece(e,t,r),function(e,t,r){return e+(t-e)*i(r)})},"spring"),"cubic-bezier":cue},mt(HJ,"getEasedValue"),mt(XJ,"getValue"),mt(KJ,"ease"),mt(ZJ,"step$1"),mt(QJ,"valid"),mt(JJ,"startAnimation"),mt(eee,"stepAll"),Ohe={animate:Yoe.animate(),animation:Yoe.animation(),animated:Yoe.animated(),clearQueue:Yoe.clearQueue(),delay:Yoe.delay(),delayAnimation:Yoe.delayAnimation(),stop:Yoe.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&&$re(mt(function(e){eee(e,r),t()},"animationStep"))}r._private.animationsRunning=!0,r.styleEnabled()&&(mt(t,"headlessStep"),(e=r.renderer())&&e.beforeRender?e.beforeRender(mt(function(e,t){eee(t,r)},"rendererAnimationStep"),e.beforeRenderPriorities.animations):t())},"startAnimationLoop")},rce={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&&Ite(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")},ice=mt(function(e){return wte(e)?new dle(e):e},"argSelector"),Phe={createEmitter:mt(function(){var e=this._private;return e.emitter||(e.emitter=new PJ(rce,this)),this},"createEmitter"),emitter:mt(function(){return this._private.emitter},"emitter"),on:mt(function(e,t,r){return this.emitter().on(e,ice(t),r),this},"on"),removeListener:mt(function(e,t,r){return this.emitter().removeListener(e,ice(t),r),this},"removeListener"),removeAllListeners:mt(function(){return this.emitter().removeAllListeners(),this},"removeAllListeners"),one:mt(function(e,t,r){return this.emitter().one(e,ice(t),r),this},"one"),once:mt(function(e,t,r){return this.emitter().one(e,ice(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")},Yoe.eventAliasesOn(Phe),(Hhe={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=Hhe.jpg,(Zhe={layout:mt(function(e){if(null==e)aie("Layout options must be specified to make a layout");else if(null==e.name)aie("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=wte(e.eles)?this.$(e.eles):null!=e.eles?e.eles:this.$(),new i(Kte({},e,{cy:this,eles:t}));aie("No such layout `"+r+"` found. Did you forget to import it and `cytoscape.use()` it?")}},"layout")}).createLayout=Zhe.makeLayout=Zhe.layout,nue={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")},nce=sue({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]}),(aue={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?aie("Can not initialise: No such renderer `".concat(e.name,"` found. Did you forget to import it and `cytoscape.use()` it?")):(void 0!==e.wheelSensitivity&&oie("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=nce(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=aue.resize,(Bhe={collection:mt(function(e,t){return wte(e)?this.$(e):Lte(e)?e.collection():Ste(e)?new Qle(this,e,(t=t||{}).unique,t.removed):new Qle(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=Bhe.filter=Bhe.$,qce={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],c="t"===e[o],h="t"===t[o],u=0<l.mappedProperties.length;if((c=c!=h)||h&&u){var d=void 0;c&&u||c?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],c=r.pstyle(o);if(!l){if(!c)continue;l=c.bypass?{name:o,deleteBypassed:!0}:{name:o,delete:!0}}if(c!==l){if(l.mapped===a.fn&&null!=c&&null!=c.mapping&&c.mapping.value===l.value){var h=c.mapping;if((h.fnValue=l.value(r))===h.prevFnValue)continue}h=n[o]={prev:c},this.applyParsedProperty(r,l),h.next=r.pstyle(o),h.next&&h.next.bypass&&(h.next=h.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),c=0;c<t.length;c++){var h=t[c];r.styleKeys[h]=[9261,5381]}for(var u=mt(function(e,t){return r.styleKeys[t][0]=qre(e,r.styleKeys[t][0])},"updateGrKey1"),d=mt(function(e,t){return r.styleKeys[t][1]=jre(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,b,x,T,k=l[m],w=o[k];null!=w&&(y=(k=this.properties[k]).type,v=k.groupKey,b=void 0,null!=k.hashOverride?b=k.hashOverride(e,w):null!=w.pfValue&&(b=w.pfValue),k=null==k.enums?w.value:null,x=null!=b,T=w.units,!y.number||!x&&null==k||y.multiple?g(w.strValue,v):(p(f(x?b:k),v),x||null==T||g(T,v)))}for(var C=[9261,5381],S=0;S<t.length;S++){var E=t[S],E=r.styleKeys[E];C[0]=qre(E[0],C[0]),C[1]=jre(E[1],C[1])}r.styleKey=Wre(C[0],C[1]);var _=r.styleKeys,A=(r.labelDimsKey=Ure(_.labelDimensions),n(e,["label"],_.labelDimensions));return r.labelKey=Ure(A),r.labelStyleKey=Ure(Gre(_.commonLabel,A)),s||(A=n(e,["source-label"],_.labelDimensions),r.sourceLabelKey=Ure(A),r.sourceLabelStyleKey=Ure(Gre(_.commonLabel,A)),A=n(e,["target-label"],_.labelDimensions),r.targetLabelKey=Ure(A),r.targetLabelStyleKey=Ure(Gre(_.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(Gre,[9261,5381]),r.nodeKey=Ure(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],c=l&&l.bypass,h=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(){oie("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=h.data,y=0;y<f.length&&m;y++)m=m[f[y]];if(null==m)return g(),!1;if(!he(m))return oie("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 b=n.valueMin[0],x=n.valueMax[0],T=n.valueMin[1],k=n.valueMax[1],w=n.valueMin[2],C=n.valueMax[2],S=null==n.valueMin[3]?1:n.valueMin[3],E=null==n.valueMax[3]?1:n.valueMax[3],x=[Math.round(b+(x-b)*v),Math.round(T+(k-T)*v),Math.round(w+(C-w)*v),Math.round(S+(E-S)*v)],b={bypass:n.bypass,name:n.name,value:x,strValue:"rgb("+x[0]+", "+x[1]+", "+x[2]+")"};else{if(!s.number)return!1;k=n.valueMin+(n.valueMax-n.valueMin)*v,b=this.parse(n.name,k,n.bypass,u)}if(!b)return g(),!1;b.mapping=n,n=b;break;case a.data:for(var _=n.field.split("."),A=h.data,R=0;R<_.length&&A;R++)A=A[_[R]];if(!(b=null!=A?this.parse(n.name,A,n.bypass,u):b))return g(),!1;b.mapping=n,n=b;break;case a.fn:if(T=n.value,C=null!=n.fnValue?n.fnValue:T(r),null==(n.prevFnValue=C))return oie("Custom function mappers may not return null (i.e. `"+n.name+"` for ele `"+r.id()+"` is null)"),!1;if(!(b=this.parse(n.name,C,n.bypass,u)))return oie("Custom function mappers may not return invalid values for the property type (i.e. `"+n.name+"` for ele `"+r.id()+"` is invalid)"),!1;b.mapping=cie(n),n=b;break;case void 0:break;default:return!1}o?(n.bypassed=c?l.bypassed:l,t[n.name]=n):c?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,c=0;c<n.length;c++){var h,u,d=n[c],p=t.pstyle(d),g=e[d];g&&(h=g.prev,g=null!=g.next?g.next:p,p=!1,u=void 0,h)&&(he(h.pfValue)&&he(g.pfValue)?(p=g.pfValue-h.pfValue,u=h.pfValue+1e-6*p):he(h.value)&&he(g.value)?(p=g.value-h.value,u=h.value+1e-6*p):Ste(h.value)&&Ste(g.value)&&(p=h.value[0]!==g.value[0]||h.value[1]!==g.value[1]||h.value[2]!==g.value[2],u=h.strValue),p)&&(o[d]=g.strValue,this.applyBypass(t,d,u),l=!0)}l&&(i.transitioning=!0,new Hae(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)}},gue={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(wte(t)){var o=this.parse(t,r,!0);o&&n.push(o)}else{if(!Ete(t))return!1;var l=t;i=r;for(var c=Object.keys(l),h=0;h<c.length;h++){var u=c[h],d=l[u];void 0!==(d=void 0===d?l[Wte(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 b,x=n[v];i&&(b=f.pstyle(x.name),y=m[x.name]={prev:b}),p=this.applyParsedProperty(f,cie(x))||p,i&&(y.next=f.pstyle(x.name))}p&&this.updateStyleHints(f),i&&this.updateTransitions(f,m,!0)}return p},overrideBypass:function(e,t,r){t=jte(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],c=n.pstyle(l.name);c&&c.bypass&&(o=this.parse(o,"",!0),c=a[l.name]={prev:c},this.applyParsedProperty(n,o),c.next=n.pstyle(l.name))}this.updateStyleHints(n),r&&this.updateTransitions(n,a,!0)}}},whe={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)}},($he={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[Wte(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&&he(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=Ste(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 wte(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?Ete(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[jte(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]=qre(a,o[0]),o[1]=jre(a,o[1]);else for(n=i.strValue,s=0;s<n.length;s++)a=n.charCodeAt(s),o[0]=qre(a,o[0]),o[1]=jre(a,o[1]);return o}}).getPropertiesHash=$he.getNonDefaultPropertiesHash,She={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}},Nhe={appendFromString:function(e){var t=""+e;function r(){t=t.length>a.length?t.substr(a.length):""}function i(){c=c.length>u.length?c.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){oie("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 dle(s).invalid)oie("Skipping parsing of block: Invalid selector found in string stylesheet: "+s);else{for(var o=n[2],l=!1,c=o,h=[];!c.match(/^\s*$/);){if(!(p=c.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/))){oie("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)?h.push({name:d,val:p}):oie("Skipping property: Invalid property definition in: "+u):oie("Skipping property: Invalid property name in: "+u),i()}if(l){r();break}this.selector(s);for(var g=0;g<h.length;g++){var f=h[g];this.css(f.name,f.val)}}r()}return this},fromString:function(e){return this.resetToDefault(),this.appendFromString(e),this}},ace={};var a=Yte,s=mt(function(e){return"^"+e+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},"data"),c=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=(ace.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:c("mapData")},mapLayoutData:{mapping:!0,regex:c("mapLayoutData")},mapScratch:{mapping:!0,regex:c("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 wte(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=Pte(e),t=Pte(t),e&&!t||!e&&t},"emptyNonEmpty")}),d=ace.types,c=[{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}],P=[{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}],B=[{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}],j=[{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}],W=[{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}],U=[{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}],G=[{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}],b=[];ace.pieBackgroundN=16,b.push({name:"pie-size",type:d.sizeMaybePercent}),b.push({name:"pie-hole",type:d.sizeMaybePercent}),b.push({name:"pie-start-angle",type:d.angle});for(var x=1;x<=ace.pieBackgroundN;x++)b.push({name:"pie-"+x+"-background-color",type:d.color}),b.push({name:"pie-"+x+"-background-size",type:d.percent}),b.push({name:"pie-"+x+"-background-opacity",type:d.zeroOneNumber});var T=[];ace.stripeBackgroundN=16,T.push({name:"stripe-size",type:d.sizeMaybePercent}),T.push({name:"stripe-direction",type:d.axisDirectionPrimary});for(var k=1;k<=ace.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=ace.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})})},{}),ace.properties=[].concat(m,$,y,P,B,U,f,g,c,u,p,v,F,z,q,b,T,j,W,w,G)),S=ace.propertyGroups={behavior:m,transition:$,visibility:y,overlay:P,underlay:B,ghost:U,commonLabel:f,labelDimensions:g,mainLabel:c,sourceLabel:u,targetLabel:p,nodeBody:v,nodeBorder:F,nodeOutline:z,backgroundImage:q,pie:b,stripe:T,compound:j,edgeLine:W,edgeArrow:w,core:G},Y=ace.propertyGroupNames={},H=((ace.propertyGroupKeys=Object.keys(S)).forEach(function(t){Y[t]=S[t].map(function(e){return e.name}),S[t].forEach(function(e){return e.groupKey=t})}),ace.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"}]);ace.propertyNames=C.map(function(e){return e.name});for(var E=0;E<C.length;E++){var X=C[E];C[X.name]=X}for(var _=0;_<H.length;_++){var A=H[_],R=C[A.pointsTo];C.push(R={name:A.name,alias:!0,pointsTo:R}),C[A.name]=R}function L(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:rie;YZ(this,L),this.idsByKey=new bie,this.keyForId=new bie,this.cachesByLvl=new bie,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=t}function I(e,t,r,i){YZ(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){YZ(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){YZ(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=wee,this.atlasManager=new Whe(e,r),this.batchManager=new Uhe(r),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(Ghe.SCREEN),this.pickingProgram=this._createShaderProgram(Ghe.PICKING),this.vao=this._createVAO()}function M(e){YZ(this,M),this.globalOptions=e,this.atlasSize=e.webglTexSize,this.maxAtlasesPerBatch=e.webglTexPerBatch,this.batchAtlases=[]}function O(e,t){YZ(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(ace.getDefaultProperty=function(e){return this.getDefaultProperties()[e]},ace.getDefaultProperties=function(){var e=this._private;if(null==e.defaultProperties){for(var t=Kte({"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<=ace.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<=ace.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 ace.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},ace.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},Dhe={parse:function(e,t,r,i){var n,a,s;return Cte(t)?this.parseImplWarn(e,t,r,i):(n=Hre(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=cie(s))&&(s.value=cie(s.value)),s)},parseImplWarn:function(e,t,r,i){return(r=this.parseImpl(e,t,r,i))||null==t||oie("The style property `".concat(e,": ").concat(t,"` is invalid")),!r||"width"!==r.name&&"height"!==r.name||"label"!==t||oie("The style value of `label` is deprecated for `"+r.name+"`"),r},parseImpl:function(t,r,i,e){t=jte(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=wte(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(Cte(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&&(x=s.data,{name:t,value:n,strValue:""+r,mapped:x,field:n[1],bypass:i});if(10<=r.length&&"m"===r[0]&&(x=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,x[4]))||s.mapped)return!1;if(!(T=this.parse(t,x[5]))||T.mapped)return!1;if(s.pfValue===T.pfValue||s.strValue===T.strValue)return oie("`"+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 c=s.value,h=T.value;if(!(c[0]!==h[0]||c[1]!==h[1]||c[2]!==h[2]||c[3]!==h[3]&&(null!=c[3]&&1!==c[3]||null!=h[3]&&1!==h[3])))return!1}return{name:t,value:x,strValue:""+r,mapped:n,field:x[1],fieldMin:parseFloat(x[2]),fieldMax:parseFloat(x[3]),valueMin:s.value,valueMax:T.value,bypass:i}}}if(l.multiple&&"multiple"!==e){var u=o?r.split(/\s+/):Ste(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||wte(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&&wte(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 b,x,c=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 h="px",l.units&&(b=l.units),l.implicitUnits&&(h=l.implicitUnits),l.unitless||(o?(n="px|em"+(l.allowPercent?"|\\%":""),b&&(n=b),(x=r.match("^("+Yte+")("+n+")?$"))&&(r=x[1],b=x[2]||h)):b&&!l.implicitUnits||(b=h)),r=parseFloat(r),isNaN(r)&&void 0===l.enums?null:isNaN(r)&&void 0!==l.enums?(r=a,c()):l.integer&&!Ate(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+(b||""),units:b,bypass:i},l.unitless||"px"!==b&&"em"!==b?s.pfValue=r:s.pfValue="px"!==b&&b?this.getEmSizeInPixels()*r:r,"ms"!==b&&"s"!==b||(s.pfValue="ms"===b?r:1e3*r),"deg"!==b&&"rad"!==b||(s.pfValue="rad"===b?r:Wie(r)),"%"===b&&(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 S=w[C].trim();this.properties[S]?k.push(S):oie("`"+S+"` 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=tre(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=c()))return o;for(var E=l.regexes||[l.regex],_=0;_<E.length;_++){var A=new RegExp(E[_]).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?c():null}},sce=mt(function(e){if(!(this instanceof sce))return new sce(e);Dte(e)?(this._private={cy:e,coreStyle:{}},this.length=0,this.resetToDefault()):aie("A style must have a core reference")},"Style"),(oce=sce.prototype).instanceString=function(){return"style"},oce.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},oce.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},oce.core=function(e){return this._private.coreStyle[e]||this.getDefaultProperty(e)},oce.selector=function(e){var e="core"===e?null:new dle(e),t=this.length++;return this[t]={selector:e,properties:[],mappedProperties:[],index:t},this},oce.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[Wte(i.name)]:n)&&this.cssRule(i.name,n)}else 2===e.length&&this.cssRule(e[0],e[1]);return this},oce.style=oce.css,oce.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},oce.append=function(e){return Mte(e)?e.appendToStyle(this):Ste(e)?this.appendFromJson(e):wte(e)&&this.appendFromString(e),this},sce.fromJson=function(e,t){return(e=new sce(e)).fromJson(t),e},sce.fromString=function(e,t){return new sce(e).fromString(t)},[qce,gue,whe,$he,She,Nhe,ace,Dhe].forEach(function(e){Kte(oce,e)}),sce.types=oce.types,sce.properties=oce.properties,sce.propertyGroups=oce.propertyGroups,sce.propertyGroupNames=oce.propertyGroupNames,sce.propertyGroupKeys=oce.propertyGroupKeys,ghe={style:mt(function(e){return e&&this.setStyle(e).update(),this._private.style},"style"),setStyle:mt(function(e){var t=this._private;return Mte(e)?t.style=e.generateStyle(this):Ste(e)?t.style=sce.fromJson(this,e):wte(e)?t.style=sce.fromString(this,e):t.style=sce(this),t.style},"setStyle"),updateStyle:mt(function(){this.mutableElements().updateStyle()},"updateStyle")},(ee={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(wte(i[0]))return n[e=i[0]];if(Ete(i[0])){if(!this._private.panningEnabled)return this;t=(r=i[0]).x,r=r.y,he(t)&&(n.x=t),he(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||!he(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:Ete(e)&&(r=(i=n[0]).x,i=i.y,he(r)&&(a.x+=r),he(i)&&(a.y+=i),this.emit("pan viewport"));break;case 2:r=t,"x"!==(i=e)&&"y"!==i||!he(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(he(e)&&void 0===t&&(t=e,e=void 0),this._private.panningEnabled&&this._private.zoomingEnabled&&(wte(e)?(i=e,e=this.$(i)):$te(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):Lte(e)||(e=this.mutableElements()),!Lte(e)||!e.empty())){var r=r||e.boundingBox(),i=this.width(),e=this.height();if(t=he(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),he(e)&&he(t)&&e<=t?(i.minZoom=e,i.maxZoom=t):he(e)&&void 0===t&&e<=i.maxZoom?i.minZoom=e:he(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 he(e)?r=e:Ete(e)&&(r=e.level,null!=e.position?t=Pie(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&&he(r)&&r!==a&&(null==t||he(t.x)&&he(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&&(he(e.zoom)||(r=!1),Ete(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,he(r.x)&&(t.pan.x=r.x,s=!1),he(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&&(wte(e)?(r=e,e=this.mutableElements().filter(r)):Lte(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=ee.center,ee.autolockNodes=ee.autolock,ee.autoungrabifyNodes=ee.autoungrabify,(cue={data:Yoe.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Yoe.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Yoe.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Yoe.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})}).attr=cue.data,cue.removeAttr=cue.removeData,lce=mt(function(e){var n=this,r=(o=(o=(e=Kte({},e)).container)&&!Rte(o)&&Rte(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!==mte&&void 0!==o&&!e.headless),a=e,e=(a.layout=Kte({name:t?"grid":"null"},a.layout),a.renderer=Kte({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 Qle(this),listeners:[],aniEles:new Qle(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:he(a.zoom)?a.zoom:1,pan:{x:Ete(a.pan)&&he(a.pan.x)?a.pan.x:0,y:Ete(a.pan)&&he(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(Fte))return Hae.all(e).then(t);t(e)},"loadExtData")),t=(s.styleEnabled&&n.setStyle([]),Kte({},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&&(Ete(e)||Ste(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=Kte({},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,Cte(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"),cce=lce.prototype,Kte(cce,{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||mte},"window"),mount:mt(function(e){var t,r;if(null!=e)return r=(t=this._private).options,!Rte(e)&&Rte(e[0])&&(e=e[0]),this.stopAnimationLoop(),this.destroyRenderer(),t.container=e,t.styleEnabled=!0,this.invalidateSize(),this.initRenderer(Kte({},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 cie(this._private.options)},"options"),json:mt(function(e){var r,h=this,t=h._private,i=h.mutableElements(),n=mt(function(e){return h.getElementById(e.id())},"getFreshRef");if(Ete(e)){if(h.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=h.getElementById(a),u[a]=!0,0!==s.length?i.push({ele:s,json:o}):(t&&(o.group=t),r.push(o))):oie("cy.json() cannot handle elements without an ID attribute")}h.add(r);for(var l=0;l<i.length;l++){var c=i[l];c.ele.json(c.json)}},"updateEles");if(Ste(e.elements))a(e.elements);else for(var s=["nodes","edges"],o=0;o<s.length;o++){var l=s[o],c=e.elements[l];Ste(c)&&a(c,l)}var d=h.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&&h.style(e.style),null!=e.zoom&&e.zoom!==t.zoom&&h.zoom(e.zoom),!e.pan||e.pan.x===t.pan.x&&e.pan.y===t.pan.y||h.pan(e.pan),e.data&&h.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]&&h[f](e[f])}return h.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=h.style().json()),r.data=cie(h.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=cie(t.pan),r.boxSelectionEnabled=t.boxSelectionEnabled,r.renderer=cie(i.renderer),r.hideEdgesOnViewport=i.hideEdgesOnViewport,r.textureOnViewport=i.textureOnViewport,r.wheelSensitivity=i.wheelSensitivity,r.motionBlur=i.motionBlur,r.multiClickDebounceTime=i.multiClickDebounceTime,r},"json")}),cce.$id=cce.getElementById,[Mhe,Ohe,Phe,Hhe,Zhe,nue,aue,Bhe,ghe,ee,cue].forEach(function(e){Kte(cce,e)}),hce={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")},uce={maximal:!1,acyclic:!1},dce=mt(function(e){return e.scratch("breadthfirst")},"getInfo"),pce=mt(function(e,t){return e.scratch("breadthfirst",t)},"setInfo"),mt(tee,"BreadthFirstLayout"),gce={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!(tee.prototype.run=function(){var l=this.options,e=l.cy,c=l.eles,h=c.nodes().filter(function(e){return e.isChildless()}),t=c,r=l.directed,P=l.acyclic||l.maximal||0<l.maximalAdjustments,n=!!l.boundingBox,a=ene(n?l.boundingBox:structuredClone(e.extent()));if(Lte(l.roots))d=l.roots;else if(Ste(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(wte(l.roots))d=e.$(l.roots);else if(r)d=h.roots();else for(var u=c.components(),d=e.collection(),B=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++)B();var g=[],f={},m=mt(function(e,t){null==g[t]&&(g[t]=[]);var r=g[t].length;g[t].push(e),pce(e,{index:r,depth:t})},"addToDepth"),$=mt(function(e,t){var r=dce(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<h.length;v++){var b=h[v];f[b.id()]||y.push(b)}var x=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--):pce(i,{depth:e,index:r})}},"assignDepthsAt"),F=mt(function(e,t){for(var r=dce(e),i=e.incomers().filter(function(e){return e.isNode()&&c.has(e)}),n=-1,a=e.id(),s=0;s<i.length;s++)var o=i[s],o=dce(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&&P){var T=[],z={},q=mt(function(e){return T.push(e)},"enqueue"),j=mt(function(){return T.shift()},"dequeue");for(h.forEach(function(e){return T.push(e)});0<T.length;){var k=j(),w=F(k,z);if(w)k.outgoers().filter(function(e){return e.isNode()&&c.has(e)}).forEach(q);else if(null===w){oie("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 S=0;S<h.length;S++)var E=h[S].layoutDimensions(l),W=E.w,C=Math.max(C,W,E.h);var _={},A=mt(function(e){if(_[e.id()])return _[e.id()];for(var t=dce(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()||!h.has(l)||null!=(l=dce(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"),U=mt(function(e,t){var r=A(e)-A(t);return 0==r?Hte(e.id(),t.id()):r},"sortFn");void 0!==l.depthSort&&(U=l.depthSort);for(var R=g.length,L=0;L<R;L++)g[L].sort(U),x(L);for(var I=[],N=0;N<y.length;N++)I.push(y[N]);t=mt(function(){for(var e=0;e<R;e++)x(e)},"assignDepths"),I.length&&(g.unshift(I),R=g.length,t());for(var G=0,D=0;D<R;D++)G=Math.max(g[D].length,G);var V=a.x1+a.w/2,Y=a.y1+a.h/2,M=h.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===R?0:n?(a.h-2*l.padding-M.h)/(R-1):(a.h-2*l.padding-M.h)/(R+1),C),X=g.reduce(function(e,t){return Math.max(e,t.length)},0),K=mt(function(e){var t,r,i=(e=dce(e)).depth,e=e.index;return l.circle?(t=Math.min(a.w/2/R,a.h/2/R),t=(t=Math.max(t,C))*i+t-(0<R&&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-(R+1)/2)*H})},"getPositionTopBottom"),O={downward:0,leftward:90,upward:180,rightward:-90},r=(-1===Object.keys(O).indexOf(l.direction)&&aie("Invalid direction '".concat(l.direction,"' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(O).join(", "))),mt(function(e){return CQ(K(e),a,O[l.direction])},"getPosition"));return c.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(ree,"CircleLayout"),fce={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!(ree.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=ene(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),c=0,h=0;h<r.length;h++)var u=r[h].layoutDimensions(i),d=u.w,c=Math.max(c,d,u.h);a=he(i.radius)?i.radius:r.length<=1?0:Math.min(e.h,e.w)/2-c,1<r.length&&i.avoidOverlap&&(c*=1.75,e=Math.cos(l)-Math.cos(0),p=Math.sin(l)-Math.sin(0),e=Math.sqrt(c*c/(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(iee,"ConcentricLayout"),iee.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=ene(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,c=0;c<n.length;c++){var h=n[c],u=e.concentric(h);o.push({value:u,node:h}),h._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 P=e.levelWidth(n),g=[[]],f=g[0],m=0;m<o.length;m++){var y=o[m];0<f.length&&P<=Math.abs(f[0].value-y.value)&&g.push(f=[]),f.push(y)}var v,b=l+e.minNodeSpacing;e.avoidOverlap||(v=0<g.length&&1<g[0].length,r=Math.min(r.w,r.h)/2-b,b=Math.min(b,r/(g.length+v?1:0)));for(var x=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(b*b/(k*k+C*C)),x=Math.max(k,x)),w.r=x,x+=b}if(e.equidistant){for(var S=0,E=0,_=0;_<g.length;_++)var B=g[_].r-E,S=Math.max(S,B);for(var E=0,A=0;A<g.length;A++){var R=g[A];0===A&&(E=R.r),R.r=E,E+=S}}for(var L={},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)};L[F.node.id()]=O}return i.nodes().layoutPositions(this,e,function(e){return e=e.id(),L[e]}),this},yce={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(nee,"CoseLayout"),nee.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}),mce=!0===r.debug,vce(e,i,r)),t=(mce&&(void 0)(n),r.randomize&&Tce(n),Fre()),a=mt(function(){wce(n,e,r),!0===r.fit&&e.fit(r.padding)},"refresh"),s=mt(function(e){return!(i.stopped||e>=r.numIter||(Cce(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=kce(n,r,e),e.layoutPositions(i,r,t))},"done"),l=0,c=!0;if(!0===r.animate){var h=mt(function(){for(var e=0;c&&e<r.refresh;)c=s(l),l++,e++;c?(Fre()-t>=r.animationThreshold&&a(),$re(h)):(Pce(n,r),o())},"frame");h()}else{for(;c;)c=s(l),l++;Pce(n,r),o()}return this},nee.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},nee.prototype.destroy=function(){return this.thread&&this.thread.stop(),this},vce=mt(function(e,t,r){for(var i=r.eles.edges(),n=r.eles.nodes(),a=ene(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={},c=0;c<o.length;c++)for(var h=o[c],u=0;u<h.length;u++)l[h[u].id()]=c;for(c=0;c<s.nodeSize;c++){var d=(y=n[c]).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=Cte(r.nodeRepulsion)?r.nodeRepulsion(y):r.nodeRepulsion,s.layoutNodes.push(I),s.idToIndex[I.id]=c}for(var p=[],g=0,f=-1,m=[],c=0;c<s.nodeSize;c++){var y,v=(y=s.layoutNodes[c]).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 b=p[g++],b=s.idToIndex[b],x=s.layoutNodes[b].children;if(0<x.length)for(s.graphSet.push(x),c=0;c<x.length;c++)p[++f]=x[c]}for(c=0;c<s.graphSet.length;c++)for(var T=s.graphSet[c],u=0;u<T.length;u++){var k=s.idToIndex[T[u]];s.indexToGraph[k]=c}for(c=0;c<s.edgeSize;c++){var w=i[c],C={},S=(C.id=w.data("id"),C.sourceId=w.data("source"),C.targetId=w.data("target"),Cte(r.idealEdgeLength)?r.idealEdgeLength(w):r.idealEdgeLength),w=Cte(r.edgeElasticity)?r.edgeElasticity(w):r.edgeElasticity,E=s.idToIndex[C.sourceId],_=s.idToIndex[C.targetId];if(s.indexToGraph[E]!=s.indexToGraph[_]){for(var A=bce(C.sourceId,C.targetId,s),R=s.graphSet[A],L=0,I=s.layoutNodes[E];-1===R.indexOf(I.id);)I=s.layoutNodes[s.idToIndex[I.parentId]],L++;for(I=s.layoutNodes[_];-1===R.indexOf(I.id);)I=s.layoutNodes[s.idToIndex[I.parentId]],L++;S*=L*r.nestingFactor}C.idealLength=S,C.elasticity=w,s.layoutEdges.push(C)}return s},"createLayoutInfo"),bce=mt(function(e,t,r){return(e=xce(e,t,0,r)).count<2?0:e.graph},"findLCA"),xce=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=xce(e,t,o,i)).count)){if(1!==o.count)return o;if(2==++a)break}}return{count:a,graph:r}},"findLCA_aux"),Tce=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"),kce=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"),wce=mt(function(e,t,r){var i=r.layout,n=r.eles.nodes(),a=kce(e,r,n);n.positions(a),!0!==e.ready&&(e.ready=!0,i.one("layoutready",r.ready),i.emit({type:"layoutready",layout:this}))},"refreshPositions"),Cce=mt(function(e,t,r){Sce(e,t),Lce(e),Ice(e,t),Nce(e),Dce(e)},"step"),Sce=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]]];_ce(s,l,e,t)}},"calculateNodeForces"),Ece=mt(function(e){return 2*e*Math.random()-1},"randomDistance"),_ce=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=Ece(1),n=Ece(1)),o=0<(o=Ace(e,t,r,n))?(s=i.nodeOverlap*o)*r/(a=Math.sqrt(r*r+n*n)):(i=Rce(e,r,n),o=(r=(o=Rce(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"),Ace=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"),Rce=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"),Lce=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,c=o.positionY-s.positionY;0==l&&0==c||(i=Rce(s,l,c),c=(l=Rce(o,-1*l,-1*c)).x-i.x,l=l.y-i.y,i=Math.sqrt(c*c+l*l),a=Math.pow(a.idealLength-i,2)/a.elasticity,c=0!==i?(n=a*c/i,a*l/i):n=0,s.isLocked||(s.offsetX+=n,s.offsetY+=c),o.isLocked)||(o.offsetX-=n,o.offsetY-=c)}},"calculateEdgeForces"),Ice=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 c,h,u,d=e.layoutNodes[e.idToIndex[a[l]]];d.isLocked||(h=n-d.positionX,u=o-d.positionY,1<(c=Math.sqrt(h*h+u*u))&&(h=t.gravity*h/c,u=t.gravity*u/c,d.offsetX+=h,d.offsetY+=u))}},"calculateGravityForces"),Nce=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,c=0;c<s.length;c++){var h=e.layoutNodes[e.idToIndex[s[c]]];h.offsetX+=o,h.offsetY+=l,r[++n]=s[c]}a.offsetX=0,a.offsetY=0}}},"propagateForces"),Dce=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=Mce(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,Oce(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"),Mce=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"),Oce=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 Oce(r,t)}},"updateAncestryBoundaries"),Pce=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(h=i[n]){h.x1=1/0,h.x2=-1/0,h.y1=1/0,h.y2=-1/0;for(var l=0;l<h.length;l++){var c=h[l];h.x1=Math.min(h.x1,c.positionX-c.width/2),h.x2=Math.max(h.x2,c.positionX+c.width/2),h.y1=Math.min(h.y1,c.positionY-c.height/2),h.y2=Math.max(h.y2,c.positionY+c.height/2)}h.w=h.x2-h.x1,h.h=h.y2-h.y1,o+=h.w*h.h}i.sort(function(e,t){return t.w*t.h-e.w*e.h});for(var h,u=0,d=0,p=0,g=0,f=Math.sqrt(o)*e.clientWidth/e.clientHeight,n=0;n<i.length;n++)if(h=i[n]){for(l=0;l<h.length;l++)(c=h[l]).isLocked||(c.positionX+=u-h.x1,c.positionY+=d-h.y1);u+=h.w+t.componentSpacing,p+=h.w+t.componentSpacing,g=Math.max(g,h.h),f<p&&(d+=g+t.componentSpacing,g=p=u=0)}},"separateComponents"),Bce={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(aee,"GridLayout"),aee.prototype.run=function(){var e=t=this.options,t=t.cy,r=(c=e.eles).nodes().not(":parent"),n=(e.sort&&(r=r.sort(e.sort)),ene(e.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()}));if(0===n.h||0===n.w)c.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"),c=e.rows,t=null!=e.cols?e.cols:e.columns;if(null!=c&&null!=t)a=c,s=t;else if(null!=c&&null==t)a=c,s=Math.ceil(i/a);else if(null==c&&null!=t)s=t,a=Math.ceil(i/s);else if(i<s*a)i<=((c=o())-1)*(t=l())?o(c-1):i<=(t-1)*c&&l(t-1);else for(;s*a<i;){var h=o(),u=l();i<=(u+1)*h?l(u+1):o(h+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={},b=mt(function(e,t){return!!v["c-"+e+"-"+t]},"used"),x=mt(function(e,t){v["c-"+e+"-"+t]=!0},"use"),T=0,k=0,w=mt(function(){s<=++k&&(k=0,T++)},"moveToNextCell"),C={},S=0;S<r.length;S++){var E=r[S],_=e.position(E);if(_&&(void 0!==_.row||void 0!==_.col)){var A={row:_.row,col:_.col};if(void 0===A.col)for(A.col=0;b(A.row,A.col);)A.col++;else if(void 0===A.row)for(A.row=0;b(A.row,A.col);)A.row++;C[E.id()]=A,x(A.row,A.col)}}c=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(;b(T,k);)w();r=k*d+d/2+n.x1,i=T*p+p/2+n.y1,x(T,k),w()}return{x:r,y:i}},"getPos"),r.layoutPositions(this,e,c)}return this},$ce={ready:mt(function(){},"ready"),stop:mt(function(){},"stop")},mt(see,"NullLayout"),see.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},Fce={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,spacingFactor:void 0,animate:!(see.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(oee,"PresetLayout"),zce={fit:!0,padding:30,boundingBox:void 0,animate:!(oee.prototype.run=function(){var t=this.options,e=t.eles.nodes(),r=Cte(t.positions);function i(e){return null==t.positions?Oie(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(lee,"RandomLayout"),lee.prototype.run=function(){var e=this.options,t=e.cy,r=e.eles,i=ene(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},qce=[{name:"breadthfirst",impl:tee},{name:"circle",impl:ree},{name:"concentric",impl:iee},{name:"cose",impl:nee},{name:"grid",impl:aee},{name:"null",impl:see},{name:"preset",impl:oee},{name:"random",impl:lee}],mt(cee,"NullRenderer"),gue=mt(function(){},"noop"),whe=mt(function(){throw new Error("A headless instance can not render images")},"throwImgErr"),cee.prototype={recalculateRenderedStyle:gue,notify:mt(function(){this.notifications++},"notify"),init:gue,isHeadless:mt(function(){return!0},"isHeadless"),png:whe,jpg:whe},$he={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"),c=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"),h=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){wte(t)&&(t=r[t]),r[e]=Kte({name:e,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:mt(function(e,t,r,i,n,a){return r=h(c(this.points,r+2*a,i,n)),xne(e,t,r)},"collide"),roughCollide:i,draw:mt(function(e,t,r,i){t=c(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:rie,roughCollide:rie,draw:nie,spacing:iie,gap:iie}),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=c(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=h(c(this.points,r+2*s,i,n)),r=h(c(this.pointsTee,r+2*s,i,n));return xne(e,t,o)||xne(e,t,r)},"collide"),draw:mt(function(e,t,r,i,n){var a=c(this.points,t,r,i),t=c(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=h(c(this.points,r+2*s,i,n));return xne(e,t,r)||o},"collide"),draw:mt(function(e,t,r,i,n){r=c(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=h(c(this.points,r+2*s,i,n)),a=h(c(this.crossLinePts(r,a),r+2*s,i,n));return xne(e,t,o)||xne(e,t,a)},"collide"),draw:mt(function(e,t,r,i,n){var a=c(this.points,t,r,i),n=c(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")})}},She={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,c,h;return this.containerBB||(h=(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"),c=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=h.width/(s+(c+l)),c=h.left+e+c,h=h.top+i+a,this.containerBB=[c,h,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,b=this,x=this,r=x.getCachedZSortedEles(),T=[],a=x.cy.zoom(),k=x.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 S(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&&x.nodeShapes[b.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,c=r.target;if("segments"===i.edgeType||"straight"===i.edgeType||"haystack"===i.edgeType){for(var h=i.allpts,u=0;u+3<h.length;u+=2)if(gne(y,v,h[u],h[u+1],h[u+2],h[u+3],o)&&s>(t=bne(y,v,h[u],h[u+1],h[u+2],h[u+3])))return C(e,t),!0}else if("bezier"===i.edgeType||"multibezier"===i.edgeType||"self"===i.edgeType||"compound"===i.edgeType)for(h=i.allpts,u=0;u+5<i.allpts.length;u+=4)if(fne(y,v,h[u],h[u+1],h[u+2],h[u+3],h[u+4],h[u+5],o)&&s>(t=vne(y,v,h[u],h[u+1],h[u+2],h[u+3],h[u+4],h[u+5])))return C(e,t),!0;for(var l=l||r.source,c=c||r.target,d=b.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=x.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&&(S(l),S(c))}function f(e,t,r){return yie(e,t,r)}function c(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,c=a.x2+i-r,h=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,h),n=s(n,i),h=s(c,h),s=s(c,i),c=[p.x+r,p.y+t,h.x+r,h.y+t,s.x+r,s.y+t,n.x+r,n.y+t];if(xne(y,v,c))return C(e),!0}else if(cne(a,y,v))return C(e),!0}}e&&(r=r.interactive),mt(C,"addEle"),mt(S,"checkNode"),mt(o,"checkEdge"),mt(f,"preprop"),mt(c,"checkLabel");for(var h=r.length-1;0<=h;h--){var u=r[h];u.isNode()?S(u)||c(u):o(u)||c(u)||c(u,"source")||c(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),c=Math.max(t,i),h=ene({x1:e=s,y1:t=l,x2:r=o,y2:i=c}),d=[{x:h.x1,y:h.y1},{x:h.x2,y:h.y1},{x:h.x2,y:h.y2},{x:h.x1,y:h.y2}],p=[[d[0],d[1]],[d[1],d[2]],[d[2],d[3]],[d[3],d[0]]];function g(e,t,r){return yie(e,t,r)}function f(e,t){var r,i,n,a,s,o,l=e._private,c=u,h=(e.boundingBox(),l.labelBounds.main);return h?(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=h.x1-c-t,t=h.x2+c-t,a=h.y1-c-e,h=h.y2+c-e,l?(s=Math.cos(l),o=Math.sin(l),[(c=mt(function(e,t){return{x:(e-=r)*s-(t-=i)*o+r,y:e*o+t*s+i}},"rotate"))(n,a),c(t,a),c(t,h),c(n,h)]):[{x:n,y:a},{x:t,y:a},{x:t,y:h},{x:n,y:h}]):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 b=v,x="yes"===b.pstyle("text-events").strValue,T=b.pstyle("box-selection").strValue,k="yes"===b.pstyle("box-select-labels").strValue;"none"!==T&&(S=b.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:("overlap"===T||k)&&x}),"contain"===T?(C=!1,k&&x&&(k=f(b))&&RQ(k,d)&&(a.push(b),C=!0),!C&&une(h,S)&&a.push(b)):"overlap"===T&&lne(h,S)&&(RQ([{x:(x=b.boundingBox({includeNodes:!0,includeEdges:!0,includeLabels:!1,includeMainLabels:!1,includeSourceLabels:!1,includeTargetLabels:!1})).x1,y:x.y1},{x:x.x2,y:x.y1},{x:x.x2,y:x.y2},{x:x.x1,y:x.y2}],d)||(k=f(b))&&RQ(k,d))&&a.push(b))}else{var w=v,C=w._private,T=C.rscratch,S=w.pstyle("box-selection").strValue;if("none"!==S)if("contain"===S){if((null==T.startX||null==T.startY||cne(h,T.startX,T.startY))&&(null==T.endX||null==T.endY||cne(h,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 E=C.rstyle.bezierPts||C.rstyle.linePts||C.rstyle.haystackPts,_=!0,A=0;A<E.length;A++)if(!hne(h,E[A])){_=!1;break}_&&a.push(w)}else"straight"===T.edgeType&&a.push(w)}else if("overlap"===S){var R=!1;if(null!=T.startX&&null!=T.startY&&null!=T.endX&&null!=T.endY&&(cne(h,T.startX,T.startY)||cne(h,T.endX,T.endY)))a.push(w),R=!0;else if(!R&&"haystack"===T.edgeType)for(var L=C.rstyle.haystackPts,I=0;I<L.length;I++)if(hne(h,L[I])){a.push(w),R=!0;break}if(!R){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 P=N[D],B=N[D+1],M=0;M<p.length;M++){var O=rQ(p[M],2);if(m(P,B,O[0],O[1])){a.push(w),R=!0;break}}if(R)break}}}}}return a}},(Nhe={calculateArrowAngles:function(e){var t,r,i,n,a,s,o,l,c,h,u,d,p,g,f="haystack"===(e=e._private.rscratch).edgeType,m="bezier"===e.edgeType,y="multibezier"===e.edgeType,v="segments"===e.edgeType,b="compound"===e.edgeType,x="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||b||x||m?(p=e.allpts,r=d-Kie(p[0],p[2],p[4],.1),g-Kie(p[1],p[3],p[5],.1)):(r=d-k,g-w),e.srcArrowAngle=Uie(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||b||x)&&(p=e.allpts,f=e.ctrlpts.length/2%2==0?(h=2+(l=2+(c=p.length/2-1)),a=Kie(p[c],p[l],p[h],0),s=Kie(p[c+1],p[l+1],p[h+1],0),o=Kie(p[c],p[l],p[h],1e-4),Kie(p[c+1],p[l+1],p[h+1],1e-4)):(h=2+(l=p.length/2-1),a=Kie(p[c=l-2],p[l],p[h],.4999),s=Kie(p[c+1],p[l+1],p[h+1],.4999),o=Kie(p[c],p[l],p[h],.5),Kie(p[c+1],p[l+1],p[h+1],.5)),r=o-a,i=f-s),e.midtgtArrowAngle=Uie(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=Uie(r,i),i=v?(r=t-e.segpts[e.segpts.length-2],T-e.segpts[e.segpts.length-1]):y||b||x||m?(g=(p=e.allpts).length,r=t-Kie(p[g-6],p[g-4],p[g-2],.9),T-Kie(p[g-5],p[g-3],p[g-1],.9)):(r=t-k,T-w),e.tgtArrowAngle=Uie(r,i)}}).getArrowWidth=Nhe.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)},Uce={},Gce={},nhe=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"),ahe=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"),she=mt(function(e,t,r,i,n){e!==ihe?nhe(t,e,Uce):ahe(Gce,Uce),nhe(t,r,Gce),Qce=Uce.nx*Gce.ny-Uce.ny*Gce.nx,Hce=Uce.nx*Gce.nx-Uce.ny*-Gce.ny,Qce=Math.asin(Math.max(-1,Math.min(1,Qce))),Math.abs(Qce)<1e-6?(jce=t.x,Wce=t.y,Xce=Zce=0):(Yce=!(Vce=1),Hce<0?Qce<0?Qce=Math.PI+Qce:(Qce=Math.PI-Qce,Vce=-1,Yce=!0):0<Qce&&(Vce=-1,Yce=!0),Zce=void 0!==t.radius?t.radius:i,Hce=Qce/2,Qce=Math.min(Uce.len/2,Gce.len/2),Xce=n?(Kce=Math.abs(Math.cos(Hce)*Zce/Math.sin(Hce)),Qce<Kce?(Kce=Qce,Math.abs(Kce*Math.sin(Hce)/Math.cos(Hce))):Zce):(Kce=Math.min(Qce,Zce),Math.abs(Kce*Math.sin(Hce)/Math.cos(Hce))),the=t.x+Gce.nx*Kce,rhe=t.y+Gce.ny*Kce,jce=the-Gce.ny*Xce*Vce,Wce=rhe+Gce.nx*Xce*Vce,Jce=t.x+Uce.nx*Kce,ehe=t.y+Uce.ny*Kce,ihe=t)},"calcCornerArc"),mt(hee,"drawPreparedRoundCorner"),mt(uee,"getRoundCorner"),ohe=Math.sqrt(.02),Dhe={findMidptPtsEtc:function(e,t){var r,i,n,a,s,o,l=t.posPts,c=t.intersectionPts,h=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=c;break;case"endpoints":o=p?(s={x1:r=(i=rQ(this.manualEndptToPx(e.source()[0],u),2))[0],y1:i=i[1],x2:n=(a=rQ(this.manualEndptToPx(e.target()[0],d),2))[0],y2:a=a[1]},h=g(r,i,n,a),s):(oie("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).")),c)}return{midptPts:o,vectorNormInverse:h}},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(),c=a.width(),h=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*h*u+s.y,i.target.x*c*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],c=s.pfValue[s.pfValue.length-1];r.edgeType="segments",r.segpts=[],r.radii=[],r.isArcRadius=[];for(var h=0;h<o;h++){var u=i.pfValue[h],d=n.pfValue[h],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[h]?a.pfValue[h]:l),r.isArcRadius.push("arc-radius"===(void 0!==s.pfValue[h]?s.pfValue[h]:c))}},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,c=t.tgtW,t=t.tgtH,h=e.pstyle("control-point-step-size").pfValue,e=(e=e.pstyle("control-point-distances"))?e.pfValue[0]:void 0,i=(i&&(r=0,h=e),{x:a.x-o/2,y:a.y-l/2}),e={x:s.x-c/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*c));n.ctrlpts=[a.x,a.y-(1+Math.pow(50,1.12)/100)*h*(r/3+1)*l,a.x-(1+Math.pow(50,1.12)/100)*h*(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"),c=o&&l?Math.min(o.value.length,l.value.length):1,h=o?o.pfValue[0]:void 0,u=l.value[0],d=i;a.edgeType=d?"multibezier":"bezier",a.ctrlpts=[];for(var p=0;p<c;p++){var g=(.5-t.eles.length/2+r)*s*(n?-1:1),f=Vie(g),f=(d&&(h=o?o.pfValue[p]:s,u=l.value[p]),void 0!==(m=i?h:void 0!==h?f*h:void 0)?m:g),m=1-u,g=u,y=this.findMidptPtsEtc(e,t),v=y.midptPts,b=v.x1*m+v.x2*g;a.ctrlpts.push(b+(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,c="node-position"!==e.pstyle("edge-distances").value,h=e.pstyle("taxi-direction").value,u=h,d=e.pstyle("taxi-turn"),p="%"===d.units,g=(d=d.pfValue)<0,f=e.pstyle("taxi-turn-min-distance").pfValue,m=c?(s+l)/2:0,y=c?(o+t)/2:0,v=a.x2-a.x1,b=a.y2-a.y1,m=(x=mt(function(e,t){return 0<e?Math.max(e-t,0):Math.min(e+t,0)},"subDWH"))(v,m),x=x(b,y),y=!1,T=("auto"===u?h=Math.abs(m)>Math.abs(x)?n:i:"upward"===u||"downward"===u?(h=i,y=!0):"leftward"!==u&&"rightward"!==u||(h=n,y=!0),(n=h===i)?x:m),i=Vie(h=n?b:v),x=!1;y&&(p||g)||!("downward"===u&&h<0||"upward"===u&&0<h||"leftward"===u&&0<h||"rightward"===u&&h<0)||(T=(i*=-1)*Math.abs(T),x=!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||x?n?(h=a.y1+m+(c?o/2*i:0),b=a.x1,t=a.x2,r.segpts=[b,h,t,h]):(p=a.x1+m+(c?s/2*i:0),u=a.y1,d=a.y2,r.segpts=[p,u,p,d]):n?(p=Math.abs(h)<=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?(x=(a.y1+a.y2)/2,v=a.x1,l=a.x2,r.segpts=[v,x,l,x]):r.segpts=[a.x1,a.y2]):(p=Math.abs(h)<=s/2,g=Math.abs(b)<=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,x=a.y2,r.segpts=[v,l,v,x]):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,c,h,u,d,p,g,f,m,y,v,b,x,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,b=t.srcRs,t=t.tgtRs,y=!he(C.startX)||!he(C.startY),f=!he(C.arrowStartX)||!he(C.arrowStartY),c=!he(C.endX)||!he(C.endY),h=!he(C.arrowEndX)||!he(C.arrowEndY),u=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,x=(T=Yie({x:C.ctrlpts[0],y:C.ctrlpts[1]},{x:C.startX,y:C.startY}))<u,p=(d=Yie({x:C.ctrlpts[0],y:C.ctrlpts[1]},{x:C.endX,y:C.endY}))<u,g=!1,(y||f||x)&&(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,b),x?(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)),(c||h||p)&&(g=!0,m=C.ctrlpts[0]-r.x,y=C.ctrlpts[1]-r.y,b=m/(v=Math.sqrt(m*m+y*y)),x=y/v,T=Math.max(i,n),k={x:C.ctrlpts[0]+2*b*T,y:C.ctrlpts[1]+2*x*T},w=o.intersectLine(r.x,r.y,a,s,k.x,k.y,0,l,t),p?(C.ctrlpts[0]=C.ctrlpts[0]+b*(u-d),C.ctrlpts[1]=C.ctrlpts[1]+x*(u-d)):(C.ctrlpts[0]=w[0]+b*u,C.ctrlpts[1]=w[1]+x*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=Kie(a.allpts[s],a.allpts[s+2],a.allpts[s+4],.5),a.midY=Kie(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 c=a.radii[l/2-1],h=a.isArcRadius[l/2-1];a.roundCorners.push(uee({x:a.allpts[l-2],y:a.allpts[l-1]},{x:a.allpts[l],y:a.allpts[l+1],radius:c},{x:a.allpts[l+2],y:a.allpts[l+3]},c,h))}}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||he(t.startX)&&he(t.startY)&&he(t.endX)&&he(t.endY)?t.loggedErr=!1:t.loggedErr||(t.loggedErr=!0,oie("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(),P=new bie,B=mt(function(e,t){return[].concat(iQ(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||Vte(l,"segments")||"straight"===l||"straight-triangle"===l||Vte(l,"taxi"),l="unbundled-bezier"===l||"bezier"===l,n=o.source,o=o.target,n=[n.poolIndex(),o.poolIndex()].sort(),o=B(n,i),null==(a=P.get(o))&&(a={eles:[]},$.push({pairId:n,edgeIsUnbundled:i}),P.set(o,a)),a.eles.push(s),i&&(a.hasUnbundled=!0),l&&(a.hasBezier=!0)))}for(var c=mt(function(){var e=$[F],t=e.pairId,t=B(t,e.edgeIsUnbundled),r=P.get(t),i=(r.hasUnbundled||(e=r.eles[0].parallelEdges().filter(function(e){return e.isBundledBezier()}),fie(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(),c=r.tgtW=n.outerWidth(),h=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,b,x,T,k,w,C,S,E,_=r.eles[y],A=_[0]._private.rscratch,R=_.pstyle("curve-style").value,L="unbundled-bezier"===R||Vte(R,"segments")||Vte(R,"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,b=d.intersectLine(s.x,s.y,c,h,a.x,a.y,0,g,f),x=r.tgtIntn=b,T=r.intersectionPts={x1:N[0],x2:b[0],y1:N[1],y2:b[1]},k=r.posPts={x1:a.x,x2:s.x,y1:a.y,y2:s.y},S=b[1]-N[1],C=b[0]-N[0],w=Math.sqrt(C*C+S*S),he(w)&&ohe<=w||(w=Math.sqrt(Math.max(C*C,.01)+Math.max(S*S,.01))),C=r.vector={x:C,y:S},E={x:-(S=r.vectorNorm={x:C.x/w,y:C.y/w}).y,y:S.x},r.nodesOverlap=!he(w)||d.checkPoint(N[0],N[1],0,c,h,s.x,s.y,g,f)||u.checkPoint(b[0],b[1],0,o,l,a.x,a.y,p,m),r.vectorNormInverse=E,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:c,srcH:h,tgtW:o,tgtH:l,srcIntn:x,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:-S.x,y:-S.y},vectorNormInverse:{x:-E.x,y:-E.y}}),I?w:r);A.nodesOverlap=N.nodesOverlap,A.srcIntn=N.srcIntn,A.tgtIntn=N.tgtIntn,A.isRound=R.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,L):i===n?D.findLoopPoints(_,N,y,L):R.endsWith("segments")?D.findSegmentsPoints(_,N):R.endsWith("taxi")?D.findTaxiPoints(_,N):"straight"===R||!L&&r.eles.length%2==1&&y===Math.floor(r.eles.length/2)?D.findStraightEdgePoints(_):D.findBezierPoints(_,N,y,L,I),D.findEndpoints(_),D.tryToCorrectInvalidPoints(_,N),D.checkForInvalidEdgeWarning(_),D.storeAllpts(_),D.storeEdgeProjections(_),D.calculateArrowAngles(_),D.recalculateEdgeLabelProjections(_),D.calculateLabelAngles(_)}},"_loop"),F=0;F<$.length;F++)c();this.findHaystackPoints(t)}}},mt(dee,"getPts"),Dhe.getSegmentPoints=function(e){var t=e[0]._private.rscratch;if(this.recalculateRenderedStyle(e),"segments"===t.edgeType)return dee(t.segpts)},Dhe.getControlPoints=function(e){var t=e[0]._private.rscratch;if(this.recalculateRenderedStyle(e),"bezier"===(e=t.edgeType)||"multibezier"===e||"self"===e||"compound"===e)return dee(t.ctrlpts)},Dhe.getEdgeMidpoint=function(e){var t=e[0]._private.rscratch;return this.recalculateRenderedStyle(e),{x:t.midX,y:t.midY}},Mhe={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,c=e.pstyle("source-distance-from-node").pfValue,h=r._private.rscratch,u=i._private.rscratch,d=e.pstyle("curve-style").value,p=e._private.rscratch,g=p.edgeType,d=Vte(d,"taxi"),f="self"===g||"compound"===g,m="bezier"===g||"multibezier"===g||f,y="bezier"!==g,v="straight"===g||"segments"===g,g="segments"===g,b=m||y||v,f=f||d,d=e.pstyle("source-endpoint"),x=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,S,E,_,A=null!=(A=2===(null==(p.tgtManEndpt=k)||null==(A=k.pfValue)?void 0:A.length)?k.pfValue:null)?A:[0,0],R=null!=(R=2===(null==d||null==(R=d.pfValue)?void 0:R.length)?d.pfValue:null)?R:[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,S=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+R[0],n.y+R[1]],S=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?E=_:"outside-to-line"!==f&&"outside-to-line-or-label"!==f||(E=[n.x,n.y]),t=this.nodeShapes[this.getNodeShape(i)].intersectLine(a.x,a.y,i.outerWidth(),i.outerHeight(),E[0],E[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,R=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-=R:"right"===w&&(A+=R),0<(u=Ine(E[0],E[1],[A-R,g-y,A+R,g-y,A+R,g+y,A-R,g+y],a.x,a.y)).length&&(v=Hie(f=n,$ie(t)),(m=Hie(f,$ie(u)))<(k=v)&&(t=u,k=m),2<u.length)&&Hie(f,{x:u[2],y:u[3]})<k&&(t=[u[2],u[3]]))),Dne(t,_,this.arrowShapes[s].spacing(e)+l)),w=Dne(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"===x?t=[n.x,n.y]:d.units?t=this.manualEndptToPx(r,d):"outside-to-line"===x?t=p.srcIntn:("outside-to-node"===x||"outside-to-node-or-label"===x?C=S:"outside-to-line"!==x&&"outside-to-line-or-label"!==x||(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,h),"outside-to-node-or-label"!==x&&"outside-to-line-or-label"!==x||(A=(E=r._private.rscratch).labelWidth,R=E.labelX,g=E.labelY,y=A/2,v=E.labelHeight/2,"top"===(m=r.pstyle("text-valign").value)?g-=v:"bottom"===m&&(g+=v),"left"===(f=r.pstyle("text-halign").value)?R-=y:"right"===f&&(R+=y),0<(k=Ine(C[0],C[1],[R-y,g-v,R+y,g-v,R+y,g+v,R-y,g+v],n.x,n.y)).length&&(_=Hie(u=a,$ie(t)),(s=Hie(u,$ie(k)))<(l=_)&&(t=[k[0],k[1]],l=s),2<k.length)&&Hie(u,{x:k[2],y:k[3]})<l&&(t=[k[2],k[3]]))),Dne(t,S,this.arrowShapes[o].spacing(e)+c)),i=Dne(t,S,this.arrowShapes[o].gap(e)+c);p.startX=i[0],p.startY=i[1],p.arrowStartX=w[0],p.arrowStartY=w[1],b&&(he(p.startX)&&he(p.startY)&&he(p.endX)&&he(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]}}},Ohe={},mt(pee,"pushBezierPts"),Ohe.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)pee(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},Ohe.recalculateEdgeProjections=function(e){this.findEdgeControlPoints(e)},Phe={recalculateNodeLabelProjection:function(e){var t=e.pstyle("label").strValue;if(!Pte(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,c=e.pstyle("text-valign").strValue,h=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(c){case"top":i=o.y-a/2-s;break;case"bottom":i=o.y+a/2+s;break;default:i=o.y}h.labelX=r,h.labelY=i,t.labelX=r,t.labelY=i,this.calculateLabelAngles(e),this.applyLabelDimensions(e)}}},lhe=mt(function(e,t){return t=Math.atan(t/e),0===e&&t<0&&(t*=-1),t},"lineAngleFromDelta"),che=mt(function(e,t){var r=t.x-e.x;return lhe(r,t.y-e.y)},"lineAngle"),hhe=mt(function(e,t,r,i){var n=Jie(0,i-.001,1),i=Jie(0,i+.001,1),n=Zie(e,t,r,n),e=Zie(e,t,r,i);return che(n,e)},"bezierAngle"),Phe.recalculateEdgeLabelProjections=function(C){var S,E,_,e,d=C._private,A=d.rscratch,p=this,R={mid:C.pstyle("label").strValue,source:C.pstyle("source-label").strValue,target:C.pstyle("target-label").strValue};(R.mid||R.source||R.target)&&(S={x:A.midX,y:A.midY},(E=mt(function(e,t,r){vie(d.rscratch,e,t,r),vie(d.rstyle,e,t,r)},"setRs"))("labelX",null,S.x),E("labelY",null,S.y),e=lhe(A.midDispX,A.midDispY),E("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=Yie(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 c=e[l],h=e[l-1];h&&(c.startDist=h.startDist+h.length),o(c,c.p0,a[l*s],0,p.bezierProjPcts[0]);for(var u=0;u<s-1;u++)o(c,a[l*s+u],a[l*s+u+1],p.bezierProjPcts[u],p.bezierProjPcts[u+1]);o(c,a[l*s+s-1],c.p2,p.bezierProjPcts[s-1],1)}return _.cache=e},"createControlPointInfo"),(e=mt(function(e){var t,r="source"===e;if(R[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 c=a[r?l:a.length-1-l],h=0;h<c.segments.length;h++){var u=c.segments[r?h:c.segments.length-1-h],d=l===a.length-1&&h===c.segments.length-1,s=o;if(i<=(o+=u.length)||d){n={cp:c,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=Jie(0,m,1);S=Zie(p.p0,p.p1,p.p2,m),t=hhe(p.p0,p.p1,p.p2,m);break;case"straight":case"segments":case"haystack":for(var y,v,b,x,T=0,k=A.allpts.length,w=0;w+3<k&&(x=r?(b={x:A.allpts[w],y:A.allpts[w+1]},{x:A.allpts[w+2],y:A.allpts[w+3]}):(b={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=Yie(b,x))));w+=2);f=Jie(0,(i-v)/y,1),S=Qie(b,x,f),t=che(b,x)}E("labelX",e,S.x),E("labelY",e,S.y),E("labelAutoAngle",e,t)}},"calculateEndProjection"))("source"),e("target"),this.applyLabelDimensions(C))},Phe.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},Phe.applyPrefixedLabelDimensions=function(e,t){var r,i,n,a=e._private,s=this.getLabelText(e,t),o=Yre(s,e._private.labelDimsKey);yie(a.rscratch,"prefixedLabelDimsKey",t)!==o&&(vie(a.rscratch,"prefixedLabelDimsKey",t,o),o=this.calculateLabelDimensions(e,s),s=e.pstyle("line-height").pfValue,e=e.pstyle("text-wrap").strValue,r=yie(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,vie(a.rstyle,"labelWidth",t,n),vie(a.rscratch,"labelWidth",t,n),vie(a.rstyle,"labelHeight",t,o),vie(a.rscratch,"labelHeight",t,o),vie(a.rscratch,"labelLineHeight",t,i))},Phe.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?(vie(i.rscratch,e,r,t),t):yie(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,c="anywhere"===e.pstyle("text-overflow-wrap").value,h=[],u=/[\s\u200b]+|$/g,d=0;d<o.length;d++){var p=o[d],g=this.calculateLabelDimensions(e,p).width;if(c&&(p=p.split("").join("")),l<g){var f,m="",y=0,v=KZ(p.matchAll(u));try{for(v.s();!(f=v.n()).done;){var b=f.value,x=b[0],T=p.substring(y,b.index),y=b.index+x.length,k=0===m.length?T:m+T+x;this.calculateLabelDimensions(e,k).width<=l?m+=T+x:(m&&h.push(m),m=T+x)}}catch(e){v.e(e)}finally{v.f()}m.match(/^[\s\u200b]+$/)||h.push(m)}else h.push(p)}a("labelWrapCachedLines",h),t=a("labelWrapCachedText",h.join(`
|
||
`)),a("labelWrapKey",s)}else if("ellipsis"===n){var w=e.pstyle("text-max-width").pfValue,C="",S=!1;if(this.calculateLabelDimensions(e,t).width<w)return t;for(var E=0;E<t.length&&!(w<this.calculateLabelDimensions(e,C+t[E]+"…").width);E++)C+=t[E],E===t.length-1&&(S=!0);return S||(C+="…"),C}return t},Phe.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"}},Phe.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,c=0,h=t.split(`
|
||
`),u=0;u<h.length;u++){var d=h[u],d=o.measureText(d),d=Math.ceil(d.width),p=n,l=Math.max(d,l);c+=p}return{width:l+=0,height:c+=0}},Phe.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},uhe=!(Phe.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"))}),dhe={},[She,Nhe,Dhe,Mhe,Ohe,Phe,{getNodeShape:function(e){var t=e.pstyle("shape").value;return"cutrectangle"===t&&(e.width()<28||e.height()<28)?(uhe||(oie("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),uhe=!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,c=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,c(e)},"onDirtyBounds")).on("style.* background.*",mt(function(e){e=e.target,c(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&&(c(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 c=0;c<n.length;c++){var h=n[c],u=h._private.rstyle,d=h.position();this.recalculateNodeLabelProjection(h),u.nodeX=d.x,u.nodeY=d.y,u.nodeW=h.pstyle("width").pfValue,u.nodeH=h.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(Yle),t.interactive=t.filter(function(e){return e.interactive()}),this.cachedZSortedEles=t,this.updateCachedGrabbedEles()):t=this.cachedZSortedEles,t}}].forEach(function(e){Kte(dhe,e)}),Hhe={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)}},Zhe={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||Bte(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 h,u,d,c,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"),b=mt(function(e){return e.shiftKey||e.metaKey||e.ctrlKey},"isMultSelKeyDown"),G=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"),S=mt(function(e){e[0]._private.rscratch.inDragLayer=!1},"setOutDragLayer"),E=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),L(e,{inDragLayer:t.inDragLayer}),I.updateCachedGrabbedEles()},"addNodesToDrag"),R=D,M=mt(function(e){e&&(I.getCachedZSortedEles().forEach(function(e){C(e),S(e),_(e)}),I.updateCachedGrabbedEles())},"freeDraggedElements"),L=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()}),Mre(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 c=s[l];if(r<=c.clientX&&c.clientX<=r+n&&i<=c.clientY&&c.clientY<=i+a){o=!0;break}}if(!o)return!1;for(var h=I.container,u=e.target.parentNode,d=!1;u;){if(u===h){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,c,h;!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],c=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"),E(a),a.selected()?(c=I.dragData.possibleDragElements=e.collection(),h=e.$(function(e){return e.isNode()&&e.selected()&&I.nodeIsGrabbable(e)}),D(h,{addToList:c}),a.emit(s("grabon")),h.forEach(l)):(c=I.dragData.possibleDragElements=e.collection(),R(a,{addToList:c}),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]),c=I.hoverData.mdownPos,h=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,h=(h&&(e=o[0]-h[0],o=o[1]-h[1],I.hoverData.isOverThresholdDrag=e=e*e+o*o>=I.desktopTapThreshold2),b(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()&&h?(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},he(f[0])&&he(f[1])&&(s.x+=f[0],s.y+=f[1],r)&&((i=I.hoverData.dragDelta)&&he(i[0])&&he(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()||!h&&a.panningEnabled()&&a.userPanningEnabled()?!I.hoverData.selecting&&a.panningEnabled()&&a.userPanningEnabled()&&G(g,I.hoverData.downs)&&(I.hoverData.dragging=!0,I.hoverData.justStartedPan=!0,u[4]=0,I.data.bgActivePosistion=$ie(c),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,c;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,c=b(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()?(h&&clearTimeout(h),u=!0,d=null,N(a,["dblclick","dbltap","vdblclick"],t,{x:r[0],y:r[1]})):(h=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||b(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()||c?l.selected()?l.unselect(["tapunselect"]):l.select(["tapselect"]):c||(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()||c||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),c=a&&a.grabbed(),M(n),c&&(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==c)if(4<=g.length){var s,o=g;if((c=X(o,5))||(s=Math.abs(o[0]),c=K(o)&&5<s),c)for(var l=0;l<o.length;l++)f=Math.min(Math.abs(o[l]),f)}else g.push(a),n=!0;else c&&(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*Vie(a):a)/-250,c&&(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 P,B,$,F,z,q,j,W,U,m,y,Q,J,ee,te,re,v,x,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"),ce=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=(W=o[0],U=o[1],m=o[2],y=o[3],P=t.touches[0].clientX-W,B=t.touches[0].clientY-U,$=t.touches[1].clientX-W,F=t.touches[1].clientY-U,Q=0<=P&&P<=m&&0<=$&&$<=m&&0<=B&&B<=y&&0<=F&&F<=y,i.pan()),l=i.zoom();if(z=le(P,B,$,F),q=ce(P,B,$,F),j=[((m=[(P+$)/2,(B+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})):R(l,{addToList:o}),E(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 c=I.touchData.startPosition=[null,null,null,null,null,null],h=0;h<n.length;h++)c[h]=a[h]=n[h];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 c=[],h=0;h<n.length;h++)c[h]=n[h]-a[h];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(),x=t.touches[0].clientX-W,T=t.touches[0].clientY-U,k=t.touches[1].clientX-W,w=t.touches[1].clientY-U,2.25<=(l=ce(x,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,b,l=I.touchData.start,x=t.touches[0].clientX-W,T=t.touches[0].clientY-U,k=t.touches[1].clientX-W,w=t.touches[1].clientY-U,r=(g=le(x,T,k,w))/z;Q&&(b=(x-P+(k-$))/2,E=(T-B+(w-F))/2,r=(L=i.zoom())*r,S=i.pan(),R=j[0]*L+S.x,v=j[1]*L+S.y,b={x:-r/L*(R-S.x-b)+R,y:-r/L*(v-S.y-E)+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:b,cancelOnFailedZoom:!0}),i.emit(o("pinchzoom")),z=g,P=x,B=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,S,E,_,A,R=I.touchData.start,L=I.touchData.last;if(I.hoverData.draggingEles||I.swipePanning||(f=I.findNearestElement(n[0],n[1],!0,!0)),e&&null!=R&&t.preventDefault(),e&&null!=R&&I.nodeIsDraggable(R)&&(p?(C=I.dragData.touchDragEles,(S=!I.dragData.didDrag)&&D(C,{inDragLayer:!0}),I.dragData.didDrag=!0,E={x:0,y:0},he(c[0])&&he(c[1])&&(E.x+=c[0],E.y+=c[1],S)&&(I.redrawHint("eles",!0),(_=I.touchData.dragDelta)&&he(_[0])&&he(_[1])&&(E.x+=_[0],E.y+=_[1])),I.hoverData.draggingEles=!0,C.silentShift(E).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(c[0]),_.push(c[1])):(_[0]+=c[0],_[1]+=c[1])),N(R||f,["touchmove","tapdrag","vmousemove"],t,{x:n[0],y:n[1]}),R&&R.grabbed()||f==L||(L&&L.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==R||R.pannable())&&i.panningEnabled()&&i.userPanningEnabled()&&(G(R,I.touchData.starts)&&(t.preventDefault(),I.data.bgActivePosistion||(I.data.bgActivePosistion=$ie(I.touchData.startPosition)),I.swipePanning?(i.panBy({x:c[0]*s,y:c[1]*s}),i.emit(o("dragpan"))):p&&(I.swipePanning=!0,i.panBy({x:u*s,y:d*s}),i.emit(o("dragpan")),R)&&(R.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(h=0;h<n.length;h++)a[h]=n[h];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()?(x&&clearTimeout(x),v=!0,T=null,N(e,["dbltap","vdblclick"],t,{x:s[0],y:s[1]})):(x=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 c=0;c<s.length;c++)o[c]=s[c];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))}))}},nue={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 Ine(n,a,this.points,e,t,r/2,i/2,s)},"intersectLine"),checkPoint:mt(function(e,t,r,i,n,a,s,o){return Tne(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 AQ(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 Sne(n,a,e,t,r/2+s,i/2+s)},"intersectLine"),checkPoint:mt(function(e,t,r,i,n,a,s,o){return Ene(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?$ne(r,i):n;for(var c=new Array(m.length/2),h=0;h<m.length/2;h++)c[h]={x:e+o*m[2*h],y:t+l*m[2*h+1]};for(var u,d,p=c.length,g=c[p-1],f=0;f<p;f++)u=c[f%p],d=c[(f+1)%p],a[s][f]=uee(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 Nne(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 kne(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:Mne(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 pne(n,a,e,t,r,i,s,o)},"intersectLine"),checkPoint:mt(function(e,t,r,i,n,a,s,o){var l=i/2,c=n/2,h=(o="auto"===o?Bne(i,n):o,2*(o=Math.min(l,c,o)));return!!(Tne(e,t,this.points,a,s,i,n-h,[0,-1],r)||Tne(e,t,this.points,a,s,i-h,n,[0,-1],r)||Ene(e,t,h,h,a-l+o,s-c+o,r)||Ene(e,t,h,h,a+l-o,s-c+o,r)||Ene(e,t,h,h,a+l-o,s+c-o,r)||Ene(e,t,h,h,a-l+o,s+c-o,r))},"checkPoint")}},generateCutRectangle:function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:Fne(),points:Mne(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)]),Ine(n,a,i,e,t)},"intersectLine"),checkPoint:mt(function(e,t,r,i,n,a,s,o){return o="auto"===o?this.cornerLength:o,!(!Tne(e,t,this.points,a,s,i,n-2*o,[0,-1],r)&&!Tne(e,t,this.points,a,s,i-2*o,n,[0,-1],r))||(o=this.generateCutTrianglePts(i,n,a,s),xne(e,t,o.topLeft))||xne(e,t,o.topRight)||xne(e,t,o.bottomRight)||xne(e,t,o.bottomLeft)},"checkPoint")}},generateBarrel:function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:Mne(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=Zie({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.15),r=Zie({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.5),i=Zie({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)),Ine(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=qne(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=(c=qne(i,n)).heightOffset,c=c.widthOffset;if(Tne(e,t,this.points,a,s,i,n-2*l,[0,-1],r)||Tne(e,t,this.points,a,s,i-2*c,n,[0,-1],r))return!0;for(var h=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),c=Math.min(s,r),s=Math.max(s,r);return o<=e&&e<=l&&c<=t&&t<=s&&(r=zne(i,n,a),0<(o=mne(r[0],r[1],r[2],e).filter(function(e){return 0<=e&&e<=1})).length)?o[0]:null},"getCurveT"),d=Object.keys(h),p=0;p<d.length;p++){var g=h[d[p]],f=u(e,t,g);if(null!=f){var m=g[5],y=g[3],v=g[1],m=Kie(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:Mne(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=Rne(n,a,e,t,e-(r/2+s),l,e+(r/2+s),l,!1)).length?l:pne(n,a,e,t,r,i,s,o)},"intersectLine"),checkPoint:mt(function(e,t,r,i,n,a,s,o){var l,c,h=2*(o="auto"===o?Bne(i,n):o);return!(!Tne(e,t,this.points,a,s,i,n-h,[0,-1],r)&&!Tne(e,t,this.points,a,s,i-h,n,[0,-1],r)&&!(xne(e,t,[a-(l=i/2+2*r),s-(c=n/2+2*r),a-l,s,a+l,s,a+l,s-c])||Ene(e,t,h,h,a+i/2-o,s+n/2-o,r)||Ene(e,t,h,h,a-i/2+o,s+n/2-o,r)))},"checkPoint")}},registerNodeShapes:function(){var e=this.nodeShapes={},r=this,t=(this.generateEllipse(),this.generatePolygon("triangle",Mne(3,0)),this.generateRoundPolygon("round-triangle",Mne(3,0)),this.generatePolygon("rectangle",Mne(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",Mne(5,0)),this.generateRoundPolygon("round-pentagon",Mne(5,0)),this.generatePolygon("hexagon",Mne(6,0)),this.generateRoundPolygon("round-hexagon",Mne(6,0)),this.generatePolygon("heptagon",Mne(7,0)),this.generateRoundPolygon("round-heptagon",Mne(7,0)),this.generatePolygon("octagon",Mne(8,0)),this.generateRoundPolygon("round-octagon",Mne(8,0)),new Array(20)),n=Pne(5,0),a=Pne(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=One(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)}}},aue={timeToRender:function(){return this.redrawTotalTime/this.redrawCount},redraw:function(e){e=e||pie(),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&&aie("Priority is not optional for beforeRender"),(r=this.beforeRenderCallbacks).push({fn:e,priority:t}),r.sort(function(e,t){return t.priority-e.priority}))}},phe=mt(function(e,t,r){for(var i=e.beforeRenderCallbacks,n=0;n<i.length;n++)i[n].fn(t,r)},"beforeRenderCallbacks"),aue.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?(phe(n,!0,e),t=Fre(),n.render(n.renderOptions),r=n.lastDrawTime=Fre(),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):phe(n,!1,e)),n.skipFrame=!1,$re(i))},"renderFn"),$re(i))},Bhe=mt(function(e){this.init(e)},"BaseRenderer"),(fhe=(ghe=Bhe).prototype).clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],fhe.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"))&&oie("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=he(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()},fhe.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()))},fhe.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{}},fhe.isHeadless=function(){return!1},[$he,dhe,Hhe,Zhe,nue,aue].forEach(function(e){Kte(fhe,e)}),ee={setupDequeueing:mt(function(f){return mt(function(){var d,e,t,p=this,g=this.renderer;p.dequeueingSetup||(p.dequeueingSetup=!0,d=Mre(function(){g.redrawHint("eles",!0),g.redrawHint("drag",!0),g.redraw()},f.deqRedrawThreshold),e=mt(function(e,t){var r=Fre(),i=g.averageRedrawTime,n=g.lastRedrawTime,a=[],s=g.cy.extent(),o=g.getPixelRatio();for(e||g.flushRenderedStyleQueue();;){var l=(c=Fre())-r,c=c-t;if(n<1e3/60){if(c>=f.deqFastCost*(1e3/60-(e?i:0)))break}else if(e){if(l>=f.deqCost*n||l>=f.deqAvgCost*i)break}else if(c>=f.deqNoDrawCost*(1e3/60))break;var h=f.deq(p,o,s);if(!(0<h.length))break;for(var u=0;u<h.length;u++)a.push(h[u])}0<a.length&&(f.onDeqd(p,a),!e)&&f.shouldRedraw(p,a,o,s)&&d()},"dequeue"),t=f.priority||nie,g.beforeRender(e,t(p)))},"setupDequeueingImpl")},"setupDequeueing")},mt(L,"ElementTextureCacheLookup"),mhe=XZ(L,[{key:"getIdsFor",value:mt(function(e){null==e&&aie("Can not get id list for null key");var t=this.idsByKey,r=this.idsByKey.get(e);return r||(r=new xie,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 bie,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")}]),yhe={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},vhe=sue({getKey:null,doesEleInvalidateKey:rie,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:tie,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),bhe=mt(function(e,t){this.renderer=e,this.onDequeues=[],e=vhe(t),Kte(this,e),this.lookup=new mhe(e.getKey,e.doesEleInvalidateKey),this.setupDequeueing()},"ElementTextureCache"),(cue=bhe.prototype).reasons=yhe,cue.getTextureQueue=function(e){return this.eleImgCaches=this.eleImgCaches||{},this.eleImgCaches[e]=this.eleImgCaches[e]||[]},cue.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},cue.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new _ie(function(e,t){return t.reqs-e.reqs})},cue.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},cue.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(Gie(o*r)):i)<-4)i=-4;else if(7.99<=o||3<i)return null;var o=Math.pow(2,i),c=t.h*o,h=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=c<=25?25:c<=50?50:50*Math.ceil(c/50);if(1024<c||1024<h)return null;var p=(m=a.getTextureQueue(d))[m.length-2],g=mt(function(){return a.recycleTexture(d,h)||a.addTexture(d,h)},"addNewTxr");(p=(p=p||m[m.length-1])||g()).width-p.usedWidth<h&&(p=g());for(var f,m=mt(function(e){return e&&e.scaledLabelShown===u},"scalableFrom"),g=n&&n===yhe.dequeue,y=n&&n===yhe.highQuality,n=n&&n===yhe.downscale,v=i+1;v<=3;v++){var b=l.get(e,v);if(b){f=b;break}}var x,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,h,c)},"downscale");if(p.context.setTransform(1,0,0,1,0,0),p.context.clearRect(p.usedWidth,0,h,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,yhe.downscale);k()}else{if(!g&&!y&&!n)for(var C=i-1;-4<=C;C--){var S=l.get(e,C);if(S){x=S;break}}if(m(x))return a.queueElement(e,i),x;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:h,height:c,scaledLabelShown:u},p.usedWidth+=Math.ceil(8+h),p.eleCaches.push(s),l.set(e,i,s),a.checkTextureFullness(p)}return s},cue.invalidateElements=function(e){for(var t=0;t<e.length;t++)this.invalidateElement(e[t])},cue.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)}},cue.checkTextureUtility=function(e){e.invalidatedWidth>=.2*e.width&&this.retireTexture(e)},cue.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);.8<e.usedWidth/e.width&&10<=e.fullnessChecks?gie(t,e):e.fullnessChecks++},cue.retireTexture=function(e){var t=e.height,r=this.getTextureQueue(t),i=this.lookup;gie(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)}fie(n),this.getRetiredTextureQueue(t).push(e)},cue.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},cue.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,fie(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),gie(i,a),r.push(a),a}},cue.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)},cue.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],c=n.hasCache(l,s.level);r[o]=null,c||(i.push(s),o=this.getBoundingBox(l),this.getElement(l,o,e,s.level,yhe.dequeue))}return i},cue.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=eie,t.updateItem(n),t.pop(),r[i]=null):n.eles.unmerge(e))},cue.onDequeue=function(e){this.onDequeues.push(e)},cue.offDequeue=function(e){gie(this.onDequeues,e)},cue.setupDequeueing=ee.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(lne(o,i))return!0}return!1},"shouldRedraw"),priority:mt(function(e){return e.renderer.beforeRenderPriorities.eleTxrDeq},"priority")}),xhe=mt(function(e){var r=this,t=(e=r.renderer=e).cy,t=(r.layersByLevel={},r.firstGet=!0,r.lastInvalidationTime=Fre()-500,r.skipping=!1,r.eleTxrDeqs=t.collection(),r.scheduleElementRefinement=Mre(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 _ie(t),r.setupDequeueing()},"LayeredTextureCache"),gue=xhe.prototype,The=0,khe=Math.pow(2,53)-1,gue.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:The=++The%khe,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},gue.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(Gie(t*e)))<-4)a=-4;else if(3.99<=t||2<a)return null;s.validateLayersElesOrdering(a,n);var o,l,c=s.layersByLevel,h=Math.pow(2,a),u=c[a]=c[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=c[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&&gie(u,i)}},"checkTempLevels");if(t)return u;i();var d=mt(function(){if(!o){o=ene();for(var e=0;e<n.length;e++)ine(o,n[e].boundingBox())}return o},"getBb"),p=mt(function(e){var t=(e=e||{}).after,r=(d(),Math.ceil(o.w*h)),i=Math.ceil(o.h*h);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],b=v._private.rscratch,x=(b=b.imgLayerCaches=b.imgLayerCaches||{})[a];if(x)g=x;else{if((!g||g.eles.length>=f||!une(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),b[a]=g}}return l||(m?null:u)},gue.getEleLevelForLayerLevel=function(e,t){return e},gue.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))},gue.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},gue.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}}},gue.updateElementsInLayers=function(e,t){for(var r=Ite(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 c=o[l];!c||n&&this.getEleLevelForLayerLevel(c.level)!==n.level||t(c,a,n)}},gue.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},gue.invalidateElements=function(e){var i=this;0!==e.length&&(i.lastInvalidationTime=Fre(),0!==e.length)&&i.haveLayers()&&i.updateElementsInLayers(e,mt(function(e,t,r){i.invalidateLayer(e)},"invalAssocLayers"))},gue.invalidateLayer=function(e){if(this.lastInvalidationTime=Fre(),!e.invalid){var t=e.level,r=e.eles,i=this.layersByLevel[t];gie(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)}}},gue.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"))},gue.enqueueElementRefinement=function(e){this.eleTxrDeqs.merge(e),this.scheduleElementRefinement()},gue.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))}},gue.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},gue.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()}},gue.requestRedraw=Mre(function(){var e=this.renderer;e.redrawHint("eles",!0),e.redrawHint("drag",!0),e.redraw()},100),gue.setupDequeueing=ee.setupDequeueing({deqRedrawThreshold:50,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:mt(function(e,t){return e.dequeue(t)},"deq"),onDeqd:nie,shouldRedraw:tie,priority:mt(function(e){return e.renderer.beforeRenderPriorities.lyrTxrDeq},"priority")}),whe={},mt(gee,"polygon"),mt(fee,"triangleBackcurve"),mt(mee,"triangleTee"),mt(yee,"circleTriangle"),mt(vee,"circle$1"),whe.arrowShapeImpl=function(e){return(Che=Che||{polygon:gee,"triangle-backcurve":fee,"triangle-tee":mee,"circle-triangle":yee,"triangle-cross":mee,circle:vee})[e]},She={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,c,h,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?(h=(u=r.getRotationPoint(t)).x,e.translate(h,u=u.y),e.rotate(a),(c=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(-h,-u),c||this.setImgSmoothing(e,!1)):r.drawElement(e,t))}},Ehe=mt(function(){return 0},"getZeroRotation"),_he=mt(function(e,t){return e.getTextAngle(t,null)},"getLabelRotation"),Ahe=mt(function(e,t){return e.getTextAngle(t,"source")},"getSourceLabelRotation"),Rhe=mt(function(e,t){return e.getTextAngle(t,"target")},"getTargetLabelRotation"),Lhe=mt(function(e,t){return t.effectiveOpacity()},"getOpacity"),Ihe=mt(function(e,t){return t.pstyle("text-opacity").pfValue*t.effectiveOpacity()},"getTextOpacity"),She.drawCachedElement=function(e,t,r,i,n,a){var s=(c=this.data).eleTxrCache,o=c.lblTxrCache,l=c.slbTxrCache,c=c.tlbTxrCache,h=t.boundingBox(),a=!0===a?s.reasons.highQuality:null;0===h.w||0===h.h||!t.visible()||i&&!lne(h,i)||(h=t.isEdge(),i=t.element()._private.rscratch.badLine,this.drawElementUnderlay(e,t),this.drawCachedElementPortion(e,t,s,r,n,a,Ehe,Lhe),h&&i||this.drawCachedElementPortion(e,t,o,r,n,a,_he,Ihe),h&&!i&&(this.drawCachedElementPortion(e,t,l,r,n,a,Ahe,Ihe),this.drawCachedElementPortion(e,t,c,r,n,a,Rhe,Ihe)),this.drawElementOverlay(e,t))},She.drawElements=function(e,t){for(var r=0;r<t.length;r++)this.drawElement(e,t[r])},She.drawCachedElements=function(e,t,r,i){for(var n=0;n<t.length;n++)this.drawCachedElement(e,t[n],r,i)},She.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)}},She.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)},Nhe={drawEdge:function(t,r,e){var i,n,a,s,o,l,c,h,u,d,p,g,f,m,y,v,b,x=!(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,c=r.pstyle("line-outline-color").value,u=h=d*k,d=mt(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:h;"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]:h;t.lineWidth=s+l,t.lineCap=o,0<l?(w.colorStrokeStyle(t,c[0],c[1],c[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,x)},"drawText"),t.lineJoin="round","yes"===r.pstyle("ghost").value?(y=r.pstyle("ghost-offset-x").pfValue,v=r.pstyle("ghost-offset-y").pfValue,b=r.pstyle("ghost-opacity").value,b*=h,t.translate(y,v),d(b),f(b),t.translate(-y,-v)):k(),g(),d(),f(),p(),m(),e&&t.translate(i.x1,i.y1))}},Dhe=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"),Nhe.drawEdgeOverlay=Dhe("overlay"),Nhe.drawEdgeUnderlay=Dhe("underlay"),Nhe.drawEdgePath=function(e,t,r,i){var n,a=e._private.rscratch,s=t,o=!1,l=this.usePaths(),c=e.pstyle("line-dash-pattern").pfValue,h=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(c),s.lineDashOffset=h;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=KZ(a.roundCorners);try{for(g.s();!(p=g.n()).done;)hee(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([])},Nhe.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()}},Nhe.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)},Nhe.drawArrowhead=function(e,t,r,i,n,a,s){var o,l,c,h,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",c=t.pstyle(r+"-arrow-fill").value,h=t.pstyle("width").pfValue,u="match-line"===(p=t.pstyle(r+"-arrow-width")).value?h:p.pfValue,"%"===p.units&&(u*=h),p=t.pstyle("opacity").value,d=e.globalCompositeOperation,1===(s=void 0===s?p:s)&&"hollow"!==c||(e.globalCompositeOperation="destination-out",this.colorFillStyle(e,255,255,255,1),this.colorStrokeStyle(e,255,255,255,1),this.drawArrowShape(t,e,l,h,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,c,h,o,u,i,n,a))},Nhe.drawArrowShape=function(e,t,r,i,n,a,s,o,l){var c,h,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=(h=this.arrowPathCache=this.arrowPathCache||[])[n=Yre(n)])?(c=t=u,p=!0):(c=t=new Path2D,h[n]=c)),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(c):t.fill()),"hollow"!==r&&"both"!==r||(t.lineWidth=a/(d?e:1),t.lineJoin="miter",d?t.stroke(c):t.stroke()),d&&(t.scale(1/e,1/e),t.rotate(-l),t.translate(-s,-o))},Mhe={safeDrawImage:function(e,t,r,i,n,a,s,o,l,c){if(!(n<=0||a<=0||l<=0||c<=0))try{e.drawImage(t,r,i,n,a,s,o,l,c)}catch(e){oie(e)}},drawInscribedImage:function(e,t,r,i,n){var a,s,o,l=(c=r.position()).x,c=c.y,h=r.cy().style(),u=(h=h.getIndexedStyle.bind(h))(r,"background-fit","value",i),d=h(r,"background-repeat","value",i),p=r.width(),g=r.height(),f=2*r.padding(),p=p+("inner"===h(r,"background-width-relative-to","value",i)?0:f),g=g+("inner"===h(r,"background-height-relative-to","value",i)?0:f),f=r._private.rscratch,m="node"===h(r,"background-clip","value",i),n=h(r,"background-image-opacity","value",i)*n,y=h(r,"background-image-smoothing","value",i),v=r.pstyle("corner-radius").value,b=("auto"!==v&&(v=r.pstyle("corner-radius").pfValue),t.width||t.cachedW),x=t.height||t.cachedH,T=(null!=b&&null!=x||(document.body.appendChild(t),b=t.cachedW=t.width||t.offsetWidth,x=t.cachedH=t.height||t.offsetHeight,document.body.removeChild(t)),b),k=x;"auto"!==h(r,"background-width","value",i)&&(T="%"===h(r,"background-width","units",i)?h(r,"background-width","pfValue",i)*p:h(r,"background-width","pfValue",i)),"auto"!==h(r,"background-height","value",i)&&(k="%"===h(r,"background-height","units",i)?h(r,"background-height","pfValue",i)*g:h(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=h(r,"background-position-x","units",i),s=h(r,"background-position-x","pfValue",i),u+="%"===a?(p-T)*s:s,a=h(r,"background-offset-x","units",i),s=h(r,"background-offset-x","pfValue",i),u+="%"===a?(p-T)*s:s,a=c-g/2,s=h(r,"background-position-y","units",i),o=h(r,"background-position-y","pfValue",i),a+="%"===s?(g-k)*o:o,s=h(r,"background-offset-y","units",i),o=h(r,"background-offset-y","pfValue",i),a+="%"===s?(g-k)*o:o,f.pathCache&&(u-=l,a-=c,c=l=0),h=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,c,p,g,v,f),e.clip())),this.safeDrawImage(e,t,0,0,b,x,u,a,T,k),m&&e.restore()):(o=e.createPattern(t,d),e.fillStyle=o,this.nodeShapes[this.getNodeShape(r)].draw(e,l,c,p,g,v,f),e.translate(u,a),e.fill(),e.translate(-u,-a)),e.globalAlpha=h,s)&&this.setImgSmoothing(e,i)}},Ohe={eleTextBiggerThanMin:function(e,t){var r,i;return t||(i=e.cy().zoom(),r=this.getPixelRatio(),i=Math.ceil(Gie(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 c,i=!r;r&&e.translate(-(c=r).x1,-c.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(c.x1,c.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(bee,"circle"),mt(xee,"roundRect"),Ohe.getTextAngle=function(e,t){var r=e._private.rscratch,i=e.pstyle((t?t+"-":"")+"text-rotation");return"autorotate"===i.strValue?(r=yie(r,"labelAngle",t),e.isEdge()?r:0):"none"===i.strValue?0:i.pfValue},Ohe.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=yie(n,"labelX",r="main"===r?null:r),c=yie(n,"labelY",r),h=this.getLabelText(t,r);if(null!=h&&""!==h&&!isNaN(l)&&!isNaN(c)){this.setupTextStyle(e,t,u);var u=r?r+"-":"",d=yie(n,"labelWidth",r),p=yie(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,c+=u,0!==(f=i?this.getTextAngle(t,r):0)&&(s=l,o=c,e.translate(s,o),e.rotate(f),c=l=0),y){case"top":break;case"center":c+=p/2;break;case"bottom":c+=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,b="round-rectangle"===(x=t.pstyle("text-background-shape").strValue)||"roundrectangle"===x,x="circle"===x;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,S=t.pstyle("text-border-style").value,E=0<g,_=0<v&&0<u,A=l-i;switch(m){case"left":A-=d;break;case"center":A-=d/2}var R=c-p-i,L=d+2*i,i=p+2*i;if(E&&(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(S){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([])}b?(e.beginPath(),xee(e,A,R,L,i,2)):x?(e.beginPath(),bee(e,A,R,L,i)):(e.beginPath(),e.rect(A,R,L,i)),E&&e.fill(),_&&e.stroke(),_&&"double"===S&&(w=v/2,e.beginPath(),b?xee(e,A+w,R+w,L-2*w,i-2*w,2):e.rect(A+w,R+w,L-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=yie(n,"labelWrapCachedLines",r),D=yie(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":c-=(N.length-1)*D;break;case"center":case"bottom":c-=(N.length-1)*D}for(var M=0;M<N.length;M++)0<I&&e.strokeText(N[M],l,c),e.fillText(N[M],l,c),c+=D}else 0<I&&e.strokeText(h,l,c),e.fillText(h,l,c);0!==f&&(e.rotate(-f),e.translate(-s,-o))}}},Phe={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],S=this,s=C._private,o=s.rscratch,E=C.position();if(he(E.x)&&he(E.y)&&(!r||C.visible())){var i,l=r?C.effectiveOpacity():1,_=S.usePaths(),n=!1,r=C.padding(),A=C.width()+2*r,R=C.height()+2*r;e&&w.translate(-(i=e).x1,-i.y1);for(var a=C.pstyle("background-image").value,c=new Array(a.length),h=new Array(a.length),P=0,u=0;u<a.length;u++){var B,d=a[u];(c[u]=null!=d&&"none"!==d)&&(B=C.cy().style().getIndexedStyle(C,"background-image-crossorigin","value",u),P++,h[u]=S.getCachedImage(d,B,function(){s.backgroundTimestamp=Date.now(),C.emitAndNotify("background")}))}var p,g,f,m,y,v=C.pstyle("background-blacken").value,L=C.pstyle("border-width").pfValue,$=C.pstyle("background-opacity").value*l,b=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,j=C.pstyle("border-dash-pattern").pfValue,W=C.pstyle("border-dash-offset").pfValue,U=C.pstyle("border-opacity").value*l,N=C.pstyle("outline-width").pfValue,x=C.pstyle("outline-color").value,G=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(){S.eleFillStyle(w,C,0<arguments.length&&void 0!==arguments[0]?arguments[0]:$)},"setupShapeColor")),Y=mt(function(){S.colorStrokeStyle(w,b[0],b[1],b[2],0<arguments.length&&void 0!==arguments[0]?arguments[0]:U)},"setupBorderColor"),H=mt(function(){S.colorStrokeStyle(w,x[0],x[1],x[2],0<arguments.length&&void 0!==arguments[0]?arguments[0]:V)},"setupOutlineColor"),X=mt(function(e,t,r,i){var n,a=S.nodePathCache=S.nodePathCache||[],i=Hre("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(E.x,E.y),T=X(A,R,T,k),p=T.path,n=T.cacheHit),mt(function(){var e;n||(e=_?{x:0,y:0}:E,S.nodeShapes[S.getNodeShape(C)].draw(p||w,e.x,e.y,A,R,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<h.length;n++){var a=C.cy().style().getIndexedStyle(C,"background-image-containment","value",n);t&&"over"===a||!t&&"inside"===a?i++:c[n]&&h[n].complete&&!h[n].error&&(i++,S.drawInscribedImage(w,h[n],C,n,e))}s.backgrounding=i!==P,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;S.hasPie(C)&&(S.drawPie(w,C,t),e)&&(_||S.nodeShapes[S.getNodeShape(C)].draw(w,E.x,E.y,A,R,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;S.hasStripe(C)&&(w.save(),_?w.clip(o.pathCache):(S.nodeShapes[S.getNodeShape(C)].draw(w,E.x,E.y,A,R,M,o),w.clip()),S.drawStripe(w,C,t),w.restore(),e)&&(_||S.nodeShapes[S.getNodeShape(C)].draw(w,E.x,E.y,A,R,M,o))},"drawStripe"),Q=mt(function(){var e=0<v?0:255;0!==v&&(S.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<L){if(w.lineWidth=L,w.lineCap=q,w.lineJoin=z,w.setLineDash)switch(F){case"dotted":w.setLineDash([1,1]);break;case"dashed":w.setLineDash(j),w.lineDashOffset=W;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-L,-R/2-L,A+2*L,R+2*L),e.addPath(p),w.clip(e,"evenodd")),_?w.stroke(p):w.stroke(),w.restore()):_?w.stroke(p):w.stroke(),"double"===F&&(w.lineWidth=L/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(G){case"dotted":w.setLineDash([1,1]);break;case"dashed":w.setLineDash([4,2]);break;case"solid":case"double":w.setLineDash([])}var e,t=E,r=(_&&(t={x:0,y:0}),S.getNodeShape(C)),i="inside"===I?0:L,n=("outside"===I&&(i*=2),(A+i+(N+D))/A),a=(R+i+(N+D))/R,s=A*n,o=R*a,l=S.nodeShapes[r].points;if(_&&(e=X(s,o,r,l).path),"ellipse"===r)S.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 c=0,h=0,u=0;"round-diamond"===r?c=1.4*(i+D+N):"round-heptagon"===r?(c=1.075*(i+D+N),u=-(i/2+D+N)/35):"round-hexagon"===r?c=1.12*(i+D+N):"round-pentagon"===r?(c=1.13*(i+D+N),u=-(i/2+D+N)/15):"round-tag"===r?(c=1.12*(i+D+N),h=.07*(i/2+N+D)):"round-triangle"===r&&(c=(i+D+N)*(Math.PI/2),u=-(i+D/2+N)/Math.PI),0!==c&&(s=A*(n=(A+c)/A),["round-hexagon","round-tag"].includes(r)||(o=R*(a=(R+c)/R)));for(var d=s/2,p=o/2,g=(M="auto"===M?$ne(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+h+d*l[2*y],y:t.y+u+p*l[2*y+1]};for(var v,b,x=f.length,T=f[x-1],k=0;k<x;k++)v=f[k%x],b=f[(k+1)%x],m[k]=uee(T,v,b,g),T=v;S.drawRoundPolygonPath(e||w,t.x+h,t.y+u,A*n,R*a,l,m)}else["roundrectangle","round-rectangle"].includes(r)?(M="auto"===M?Bne(s,o):M,S.drawRoundRectanglePath(e||w,t.x,t.y,s,o,M+(i+N+D)/2)):["cutrectangle","cut-rectangle"].includes(r)?(M="auto"===M?Fne():M,S.drawCutRectanglePath(e||w,t.x,t.y,s,o,null,M+(i+N+D)/4)):["bottomroundrectangle","bottom-round-rectangle"].includes(r)?(M="auto"===M?Bne(s,o):M,S.drawBottomRoundRectanglePath(e||w,t.x,t.y,s,o,M+(i+N+D)/2)):"barrel"===r?S.drawBarrelPath(e||w,t.x,t.y,s,o):(l=r.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(r)?wne(Cne(l,(i+N+D)/A)):wne(Cne(l,-(i+N+D)/A)),S.drawPolygonPath(e||w,t.x,t.y,A,R,l));_?w.stroke(e):w.stroke(),"double"===G&&(w.lineWidth=i/3,c=w.globalCompositeOperation,w.globalCompositeOperation="destination-out",_?w.stroke(e):w.stroke(),w.globalCompositeOperation=c),w.setLineDash&&w.setLineDash([])}},"drawOutline"),te=mt(function(){t&&S.drawNodeOverlay(w,C,E,A,R)},"drawOverlay"),re=mt(function(){t&&S.drawNodeUnderlay(w,C,E,A,R)},"drawUnderlay"),ie=mt(function(){S.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*U),J(),K(0!==v||0!==L),Z(0!==v||0!==L),T(y,!1),Q(y),w.translate(-g,-f)),_&&w.translate(-E.x,-E.y),re(),_&&w.translate(E.x,E.y),H(),ee(),r(),k(),T(l,!0),Y(),J(),K(0!==v||0!==L),Z(0!==v||0!==L),T(l,!1),Q(),_&&w.translate(-E.x,-E.y),ie(),te(),e&&w.translate(i.x1,i.y1)}}},Bhe=mt(function(u){if(["overlay","underlay"].includes(u))return function(e,t,r,i,n){var a,s,o,l,c,h;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,c=t.pstyle("".concat(u,"-corner-radius")).value,0<s)&&(r=r||t.position(),null!=i&&null!=n||(h=t.padding(),i=t.width()+2*h,n=t.height()+2*h),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,c),e.fill())};throw new Error("Invalid state")},"drawNodeOverlayUnderlay"),Phe.drawNodeOverlay=Bhe("overlay"),Phe.drawNodeUnderlay=Bhe("underlay"),Phe.hasPie=function(e){return(e=e[0])._private.hasPie},Phe.hasStripe=function(e){return(e=e[0])._private.hasStripe},Phe.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,c=i.x,h=i.y,i=t.width(),u=t.height(),d=Math.min(i,u)/2,p=0;if(this.usePaths()&&(h=c=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,b=(1<v+p&&(v=1-p),1.5*Math.PI+2*Math.PI*p),x=(b+=l)+2*Math.PI*v;0===f||1<=p||1<p+v||(0===n?(e.beginPath(),e.moveTo(c,h),e.arc(c,h,d,b,x)):(e.beginPath(),e.arc(c,h,d,b,x),e.arc(c,h,n,x,b,!0)),e.closePath(),this.colorFillStyle(e,m[0],m[1],m[2],y),e.fill(),p+=v)}},Phe.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,c=this.usePaths(),h=(e.save(),t.pstyle("stripe-direction").value),u=t.pstyle("stripe-size");switch(h){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),c&&(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()},$he={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=Yie(t,l),Yie(i,l)):(l=a?{x:0,y:0}:r.position(),t=r.paddedWidth(),r.paddedHeight()),c=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(),c=e.createLinearGradient(l.x,l.y,t.x,t.y);else{var h=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":c=e.createLinearGradient(h.x,h.y-d,h.x,h.y+d);break;case"to-top":c=e.createLinearGradient(h.x,h.y+d,h.x,h.y-d);break;case"to-left":c=e.createLinearGradient(h.x+u,h.y,h.x-u,h.y);break;case"to-right":c=e.createLinearGradient(h.x-u,h.y,h.x+u,h.y);break;case"to-bottom-right":case"to-right-bottom":c=e.createLinearGradient(h.x-u,h.y-d,h.x+u,h.y+d);break;case"to-top-right":case"to-right-top":c=e.createLinearGradient(h.x-u,h.y+d,h.x+u,h.y-d);break;case"to-bottom-left":case"to-left-bottom":c=e.createLinearGradient(h.x+u,h.y-d,h.x-u,h.y+d);break;case"to-top-left":case"to-left-top":c=e.createLinearGradient(h.x+u,h.y+d,h.x-u,h.y-d)}}if(!c)return null;for(var p=o.length===s.length,g=s.length,f=0;f<g;f++)c.addColorStop(p?o[f]:f/(g-1),"rgba("+s[f][0]+","+s[f][1]+","+s[f][2]+","+n+")");return c},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),c=a*s;if(l!==r.canvasWidth||c!==r.canvasHeight){r.fontCaches=null,(e=i.canvasContainer).style.width=n+"px",e.style.height=a+"px";for(var h=0;h<r.CANVAS_LAYERS;h++)(t=i.canvases[h]).width=l,t.height=c,t.style.width=n+"px",t.style.height=a+"px";for(h=0;h<r.BUFFER_COUNT;h++)(t=i.bufferCanvases[h]).width=l,t.height=c,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=c*r.textureMult),r.canvasWidth=l,r.canvasHeight=c,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||pie(),s.cy),o=e.forcedContext,l=e.drawAllLayers,r=e.drawOnlyNodeLayer,c=e.forcedZoom,h=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(),b=void 0!==c?c:v,x=t.pan(),T={x:x.x,y:x.y},k={zoom:v,pan:{x:x.x,y:x.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),b*=i,(T=h||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 S(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=b,n=s.canvasWidth,s.canvasHeight):(r={x:x.x*p,y:x.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)),h&&e.translate(h.x,h.y),c&&e.scale(c,c)}mt(C,"mbclear"),mt(S,"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,E=u.contexts[s.NODE],g=s.textureCache.texture,k=s.textureCache.viewport,E.setTransform(1,0,0,1,0,0),d?C(E,0,0,k.width,k.height):E.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(E,f[0],f[1],f[2],m),E.fillRect(0,0,k.width,k.height),v=t.zoom(),S(E,!1),E.clearRect(k.mpan.x,k.mpan.y,k.width/k.zoom/i,k.height/k.zoom/i),E.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 E,_,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,S(E=o||(_?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]:u.contexts[s.NODE]),d&&!_?"motionBlur":void 0),g?s.drawCachedNodes(E,w.nondrag,i,f):s.drawLayeredElements(E,w.nondrag,i,f),s.debug&&s.drawDebugPoints(E,w.nondrag),l||d||(n[s.NODE]=!1)),!r&&(n[s.DRAG]||l||m[s.DRAG])&&(_=d&&!m[s.DRAG]&&1!==p,S(E=o||(_?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]:u.contexts[s.DRAG]),d&&!_?"motionBlur":void 0),g?s.drawCachedNodes(E,w.drag,i,f):s.drawCachedElements(E,w.drag,i,f),s.debug&&s.drawDebugPoints(E,w.drag),l||d||(n[s.DRAG]=!1)),this.drawSelectionRectangle(e,S),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",Fhe||(n=s.measureText(e),Fhe=n.actualBoundingBoxAscent),s.fillText(e,0,Fhe),s.strokeRect(0,Fhe+10,250,20),s.fillRect(0,Fhe+10,250*Math.min(a/60,1),20)),o||(l[i.SELECT_BOX]=!1))}},mt(Tee,"compileShader"),mt(kee,"createProgram"),mt(wee,"createTextureCanvas"),mt(Cee,"getEffectivePanZoom"),mt(See,"getEffectiveZoom"),mt(Eee,"modelToRenderedPosition"),mt(_ee,"isSimpleShape"),mt(Aee,"arrayEqual"),mt(Ree,"toWebGLColor"),mt(Lee,"indexToVec4"),mt(Iee,"vec4ToIndex"),mt(Nee,"createTexture"),mt(Dee,"getTypeInfo"),mt(Mee,"createTypedArray"),mt(Oee,"createTypedArrayView"),mt(Pee,"createBufferStaticDraw"),mt(Bee,"createBufferDynamicDraw"),mt($ee,"create3x3MatrixBufferDynamicDraw"),mt(Fee,"createPickingFrameBuffer"),zhe=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(zee,"create"),mt(qee,"identity"),mt(jee,"multiply"),mt(Wee,"translate"),mt(Uee,"rotate"),mt(Gee,"scale"),mt(Vee,"projection"),mt(N,"Atlas"),qhe=XZ(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 c=this.texSize,t=this.texRows,h=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=h*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*h,w:u,h:d},g[1]={x:l.freePointer.x+u,y:l.freePointer.row*h,w:0,h:d},l.freePointer.x+=u,l.freePointer.x==c&&(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),c-l.freePointer.x),i=u-r,n=h,a=l.freePointer.x,s=l.freePointer.row*h,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)*h,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<=c)r();else{if(this.freePointer.row>=t-1)return!1;(this.freePointer.x!==c&&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=Nee(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"),jhe=XZ(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 qhe(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 c=this,h=this.markedKeys;if(0===h.size)console.log("nothing to garbage collect");else{var u,d=[],p=new Map,g=null,e=KZ(this.atlases);try{var t=mt(function(){var t=u.value,e=t.getKeys(),r=Yee(h,e);if(0===r.size)return d.push(t),e.forEach(function(e){return p.set(e,t)}),1;g||(g=c._createAtlas(),d.push(g));var i,n=KZ(e);try{for(n.s();!(i=n.n()).done;){var a,s,o,l=i.value;r.has(l)||(s=(a=rQ(t.getOffsets(l),2))[0],o=a[1],g.canFit({w:s.w+o.w,h:s.h})||(g.lock(),g=c._createAtlas(),d.push(g)),t.canvas&&(c._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=rQ(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(Yee,"intersection"),mt(O,"AtlasManager"),Whe=XZ(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 jhe(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=Kte({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,c=!1,h=KZ(e);try{for(h.s();!(t=h.n()).done;){var u=t.value;if(s(u)){var d,p=KZ(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)}),c=!0):(r=r.getID?r.getID(u):u.id(),i=n._key(i,r),void 0===(r=n.typeAndIdToKey.get(i))||Aee(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){h.e(e)}finally{h.f()}return c&&(this.gc(),l=!1),l},"invalidate")},{key:"gc",value:mt(function(){var e,t=KZ(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=rQ(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=KZ(this.collections);try{for(r.s();!(e=r.n()).done;){var i=rQ(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"),Uhe=XZ(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")}]),Ghe={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},Vhe={IGNORE:1,USE_BB:2},mt(D,"ElementDrawingWebGL"),Yhe=XZ(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=kee(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),Pee(r,"vec2",i.aPosition,e),this.transformBuffer=$ee(r,t,i.aTransform),this.indexBuffer=Bee(r,t,"vec4",i.aIndex),this.vertTypeBuffer=Bee(r,t,"int",i.aVertType),this.atlasIdBuffer=Bee(r,t,"int",i.aAtlasId),this.texBuffer=Bee(r,t,"vec4",i.aTex),this.pointAPointBBuffer=Bee(r,t,"vec4",i.aPointAPointB),this.pointCPointDBuffer=Bee(r,t,"vec4",i.aPointCPointD),this.lineWidthBuffer=Bee(r,t,"vec2",i.aLineWidth),this.colorBuffer=Bee(r,t,"vec4",i.aColor),this.cornerRadiusBuffer=Bee(r,t,"vec4",i.aCornerRadius),this.borderColorBuffer=Bee(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 Vte(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]:Ghe.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===Vhe.IGNORE)return;if(s==Vhe.USE_BB)return void this.drawPickingRectangle(e,t,r)}var o,l=KZ(i.getAtlasInfo(e,r));try{for(l.s();!(o=l.n()).done;){var c=o.value,h=c.atlas,u=c.tex1,d=c.tex2;n.canAddToCurrentBatch(h)||this.endBatch();for(var p=n.getAtlasIndexForBatch(h),g=0,f=[[u,!0],[d,!1]];g<f.length;g++){var m,y,v,b=rQ(f[g],2),x=b[0],T=b[1];0!=x.w&&(m=this.instanceCount,this.vertTypeBuffer.getView(m)[0]=0,Lee(t,this.indexBuffer.getView(m)),this.atlasIdBuffer.getView(m)[0]=p,(y=this.texBuffer.getView(m))[0]=x.x,y[1]=x.y,y[2]=x.w,y[3]=x.h,v=this.transformBuffer.getMatrixView(m),this.setTransformMatrix(e,v,a,c,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){qee(e);var n,a,s=0!==(s=r.getRotation?r.getRotation(i):0)?(Wee(e,e,[(n=r.getRotationPoint(i)).x,n.y]),Uee(e,e,s),a=(n=r.getRotationOffset(i)).x+(t.xOffset||0),n.y+(t.yOffset||0)):(a=t.x1,t.y1);Wee(e,e,[a,s]),Gee(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,Lee(t,this.indexBuffer.getView(i)),Ree([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)),Lee(t,this.indexBuffer.getView(r)),Ree(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)&&(Ree(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?Bne(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,qee(o=this.transformBuffer.getMatrixView(e)),Wee(o,o,[i,n]),Gee(o,o,[s,s]),Uee(o,o,l),this.vertTypeBuffer.getView(e)[0]=3,Lee(t,this.indexBuffer.getView(e)),Ree(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,Lee(t,this.indexBuffer.getView(e)),Ree(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 c=this.instanceCount,h=(this.vertTypeBuffer.getView(c)[0]=2,Lee(t,this.indexBuffer.getView(c)),Ree(s,o,this.colorBuffer.getView(c)),this.lineWidthBuffer.getView(c)[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&&(h=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(c));v[0]=h,v[1]=u,v[2]=d,v[3]=p,(h=this.pointCPointDBuffer.getView(c))[0]=g,h[1]=f,h[2]=m,h[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),KZ(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 c=0;c<o.length;c++)e.activeTexture(e.TEXTURE0+c),e.bindTexture(e.TEXTURE_2D,o[c].texture),e.uniform1i(a.uTextures[c],c);e.uniform1f(a.uZoom,See(this.r)),e.uniformMatrix3fv(a.uPanZoomMatrix,!1,this.panZoomMatrix),e.uniform1i(a.uAtlasSize,this.batchManager.getAtlasSize()),t=Ree(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")}]),Hhe={initWebgl:function(e,t){var i=this,r=i.data.contexts[i.WEBGL],r=(e.bgColor=Hee(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=Fee(r),i.pickingFrameBuffer.needsDraw=!0,i.drawing=new Yhe(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?Vhe.USE_BB:Vhe.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:_ee,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:Xhe(t.getLabelKey,null),getBoundingBox:Khe(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:Xhe(t.getSourceLabelKey,"source"),getBoundingBox:Khe(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:Xhe(t.getTargetLabelKey,"target"),getBoundingBox:Khe(t.getTargetLabelBox,"target"),drawClipped:!0,drawElement:t.drawTargetLabel,getRotation:r("target"),getRotationPoint:t.getTargetLabelRotationPoint,getRotationOffset:t.getTargetLabelRotationOffset,isVisible:n("target-label")}),Mre(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()}),Kee(i)}},mt(Hee,"getBGColor"),mt(Xee,"getLabelLines"),Xhe=mt(function(t,i){return function(e){var r=t(e);return 1<(e=Xee(e,i)).length?e.map(function(e,t){return"".concat(r,"_").concat(t)}):r}},"getStyleKeysForLabel"),Khe=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=Xee(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(Kee,"overrideCanvasRendererFunctions"),mt(Zee,"clearWebgl"),mt(Qee,"clearCanvas"),mt(Jee,"createPanZoomMatrix"),mt(ete,"setContextTransform"),mt(tte,"drawSelectionRectangle"),mt(rte,"drawAxes"),mt(ite,"drawAtlases"),mt(nte,"getPickingIndexes"),mt(ate,"findNearestElementsWebgl"),mt(ste,"drawEle"),mt(ote,"renderWebgl"),Zhe={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 hee(t,e)}),t.closePath()},drawRoundRectanglePath:function(e,t,r,i,n,a){var s=i/2,o=n/2,i="auto"===a?Bne(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?Bne(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?Fne():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=qne(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()}},Qhe=Math.sin(0),Jhe=Math.cos(0),eue={},tue={},rue=Math.PI/40,iue=0*Math.PI;iue<2*Math.PI;iue+=rue)eue[iue]=Math.sin(iue),tue[iue]=Math.cos(iue);Zhe.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,c=0*Math.PI;c<2*Math.PI;c+=rue)a=t-o*eue[c]*Qhe+o*tue[c]*Jhe,s=r+l*tue[c]*Qhe+l*eue[c]*Jhe,0===c?e.moveTo(a,s):e.lineTo(a,s);e.closePath()},nue={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=he(e.maxWidth)||he(e.maxHeight),s=this.getPixelRatio(),o=1,l=(void 0!==e.scale?(n*=e.scale,i*=e.scale,o=e.scale):a&&(c=l=1/0,he(e.maxWidth)&&(l=o*e.maxWidth/n),he(e.maxHeight)&&(c=o*e.maxHeight/i),n*=o=Math.min(l,c),i*=o),a||(n*=s,i*=s,o*=s),document.createElement("canvas")),c=(l.width=n,l.height=i,l.style.width=n+"px",l.style.height=i+"px",l.getContext("2d"));return 0<n&&0<i&&(c.clearRect(0,0,n,i),c.globalCompositeOperation="source-over",a=this.getCachedZSortedEles(),e.full?(c.translate(-r.x1*o,-r.y1*o),c.scale(o,o),this.drawElements(c,a),c.scale(1/o,1/o),c.translate(r.x1*o,r.y1*o)):(r={x:(s=t.pan()).x*o,y:s.y*o},o*=t.zoom(),c.translate(r.x,r.y),c.scale(o,o),this.drawElements(c,a),c.scale(1/o,1/o),c.translate(-r.x,-r.y)),e.bg)&&(c.globalCompositeOperation="destination-over",c.fillStyle=e.bg,c.rect(0,0,n,i),c.fill()),l}},mt(lte,"b64ToBlob"),mt(cte,"b64UriToB64"),mt(hte,"output"),nue.png=function(e){return hte(e,this.bufferCanvasImage(e),"image/png")},nue.jpg=function(e){return hte(e,this.bufferCanvasImage(e),"image/jpeg")},aue={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)}}},(oue=(sue=ute).prototype).CANVAS_LAYERS=3,oue.SELECT_BOX=0,oue.DRAG=1,oue.NODE=2,oue.WEBGL=3,oue.CANVAS_TYPES=["2d","2d","2d","webgl2"],oue.BUFFER_COUNT=3,oue.TEXTURE_BUFFER=0,oue.MOTIONBLUR_BUFFER_NODE=1,oue.MOTIONBLUR_BUFFER_DRAG=2,mt(ute,"CanvasRenderer"),oue.redrawHint=function(e,t){switch(e){case"eles":this.data.canvasNeedsRedraw[oue.NODE]=t;break;case"drag":this.data.canvasNeedsRedraw[oue.DRAG]=t;break;case"select":this.data.canvasNeedsRedraw[oue.SELECT_BOX]=t;break;case"gc":this.data.gc=!0}},lue=typeof Path2D<"u",oue.path2dEnabled=function(e){if(void 0===e)return this.pathsEnabled;this.pathsEnabled=!!e},oue.usePaths=function(){return lue&&this.pathsEnabled},oue.setImgSmoothing=function(e,t){null!=e.imageSmoothingEnabled?e.imageSmoothingEnabled=t:(e.webkitImageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t)},oue.getImgSmoothing=function(e){return null!=e.imageSmoothingEnabled?e.imageSmoothingEnabled:e.webkitImageSmoothingEnabled||e.mozImageSmoothingEnabled||e.msImageSmoothingEnabled},oue.makeOffscreenCanvas=function(e,t){var r;return"undefined"!==("u"<typeof OffscreenCanvas?"undefined":sQ(OffscreenCanvas))?r=new OffscreenCanvas(e,t):((r=this.cy.window().document.createElement("canvas")).width=e,r.height=t),r},[whe,She,Nhe,Mhe,Ohe,Phe,$he,Hhe,Zhe,nue,aue].forEach(function(e){Kte(oue,e)}),cue=[{type:"layout",extensions:qce},{type:"renderer",extensions:[{name:"null",impl:cee},{name:"base",impl:ghe},{name:"canvas",impl:sue}]}],hue={},uue={},mt(dte,"setExtension"),mt(pte,"getExtension"),mt(gte,"setModule"),mt(fte,"getModule"),due=mt(function(){return 2===arguments.length?pte.apply(null,arguments):3===arguments.length?dte.apply(null,arguments):4===arguments.length?fte.apply(null,arguments):5===arguments.length?gte.apply(null,arguments):void aie("Invalid extension access syntax")},"extension"),lce.prototype.extension=due,cue.forEach(function(t){t.extensions.forEach(function(e){dte(t.type,e.name,e.impl)})}),pue=mt(function(){if(!(this instanceof pue))return new pue;this.length=0},"Stylesheet"),(gue=pue.prototype).instanceString=function(){return"stylesheet"},gue.selector=function(e){var t=this.length++;return this[t]={selector:e,properties:[]},this},gue.css=function(e,t){var r=this.length-1;if(wte(e))this[r].properties.push({name:e,value:t});else if(Ete(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=sce.properties[s]||sce.properties[Wte(s)])&&(s=s.name,this[r].properties.push({name:s,value:o}))}return this},gue.style=gue.css,gue.generateStyle=function(e){return e=new sce(e),this.appendToStyle(e)},gue.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},(fue=mt(function(e){return Ete(e=void 0===e?{}:e)?new lce(e):wte(e)?due.apply(due,arguments):void 0},"cytoscape")).use=function(e){var t=Array.prototype.slice.call(arguments,1);return t.unshift(fue),e.apply(null,t),this},fue.warnings=function(e){return sie(e)},fue.version="3.33.1",fue.stylesheet=fue.Stylesheet=pue}),yue=qat((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),c=r(4);function h(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(h,"LNode"),h.prototype=Object.create(n.prototype),n)h[i]=n[i];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(e){this.rect.width=e},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(e){this.rect.height=e},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},h.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},h.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},h.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},h.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},h.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},h.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},h.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},h.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},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==a.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.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)},h.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},h.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))},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.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 c(t,r),r=e.inverseTransformPoint(t);this.setLocation(r.x,r.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},e.exports=h},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),c=r(12),h=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 c(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,c=0;c<l;c++){var h=o[c];e&&null!=h.child&&h.updateBounds(),(t=h.getLeft())<i&&(i=t),n<(t=h.getRight())&&(n=t),(t=h.getTop())<a&&(a=t),s<(t=h.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 h,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 c,h=r(1);function i(e){c=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 c){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 h){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 h=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(),c=e.getRight(),h=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(),b=t.getBottom(),x=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]=b,!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]=c,r[1]=n,r[2]=f,r[3]=s)}else{var e=e.height/e.width,t=t.height/t.width,S=(s-n)/(a-i),E=void 0,_=void 0,A=void 0;if(-e==S?(a<i?(r[0]=h,r[1]=u):(r[0]=c,r[1]=l),w=!0):e==S&&(a<i?(r[0]=o,r[1]=l):(r[0]=d,r[1]=u),w=!0),-t==S?(i<a?(r[2]=v,r[3]=b):(r[2]=y,r[3]=m),C=!0):t==S&&(i<a?(r[2]=f,r[3]=m):(r[2]=x,r[3]=b),C=!0),w&&C)return!1;if(c=a<i?s<n?(E=this.getCardinalDirection(e,S,4),this.getCardinalDirection(t,S,2)):(E=this.getCardinalDirection(-e,S,3),this.getCardinalDirection(-t,S,1)):s<n?(E=this.getCardinalDirection(-e,S,1),this.getCardinalDirection(-t,S,3)):(E=this.getCardinalDirection(e,S,2),this.getCardinalDirection(t,S,4)),!w)switch(E){case 1:_=l,r[0]=i+-g/S,r[1]=_;break;case 2:_=n+p*S,r[0]=d,r[1]=_;break;case 3:_=u,r[0]=i+g/S,r[1]=_;break;case 4:_=n+-p*S,r[0]=h,r[1]=_}if(!C)switch(c){case 1:A=m,r[2]=a+-k/S,r[3]=A;break;case 2:A=s+T*S,r[2]=x,r[3]=A;break;case 3:A=b,r[2]=a+k/S,r[3]=A;break;case 4:A=s+-T*S,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,c;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),c=(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 h((s*c-e*o)/i,(l*o-t*c)/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"),c=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 h(e){var t=this;n(this,h),this.length=0,this.head=null,this.tail=null,e?.forEach(function(e){return t.push(e)})}mt(h,"LinkedList"),a=h,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 c(e,this)},"remove")},{key:"pop",value:mt(function(){return c(this.tail,this).value},"pop")},{key:"popNode",value:mt(function(){return c(this.tail,this)},"popNode")},{key:"shift",value:mt(function(){return c(this.head,this).value},"shift")},{key:"shiftNode",value:mt(function(){return c(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=h},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),c=r(17),h=r(27);function u(e){h.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(h.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 c,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 c=s[0];s.splice(0,1),a.add(c);for(var h=c.getEdges(),n=0;n<h.length;n++){var u=h[n].getOtherEnd(c);if(o.get(c)!=u){if(a.has(u)){t=!1;break}s.push(u),o.set(u,c)}}}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=(c=t[s]).getNeighborsList().size;i.set(c,c.getNeighborsList().size),1==o&&r.push(c)}for(l=(l=[]).concat(r);!n;){[].concat(l);for(var l=[],s=0;s<t.length;s++){var c=t[s],h=t.indexOf(c);0<=h&&t.splice(h,1),c.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),c=r(8),h=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)?(c.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()):(c.getIntersection(a,s,l),r=l[2]-l[0],l[3]-l[1]),a=(r=Math.abs(r)<p.MIN_REPULSION_DIST?h.sign(r)*p.MIN_REPULSION_DIST:r)*r+(o=Math.abs(o)<p.MIN_REPULSION_DIST?h.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 c,h,u=a[s][o][l];e.getOwner()!=u.getOwner()||e==u||t.has(u)||n.has(u)||(c=Math.abs(e.getCenterX()-u.getCenterX())-(e.getWidth()/2+u.getWidth()/2),h=Math.abs(e.getCenterY()-u.getCenterY())-(e.getHeight()/2+u.getHeight()/2),c<=this.repulsionRange&&h<=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 c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(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;c(this,h),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(c,"_classCallCheck"),mt(h,"NeedlemanWunsch"),i=h,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=h},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})}),vue=qat((r,i)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t(yue()):"function"==typeof define&&define.amd?define(["layout-base"],t):"object"==typeof r?r.coseBase=t(yue()):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),h=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,c=r(0).Transform;function b(){n.call(this),this.toBeTiled={}}for(i in mt(b,"CoSELayout"),b.prototype=Object.create(n.prototype),n)b[i]=n[i];b.prototype.newGraphManager=function(){var e=new a(this);return this.graphManager=e},b.prototype.newGraph=function(e){return new s(null,this.graphManager,e)},b.prototype.newNode=function(e){return new h(this.graphManager,e)},b.prototype.newEdge=function(e){return new o(null,null,e)},b.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)},b.prototype.layout=function(){return d.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},b.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},b.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},b.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},b.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()}},b.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},b.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}},b.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],c=m.findCenterOfTree(l);t.x=a,t.y=n,(s=b.radialLayout(l,c,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))},b.radialLayout=function(e,t,r){var i=Math.max(this.maxDiagonalInTree(e),u.DEFAULT_RADIAL_SEPARATION),t=(b.branchRadialLayout(t,null,0,359,0,i),l.calculateBounds(e)),n=new c;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)},b.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),[]),c=(l=l.concat(e.getEdges())).length;null!=t&&c--;for(var h=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--,c--}for(var o=null!=t?(l.indexOf(d[0])+1)%u:0,g=Math.abs(i-r)/c,f=o;h!=c;f=++f%u){var m=l[f].getOtherEnd(e);m!=t&&(b.branchRadialLayout(m,e,m=(r+h*g)%360,(m+g)%360,n+a,a),h++)}},b.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},b.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},b.prototype.groupZeroDegreeMembers=function(){var l=this,c={};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 c[a]&&(c[a]=[]),c[a]=c[a].concat(n)}Object.keys(c).forEach(function(e){if(1<c[e].length){var t="DummyCompound_"+e,r=(l.memberGroups[t]=c[e],c[e][0].getParent()),i=new h(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<c[e].length;s++){var o=c[e][s];a.remove(o),n.add(o)}}})},b.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)},b.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})},b.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)}},b.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)})},b.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},b.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},b.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},b.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},b.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)}},b.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,c=0;c<o.length;c++){var h=o[c];h.rect.x=t,h.rect.y=r,t+=h.rect.width+e.horizontalPadding,h.rect.height>l&&(l=h.rect.height)}r+=l+e.verticalPadding}},b.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})},b.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},b.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)},b.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},b.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},b.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))},b.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)}},b.prototype.tilingPreLayout=function(){u.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},b.prototype.tilingPostLayout=function(){u.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},b.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},b.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()},b.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,c,h,u,d=y.MAX_VALUE,p=0;p<s.length;p++)s[p]<d?(d=s[p],l=1,c=p):s[p]==d&&l++;3==l&&0==d?0==s[0]&&0==s[1]&&0==s[2]?h=1:0==s[0]&&0==s[1]&&0==s[3]?h=0:0==s[0]&&0==s[2]&&0==s[3]?h=3:0==s[1]&&0==s[2]&&0==s[3]&&(h=2):h=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()):c,0==h?t.setCenter(e.getCenterX(),e.getCenterY()-e.getHeight()/2-g.DEFAULT_EDGE_LENGTH-t.getHeight()/2):1==h?t.setCenter(e.getCenterX()+e.getWidth()/2+g.DEFAULT_EDGE_LENGTH+t.getWidth()/2,e.getCenterY()):2==h?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=b},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})}),bue=qat((r,i)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t(vue()):"function"==typeof define&&define.amd?define(["cose-base"],t):"object"==typeof r?r.cytoscapeCoseBilkent=t(vue()):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),c(this.options)}mt(o,"extend"),mt(l,"_CoSELayout");var c=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,c=(this.idToLNode={},this.layout=new g),h=this,e=(h.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this}),c.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),c);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(c.newEdge(),a,u).id=n.id())}var d=mt(function(e,t){return t=(e="number"==typeof e?t:e).data("id"),{x:(e=h.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,h.cy.one("layoutready",l.ready),h.cy.trigger({type:"layoutready",layout:h}))},"afterReposition"),i=h.options.refresh,n=0;n<i&&!t;n++)t=h.stopped||h.layout.tick();t?(c.checkLayoutSuccess()&&!c.isSubLayout&&c.doPostLayout(),c.tilingPostLayout&&c.tilingPostLayout(),c.isLayoutFinished=!0,h.options.eles.nodes().positions(d),r(),h.cy.one("layoutstop",h.options.stop),h.cy.trigger({type:"layoutstop",layout:h}),o&&cancelAnimationFrame(o),s=!1):(a=h.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 c.addListener("layoutstarted",function(){"during"===h.options.animate&&(o=requestAnimationFrame(p))}),c.runLayout(),"during"!==this.options.animate&&(h.options.eles.nodes().not(":parent").layoutPositions(h,h.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],c=l.children(),h=l.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});(h=null!=l.outerWidth()&&null!=l.outerHeight()?e.add(new u(r.graphManager,new d(l.position("x")-h.w/2,l.position("y")-h.h/2),new p(parseFloat(h.w),parseFloat(h.h)))):e.add(new u(this.graphManager))).id=l.data("id"),h.paddingLeft=parseInt(l.css("padding")),h.paddingTop=parseInt(l.css("padding")),h.paddingRight=parseInt(l.css("padding")),h.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"),h.labelWidth=o,h.labelHeight=a,h.labelPos=s),this.idToLNode[l.data("id")]=h,isNaN(h.rect.x)&&(h.rect.x=0),isNaN(h.rect.y)&&(h.rect.y=0),null!=c&&0<c.length&&(o=r.getGraphManager().add(r.newGraph(),h),this.processChildrenList(o,c,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 xue(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 Tue(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 kue(i){return new Promise(t=>{let e=Q("body").append("div").attr("id","cy").attr("style","display:none"),r=fue({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});e.remove(),xue(i.nodes,r),Tue(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=>{P.info("Cytoscape ready",e),t(r)})})}function wue(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 Cue(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 Sue,Eue=r(()=>{mue(),Sue=j(bue(),1),bk(),e(),fue.use(Sue.default),mt(xue,"addNodes"),mt(Tue,"addEdges"),mt(kue,"createCytoscapeInstance"),mt(wue,"extractPositionedNodes"),mt(Cue,"extractPositionedEdges")});async function _ue(e,t){P.debug("Starting cose-bilkent layout algorithm");try{Aue(e);var r=await kue(e),i=wue(r),n=Cue(r);return P.debug(`Layout completed: ${i.length} nodes, ${n.length} edges`),{nodes:i,edges:n}}catch(e){throw P.error("Error in cose-bilkent layout algorithm:",e),e}}function Aue(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 Rue,Lue=r(()=>{e(),Eue(),mt(_ue,"executeCoseBilkentLayout"),mt(Aue,"validateLayoutData")}),Iue=r(()=>{Lue(),Rue=mt(async(n,e,{insertCluster:a,insertEdge:s,insertEdgeLabel:o,insertMarkers:t,insertNode:l,log:c,positionEdgeLabel:h},{})=>{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=(c.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,c.debug(`Node ${e.id} dimensions: ${i.width}x`+i.height))})),c.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 _ue(i,n.config);c.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,c.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}])}),c.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))?(c.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),h(e,r))})),c.debug("Cose-bilkent rendering completed")},"render")}),Nue={};Vat(Nue,{render:()=>Due});var Due,Mue,Oue,Pue,Bue,$ue,Fue,zue,que,jue,Wue,Uue,Gue,Vue,Yue,Hue,Xue,Kue,Zue,Que=r(()=>{Iue(),Due=Rue}),Jue=r(()=>{ON(),e(),Mue={},Oue=mt(e=>{for(var t of e)Mue[t.name]=t},"registerLayoutLoaders"),mt(()=>{Oue([{name:"dagre",loader:mt(async()=>Promise.resolve().then(()=>(WZ(),zZ)),"loader")},{name:"cose-bilkent",loader:mt(async()=>Promise.resolve().then(()=>(Que(),Nue)),"loader")}])},"registerDefaultLayoutLoaders")(),Pue=mt(async(e,t)=>{if(!(e.layoutAlgorithm in Mue))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=Mue[e.layoutAlgorithm],a=await n.loader(),{theme:s,themeVariables:o}=e.config,{useGradient:o,gradientStart:l,gradientStop:c}=o,h=t.attr("id");return t.append("defs").append("filter").attr("id",h+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",s?.includes("dark")?"#FFFFFF":"#000000"),t.append("defs").append("filter").attr("id",h+"-drop-shadow-small").attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",s?.includes("dark")?"#FFFFFF":"#000000"),o&&((h=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),h.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)),a.render(e,t,_N,{algorithm:n.algorithm})},"render"),Bue=mt((e="",{fallback:t="dagre"}={})=>{if(e in Mue)return e;if(t in Mue)return P.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")}),ede=r(()=>{Ch(),e(),$ue=mt((e,t,r,i)=>{e.attr("class",r);var{width:r,height:n,x:a,y:s}=Fue(e,t),i=(yh(e,n,r,i),zue(a,s,r,n,t));e.attr("viewBox",i),P.debug(`viewBox configured: ${i} with padding: `+t)},"setupViewPortForSVG"),Fue=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"),zue=mt((e,t,r,i,n)=>e-n+` ${t-n} ${r} `+i,"createViewBox")}),tde=r(()=>{Uu(),e(),fI(),Jue(),ede(),zC(),que=mt(function(e,t){return t.db.getClasses()},"getClasses"),jue=mt(async function(e,t,r,i){P.info("REF0:"),P.info("Drawing state diagram (v2)",t);var{securityLevel:n,flowchart:a,layout:s}=B(),o=(i.db.setDiagramId(t),P.debug("Before getData: "),i.db.getData()),n=(P.debug("Data: ",o),tI(t,n)),l=i.db.getDirection(),s=(o.type=i.type,o.layoutAlgorithm=Bue(s),"dagre"===o.layoutAlgorithm&&"elk"===s&&P.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,P.debug("REF1:",o),await Pue(o,n),o.config.flowchart?.diagramPadding??8);PC.insertTitle(n,"flowchartTitleText",a?.titleTopMargin||0,i.db.getDiagramTitle()),$ue(n,s,"flowchart",a?.useMaxWidth||!1)},"draw"),Wue={getClasses:que,draw:jue}}),rde=r(()=>{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"),B=[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],j=[1,13],W=[1,14],U=[1,15],G=[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],c=[1,46],h=[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],ce=[1,92],he=[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],be=[1,90],xe=[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],Se=[1,125],Ee=[1,124],_e=[44,60,62,74,89,102,105,106,109,111,114,115,116],Ae=[1,134],Re=[1,148],Le=[1,149],Ie=[1,150],Ne=[1,151],De=[1,136],Me=[1,138],Oe=[1,142],Pe=[1,143],Be=[1,144],$e=[1,145],Fe=[1,146],ze=[1,147],qe=[1,152],je=[1,153],We=[1,132],Ue=[1,133],Ge=[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],b=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],x=[1,177],T=[1,173],k=[1,174],w=[1,178],C=[1,175],S=[1,176],Qe=[77,116,119],E=[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],R=[1,250],L=[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],B={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:B,10:$,12:F},{1:[3]},e(z,q,{5:6}),{4:7,9:B,10:$,12:F},{4:8,9:B,10:$,12:F},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:j,9:W,10:U,11:G,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:c,115:h,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:ce,44:he,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:be,120:88},e(d,[2,185]),e(d,[2,186]),e(d,[2,187]),e(d,[2,188]),e(d,[2,189]),e(xe,[2,51]),e(xe,[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:c,115:h,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:c,115:h,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:Se,119:Ee},{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:Re,14:Le,27:Ie,28:128,32:Ne,44:De,60:Me,75:Oe,80:[1,130],81:[1,131],83:141,84:Pe,85:Be,86:$e,87:Fe,88:ze,89:qe,90:je,91:129,105:We,109:Ue,111:Ge,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(xe,[2,44]),{44:t,47:158,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:42,114:c,115:h,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:c,115:h,116:u},{44:t,47:163,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:42,114:c,115:h,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:ce,44:he,60:ue,89:de,105:pe,106:ge,109:fe,111:me,114:ye,115:ve,116:be}),e(v,[2,117],{10:[1,169]}),e(b,[2,183]),e(b,[2,170]),e(b,[2,171]),e(b,[2,172]),e(b,[2,173]),e(b,[2,174]),e(b,[2,175]),e(b,[2,176]),e(b,[2,177]),e(b,[2,178]),e(b,[2,179]),e(b,[2,180]),{44:t,47:170,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:42,114:c,115:h,116:u},{30:171,67:x,80:T,81:k,82:172,116:w,117:C,118:S},{30:179,67:x,80:T,81:k,82:172,116:w,117:C,118:S},{30:181,50:[1,180],67:x,80:T,81:k,82:172,116:w,117:C,118:S},{30:182,67:x,80:T,81:k,82:172,116:w,117:C,118:S},{30:183,67:x,80:T,81:k,82:172,116:w,117:C,118:S},{30:184,67:x,80:T,81:k,82:172,116:w,117:C,118:S},{109:[1,185]},{30:186,67:x,80:T,81:k,82:172,116:w,117:C,118:S},{30:187,65:[1,188],67:x,80:T,81:k,82:172,116:w,117:C,118:S},{30:189,67:x,80:T,81:k,82:172,116:w,117:C,118:S},{30:190,67:x,80:T,81:k,82:172,116:w,117:C,118:S},{30:191,67:x,80:T,81:k,82:172,116:w,117:C,118:S},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:x,80:T,81:k,82:172,116:w,117:C,118:S},{77:[1,197],79:198,116:Se,119:Ee},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:Se,119:Ee},e(_e,[2,84]),{8:p,9:g,10:Ae,11:f,12:Re,14:Le,21:201,27:Ie,29:[1,200],32:Ne,44:De,60:Me,75:Oe,83:141,84:Pe,85:Be,86:$e,87:Fe,88:ze,89:qe,90:je,91:202,105:We,109:Ue,111:Ge,114:Ve,115:Ye,116:He},e(E,[2,101]),e(E,[2,103]),e(E,[2,104]),e(E,[2,157]),e(E,[2,158]),e(E,[2,159]),e(E,[2,160]),e(E,[2,161]),e(E,[2,162]),e(E,[2,163]),e(E,[2,164]),e(E,[2,165]),e(E,[2,166]),e(E,[2,167]),e(E,[2,90]),e(E,[2,91]),e(E,[2,92]),e(E,[2,93]),e(E,[2,94]),e(E,[2,95]),e(E,[2,96]),e(E,[2,97]),e(E,[2,98]),e(E,[2,99]),e(E,[2,100]),{6:11,7:12,8:j,9:W,10:U,11:G,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:c,115:h,116:u,121:te,122:re,123:ie,124:ne,125:ae},{10:se,18:204},{44:[1,205]},e(xe,[2,43]),{10:[1,206],44:t,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:113,114:c,115:h,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:c,115:h,116:u},{10:[1,211],44:t,60:r,89:i,102:n,105:a,106:s,109:o,111:l,113:113,114:c,115:h,116:u},{80:[1,212]},e(v,[2,109],{10:[1,213]}),e(v,[2,111],{10:[1,214]}),{80:[1,215]},e(b,[2,184]),{80:[1,216],98:[1,217]},e(xe,[2,55],{113:113,44:t,60:r,89:i,102:n,105:a,106:s,109:o,111:l,114:c,115:h,116:u}),{31:[1,218],67:x,82:219,116:w,117:C,118:S},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:x,82:219,116:w,117:C,118:S},{30:221,67:x,80:T,81:k,82:172,116:w,117:C,118:S},{51:[1,222],67:x,82:219,116:w,117:C,118:S},{53:[1,223],67:x,82:219,116:w,117:C,118:S},{55:[1,224],67:x,82:219,116:w,117:C,118:S},{57:[1,225],67:x,82:219,116:w,117:C,118:S},{60:[1,226]},{64:[1,227],67:x,82:219,116:w,117:C,118:S},{66:[1,228],67:x,82:219,116:w,117:C,118:S},{30:229,67:x,80:T,81:k,82:172,116:w,117:C,118:S},{31:[1,230],67:x,82:219,116:w,117:C,118:S},{67:x,69:[1,231],71:[1,232],82:219,116:w,117:C,118:S},{67:x,69:[1,234],71:[1,233],82:219,116:w,117:C,118:S},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:x,82:219,116:w,117:C,118:S},e(ke,[2,77]),e(Qe,[2,80]),{77:[1,236],79:198,116:Se,119:Ee},{30:237,67:x,80:T,81:k,82:172,116:w,117:C,118:S},e(Xe,q,{5:238}),e(E,[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:c,115:h,116:u},{10:se,18:240},{10:_,60:A,84:R,92:241,105:L,107:242,108:243,109:I,110:N,111:D,112:M},{10:_,60:A,84:R,92:252,104:[1,253],105:L,107:242,108:243,109:I,110:N,111:D,112:M},{10:_,60:A,84:R,92:254,104:[1,255],105:L,107:242,108:243,109:I,110:N,111:D,112:M},{105:[1,256]},{10:_,60:A,84:R,92:257,105:L,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:c,115:h,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:x,82:219,116:w,117:C,118:S},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:x,82:219,116:w,117:C,118:S},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:x,82:219,116:w,117:C,118:S},{6:11,7:12,8:j,9:W,10:U,11:G,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:c,115:h,116:u,121:te,122:re,123:ie,124:ne,125:ae},e(xe,[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:c,115:h,116:u},e(v,[2,121],{106:tt}),e(rt,[2,130],{108:270,10:_,60:A,84:R,105:L,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:c,115:h,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(xe,[2,52]),{10:_,60:A,84:R,105:L,107:279,108:243,109:I,110:N,111:D,112:M},e(O,[2,133]),{14:ce,44:he,60:ue,89:de,101:280,105:pe,106:ge,109:fe,111:me,114:ye,115:ve,116:be,120:88},{14:ce,44:he,60:ue,89:de,101:281,105:pe,106:ge,109:fe,111:me,114:ye,115:ve,116:be,120:88},{98:[1,282]},e(v,[2,120]),e(m,[2,58]),{30:283,67:x,80:T,81:k,82:172,116:w,117:C,118:S},e(m,[2,66]),e(Xe,q,{5:284}),e(rt,[2,131],{108:270,10:_,60:A,84:R,105:L,109:I,110:N,111:D,112:M}),e(v,[2,126],{120:168,10:[1,285],14:ce,44:he,60:ue,89:de,105:pe,106:ge,109:fe,111:me,114:ye,115:ve,116:be}),e(v,[2,127],{120:168,10:[1,286],14:ce,44:he,60:ue,89:de,105:pe,106:ge,109:fe,111:me,114:ye,115:ve,116:be}),e(v,[2,114]),{31:[1,287],67:x,82:219,116:w,117:C,118:S},{6:11,7:12,8:j,9:W,10:U,11:G,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:c,115:h,116:u,121:te,122:re,123:ie,124:ne,125:ae},{10:_,60:A,84:R,92:289,105:L,107:242,108:243,109:I,110:N,111:D,112:M},{10:_,60:A,84:R,92:290,105:L,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="",c=0,h=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 b,x,T,k,w,C,S,E={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===b||"u"<typeof b)&&(b=v()),o[T]&&o[T][b]))||!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 "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,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: "+b);switch(k[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],E.$=a[a.length-C],E._$={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&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return S;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(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);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}}};B.lexer=$,mt(P,"Parser"),(Uue=new((P.prototype=B).Parser=P)).parser=Uue,Gue=Uue}),ide=r(()=>{rde(),(Vue=Object.assign({},Gue)).parse=e=>(e=e.replace(/}\s*\n/g,`}
|
||
`),Gue.parse(e)),Yue=Vue}),nde=r(()=>{Hue=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")}),ade=r(()=>{ai(),nde(),Xue=mt((e,t)=>{var r=(n=ot)(e,"r"),i=n(e,"g"),n=n(e,"b");return at(r,i,n,t)},"fade"),Kue=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: ${Xue(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;
|
||
}
|
||
${Hue()}
|
||
`,"getStyles"),Zue=Kue}),sde={};Vat(sde,{diagram:()=>ode});var ode,lde,cde,hde,ude=r(()=>{Uu(),gI(),tde(),ide(),ade(),ode={parser:Yue,get db(){return new eI},renderer:Wue,styles:Zue,init:mt(e=>{e.flowchart||(e.flowchart={}),e.layout&&Gh({layout:e.layout}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,Gh({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},"init")}}),dde=r(()=>{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],P=[1,25],B=[1,26],$=[1,27],c=[1,19],F=[1,28],z=[1,29],h=[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],b=[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],x=[1,45],T=[1,46],k=[1,55],w=[40,48,50,51,52,70,71],C=[1,66],S=[1,64],E=[1,61],_=[1,65],A=[1,67],R=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],q=[65,66,67,68,69],j=[1,84],W=[1,83],U=[1,81],G=[1,82],V=[6,10,42,47],L=[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:P,36:B,37:$,40:c,43:F,44:z,48:h,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:P,36:B,37:$,40:c,43:F,44:z,48:h,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(b,[2,54]),t(b,[2,55]),t(b,[2,56]),t(b,[2,57]),t(b,[2,58]),t(r,[2,32]),t(r,[2,33]),t(r,[2,34]),t(r,[2,35]),{16:44,40:x,41:T},{16:47,40:x,41:T},{16:48,40:x,41:T},t(r,[2,4]),{11:49,40:c,48:h,50:u,51:d,52:p},{16:50,40:x,41:T},{18:51,19:[1,52],53:53,54:54,58:k},{11:56,40:c,48:h,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:S,42:E,45:62,46:63,48:_,49:A},t(R,[2,37]),t(R,[2,38]),{16:68,40:x,41:T,42:E},{13:C,38:69,41:S,42:E,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:E,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:j,10:W,39:80,42:U,47:G},{40:[1,85],41:[1,86]},t(V,[2,43],{46:87,13:C,41:S,48:_,49:A}),t(L,[2,45]),t(L,[2,50]),t(L,[2,51]),t(L,[2,52]),t(L,[2,53]),t(r,[2,41],{42:E}),{6:j,10:W,39:88,42:U,47:G},{14:89,40:I,50:N,72:D},{16:93,40:x,41:T},{11:94,40:c,48:h,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:S,45:104,46:63,48:_,49:A},t(r,[2,47]),t(r,[2,48]),t(r,[2,49]),t(R,[2,39]),t(R,[2,40]),t(L,[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:E},{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:x,41:T},t(V,[2,44],{46:87,13:C,41:S,48:_,49:A}),{14:114,40:I,50:N,72:D},{16:115,40:x,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:E}),t(r,[2,11]),{13:[1,120],42:E},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="",c=0,h=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 b,x,T,k,w,C,S,E={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===b||"u"<typeof b)&&(b=v()),o[T]&&o[T][b]))||!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 "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,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: "+b);switch(k[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],E.$=a[a.length-C],E._$={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&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return S;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(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);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"),(lde=new((e.prototype=i).Parser=e)).parser=lde,cde=lde}),pde=r(()=>{e(),Uu(),Wu(),zC(),hde=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=Bh,this.getAccTitle=$h,this.setAccDescription=Fh,this.getAccDescription=zh,this.setDiagramTitle=qh,this.getDiagramTitle=jh,this.getConfig=mt(()=>B().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,P.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:B().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),P.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]),P.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),P.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=[],Ph()}getData(){let e=[],t=[],r=B(),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:FC(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"}}}}),gde={};Vat(gde,{draw:()=>fde});var fde,mde,yde,vde,bde,xde,Tde=r(()=>{Uu(),e(),fI(),Jue(),ede(),zC(),bk(),fde=mt(async function(e,t,r,i){P.info("REF0:"),P.info("Drawing er diagram (unified)",t);let{securityLevel:n,er:a,layout:s}=B(),o=i.db.getData(),l=tI(t,n);o.type=i.type,o.layoutAlgorithm=Bue(s),o.config.flowchart.nodeSpacing=a?.nodeSpacing||140,o.config.flowchart.rankSpacing=a?.rankSpacing||80,o.direction=i.db.getDirection();var c=(c=o.config).look,c=(o.markers="neo"===c?["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 Pue(o,l),"elk"===o.layoutAlgorithm&&l.select(".edges").lower(),l.selectAll('[id*="-background"]'));0<Array.from(c).length&&c.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))}),PC.insertTitle(l,"erDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),$ue(l,8,"erDiagram",a?.useMaxWidth??!0)},"draw")}),kde=r(()=>{ai(),mde=mt((e,t)=>{var r=(n=ot)(e,"r"),i=n(e,"g"),n=n(e,"b");return at(r,i,n,t)},"fade"),yde=new Set(["redux-color","redux-dark-color"]),vde=mt(t=>{var{theme:e,look:r,bkgColorArray:i,borderColorArray:n}=t;if(!yde.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"),bde=mt(e=>{var{look:t,theme:r,erEdgeLabelBackground:i,strokeWidth:n}=e;return`
|
||
${vde(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: ${yde.has(r)&&i?i:mde(e.tertiaryColor,.5)};
|
||
}
|
||
|
||
.edgeLabel {
|
||
background-color: ${yde.has(r)&&i?i:e.edgeLabelBackground};
|
||
}
|
||
.edgeLabel .label rect {
|
||
fill: ${yde.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: ${mde(e.tertiaryColor,.5)};
|
||
}
|
||
`},"getStyles"),xde=bde}),wde={};Vat(wde,{diagram:()=>Cde});var Cde,Sde=r(()=>{dde(),pde(),Tde(),kde(),Cde={parser:cde,get db(){return new hde},renderer:gde,styles:xde}});function Ede(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$type}function _de(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText&&"ref"in e}function Ade(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText&&"items"in e}function Rde(e){return"object"==typeof e&&null!==e&&"string"==typeof e.name&&"string"==typeof e.type&&"string"==typeof e.path}function Lde(e){return"object"==typeof e&&null!==e&&"object"==typeof e.info&&"string"==typeof e.message}function Ide(e){return"object"==typeof e&&null!==e&&Array.isArray(e.content)}function Nde(e){return"object"==typeof e&&null!==e&&"object"==typeof e.tokenType}function Dde(e){return Ide(e)&&"string"==typeof e.fullText}function Mde(e){return"string"==typeof e?e:"u"<typeof e?"undefined":"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e)}function Ode(e){return!!e&&"function"==typeof e[Symbol.iterator]}function Pde(...r){if(1===r.length){let t=r[0];if(t instanceof $ke)return t;if(Ode(t))return new $ke(()=>t[Symbol.iterator](),e=>e.next());if("number"==typeof t.length)return new $ke(()=>({index:0}),e=>e.index<t.length?{done:!1,value:t[e.index++]}:zke)}return 1<r.length?new $ke(()=>({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&&(Ode(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 zke}):Fke}function Bde(i,n={}){for(let[r,e]of Object.entries(i))r.startsWith("$")||(Array.isArray(e)?e.forEach((e,t)=>{Ede(e)&&(e.$container=i,e.$containerProperty=r,e.$containerIndex=t,n.deep)&&Bde(e,n)}):Ede(e)&&(e.$container=i,e.$containerProperty=r,n.deep)&&Bde(e,n))}function $de(e,t){let r=e;for(;r;){if(t(r))return r;r=r.$container}}function Fde(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 _de(e)?e.ref?[e.ref]:[]:Ade(e)?e.items.map(e=>e.ref):[]}function Wde(n,e){if(!n)throw new Error("Node must be an AstNode.");let a=e?.range;return new $ke(()=>({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(Ede(r)){if(e.keyIndex++,Vde(r,a))return{done:!1,value:r}}else if(Array.isArray(r)){for(;e.arrayIndex<r.length;){var i=r[e.arrayIndex++];if(Ede(i)&&Vde(i,a))return{done:!1,value:i}}e.arrayIndex=0}}e.keyIndex++}return zke})}function Ude(e,t){if(e)return new qke(e,e=>Wde(e,t));throw new Error("Root node must be an AstNode.")}function Gde(e,t){if(e)return t?.range&&!Vde(e,t.range)?new qke(e,()=>[]):new qke(e,e=>Wde(e,t),{includeRoot:!0});throw new Error("Root node must be an AstNode.")}function Vde(e,t){return!t||!!(e=e.$cstNode?.range)&&t0e(e,t)}function Yde(a){return new $ke(()=>({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(_de(r)||Ade(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(_de(n)||Ade(r))return{done:!1,value:{reference:n,container:a,property:t,index:i}}}e.arrayIndex=0}}e.keyIndex++}return zke})}function Hde(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]=Xde(r.defaultValue))}function Xde(e){return Array.isArray(e)?[...e.map(Xde)]:e}function Kde(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(Ede(n))a[i]=Kde(n,t,r);else if(_de(n))a[i]=t(a,i,n.$refNode,n.$refText,n);else if(Array.isArray(n)){var s,o=[];for(s of n)Ede(s)?o.push(Kde(s,t,r)):_de(s)?o.push(t(a,i,s.$refNode,s.$refText,s)):o.push(s);a[i]=o}else a[i]=n;return Bde(a,{deep:!0}),a}function Zde(e){return Uwe.isInstance(e,Vke.$type)}function Qde(e){return Uwe.isInstance(e,Yke.$type)}function Jde(e){return Uwe.isInstance(e,Hke.$type)}function epe(e){return Uwe.isInstance(e,Xke.$type)}function tpe(e){return Uwe.isInstance(e,Kke.$type)}function rpe(e){return Uwe.isInstance(e,Zke.$type)}function ipe(e){return Uwe.isInstance(e,Qke.$type)}function npe(e){return Uwe.isInstance(e,Jke.$type)}function ape(e){return Uwe.isInstance(e,ewe.$type)}function spe(e){return Uwe.isInstance(e,twe.$type)}function ope(e){return Uwe.isInstance(e,rwe.$type)}function lpe(e){return Uwe.isInstance(e,iwe.$type)}function cpe(e){return Uwe.isInstance(e,nwe.$type)}function hpe(e){return Uwe.isInstance(e,awe.$type)}function upe(e){return Uwe.isInstance(e,swe.$type)}function dpe(e){return Uwe.isInstance(e,owe.$type)}function ppe(e){return Uwe.isInstance(e,lwe.$type)}function gpe(e){return Uwe.isInstance(e,cwe.$type)}function fpe(e){return Uwe.isInstance(e,hwe.$type)}function mpe(e){return Uwe.isInstance(e,uwe.$type)}function ype(e){return Uwe.isInstance(e,dwe.$type)}function vpe(e){return Uwe.isInstance(e,pwe.$type)}function bpe(e){return Uwe.isInstance(e,gwe.$type)}function xpe(e){return Uwe.isInstance(e,fwe.$type)}function Tpe(e){return Uwe.isInstance(e,mwe.$type)}function kpe(e){return Uwe.isInstance(e,ywe.$type)}function wpe(e){return Uwe.isInstance(e,vwe.$type)}function Cpe(e){return Uwe.isInstance(e,bwe.$type)}function Spe(e){return Uwe.isInstance(e,xwe.$type)}function Epe(e){return Uwe.isInstance(e,Twe.$type)}function _pe(e){return Uwe.isInstance(e,kwe.$type)}function Ape(e){return Uwe.isInstance(e,wwe.$type)}function Rpe(e){return Uwe.isInstance(e,Cwe.$type)}function Lpe(e){return Uwe.isInstance(e,Swe.$type)}function Ipe(e){return Uwe.isInstance(e,Ewe.$type)}function Npe(e){return Uwe.isInstance(e,_we.$type)}function Dpe(e){return Uwe.isInstance(e,Awe.$type)}function Mpe(e){return Uwe.isInstance(e,Rwe.$type)}function Ope(e){return Uwe.isInstance(e,Lwe.$type)}function Ppe(e){return Uwe.isInstance(e,Iwe.$type)}function Bpe(e){return Uwe.isInstance(e,Nwe.$type)}function $pe(e){return Uwe.isInstance(e,Dwe.$type)}function Fpe(e){return Uwe.isInstance(e,Mwe.$type)}function zpe(e){return Uwe.isInstance(e,Owe.$type)}function qpe(e){return Uwe.isInstance(e,Pwe.$type)}function jpe(e){return Uwe.isInstance(e,Bwe.$type)}function Wpe(e){return Uwe.isInstance(e,$we.$type)}function Upe(e){return Uwe.isInstance(e,Fwe.$type)}function Gpe(e){return Uwe.isInstance(e,zwe.$type)}function Vpe(e){return Uwe.isInstance(e,qwe.$type)}function Ype(e){return Uwe.isInstance(e,jwe.$type)}function Hpe(e){let t=e,r=!1;for(;t;){var i=$de(t.grammarSource,Ape);if(!i||!i.dataType)return r?t:void 0;t=t.container,r=!0}}function Xpe(e){return new qke(e,e=>Ide(e)?e.content:[],{includeRoot:!0})}function Kpe(e){return Xpe(e).filter(Nde)}function Zpe(e,t){for(;e.container;)if((e=e.container)===t)return!0;return!1}function Qpe(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function Jpe(e){var t,r;if(e)return{offset:e,end:t,range:r}=e,{range:r,offset:e,end:t,length:t-e}}function e0e(e,t){var r;return e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<=t.start.character?Gwe.Before:e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character?Gwe.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?Gwe.Inside:r?Gwe.OverlapBack:e?Gwe.OverlapFront:Gwe.Outside)}function t0e(e,t){return e0e(e,t)>Gwe.After}function r0e(e,t,r=Vwe){var i;if(e)return 0<t&&(i=t-e.offset,i=e.text.charAt(i),r.test(i)||t--),a0e(e,t)}function i0e(t,r){if(t){var e=l0e(t,!0);if(e&&n0e(e,r))return e;if(Dde(t))for(let e=t.content.findIndex(e=>!e.hidden)-1;0<=e;e--){var i=t.content[e];if(n0e(i,r))return i}}}function n0e(e,t){return Nde(e)&&t.includes(e.tokenType.name)}function a0e(e,t){return Nde(e)?e:Ide(e)&&(e=o0e(e,t,!1))?a0e(e,t):void 0}function s0e(e,t){return Nde(e)?e:Ide(e)&&(e=o0e(e,t,!0))?s0e(e,t):void 0}function o0e(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 l0e(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 c0e(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 h0e(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 u0e(e,t){return(e=d0e(e,t))?e.parent.content.slice(e.a+1,e.b):[]}function d0e(e,t){let r=p0e(e),i=p0e(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 p0e(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()}function g0e(e,t="Error: Got unexpected value."){throw new Error(t)}function f0e(e,t="Error: Condition is violated."){if(!e)throw new Error(t)}function m0e(e){return e.charCodeAt(0)}function y0e(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function v0e(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t]=!0}function b0e(e){if(void 0===e)throw Error("Internal Error - Should never get here!");return!0}function x0e(){throw Error("Internal Error - Should never get here!")}function T0e(e){return"Character"===e.type}function k0e(e){try{e=`/${e="string"!=typeof e?e.source:e}/`;var t,r=nCe.pattern(e),i=[];for(t of r.value.value)aCe.reset(e),aCe.visit(t),i.push({start:aCe.startRegexp,end:aCe.endRegex});return i}catch{return[]}}function w0e(e){try{return e=(e="string"==typeof e?new RegExp(e):e).toString(),aCe.reset(e),aCe.visit(nCe.pattern(e)),aCe.multiline}catch{return!1}}function C0e(e){let t="string"==typeof e?new RegExp(e):e;return sCe.some(e=>t.test(e))}function S0e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function E0e(e,t){return e=_0e(e),!!(t=t.match(e))&&0<t[0].length}function _0e(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"),yt(r,"appendRaw"),mt(i,"appendOptional"),yt(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,"process2"),yt(o,"process"),new RegExp(o(),e.flags)}function A0e(e){return e.rules.find(e=>Ape(e)&&e.entry)}function R0e(e){return e.rules.filter(e=>$pe(e)&&e.hidden)}function L0e(e,t){var r,i=new Set,n=A0e(e);if(!n)return new Set(e.rules);for(r of[n].concat(R0e(e)))I0e(r,i,t);var a,s=new Set;for(a of e.rules)(i.has(a.name)||$pe(a)&&a.hidden)&&s.add(a);return s}function I0e(e,t,r){t.add(e.name),Ude(e).forEach(e=>{(Npe(e)||r&&Fpe(e))&&(e=e.rule.ref)&&!t.has(e.name)&&I0e(e,t,r)})}function N0e(e){let t=new Set;return Ude(e).forEach(e=>{hpe(e)&&(Ape(e.type.ref)&&t.add(e.type.ref),mpe(e.type.ref))&&Ape(e.type.ref.$container)&&t.add(e.type.ref.$container)}),t}function D0e(e){return e.terminal||(e.type.ref?j0e(e.type.ref)?.terminal:void 0)}function M0e(e){return e.hidden&&!C0e(ige(e))}function O0e(e,t){return e&&t?B0e(e,t,e.astNode,!0):[]}function P0e(e,t,r){return e&&t&&0!==(t=B0e(e,t,e.astNode,!0)).length?t[r=void 0!==r?Math.max(0,Math.min(r,t.length-1)):0]:void 0}function B0e(e,t,r,i){return!i&&(i=$de(e.grammarSource,ape))&&i.feature===t?[e]:Ide(e)&&e.astNode===r?e.content.flatMap(e=>B0e(e,t,r,!1)):[]}function $0e(e,t){return e?z0e(e,t,e?.astNode):[]}function F0e(e,t,r){return e&&0!==(t=z0e(e,t,e?.astNode)).length?t[r=void 0!==r?Math.max(0,Math.min(r,t.length-1)):0]:void 0}function z0e(e,t,r){if(e.astNode!==r)return[];if(Tpe(e.grammarSource)&&e.grammarSource.value===t)return[e];for(var i,n,a=Xpe(e).iterator(),s=[];(n=a.next()).done||((i=n.value).astNode===r?Tpe(i.grammarSource)&&i.grammarSource.value===t&&s.push(i):a.prune()),!n.done;);return s}function q0e(e){for(var t=e.astNode;t===e.container?.astNode;){var r=$de(e.grammarSource,ape);if(r)return r;e=e.container}}function j0e(e){let t=e;return mpe(t)&&(tpe(t.$container)?t=t.$container.$container:Qde(t.$container)?t=t.$container:g0e(t.$container)),W0e(e,t,new Map)}function W0e(i,e,n){function t(e,t){let r;return $de(e,ape)||(r=W0e(t,t,n)),n.set(i,r),r}if(mt(t,"go"),yt(t,"go"),n.has(i))return n.get(i);n.set(i,void 0);for(var r of Ude(e)){if(ape(r)&&"name"===r.feature.toLowerCase())return n.set(i,r),r;if(Npe(r)&&Ape(r.rule.ref))return t(r,r.rule.ref);if(Dpe(r)&&r.typeRef?.ref)return t(r,r.typeRef.ref)}}function U0e(t){var e=t.$container;if(fpe(e)){var r=e.elements;for(let e=r.indexOf(t)-1;0<=e;e--){var i=r[e];if(tpe(i))return i;if(i=Ude(r[e]).find(tpe))return i}}if(Zde(e))return U0e(e)}function G0e(e,t){return"?"===e||"*"===e||fpe(t)&&!!t.guardCondition}function V0e(e){return"*"===e||"+"===e}function Y0e(e){return"+="===e}function H0e(e){return X0e(e,new Set)}function X0e(e,t){if(t.has(e))return!0;t.add(e);for(var r of Ude(e))if(Npe(r)){if(!r.rule.ref||Ape(r.rule.ref)&&!X0e(r.rule.ref,t)||ype(r.rule.ref))return!1}else{if(ape(r))return!1;if(tpe(r))return!1}return!!e.definition}function K0e(e){return Z0e(e.type,new Set)}function Z0e(e,t){return!!t.has(e)||(t.add(e),!npe(e)&&!Rpe(e)&&(Wpe(e)?e.types.every(e=>Z0e(e,t)):!!Dpe(e)&&(void 0!==e.primitiveType||void 0!==e.stringType||void 0!==e.typeRef&&!!zpe(e=e.typeRef.ref)&&Z0e(e.type,t))))}function Q0e(e){if(!$pe(e))return e.inferredType?e.inferredType.name:e.dataType||(e.returnType&&(e=e.returnType.ref)?e.name:void 0)}function J0e(e){if(Qde(e))return Ape(e)&&H0e(e)?e.name:Q0e(e)??e.name;if(xpe(e)||zpe(e)||Ipe(e))return e.name;if(tpe(e)){var t=ege(e);if(t)return t}else if(mpe(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function ege(e){return e.inferredType?e.inferredType.name:e.type?.ref?J0e(e.type.ref):void 0}function tge(e){return $pe(e)?e.type?.name??"string":Ape(e)&&H0e(e)?e.name:Q0e(e)??e.name}function rge(e){return $pe(e)?e.type?.name??"string":Q0e(e)??e.name}function ige(e){var e=nge(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 nge(e,t){if(Ope(e))return age(e);if(Bpe(e))return sge(e);if(ope(e))return cge(e);if(Fpe(e)){var r=e.rule.ref;if(r)return uge(nge(r.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error("Missing rule reference.")}if(wpe(e))return lge(e);if(Gpe(e))return oge(e);var i;if(Lpe(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")),uge(i,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1});if(Ype(e))return uge(oCe,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error(`Invalid terminal element: ${e?.$type}, `+e?.$cstNode?.text)}function age(e){return uge(e.elements.map(e=>nge(e)).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function sge(e){return uge(e.elements.map(e=>nge(e)).join(""),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function oge(e){return uge(oCe+"*?"+nge(e.terminal),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function lge(e){return uge(`(?!${nge(e.terminal)})${oCe}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function cge(e){return e.right?uge(`[${hge(e.left)}-${hge(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):uge(hge(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function hge(e){return S0e(e.value)}function uge(e,t){return(t.parenthesized||t.lookahead||!1!==t.wrap)&&(e=`(${t.lookahead??(t.parenthesized?"":"?:")}${e})`),t.cardinality?""+e+t.cardinality:e}function dge(e){var t,r=[];for(t of e.Grammar.rules)$pe(t)&&M0e(t)&&w0e(ige(t))&&r.push(t.name);return{multilineCommentRules:r,nameRegexp:Vwe}}function pge(e){var t=lCe.call(e,hCe),r=e[hCe];try{var i=!(e[hCe]=void 0)}catch{}var n=cCe.call(e);return i&&(t?e[hCe]=r:delete e[hCe]),n}function gge(e){return dCe.call(e)}function fge(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":(gCe&&gCe in Object(e)?uCe:pCe)(e)}function mge(e){return null!=e&&"object"==typeof e}function yge(e){return"symbol"==typeof e||mCe(e)&&"[object Symbol]"==fCe(e)}function vge(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 bge(e){var t;return"string"==typeof e?e:bCe(e)?vCe(e,bge)+"":yCe(e)?TCe?TCe.call(e):"":"0"==(t=e+"")&&1/e==-xCe?"-0":t}function xge(e){for(var t=e.length;t--&&wCe.test(e.charAt(t)););return t}function Tge(e){return e&&e.slice(0,CCe(e)+1).replace(SCe,"")}function kge(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function wge(e){if("number"==typeof e)return e;if(yCe(e))return ACe;if(_Ce(e)&&(t="function"==typeof e.valueOf?e.valueOf():e,e=_Ce(t)?t+"":t),"string"!=typeof e)return 0===e?e:+e;e=ECe(e);var t=LCe.test(e);return t||ICe.test(e)?NCe(e.slice(2),t?2:8):RCe.test(e)?ACe:+e}function Cge(e){return e?(e=DCe(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function Sge(e){var t=(e=MCe(e))%1;return e==e?t?e-t:e:0}function Ege(e){return e}function _ge(e){return!!_Ce(e)&&("[object Function]"==(e=fCe(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}function Age(e){return!!$Ce&&$Ce in e}function Rge(e){if(null!=e){try{return zCe.call(e)}catch{}try{return e+""}catch{}}return""}function Lge(e){return!(!_Ce(e)||FCe(e))&&(BCe(e)?WCe:jCe).test(qCe(e))}function Ige(e,t){return e?.[t]}function Nge(e,t){return e=GCe(e,t),UCe(e)?e:void 0}function Dge(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)}function Mge(){}function Oge(e,t){var r=-1,i=e.length;for(t=t||Array(i);++r<i;)t[r]=e[r];return t}function Pge(r){var i=0,n=0;return function(){var e=QCe(),t=16-(e-n);if(n=e,0<t){if(800<=++i)return arguments[0]}else i=0;return r.apply(void 0,arguments)}}function Bge(e){return function(){return e}}function $ge(e,t){for(var r=-1,i=null==e?0:e.length;++r<i&&!1!==t(e[r],r,e););return e}function Fge(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}function zge(e){return e!=e}function qge(e,t,r){for(var i=r-1,n=e.length;++i<n;)if(e[i]===t)return i;return-1}function jge(e,t,r){return t==t?a6e(e,t,r):i6e(e,n6e,r)}function Wge(e,t){return!(null==e||!e.length)&&-1<s6e(e,t,0)}function Uge(e,t){var r=typeof e;return!!(t=t??9007199254740991)&&("number"==r||"symbol"!=r&&l6e.test(e))&&-1<e&&e%1==0&&e<t}function Gge(e,t,r){"__proto__"==t&&e6e?e6e(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Vge(e,t){return e===t||e!=e&&t!=t}function Yge(e,t,r){var i=e[t];d6e.call(e,t)&&u6e(i,r)&&(void 0!==r||t in e)||h6e(e,t,r)}function Hge(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?h6e:p6e)(r,o,l)}return r}function Xge(a,s,o){return s=f6e(void 0===s?a.length-1:s,0),function(){for(var e=arguments,t=-1,r=f6e(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),XCe(a,this,n)}}function Kge(e,t){return t6e(m6e(e,t,PCe),e+"")}function Zge(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=9007199254740991}function Qge(e){return null!=e&&v6e(e.length)&&!BCe(e)}function Jge(e,t,r){var i;return!!_Ce(r)&&!!("number"==(i=typeof t)?b6e(r)&&c6e(t,r.length):"string"==i&&t in r)&&u6e(r[t],e)}function efe(o){return y6e(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&&x6e(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})}function tfe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||T6e)}function rfe(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}function ife(e){return mCe(e)&&"[object Arguments]"==fCe(e)}function nfe(){return!1}function afe(e){return mCe(e)&&v6e(e.length)&&!!A6e[fCe(e)]}function sfe(t){return function(e){return t(e)}}function ofe(e,t){var r,i=bCe(e),n=!i&&E6e(e),a=!i&&!n&&_6e(e),s=!i&&!n&&!a&&N6e(e),o=i||n||a||s,l=o?w6e(e.length,String):[],c=l.length;for(r in e)!t&&!D6e.call(e,r)||o&&("length"==r||a&&("offset"==r||"parent"==r)||s&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||c6e(r,c))||l.push(r);return l}function lfe(t,r){return function(e){return t(r(e))}}function cfe(e){if(!k6e(e))return O6e(e);var t,r=[];for(t in Object(e))P6e.call(e,t)&&"constructor"!=t&&r.push(t);return r}function hfe(e){return(b6e(e)?M6e:B6e)(e)}function ufe(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}function dfe(e){if(!_Ce(e))return q6e(e);var t,r=k6e(e),i=[];for(t in e)("constructor"!=t||!r&&j6e.call(e,t))&&i.push(t);return i}function pfe(e){return b6e(e)?M6e(e,!0):W6e(e)}function gfe(e,t){var r;return!bCe(e)&&(!("number"!=(r=typeof e)&&"symbol"!=r&&"boolean"!=r&&null!=e&&!yCe(e))||V6e.test(e)||!G6e.test(e)||null!=t&&e in Object(t))}function ffe(){this.__data__=H6e?H6e(null):{},this.size=0}function mfe(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e}function yfe(e){var t,r=this.__data__;return H6e?"__lodash_hash_undefined__"===(t=r[e])?void 0:t:X6e.call(r,e)?r[e]:void 0}function vfe(e){var t=this.__data__;return H6e?void 0!==t[e]:K6e.call(t,e)}function bfe(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=H6e&&void 0===t?"__lodash_hash_undefined__":t,this}function xfe(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 Tfe(){this.__data__=[],this.size=0}function kfe(e,t){for(var r=e.length;r--;)if(u6e(e[r][0],t))return r;return-1}function wfe(e){var t=this.__data__;return!((e=Q6e(t,e))<0||(e==t.length-1?t.pop():J6e.call(t,e,1),--this.size,0))}function Cfe(e){var t=this.__data__;return(e=Q6e(t,e))<0?void 0:t[e][1]}function Sfe(e){return-1<Q6e(this.__data__,e)}function Efe(e,t){var r=this.__data__,i=Q6e(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function _fe(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 Afe(){this.size=0,this.__data__={hash:new Z6e,map:new(tSe||eSe),string:new Z6e}}function Rfe(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Lfe(e,t){return e=e.__data__,rSe(t)?e["string"==typeof t?"string":"hash"]:e.map}function Ife(e){return e=iSe(this,e).delete(e),this.size-=e?1:0,e}function Nfe(e){return iSe(this,e).get(e)}function Dfe(e){return iSe(this,e).has(e)}function Mfe(e,t){var r=iSe(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function Ofe(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 Pfe(i,n){if("function"!=typeof i||null!=n&&"function"!=typeof n)throw new TypeError(aSe);var a=yt(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(Pfe.Cache||nSe),a}function Bfe(e){var t=(e=sSe(e,function(e){return 500===t.size&&t.clear(),e})).cache;return e}function $fe(e){return null==e?"":kCe(e)}function Ffe(e,t){return bCe(e)?e:Y6e(e,t)?[e]:cSe(hSe(e))}function zfe(e){var t;return"string"==typeof e||yCe(e)?e:"0"==(t=e+"")&&1/e==-1/0?"-0":t}function qfe(e,t){for(var r=0,i=(t=uSe(t,e)).length;null!=e&&r<i;)e=e[dSe(t[r++])];return r&&r==i?e:void 0}function jfe(e,t,r){return void 0===(e=null==e?void 0:pSe(e,t))?r:e}function Wfe(e,t){for(var r=-1,i=t.length,n=e.length;++r<i;)e[n+r]=t[r];return e}function Ufe(e){return bCe(e)||E6e(e)||!!(mSe&&e&&e[mSe])}function Gfe(e,t,r,i,n){var a=-1,s=e.length;for(r=r||ySe,n=n||[];++a<s;){var o=e[a];0<t&&r(o)?1<t?Gfe(o,t-1,r,i,n):fSe(n,o):i||(n[n.length]=o)}return n}function Vfe(e){return null!=e&&e.length?vSe(e,1):[]}function Yfe(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}function Hfe(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}function Xfe(){this.__data__=new eSe,this.size=0}function Kfe(e){var t=this.__data__,e=t.delete(e);return this.size=t.size,e}function Zfe(e){return this.__data__.get(e)}function Qfe(e){return this.__data__.has(e)}function Jfe(e,t){var r=this.__data__;if(r instanceof eSe){var i=r.__data__;if(!tSe||i.length<199)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new nSe(i)}return r.set(e,t),this.size=r.size,this}function e1e(e){e=this.__data__=new eSe(e),this.size=e.size}function t1e(e,t){return e&&g6e(t,$6e(t),e)}function r1e(e,t){return e&&g6e(t,U6e(t),e)}function i1e(e,t){return t?e.slice():(t=e.length,t=ESe?ESe(t):new e.constructor(t),e.copy(t),t)}function n1e(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}function a1e(){return[]}function s1e(e,t){return g6e(e,ISe(e),t)}function o1e(e,t){return g6e(e,DSe(e),t)}function l1e(e,t,r){return t=t(e),bCe(e)?t:fSe(t,r(e))}function c1e(e){return OSe(e,$6e,ISe)}function h1e(e){return OSe(e,U6e,DSe)}function u1e(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&KSe.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function d1e(e){var t=new e.constructor(e.byteLength);return new QSe(t).set(new QSe(e)),t}function p1e(e,t){return t=t?JSe(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.byteLength)}function g1e(e){var t=new e.constructor(e.source,tEe.exec(e));return t.lastIndex=e.lastIndex,t}function f1e(e){return iEe?Object(iEe.call(e)):{}}function m1e(e,t){return t=t?JSe(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.length)}function y1e(e,t,r){var i=e.constructor;switch(t){case"[object ArrayBuffer]":return JSe(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return eEe(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 aEe(e,r);case"[object Map]":return new i;case"[object Number]":case"[object String]":return new i(e);case"[object RegExp]":return rEe(e);case"[object Set]":return new i;case"[object Symbol]":return nEe(e)}}function v1e(e){return"function"!=typeof e.constructor||k6e(e)?{}:HCe(xSe(e))}function b1e(e){return mCe(e)&&"[object Map]"==XSe(e)}function x1e(e){return mCe(e)&&"[object Set]"==XSe(e)}function T1e(r,i,n,e,t,a){var s,o=i&hEe,l=i&uEe,c=i&dEe;if(void 0===(s=n?t?n(r,e,t,a):n(r):s)){if(!_Ce(r))return r;if(e=bCe(r)){if(s=ZSe(r),!o)return ZCe(r,s)}else{var h=XSe(r),u=h==gEe||h==fEe;if(_6e(r))return _Se(r,o);if(h==mEe||h==pEe||u&&!t){if(s=l||u?{}:oEe(r),!o)return l?MSe(r,SSe(s,r)):NSe(r,CSe(s,r))}else{if(!yEe[h])return t?r:{};s=sEe(r,h,o)}}if(u=(a=a||new wSe).get(r))return u;a.set(r,s),cEe(r)?r.forEach(function(e){s.add(T1e(e,i,n,e,r,a))}):lEe(r)&&r.forEach(function(e,t){s.set(t,T1e(e,i,n,t,r,a))});var d=e?void 0:(c?l?BSe:PSe:l?U6e:$6e)(r);r6e(d||r,function(e,t){d&&(e=r[t=e]),p6e(s,t,T1e(e,i,n,t,r,a))})}return s}function k1e(e){return vEe(e,4)}function w1e(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}function C1e(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}function S1e(e){return this.__data__.has(e)}function E1e(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new nSe;++t<r;)this.add(e[t])}function _1e(e,t){for(var r=-1,i=null==e?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}function A1e(e,t){return e.has(t)}function R1e(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),c=a.get(t);if(l&&c)return l==t&&c==e;var h=-1,u=!0,d=2&r?new TEe:void 0;for(a.set(e,t),a.set(t,e);++h<o;){var p,g=e[h],f=t[h];if(void 0!==(p=i?s?i(f,g,h,t,e,a):i(g,f,h,e,t,a):p)){if(p)continue;u=!1;break}if(d){if(!kEe(t,function(e,t){if(!wEe(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}function L1e(e){var r=-1,i=Array(e.size);return e.forEach(function(e,t){i[++r]=[t,e]}),i}function I1e(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}function N1e(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 QSe(e),new QSe(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return u6e(+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=SEe;case"[object Set]":var l,o=o||EEe;return!!(e.size==t.size||1&i)&&((l=s.get(e))?l==t:(i|=2,s.set(e,t),l=CEe(o(e),o(t),i,n,a,s),s.delete(e),l));case"[object Symbol]":if(_Ee)return _Ee.call(e)==_Ee.call(t)}return!1}function D1e(e,t,r,i,n,a){var s=1&r,o=PSe(e),l=o.length;if(l!=PSe(t).length&&!s)return!1;for(var c=l;c--;){var h=o[c];if(!(s?h in t:REe.call(t,h)))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;++c<l;){var f,m=e[h=o[c]],y=t[h];if(!(void 0===(f=i?s?i(y,m,h,t,e,a):i(m,y,h,e,t,a):f)?m===y||n(m,y,r,i,a):f)){p=!1;break}g=g||"constructor"==h}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}function M1e(e,t,r,i,n,a){var s=bCe(e),o=bCe(t),l=s?NEe:XSe(e),o=o?NEe:XSe(t),c=(l=l==IEe?DEe:l)==DEe,h=(o=o==IEe?DEe:o)==DEe;if((o=l==o)&&_6e(e)){if(!_6e(t))return!1;c=!(s=!0)}return o&&!c?(a=a||new wSe,s||N6e(e)?CEe(e,t,r,i,n,a):AEe(e,t,l,r,i,n,a)):1&r||(s=c&&MEe.call(e,"__wrapped__"),l=h&&MEe.call(t,"__wrapped__"),!s&&!l)?o&&(a=a||new wSe,LEe(e,t,r,i,n,a)):n(s?e.value():e,l?t.value():t,r,i,a=a||new wSe)}function O1e(e,t,r,i,n){return e===t||(null==e||null==t||!mCe(e)&&!mCe(t)?e!=e&&t!=t:OEe(e,t,r,i,O1e,n))}function P1e(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],c=e[l],h=o[1];if(s&&o[2]){if(void 0===c&&!(l in e))return!1}else{var u,d=new wSe;if(!(void 0===(u=i?i(c,h,l,e,t,d):u)?PEe(h,c,3,i,d):u))return!1}}return!0}function B1e(e){return e==e&&!_Ce(e)}function $1e(e){for(var t=$6e(e),r=t.length;r--;){var i=t[r],n=e[i];t[r]=[i,n,$Ee(n)]}return t}function F1e(t,r){return function(e){return null!=e&&e[t]===r&&(void 0!==r||t in Object(e))}}function z1e(t){var r=FEe(t);return 1==r.length&&r[0][2]?zEe(r[0][0],r[0][1]):function(e){return e===t||BEe(e,t,r)}}function q1e(e,t){return null!=e&&t in Object(e)}function j1e(e,t,r){for(var i=-1,n=(t=uSe(t,e)).length,a=!1;++i<n;){var s=dSe(t[i]);if(!(a=null!=e&&r(e,s)))break;e=e[s]}return a||++i!=n?a:!!(n=null==e?0:e.length)&&v6e(n)&&c6e(s,n)&&(bCe(e)||E6e(e))}function W1e(e,t){return null!=e&&WEe(e,t,jEe)}function U1e(r,i){return Y6e(r)&&$Ee(i)?zEe(dSe(r),i):function(e){var t=gSe(e,r);return void 0===t&&t===i?UEe(e,r):PEe(i,t,3)}}function G1e(t){return function(e){return e?.[t]}}function V1e(t){return function(e){return pSe(e,t)}}function Y1e(e){return Y6e(e)?VEe(dSe(e)):YEe(e)}function H1e(e){return"function"==typeof e?e:null==e?PCe:"object"==typeof e?bCe(e)?GEe(e[0],e[1]):qEe(e):HEe(e)}function X1e(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}function K1e(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}}function Z1e(e,t){return e&&ZEe(e,t,$6e)}function Q1e(a,s){return function(e,t){if(null!=e){if(!b6e(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}}function J1e(e,i,n,a){return QEe(e,function(e,t,r){i(a,e,n(e),r)}),a}function eme(n,a){return function(e,t){var r=bCe(e)?KEe:JEe,i=a?a():{};return r(e,n,XEe(t,2),i)}}function tme(e){return mCe(e)&&b6e(e)}function rme(e,t,r){for(var i=-1,n=null==e?0:e.length;++i<n;)if(r(t,e[i]))return!0;return!1}function ime(e,t,r,i){var n=-1,a=o6e,s=!0,o=e.length,l=[],c=t.length;if(o){r&&(t=vCe(t,R6e(r))),i?(a=n_e,s=!1):200<=t.length&&(a=wEe,s=!1,t=new TEe(t));e:for(;++n<o;){var h=e[n],u=null==r?h:r(h),h=i||0!==h?h:0;if(s&&u==u){for(var d=c;d--;)if(t[d]===u)continue e;l.push(h)}else a(t,u,i)||l.push(h)}}return l}function nme(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}function ame(e,t,r){var i=null==e?0:e.length;return i?(t=r||void 0===t?1:OCe(t),TSe(e,t<0?0:t,i)):[]}function sme(e,t,r){var i=null==e?0:e.length;return i?(t=r||void 0===t?1:OCe(t),TSe(e,0,(t=i-t)<0?0:t)):[]}function ome(e){return"function"==typeof e?e:PCe}function lme(e,t){return(bCe(e)?r6e:QEe)(e,h_e(t))}function cme(e,t){for(var r=-1,i=null==e?0:e.length;++r<i;)if(!t(e[r],r,e))return!1;return!0}function hme(e,i){var n=!0;return QEe(e,function(e,t,r){return n=!!i(e,t,r)}),n}function ume(e,t,r){var i=bCe(e)?d_e:p_e;return r&&x6e(e,t,r)&&(t=void 0),i(e,XEe(t,3))}function dme(e,i){var n=[];return QEe(e,function(e,t,r){i(e,t,r)&&n.push(e)}),n}function pme(e,t){return(bCe(e)?ASe:f_e)(e,XEe(t,3))}function gme(a){return function(e,t,r){var i,n=Object(e);return b6e(e)||(i=XEe(t,3),e=$6e(e),t=yt(function(e){return i(n[e],e,n)},"predicate")),-1<(t=a(e,t,r))?n[i?e[t]:t]:void 0}}function fme(e,t,r){var i=null==e?0:e.length;return i?((r=null==r?0:OCe(r))<0&&(r=y_e(i+r,0)),i6e(e,XEe(t,3),r)):-1}function mme(e){return e&&e.length?e[0]:void 0}function yme(e,i){var n=-1,a=b6e(e)?Array(e.length):[];return QEe(e,function(e,t,r){a[++n]=i(e,t,r)}),a}function vme(e,t){return(bCe(e)?vCe:x_e)(e,XEe(t,3))}function bme(e,t){return vSe(T_e(e,t),1)}function xme(e,t){return null!=e&&S_e.call(e,t)}function Tme(e,t){return null!=e&&WEe(e,t,E_e)}function kme(e){return"string"==typeof e||!bCe(e)&&mCe(e)&&"[object String]"==fCe(e)}function wme(t,e){return vCe(e,function(e){return t[e]})}function Cme(e){return null==e?[]:R_e(e,$6e(e))}function Sme(e,t,r,i){return e=b6e(e)?e:L_e(e),r=r&&!i?OCe(r):0,i=e.length,r<0&&(r=I_e(i+r,0)),A_e(e)?r<=i&&-1<e.indexOf(t,r):!!i&&-1<s6e(e,t,r)}function Eme(e,t,r){var i=null==e?0:e.length;return i?((r=null==r?0:OCe(r))<0&&(r=D_e(i+r,0)),s6e(e,t,r)):-1}function _me(e){if(null!=e){if(b6e(e)&&(bCe(e)||"string"==typeof e||"function"==typeof e.splice||_6e(e)||N6e(e)||E6e(e)))return!e.length;var t,r=XSe(e);if("[object Map]"==r||"[object Set]"==r)return!e.size;if(k6e(e))return!B6e(e).length;for(t in e)if(O_e.call(e,t))return!1}return!0}function Ame(e){return mCe(e)&&"[object RegExp]"==fCe(e)}function Rme(e){return void 0===e}function Lme(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)}}function Ime(e,t,r,i){if(_Ce(e))for(var n=-1,a=(t=uSe(t,e)).length,s=a-1,o=e;null!=o&&++n<a;){var l,c=dSe(t[n]),h=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;n!=s&&(l=o[c],void 0===(h=i?i(l,c,o):void 0))&&(h=_Ce(l)?l:c6e(t[n+1])?[]:{}),p6e(o,c,h),o=o[c]}return e}function Nme(e,t,r){for(var i=-1,n=t.length,a={};++i<n;){var s=t[i],o=pSe(e,s);r(o,s)&&z_e(a,uSe(s,e),o)}return a}function Dme(e,r){var t;return null==e?{}:(t=vCe(BSe(e),function(e){return[e]}),r=XEe(r),q_e(e,t,function(e,t){return r(e,t[0])}))}function Mme(e,i,n,a,t){return t(e,function(e,t,r){n=a?(a=!1,e):i(n,e,t,r)}),n}function Ome(e,t,r){var i=bCe(e)?kSe:W_e,n=arguments.length<3;return i(e,XEe(t,4),r,n,QEe)}function Pme(e,t){return(bCe(e)?ASe:f_e)(e,F_e(XEe(t,3)))}function Bme(e,i){var n;return QEe(e,function(e,t,r){return!(n=i(e,t,r))}),!!n}function $me(e,t,r){var i=bCe(e)?kEe:V_e;return r&&x6e(e,t,r)&&(t=void 0),i(e,XEe(t,3))}function Fme(e,t,r){var i=-1,n=o6e,a=e.length,s=!0,o=[],l=o;if(r)s=!1,n=n_e;else if(200<=a){var c=t?null:H_e(e);if(c)return EEe(c);s=!1,n=wEe,l=new TEe}else l=t?[]:o;e:for(;++i<a;){var h=e[i],u=t?t(h):h,h=r||0!==h?h:0;if(s&&u==u){for(var d=l.length;d--;)if(l[d]===u)continue e;t&&l.push(u),o.push(h)}else n(l,u,r)||(l!==o&&l.push(u),o.push(h))}return o}function zme(e){return e&&e.length?X_e(e):[]}function qme(e){console&&console.error&&console.error("Error: "+e)}function jme(e){console&&console.warn&&console.warn("Warning: "+e)}function Wme(e){var t=(new Date).getTime(),e=e();return{time:(new Date).getTime()-t,value:e}}function Ume(e){function t(){}mt(t,"FakeConstructor"),yt(t,"FakeConstructor"),t.prototype=e;let r=new t;function i(){return typeof r.bar}return mt(i,"fakeAccess"),yt(i,"fakeAccess"),i(),i(),e}function Gme(e){return Vme(e)?e.LABEL:e.name}function Vme(e){return A_e(e.LABEL)&&""!==e.LABEL}function Yme(e){return T_e(e,Hme)}function Hme(e){function t(e){return T_e(e,Hme)}var r,i;if(mt(t,"convertDefinition"),yt(t,"convertDefinition"),e instanceof Q_e)return r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx},A_e(e.label)&&(r.label=e.label),r;if(e instanceof e7e)return{type:"Alternative",definition:t(e.definition)};if(e instanceof t7e)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof r7e)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof i7e)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:Hme(new o7e({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof a7e)return{type:"RepetitionWithSeparator",idx:e.idx,separator:Hme(new o7e({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof n7e)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof s7e)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof o7e)return r={type:"Terminal",name:e.terminalType.name,label:Gme(e.terminalType),idx:e.idx},A_e(e.label)&&(r.terminalLabel=e.label),i=e.terminalType.PATTERN,e.terminalType.PATTERN&&(r.pattern=B_e(i)?i.source:i),r;if(e instanceof J_e)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}function Xme(e){return e instanceof e7e||e instanceof t7e||e instanceof n7e||e instanceof r7e||e instanceof i7e||e instanceof a7e||e instanceof o7e||e instanceof J_e}function Kme(e,t=[]){return e instanceof t7e||e instanceof n7e||e instanceof a7e||(e instanceof s7e?Y_e(e.definition,e=>Kme(e,t)):!(e instanceof Q_e&&N_e(t,e))&&e instanceof Z_e&&(e instanceof Q_e&&t.push(e),g_e(e.definition,e=>Kme(e,t))))}function Zme(e){return e instanceof s7e}function Qme(e){if(e instanceof Q_e)return"SUBRULE";if(e instanceof t7e)return"OPTION";if(e instanceof s7e)return"OR";if(e instanceof r7e)return"AT_LEAST_ONE";if(e instanceof i7e)return"AT_LEAST_ONE_SEP";if(e instanceof a7e)return"MANY_SEP";if(e instanceof n7e)return"MANY";if(e instanceof o7e)return"CONSUME";throw Error("non exhaustive match")}function Jme(e,t,r){return[new t7e({definition:[new o7e({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}function eye(e){if(e instanceof Q_e)return eye(e.referencedRule);if(e instanceof o7e)return iye(e);if(Xme(e))return tye(e);if(Zme(e))return rye(e);throw Error("non exhaustive match")}function tye(e){let t=[],r=e.definition,i=0,n=r.length>i,a,s=!0;for(;n&&s;)a=r[i],s=Kme(a),t=t.concat(eye(a)),i+=1,n=r.length>i;return K_e(t)}function rye(e){return e=T_e(e.definition,e=>eye(e)),K_e(bSe(e))}function iye(e){return[e.terminalType]}function nye(e){let t={};return u_e(e,e=>{e=new l7e(e).startWalking(),z6e(t,e)}),t}function aye(e,t){return e.name+t+"_~IN~_"}function sye(e){var t,e=e.toString();return c7e.hasOwnProperty(e)?c7e[e]:(t=h7e.pattern(e),c7e[e]=t)}function oye(){c7e={}}function lye(e,t=!1){try{var r=sye(e);return cye(r.value,{},r.flags.ignoreCase)}catch(r){r.message===u7e?t&&jme(d7e+` 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.`:"",qme(d7e+`
|
||
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 cye(t,n,a){switch(t.type){case"Disjunction":for(let e=0;e<t.value.length;e++)cye(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":hye(s.value,n,a);break;case"Set":if(!0===s.complement)throw Error(u7e);u_e(s.value,t=>{if("number"==typeof t)hye(t,n,a);else{var r=t;if(!0===a)for(let e=r.from;e<=r.to;e++)hye(e,n,a);else{for(let e=r.from;e<=r.to&&e<x7e;e++)hye(e,n,a);if(r.to>=x7e){var t=r.from>=x7e?r.from:x7e,e=r.to,t=jye(t),i=jye(e);for(let e=t;e<=i;e++)n[e]=e}}}});break;case"Group":cye(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===pye(s)||"Group"!==s.type&&0==i)break}break;default:throw Error("non exhaustive match!")}return L_e(n)}function hye(e,t,r){var i=jye(e);t[i]=i,!0===r&&uye(e,t)}function uye(e,t){var r=(e=String.fromCharCode(e)).toUpperCase();r!==e?t[r=jye(r.charCodeAt(0))]=r:(r=e.toLowerCase())!==e&&(t[e=jye(r.charCodeAt(0))]=e)}function dye(e,r){return v_e(e.value,e=>{if("number"==typeof e)return N_e(r,e);{let t=e;return void 0!==v_e(r,e=>t.from<=e&&e<=t.to)}})}function pye(e){var t=e.quantifier;return!(!t||0!==t.atLeast)||!!e.value&&(bCe(e.value)?g_e(e.value,pye):pye(e.value))}function gye(t,e){var r,i;return e instanceof RegExp?(r=sye(e),(i=new p7e(t)).visit(r),i.found):void 0!==v_e(e,e=>N_e(t,e.charCodeAt(0)))}function fye(e,n){var t=(n=r_e(n,{useSticky:m7e,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
|
||
`],tracer:yt((e,t)=>t(),"tracer")})).tracer;t("initCharCodeToOptimizedIndexMap",()=>{Wye()});let r,i=(t("Reject Lexer.NA",()=>{r=G_e(e,e=>e[g7e]===_7e.NA)}),!1),a;t("Transform Patterns",()=>{i=!1,a=T_e(r,e=>{var t,e=e[g7e];if(B_e(e))return 1!==(t=e.source).length||"^"===t||"$"===t||"."===t||e.ignoreCase?2!==t.length||"\\"!==t[0]||N_e(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],t[1])?(n.useSticky?Nye:Iye)(e):t[1]:t;if(BCe(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?Nye:Iye)(e));throw Error("non exhaustive match")})});let s,o,l,c,h;t("misc mapping",()=>{s=T_e(r,e=>e.tokenTypeIdx),o=T_e(r,e=>{if((e=e.GROUP)!==_7e.SKIPPED){if(A_e(e))return e;if($_e(e))return!1;throw Error("non exhaustive match")}}),l=T_e(r,e=>{if(e=e.LONGER_ALT)return bCe(e)?T_e(e,e=>M_e(r,e)):[M_e(r,e)]}),c=T_e(r,e=>e.PUSH_MODE),h=T_e(r,e=>__e(e,"POP_MODE"))});let u;t("Line Terminator Handling",()=>{let t=zye(n.lineTerminatorCharacters);u=T_e(r,e=>!1),"onlyOffset"!==n.positionTracking&&(u=T_e(r,e=>__e(e,"LINE_BREAKS")?!!e.LINE_BREAKS:!1===$ye(e,t)&&gye(t,e.PATTERN)))});let d,p,g,f,m=(t("Misc Mapping #2",()=>{d=T_e(r,Pye),p=T_e(a,Bye),g=U_e(r,(e,t)=>(t=t.GROUP,A_e(t)&&t!==_7e.SKIPPED&&(e[t]=[]),e),{}),f=T_e(a,(e,t)=>({pattern:a[t],longerAlt:l[t],canLineTerminator:u[t],isCustom:d[t],short:p[t],group:o[t],push:c[t],pop:h[t],tokenTypeIdx:s[t],tokenType:r[t]}))}),!0),y=[];return n.safeMode||t("First Char Optimization",()=>{y=U_e(r,(r,e,i)=>{if("string"==typeof e.PATTERN){var t=jye(e.PATTERN.charCodeAt(0));qye(r,t,f[i])}else if(bCe(e.START_CHARS_HINT)){let t;u_e(e.START_CHARS_HINT,e=>{e=jye("string"==typeof e?e.charCodeAt(0):e),t!==e&&(t=e,qye(r,e,f[i]))})}else B_e(e.PATTERN)?e.PATTERN.unicode?(m=!1,n.ensureOptimizations&&qme(d7e+` 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=lye(e.PATTERN,n.ensureOptimizations),P_e(t)&&(m=!1),u_e(t,e=>{qye(r,e,f[i])})):(n.ensureOptimizations&&qme(d7e+` 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 mye(e,t){let r=[],i=vye(e);r=r.concat(i.errors);var n=(e=bye(i.valid)).valid;return r=(r=(r=(r=(r=r.concat(e.errors)).concat(yye(n))).concat(Sye(n))).concat(Eye(n,t))).concat(_ye(n))}function yye(e){let t=[],r=m_e(e,e=>B_e(e[g7e]));return t=(t=(t=(t=(t=t.concat(xye(r))).concat(kye(r))).concat(wye(r))).concat(Cye(r))).concat(Tye(r))}function vye(e){var t=m_e(e,e=>!__e(e,g7e));return{errors:T_e(t,e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:S7e.MISSING_PATTERN,tokenTypes:[e]})),valid:s_e(e,t)}}function bye(e){var t=m_e(e,e=>(e=e[g7e],!(B_e(e)||BCe(e)||__e(e,"exec")||A_e(e))));return{errors:T_e(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:S7e.INVALID_PATTERN,tokenTypes:[e]})),valid:s_e(e,t)}}function xye(e){class i extends rCe{static{mt(this,"EndAnchorFinder")}static{yt(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}return e=m_e(e,e=>{e=e.PATTERN;try{var t=sye(e),r=new i;return r.visit(t),r.found}catch{return y7e.test(e.source)}}),T_e(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:S7e.EOI_ANCHOR_FOUND,tokenTypes:[e]}))}function Tye(e){return e=m_e(e,e=>e.PATTERN.test("")),T_e(e,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:S7e.EMPTY_MATCH_PATTERN,tokenTypes:[e]}))}function kye(e){class i extends rCe{static{mt(this,"StartAnchorFinder")}static{yt(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}return e=m_e(e,e=>{e=e.PATTERN;try{var t=sye(e),r=new i;return r.visit(t),r.found}catch{return v7e.test(e.source)}}),T_e(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:S7e.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}function wye(e){return e=m_e(e,e=>(e=e[g7e])instanceof RegExp&&(e.multiline||e.global)),T_e(e,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:S7e.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}))}function Cye(e){let i=[],t=T_e(e,r=>U_e(e,(e,t)=>(r.PATTERN.source!==t.PATTERN.source||N_e(i,t)||t.PATTERN===_7e.NA||(i.push(t),e.push(t)),e),[]));t=xEe(t);var r=m_e(t,e=>1<e.length);return T_e(r,e=>{var t=T_e(e,e=>e.name);return{message:`The same RegExp pattern ->${b_e(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,type:S7e.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})}function Sye(e){return e=m_e(e,e=>!!__e(e,"GROUP")&&(e=e.GROUP)!==_7e.SKIPPED&&e!==_7e.NA&&!A_e(e)),T_e(e,e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:S7e.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}))}function Eye(e,t){return e=m_e(e,e=>void 0!==e.PUSH_MODE&&!N_e(t,e.PUSH_MODE)),T_e(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:S7e.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}))}function _ye(e){let a=[],t=U_e(e,(e,t,r)=>{var i=t.PATTERN;return i!==_7e.NA&&(A_e(i)?e.push({str:i,idx:r,tokenType:t}):B_e(i)&&Rye(i)&&e.push({str:i.source,idx:r,tokenType:t})),e},[]);return u_e(e,(i,n)=>{u_e(t,({str:e,idx:t,tokenType:r})=>{n<t&&Aye(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:S7e.UNREACHABLE_PATTERN,tokenTypes:[i,r]}))})}),a}function Aye(e,t){var r;if(B_e(t))return!Lye(t)&&null!==(r=t.exec(e))&&0===r.index;if(BCe(t))return t(e,0,[],{});if(__e(t,"exec"))return t.exec(e,0,[],{});if("string"==typeof t)return t===e;throw Error("non exhaustive match")}function Rye(t){return void 0===v_e([".","\\","[","]","|","^","$","(",")","?","*","+","{"],e=>-1!==t.source.indexOf(e))}function Lye(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(e.source)}function Iye(e){var t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function Nye(e){var t=e.ignoreCase?"iy":"y";return new RegExp(""+e.source,t)}function Dye(e,t,r){let n=[];return __e(e,f7e)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+f7e+`> property in its definition
|
||
`,type:S7e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),__e(e,"modes")||n.push({message:"A MultiMode Lexer cannot be initialized without a <modes> property in its definition\n",type:S7e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),__e(e,"modes")&&__e(e,f7e)&&!__e(e.modes,e.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${f7e}: <${e.defaultMode}>which does not exist
|
||
`,type:S7e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),__e(e,"modes")&&u_e(e.modes,(r,i)=>{u_e(r,(t,e)=>{$_e(t)?n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${i}> at index: <${e}>
|
||
`,type:S7e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):__e(t,"LONGER_ALT")&&(e=bCe(t.LONGER_ALT)?t.LONGER_ALT:[t.LONGER_ALT],u_e(e,e=>{$_e(e)||N_e(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:S7e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))})}),n}function Mye(e,t,r){let i=[],n=!1,a=xEe(bSe(L_e(e.modes))),s=G_e(a,e=>e[g7e]===_7e.NA),o=zye(r);return t&&u_e(s,e=>{var t=$ye(e,o);!1!==t?(t={message:Fye(e,t),type:t.issue,tokenType:e},i.push(t)):__e(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(n=!0):gye(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:S7e.NO_LINE_BREAKS_FLAGS}),i}function Oye(r){let i={},e=$6e(r);return u_e(e,e=>{var t=r[e];if(!bCe(t))throw Error("non exhaustive match");i[e]=[]}),i}function Pye(e){if(e=e.PATTERN,B_e(e))return!1;if(BCe(e))return!0;if(__e(e,"exec"))return!0;if(A_e(e))return!1;throw Error("non exhaustive match")}function Bye(e){return!(!A_e(e)||1!==e.length)&&e.charCodeAt(0)}function $ye(e,t){if(__e(e,"LINE_BREAKS"))return!1;if(B_e(e.PATTERN)){try{gye(t,e.PATTERN)}catch(e){return{issue:S7e.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}if(A_e(e.PATTERN))return!1;if(Pye(e))return{issue:S7e.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function Fye(e,t){if(t.issue===S7e.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===S7e.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 zye(e){return T_e(e,e=>A_e(e)?e.charCodeAt(0):e)}function qye(e,t,r){void 0===e[t]?e[t]=[r]:e[t].push(r)}function jye(e){return e<x7e?e:T7e[e]}function Wye(){if(P_e(T7e)){T7e=new Array(65536);for(let e=0;e<65536;e++)T7e[e]=255<e?255+~~(e/255):e}}function Uye(e,t){return(e=e.tokenTypeIdx)===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[e]}function Gye(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}function Vye(e){Hye(e=Yye(e)),Kye(e),Xye(e),u_e(e,e=>{e.isParent=0<e.categoryMatches.length})}function Yye(e){let t=bEe(e),r=e,i=!0;for(;i;){r=xEe(bSe(T_e(r,e=>e.CATEGORIES)));var n=s_e(r,t);t=t.concat(n),P_e(n)?i=!1:r=n}return t}function Hye(e){u_e(e,e=>{Qye(e)||((w7e[k7e]=e).tokenTypeIdx=k7e++),Jye(e)&&!bCe(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),Jye(e)||(e.CATEGORIES=[]),e2e(e)||(e.categoryMatches=[]),t2e(e)||(e.categoryMatchesMap={})})}function Xye(e){u_e(e,r=>{r.categoryMatches=[],u_e(r.categoryMatchesMap,(e,t)=>{r.categoryMatches.push(w7e[t].tokenTypeIdx)})})}function Kye(e){u_e(e,e=>{Zye([],e)})}function Zye(r,i){u_e(r,e=>{i.categoryMatchesMap[e.tokenTypeIdx]=!0}),u_e(i.CATEGORIES,e=>{var t=r.concat(i);N_e(t,e)||Zye(t,e)})}function Qye(e){return __e(e,"tokenTypeIdx")}function Jye(e){return __e(e,"CATEGORIES")}function e2e(e){return __e(e,"categoryMatches")}function t2e(e){return __e(e,"categoryMatchesMap")}function r2e(e){return __e(e,"tokenTypeIdx")}function i2e(e){return n2e(e)?e.LABEL:e.name}function n2e(e){return A_e(e.LABEL)&&""!==e.LABEL}function a2e(e){return s2e(e)}function s2e(e){var t=e.pattern,r={};if(r.name=e.name,$_e(t)||(r.PATTERN=t),__e(e,A7e))throw`The parent property is no longer supported.
|
||
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return __e(e,R7e)&&(r.CATEGORIES=e[R7e]),Vye([r]),__e(e,L7e)&&(r.LABEL=e[L7e]),__e(e,I7e)&&(r.GROUP=e[I7e]),__e(e,D7e)&&(r.POP_MODE=e[D7e]),__e(e,N7e)&&(r.PUSH_MODE=e[N7e]),__e(e,M7e)&&(r.LONGER_ALT=e[M7e]),__e(e,O7e)&&(r.LINE_BREAKS=e[O7e]),__e(e,P7e)&&(r.START_CHARS_HINT=e[P7e]),r}function o2e(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 l2e(e,t){return Uye(e,t)}function c2e(e,t){return(e=new q7e(e,t)).resolveRefs(),e.errors}function h2e(t,r,i=[]){i=bEe(i);let n=[],a=0;function s(e){return e.concat(l_e(t,a+1))}function o(e){return e=h2e(s(e),r,i),n.concat(e)}for(mt(s,"remainingPathWith"),yt(s,"remainingPathWith"),mt(o,"getAlternativesForProd"),yt(o,"getAlternativesForProd");i.length<r&&a<t.length;){var e=t[a];if(e instanceof e7e)return o(e.definition);if(e instanceof Q_e)return o(e.definition);if(e instanceof t7e)n=o(e.definition);else{if(e instanceof r7e)return o(e.definition.concat([new n7e({definition:e.definition})]));if(e instanceof i7e)return o([new e7e({definition:e.definition}),new n7e({definition:[new o7e({terminalType:e.separator})].concat(e.definition)})]);if(e instanceof a7e){var l=e.definition.concat([new n7e({definition:[new o7e({terminalType:e.separator})].concat(e.definition)})]);n=o(l)}else if(e instanceof n7e)l=e.definition.concat([new n7e({definition:e.definition})]),n=o(l);else{if(e instanceof s7e)return u_e(e.definition,e=>{!1===P_e(e.definition)&&(n=o(e.definition))}),n;if(!(e instanceof o7e))throw Error("non exhaustive match");i.push(e.terminalType)}}a++}return n.push({partialPath:i,suffixDef:l_e(t,a)}),n}function u2e(e,t,r,i){let n="EXIT_NONE_TERMINAL",a=[n],s="EXIT_ALTERNATIVE",o=!1,l=t.length,c=l-i-1,h=[],u=[];for(u.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!P_e(u);)if((v=u.pop())===s)o&&o_e(u).idx<=c&&u.pop();else{var d=v.def,p=v.idx,g=v.ruleStack,f=v.occurrenceStack;if(!P_e(d)){var m=d[0];if(m===n)v={idx:p,def:l_e(d),ruleStack:c_e(g),occurrenceStack:c_e(f)},u.push(v);else if(m instanceof o7e)if(p<l-1)r(t[v=p+1],m.terminalType)&&(v={idx:v,def:l_e(d),ruleStack:g,occurrenceStack:f},u.push(v));else{if(p!==l-1)throw Error("non exhaustive match");h.push({nextTokenType:m.terminalType,nextTokenOccurrence:m.idx,ruleStack:g,occurrenceStack:f}),o=!0}else if(m instanceof Q_e){(v=bEe(g)).push(m.nonTerminalName);var y=bEe(f),v=(y.push(m.idx),{idx:p,def:m.definition.concat(a,l_e(d)),ruleStack:v,occurrenceStack:y});u.push(v)}else if(m instanceof t7e)y={idx:p,def:l_e(d),ruleStack:g,occurrenceStack:f},u.push(y),u.push(s),v={idx:p,def:m.definition.concat(l_e(d)),ruleStack:g,occurrenceStack:f},u.push(v);else if(m instanceof r7e)v=new n7e({definition:m.definition,idx:m.idx}),v=m.definition.concat([v],l_e(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof i7e)v=new o7e({terminalType:m.separator}),v=new n7e({definition:[v].concat(m.definition),idx:m.idx}),v=m.definition.concat([v],l_e(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof a7e)v={idx:p,def:l_e(d),ruleStack:g,occurrenceStack:f},u.push(v),u.push(s),v=new o7e({terminalType:m.separator}),v=new n7e({definition:[v].concat(m.definition),idx:m.idx}),v=m.definition.concat([v],l_e(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof n7e)v={idx:p,def:l_e(d),ruleStack:g,occurrenceStack:f},u.push(v),u.push(s),v=new n7e({definition:m.definition,idx:m.idx}),v=m.definition.concat([v],l_e(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof s7e)for(let e=m.definition.length-1;0<=e;e--){var b={idx:p,def:m.definition[e].definition.concat(l_e(d)),ruleStack:g,occurrenceStack:f};u.push(b),u.push(s)}else if(m instanceof e7e)u.push({idx:p,def:m.definition.concat(l_e(d)),ruleStack:g,occurrenceStack:f});else{if(!(m instanceof J_e))throw Error("non exhaustive match");u.push(d2e(m,p,g,f))}}}return h}function d2e(e,t,r,i){return(r=bEe(r)).push(e.name),(i=bEe(i)).push(1),{idx:t,def:e.definition,ruleStack:r,occurrenceStack:i}}function p2e(e){if(e instanceof t7e||"Option"===e)return Y7e.OPTION;if(e instanceof n7e||"Repetition"===e)return Y7e.REPETITION;if(e instanceof r7e||"RepetitionMandatory"===e)return Y7e.REPETITION_MANDATORY;if(e instanceof i7e||"RepetitionMandatoryWithSeparator"===e)return Y7e.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof a7e||"RepetitionWithSeparator"===e)return Y7e.REPETITION_WITH_SEPARATOR;if(e instanceof s7e||"Alternation"===e)return Y7e.ALTERNATION;throw Error("non exhaustive match")}function g2e(e){var{occurrence:e,rule:t,prodType:r,maxLookahead:i}=e;return(r=p2e(r))===Y7e.ALTERNATION?w2e(e,t,i):C2e(e,t,r,i)}function f2e(e,t,r,i,n,a){return a(e=w2e(e,t,r),i,_2e(e)?Gye:Uye,n)}function m2e(e,t,r,i,n,a){return t=_2e(e=C2e(e,t,n,r))?Gye:Uye,a(e[0],t,i)}function y2e(c,e,h,t){let u=c.length,r=g_e(c,e=>g_e(e,e=>1===e.length));if(e)return function(e){var r=T_e(e,e=>e.GATE);for(let t=0;t<u;t++){var i=c[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===h(l,s[e]))continue e}return t}}};if(!r||t)return function(){for(let t=0;t<u;t++){var r=c[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===h(s,n[e]))continue e}return t}}};{let e=T_e(c,e=>bSe(e)),t=U_e(e,(t,e,r)=>(u_e(e,e=>{__e(t,e.tokenTypeIdx)||(t[e.tokenTypeIdx]=r),u_e(e.categoryMatches,e=>{__e(t,e)||(t[e]=r)})}),t),{});return function(){var e=this.LA(1);return t[e.tokenTypeIdx]}}}function v2e(n,a,r){let e=g_e(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=bSe(n)).length&&P_e(r[0].categoryMatches)){let e=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{let t=U_e(r,(t,e,r)=>(t[e.tokenTypeIdx]=!0,u_e(e.categoryMatches,e=>{t[e]=!0}),t),[]);return function(){var e=this.LA(1);return!0===t[e.tokenTypeIdx]}}}function b2e(t){var r=new Array(t);for(let e=0;e<t;e++)r[e]=[];return r}function x2e(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 T2e(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 k2e(e,i){let t=T_e(e,e=>h2e([e],1)),n=b2e(t.length),a=T_e(t,e=>{let t={};return u_e(e,e=>{e=x2e(e.partialPath),u_e(e,e=>{t[e]=!0})}),t}),s=t;for(let r=1;r<=i;r++){var o=s;s=b2e(o.length);for(let t=0;t<o.length;t++){var l=o[t];for(let e=0;e<l.length;e++){var c=l[e].partialPath,h=l[e].suffixDef,u=x2e(c);if(T2e(a,u,t)||P_e(h)||c.length===i){var d=n[t];if(!1===S2e(d,c)){d.push(c);for(let e=0;e<u.length;e++){var p=u[e];a[t][p]=!0}}}else d=h2e(h,r+1,c),s[t]=s[t].concat(d),u_e(d,e=>{e=x2e(e.partialPath),u_e(e,e=>{a[t][e]=!0})})}}}return n}function w2e(e,t,r,i){return e=new X7e(e,Y7e.ALTERNATION,i),t.accept(e),k2e(e.result,r)}function C2e(e,t,r,i){var n=new X7e(e,r),n=(t.accept(n),n.result),t=new H7e(t,e,r).startWalking();return k2e([new e7e({definition:n}),new e7e({definition:t})],i)}function S2e(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 E2e(e,r){return e.length<r.length&&g_e(e,(e,t)=>e===(t=r[t])||t.categoryMatchesMap[e.tokenTypeIdx])}function _2e(e){return g_e(e,e=>g_e(e,e=>g_e(e,e=>P_e(e.categoryMatches))))}function A2e(e){return e=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName}),T_e(e,e=>Object.assign({type:y8e.CUSTOM_LOOKAHEAD_VALIDATION},e))}function R2e(t,e,r,i){var n=k_e(t,e=>L2e(e,r)),e=W2e(t,e,r),a=k_e(t,e=>F2e(e,r)),s=k_e(t,e=>D2e(e,t,i,r));return n.concat(e,a,s)}function L2e(i,n){var e=new K7e,e=(i.accept(e),e.allProductions),e=C_e(e,I2e),e=j_e(e,e=>1<e.length);return T_e(L_e(e),e=>{var t=b_e(e),e=n.buildDuplicateFoundError(i,e),r=Qme(t),e={message:e,type:y8e.DUPLICATE_PRODUCTIONS,ruleName:i.name,dslName:r,occurrence:t.idx};return(r=N2e(t))&&(e.parameter=r),e})}function I2e(e){return`${Qme(e)}_#_${e.idx}_#_`+N2e(e)}function N2e(e){return e instanceof o7e?e.terminalType.name:e instanceof Q_e?e.nonTerminalName:""}function D2e(r,e,t,i){var n=[];return 1<U_e(e,(e,t)=>t.name===r.name?e+1:e,0)&&(e=i.buildDuplicateRuleNameError({topLevelRule:r,grammarName:t}),n.push({message:e,type:y8e.DUPLICATE_RULE_NAME,ruleName:r.name})),n}function M2e(e,t,r){var i=[];return N_e(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:y8e.INVALID_RULE_OVERRIDE,ruleName:e}),i}function O2e(r,e,i,n=[]){var t,a=[],e=P2e(e.definition);return P_e(e)?[]:(t=r.name,N_e(e,r)&&a.push({message:i.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:n}),type:y8e.LEFT_RECURSION,ruleName:t}),t=s_e(e,n.concat([r])),e=k_e(t,e=>{var t=bEe(n);return t.push(e),O2e(r,e,i,t)}),a.concat(e))}function P2e(e){let t=[];if(P_e(e))return t;if((r=b_e(e))instanceof Q_e)t.push(r.referencedRule);else if(r instanceof e7e||r instanceof t7e||r instanceof r7e||r instanceof i7e||r instanceof a7e||r instanceof n7e)t=t.concat(P2e(r.definition));else if(r instanceof s7e)t=bSe(T_e(r.definition,e=>P2e(e.definition)));else if(!(r instanceof o7e))throw Error("non exhaustive match");var r=Kme(r),i=1<e.length;return r&&i?(r=l_e(e),t.concat(P2e(r))):t}function B2e(i,n){var e=new Z7e,e=(i.accept(e),e.alternations);return k_e(e,r=>{var e=c_e(r.definition);return k_e(e,(e,t)=>(e=u2e([e],[],Uye,1),P_e(e)?[{message:n.buildEmptyAlternationError({topLevelRule:i,alternation:r,emptyChoiceIdx:t}),type:y8e.NONE_LAST_EMPTY_ALT,ruleName:i.name,occurrence:r.idx,alternative:t+1}]:[]))})}function $2e(i,n,a){var e=new Z7e,e=(i.accept(e),e.alternations),e=G_e(e,e=>!0===e.ignoreAmbiguities);return k_e(e,e=>{var t=q2e(r=w2e(e.idx,i,e.maxLookahead||n,e),e,i,a),r=j2e(r,e,i,a);return t.concat(r)})}function F2e(t,r){var e=new Z7e,e=(t.accept(e),e.alternations);return k_e(e,e=>255<e.definition.length?[{message:r.buildTooManyAlternativesError({topLevelRule:t,alternation:e}),type:y8e.TOO_MANY_ALTS,ruleName:t.name,occurrence:e.idx}]:[])}function z2e(e,n,a){let s=[];return u_e(e,i=>{var e=new Q7e,e=(i.accept(e),e.allProductions);u_e(e,e=>{var t=p2e(e),r=e.maxLookahead||n,t=C2e(e.idx,i,t,r)[0];P_e(bSe(t))&&(r=a.buildEmptyRepetitionError({topLevelRule:i,repetition:e}),s.push({message:r,type:y8e.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name}))})}),s}function q2e(a,s,r,i){let o=[],e=U_e(a,(e,t,n)=>(!0!==s.definition[n].ignoreAmbiguities&&u_e(t,r=>{let i=[n];u_e(a,(e,t)=>{n!==t&&S2e(e,r)&&!0!==s.definition[t].ignoreAmbiguities&&i.push(t)}),1<i.length&&!S2e(o,r)&&(o.push(r),e.push({alts:i,path:r}))}),e),[]);return T_e(e,e=>{var t=T_e(e.alts,e=>e+1);return{message:i.buildAlternationAmbiguityError({topLevelRule:r,alternation:s,ambiguityIndices:t,prefixPath:e.path}),type:y8e.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:s.idx,alternatives:e.alts}})}function j2e(e,n,a,s){let o=U_e(e,(e,t,r)=>(t=T_e(t,e=>({idx:r,path:e})),e.concat(t)),[]);return xEe(k_e(o,e=>{if(!0===n.definition[e.idx].ignoreAmbiguities)return[];let i=e.idx,t=e.path,r=m_e(o,e=>!0!==n.definition[e.idx].ignoreAmbiguities&&e.idx<i&&E2e(e.path,t));return T_e(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:y8e.AMBIGUOUS_PREFIX_ALTS,ruleName:a.name,occurrence:r,alternatives:t}})}))}function W2e(e,t,r){let i=[],n=T_e(t,e=>e.name);return u_e(e,e=>{var t=e.name;N_e(n,t)&&(e=r.buildNamespaceConflictError(e),i.push({message:e,type:y8e.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t}))}),i}function U2e(e){let t=r_e(e,{errMsgProvider:F7e}),r={};return u_e(e.rules,e=>{r[e.name]=e}),c2e(r,t.errMsgProvider)}function G2e(e){return R2e((e=r_e(e,{errMsgProvider:z7e})).rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}function V2e(e){return N_e(J7e,e.name)}function Y2e(e,t,r,i,n,a,s){let o=this.getKeyForAutomaticLookahead(i,n),l=this.firstAfterRepMap[o],c=(void 0===l&&(i=this.getCurrRuleFullName(),i=this.getGAstProductions()[i],l=new a(i,n).startWalking(),this.firstAfterRepMap[o]=l),l.token),h=l.occurrence,u=l.isEndOfRule;1===this.RULE_STACK.length&&u&&void 0===c&&(c=B7e,h=1),void 0!==c&&void 0!==h&&this.shouldInRepetitionRecoveryBeTried(c,h,s)&&this.tryInRepetitionRecovery(e,t,r,c)}function H2e(e,t,r){return r|t|e}function X2e(e){return l8e.reset(),e.accept(l8e),e=l8e.dslMethods,l8e.reset(),e}function K2e(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset)}function Z2e(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 Q2e(e,t,r){void 0===e.children[r]?e.children[r]=[t]:e.children[r].push(t)}function J2e(e,t,r){void 0===e.children[t]?e.children[t]=[r]:e.children[t].push(r)}function eve(e,t){Object.defineProperty(e,"name",{enumerable:!1,configurable:!0,writable:!1,value:t})}function tve(t,r){var i=$6e(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 rve(e,t){var r=yt(function(){},"derivedConstructor"),e=(eve(r,e+"BaseSemantics"),{visit:yt(function(e,t){if(bCe(e)&&(e=e[0]),!$_e(e))return this[e.name](e.children,t)},"visit"),validateVisitor:yt(function(){var e=nve(this,t);if(!P_e(e))throw e=T_e(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 ive(e,t,r){var i=yt(function(){},"derivedConstructor");eve(i,e+"BaseSemanticsWithDefaults");let n=Object.create(r.prototype);return u_e(t,e=>{n[e]=tve}),i.prototype=n,i.prototype.constructor=i}function nve(e,t){return ave(e,t)}function ave(t,e){return e=m_e(e,e=>!1===BCe(t[e])),e=T_e(e,e=>({msg:`Missing visitor method: <${e}> on ${t.constructor.name} CST Visitor.`,type:c8e.MISSING_METHOD,methodName:e})),xEe(e)}function sve(e,t,r,i=!1){cve(r);var n=o_e(this.recordingProdStack),a=BCe(t)?t:t.DEF,e=new e({definition:[],idx:r});return i&&(e.separator=t.SEP),__e(t,"MAX_LOOKAHEAD")&&(e.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(e),a.call(this),n.definition.push(e),this.recordingProdStack.pop(),h8e}function ove(e,t){cve(t);let r=o_e(this.recordingProdStack),i=!1===bCe(e),n=0==i?e:e.DEF,a=new s7e({definition:[],idx:t,ignoreAmbiguities:i&&!0===e.IGNORE_AMBIGUITIES});return __e(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD),t=Y_e(n,e=>BCe(e.GATE)),a.hasPredicates=t,r.definition.push(a),u_e(n,e=>{var t=new e7e({definition:[]});a.definition.push(t),__e(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:__e(e,"GATE")&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),h8e}function lve(e){return 0===e?"":""+e}function cve(e){if(e<0||u8e<e)throw(e=new Error(`Invalid DSL Method idx value: <${e}>
|
||
Idx value must be a none negative value smaller than `+(u8e+1))).KNOWN_RECORDER_ERROR=!0,e}function hve(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])})})}function uve(e=void 0){return function(){return e}}function dve(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 pve(){this.__data__=[],this.size=0}function gve(e,t){return e===t||e!=e&&t!=t}function fve(e,t){for(var r=e.length;r--;)if(x8e(e[r][0],t))return r;return-1}function mve(e){var t=this.__data__;return!((e=T8e(t,e))<0||(e==t.length-1?t.pop():k8e.call(t,e,1),--this.size,0))}function yve(e){var t=this.__data__;return(e=T8e(t,e))<0?void 0:t[e][1]}function vve(e){return-1<T8e(this.__data__,e)}function bve(e,t){var r=this.__data__,i=T8e(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function xve(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 Tve(){this.__data__=new w8e,this.size=0}function kve(e){var t=this.__data__,e=t.delete(e);return this.size=t.size,e}function wve(e){return this.__data__.get(e)}function Cve(e){return this.__data__.has(e)}function Sve(e){var t=C8e.call(e,E8e),r=e[E8e];try{var i=!(e[E8e]=void 0)}catch{}var n=S8e.call(e);return i&&(t?e[E8e]=r:delete e[E8e]),n}function Eve(e){return A8e.call(e)}function _ve(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":(L8e&&L8e in Object(e)?_8e:R8e)(e)}function Ave(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Rve(e){return!!N8e(e)&&("[object Function]"==(e=I8e(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}function Lve(e){return!!M8e&&M8e in e}function Ive(e){if(null!=e){try{return P8e.call(e)}catch{}try{return e+""}catch{}}return""}function Nve(e){return!(!N8e(e)||O8e(e))&&(D8e(e)?F8e:$8e).test(B8e(e))}function Dve(e,t){return e?.[t]}function Mve(e,t){return e=q8e(e,t),z8e(e)?e:void 0}function Ove(){this.__data__=W8e?W8e(null):{},this.size=0}function Pve(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e}function Bve(e){var t,r=this.__data__;return W8e?"__lodash_hash_undefined__"===(t=r[e])?void 0:t:U8e.call(r,e)?r[e]:void 0}function $ve(e){var t=this.__data__;return W8e?void 0!==t[e]:G8e.call(t,e)}function Fve(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=W8e&&void 0===t?"__lodash_hash_undefined__":t,this}function zve(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 qve(){this.size=0,this.__data__={hash:new V8e,map:new(j8e||w8e),string:new V8e}}function jve(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Wve(e,t){return e=e.__data__,Y8e(t)?e["string"==typeof t?"string":"hash"]:e.map}function Uve(e){return e=H8e(this,e).delete(e),this.size-=e?1:0,e}function Gve(e){return H8e(this,e).get(e)}function Vve(e){return H8e(this,e).has(e)}function Yve(e,t){var r=H8e(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function Hve(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 Xve(e,t){var r=this.__data__;if(r instanceof w8e){var i=r.__data__;if(!j8e||i.length<199)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new X8e(i)}return r.set(e,t),this.size=r.size,this}function Kve(e){e=this.__data__=new w8e(e),this.size=e.size}function Zve(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}function Qve(e){return this.__data__.has(e)}function Jve(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new X8e;++t<r;)this.add(e[t])}function ebe(e,t){for(var r=-1,i=null==e?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}function tbe(e,t){return e.has(t)}function rbe(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),c=a.get(t);if(l&&c)return l==t&&c==e;var h=-1,u=!0,d=2&r?new Z8e:void 0;for(a.set(e,t),a.set(t,e);++h<o;){var p,g=e[h],f=t[h];if(void 0!==(p=i?s?i(f,g,h,t,e,a):i(g,f,h,e,t,a):p)){if(p)continue;u=!1;break}if(d){if(!Q8e(t,function(e,t){if(!J8e(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}function ibe(e){var r=-1,i=Array(e.size);return e.forEach(function(e,t){i[++r]=[t,e]}),i}function nbe(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}function abe(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 tAe(e),new tAe(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return x8e(+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=rAe;case"[object Set]":var l,o=o||iAe;return!!(e.size==t.size||1&i)&&((l=s.get(e))?l==t:(i|=2,s.set(e,t),l=eAe(o(e),o(t),i,n,a,s),s.delete(e),l));case"[object Symbol]":if(nAe)return nAe.call(e)==nAe.call(t)}return!1}function sbe(e,t){for(var r=-1,i=t.length,n=e.length;++r<i;)e[n+r]=t[r];return e}function obe(e,t,r){return t=t(e),oAe(e)?t:sAe(t,r(e))}function lbe(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}function cbe(){return[]}function hbe(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}function ube(e){return null!=e&&"object"==typeof e}function dbe(e){return gAe(e)&&"[object Arguments]"==I8e(e)}function pbe(){return!1}function gbe(e,t){var r=typeof e;return!!(t=t??9007199254740991)&&("number"==r||"symbol"!=r&&bAe.test(e))&&-1<e&&e%1==0&&e<t}function fbe(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=9007199254740991}function mbe(e){return gAe(e)&&TAe(e.length)&&!!kAe[I8e(e)]}function ybe(t){return function(e){return t(e)}}function vbe(e,t){var r,i=oAe(e),n=!i&&yAe(e),a=!i&&!n&&vAe(e),s=!i&&!n&&!a&&SAe(e),o=i||n||a||s,l=o?pAe(e.length,String):[],c=l.length;for(r in e)!t&&!EAe.call(e,r)||o&&("length"==r||a&&("offset"==r||"parent"==r)||s&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||xAe(r,c))||l.push(r);return l}function bbe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||AAe)}function xbe(t,r){return function(e){return t(r(e))}}function Tbe(e){if(!RAe(e))return LAe(e);var t,r=[];for(t in Object(e))IAe.call(e,t)&&"constructor"!=t&&r.push(t);return r}function kbe(e){return null!=e&&TAe(e.length)&&!D8e(e)}function wbe(e){return(DAe(e)?_Ae:NAe)(e)}function Cbe(e){return lAe(e,MAe,dAe)}function Sbe(e,t,r,i,n,a){var s=1&r,o=OAe(e),l=o.length;if(l!=OAe(t).length&&!s)return!1;for(var c=l;c--;){var h=o[c];if(!(s?h in t:PAe.call(t,h)))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;++c<l;){var f,m=e[h=o[c]],y=t[h];if(!(void 0===(f=i?s?i(y,m,h,t,e,a):i(m,y,h,e,t,a):f)?m===y||n(m,y,r,i,a):f)){p=!1;break}g=g||"constructor"==h}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}function Ebe(e,t,r,i,n,a){var s=oAe(e),o=oAe(t),l=s?ZAe:XAe(e),o=o?ZAe:XAe(t),c=(l=l==KAe?QAe:l)==QAe,h=(o=o==KAe?QAe:o)==QAe;if((o=l==o)&&vAe(e)){if(!vAe(t))return!1;c=!(s=!0)}return o&&!c?(a=a||new K8e,s||SAe(e)?eAe(e,t,r,i,n,a):aAe(e,t,l,r,i,n,a)):1&r||(s=c&&JAe.call(e,"__wrapped__"),l=h&&JAe.call(t,"__wrapped__"),!s&&!l)?o&&(a=a||new K8e,BAe(e,t,r,i,n,a)):n(s?e.value():e,l?t.value():t,r,i,a=a||new K8e)}function _be(e,t,r,i,n){return e===t||(null==e||null==t||!gAe(e)&&!gAe(t)?e!=e&&t!=t:eRe(e,t,r,i,_be,n))}function Abe(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],c=e[l],h=o[1];if(s&&o[2]){if(void 0===c&&!(l in e))return!1}else{var u,d=new K8e;if(!(void 0===(u=i?i(c,h,l,e,t,d):u)?tRe(h,c,3,i,d):u))return!1}}return!0}function Rbe(e){return e==e&&!N8e(e)}function Lbe(e){for(var t=MAe(e),r=t.length;r--;){var i=t[r],n=e[i];t[r]=[i,n,iRe(n)]}return t}function Ibe(t,r){return function(e){return null!=e&&e[t]===r&&(void 0!==r||t in Object(e))}}function Nbe(t){var r=nRe(t);return 1==r.length&&r[0][2]?aRe(r[0][0],r[0][1]):function(e){return e===t||rRe(e,t,r)}}function Dbe(e){return"symbol"==typeof e||gAe(e)&&"[object Symbol]"==I8e(e)}function Mbe(e,t){var r;return!oAe(e)&&(!("number"!=(r=typeof e)&&"symbol"!=r&&"boolean"!=r&&null!=e&&!oRe(e))||cRe.test(e)||!lRe.test(e)||null!=t&&e in Object(t))}function Obe(i,n){if("function"!=typeof i||null!=n&&"function"!=typeof n)throw new TypeError(uRe);var a=yt(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(Obe.Cache||X8e),a}function Pbe(e){var t=(e=dRe(e,function(e){return 500===t.size&&t.clear(),e})).cache;return e}function Bbe(e){var t;return"string"==typeof e?e:oAe(e)?b8e(e,Bbe)+"":oRe(e)?bRe?bRe.call(e):"":"0"==(t=e+"")&&1/e==-yRe?"-0":t}function $be(e){return null==e?"":xRe(e)}function Fbe(e,t){return oAe(e)?e:hRe(e,t)?[e]:mRe(TRe(e))}function zbe(e){var t;return"string"==typeof e||oRe(e)?e:"0"==(t=e+"")&&1/e==-1/0?"-0":t}function qbe(e,t){for(var r=0,i=(t=kRe(t,e)).length;null!=e&&r<i;)e=e[wRe(t[r++])];return r&&r==i?e:void 0}function jbe(e,t,r){return void 0===(e=null==e?void 0:CRe(e,t))?r:e}function Wbe(e,t){return null!=e&&t in Object(e)}function Ube(e,t,r){for(var i=-1,n=(t=kRe(t,e)).length,a=!1;++i<n;){var s=wRe(t[i]);if(!(a=null!=e&&r(e,s)))break;e=e[s]}return a||++i!=n?a:!!(n=null==e?0:e.length)&&TAe(n)&&xAe(s,n)&&(oAe(e)||yAe(e))}function Gbe(e,t){return null!=e&&_Re(e,t,ERe)}function Vbe(r,i){return hRe(r)&&iRe(i)?aRe(wRe(r),i):function(e){var t=SRe(e,r);return void 0===t&&t===i?ARe(e,r):tRe(i,t,3)}}function Ybe(e){return e}function Hbe(t){return function(e){return e?.[t]}}function Xbe(t){return function(e){return CRe(e,t)}}function Kbe(e){return hRe(e)?IRe(wRe(e)):NRe(e)}function Zbe(e){return"function"==typeof e?e:null==e?LRe:"object"==typeof e?oAe(e)?RRe(e[0],e[1]):sRe(e):DRe(e)}function Qbe(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}}function Jbe(e,t){return e&&PRe(e,t,MAe)}function exe(a,s){return function(e,t){if(null!=e){if(!DAe(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}}function txe(e,i){var n=-1,a=DAe(e)?Array(e.length):[];return FRe(e,function(e,t,r){a[++n]=i(e,t,r)}),a}function rxe(e,t){return(oAe(e)?b8e:zRe)(e,MRe(t,3))}function ixe(e,i){var n=[];return FRe(e,function(e,t,r){i(e,t,r)&&n.push(e)}),n}function nxe(e,t){return(oAe(e)?cAe:jRe)(e,MRe(t,3))}function axe(e,t,r){return e.name+`_${t}_`+r}function sxe(t){var r={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]},i=(oxe(r,t),t.length);for(let e=0;e<i;e++){var n=t[e],a=fxe(r,n,n);void 0!==a&&Sxe(r,n,a)}return r}function oxe(t,r){var i=r.length;for(let e=0;e<i;e++){var n=r[e],a=_xe(t,n,void 0,{type:GRe}),s=_xe(t,n,void 0,{type:HRe});a.stop=s,t.ruleToStartState.set(n,a),t.ruleToStopState.set(n,s)}}function lxe(e,t,r){return r instanceof o7e?wxe(e,t,r.terminalType,r):(r instanceof Q_e?Cxe:r instanceof s7e?pxe:r instanceof t7e?gxe:r instanceof n7e?cxe:r instanceof a7e?hxe:r instanceof r7e?uxe:r instanceof i7e?dxe:fxe)(e,t,r)}function cxe(e,t,r){var i=_xe(e,t,r,{type:YRe});return bxe(e,i),yxe(e,t,r,xxe(e,t,i,r,fxe(e,t,r)))}function hxe(e,t,r){var i=_xe(e,t,r,{type:YRe});return bxe(e,i),yxe(e,t,r,xxe(e,t,i,r,fxe(e,t,r)),wxe(e,t,r.separator,r))}function uxe(e,t,r){var i=_xe(e,t,r,{type:VRe});return bxe(e,i),mxe(e,t,r,xxe(e,t,i,r,fxe(e,t,r)))}function dxe(e,t,r){var i=_xe(e,t,r,{type:VRe});return bxe(e,i),mxe(e,t,r,xxe(e,t,i,r,fxe(e,t,r)),wxe(e,t,r.separator,r))}function pxe(t,r,e){var i=_xe(t,r,e,{type:URe}),n=(bxe(t,i),qRe(e.definition,e=>lxe(t,r,e)));return xxe(t,r,i,e,...n)}function gxe(e,t,r){var i=_xe(e,t,r,{type:URe});return bxe(e,i),vxe(e,t,r,xxe(e,t,i,r,fxe(e,t,r)))}function fxe(t,r,e){return 1===(e=WRe(qRe(e.definition,e=>lxe(t,r,e)),e=>void 0!==e)).length?e[0]:0===e.length?void 0:kxe(t,e)}function mxe(e,t,r,i,n){var a=i.left,i=i.right,s=_xe(e,t,r,{type:QRe}),o=(bxe(e,s),_xe(e,t,r,{type:JRe}));return a.loopback=s,o.loopback=s,Exe(i,e.decisionMap[axe(t,n?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=s),void 0===n?(Exe(s,a),Exe(s,o)):(Exe(s,o),Exe(s,n.left),Exe(n.right,a)),{left:a,right:o}}function yxe(e,t,r,i,n){var a=i.left,i=i.right,s=_xe(e,t,r,{type:ZRe}),o=(bxe(e,s),_xe(e,t,r,{type:JRe})),l=_xe(e,t,r,{type:KRe});return s.loopback=l,o.loopback=l,Exe(s,a),Exe(s,o),Exe(i,l),void 0!==n?(Exe(l,o),Exe(l,n.left),Exe(n.right,a)):Exe(l,s),{left:e.decisionMap[axe(t,n?"RepetitionWithSeparator":"Repetition",r.idx)]=s,right:o}}function vxe(e,t,r,i){var n=i.left;return Exe(n,i.right),e.decisionMap[axe(t,"Option",r.idx)]=n,i}function bxe(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function xxe(e,t,r,i,...n){var a,s=_xe(e,t,i,{type:XRe,start:r});r.end=s;for(a of n)void 0!==a?(Exe(r,a.left),Exe(a.right,s)):Exe(r,s);return n={left:r,right:s},e.decisionMap[axe(t,Txe(i),i.idx)]=r,n}function Txe(e){if(e instanceof s7e)return"Alternation";if(e instanceof t7e)return"Option";if(e instanceof n7e)return"Repetition";if(e instanceof a7e)return"RepetitionWithSeparator";if(e instanceof r7e)return"RepetitionMandatory";if(e instanceof i7e)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function kxe(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 iLe,o=n,l=r[e+1].left;a.left.type===URe&&a.right.type===URe&&void 0!==n&&(s&&o.followState===a.right||n.target===a.right)?(s?o.followState=l:n.target=l,Rxe(t,a.right)):Exe(a.right,l)}return{left:r[0].left,right:r[i-1].right}}function wxe(e,t,r,i){var n=_xe(e,t,i,{type:URe}),e=_xe(e,t,i,{type:URe});return Axe(n,new tLe(e,r)),{left:n,right:e}}function Cxe(e,t,r){var i=r.referencedRule,n=e.ruleToStartState.get(i),a=_xe(e,t,r,{type:URe}),e=_xe(e,t,r,{type:URe});return Axe(a,new iLe(n,i,e)),{left:a,right:e}}function Sxe(e,t,r){var i=e.ruleToStartState.get(t),e=(Exe(i,r.left),e.ruleToStopState.get(t));return Exe(r.right,e),{left:i,right:e}}function Exe(e,t){Axe(e,new rLe(t))}function _xe(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 Axe(e,t){0===e.transitions.length&&(e.epsilonOnlyTransitions=t.isEpsilon()),e.transitions.push(t)}function Rxe(e,t){e.states.splice(e.states.indexOf(t),1)}function Lxe(e,t=!0){return`${t?"a"+e.alt:""}s${e.state.stateNumber}:`+e.stack.map(e=>e.stateNumber.toString()).join("_")}function Ixe(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&&!oRe(l):r(l,a))&&(a=l,s=o)}return s}function Nxe(e,t){return e<t}function Dxe(e){return e&&e.length?sLe(e,LRe,oLe):void 0}function Mxe(e){return oAe(e)||yAe(e)||!!(cLe&&e&&e[cLe])}function Oxe(e,t,r,i,n){var a=-1,s=e.length;for(r=r||hLe,n=n||[];++a<s;){var o=e[a];0<t&&r(o)?1<t?Oxe(o,t-1,r,i,n):sAe(n,o):i||(n[n.length]=o)}return n}function Pxe(e,t){return uLe(qRe(e,t),1)}function Bxe(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}function $xe(e){return e!=e}function Fxe(e,t,r){for(var i=r-1,n=e.length;++i<n;)if(e[i]===t)return i;return-1}function zxe(e,t,r){return t==t?fLe(e,t,r):pLe(e,gLe,r)}function qxe(e,t){return!(null==e||!e.length)&&-1<mLe(e,t,0)}function jxe(e,t,r){for(var i=-1,n=null==e?0:e.length;++i<n;)if(r(t,e[i]))return!0;return!1}function Wxe(){}function Uxe(e,t,r){var i=-1,n=yLe,a=e.length,s=!0,o=[],l=o;if(r)s=!1,n=vLe;else if(200<=a){var c=t?null:TLe(e);if(c)return iAe(c);s=!1,n=J8e,l=new Z8e}else l=t?[]:o;e:for(;++i<a;){var h=e[i],u=t?t(h):h,h=r||0!==h?h:0;if(s&&u==u){for(var d=l.length;d--;)if(l[d]===u)continue e;t&&l.push(u),o.push(h)}else n(l,u,r)||(l!==o&&l.push(u),o.push(h))}return o}function Gxe(e,t){return e&&e.length?kLe(e,MRe(t,2)):[]}function Vxe(e){return null!=e&&e.length?uLe(e,1):[]}function Yxe(e,t){for(var r=-1,i=null==e?0:e.length;++r<i&&!1!==t(e[r],r,e););return e}function Hxe(e){return"function"==typeof e?e:LRe}function Xxe(e,t){return(oAe(e)?SLe:FRe)(e,ELe(t))}function Kxe(e){if(null!=e){if(DAe(e)&&(oAe(e)||"string"==typeof e||"function"==typeof e.splice||vAe(e)||SAe(e)||yAe(e)))return!e.length;var t,r=XAe(e);if("[object Map]"==r||"[object Set]"==r)return!e.size;if(RAe(e))return!NAe(e).length;for(t in e)if(RLe.call(e,t))return!1}return!0}function Zxe(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}function Qxe(e,i,n,a,t){return t(e,function(e,t,r){n=a?(a=!1,e):i(n,e,t,r)}),n}function Jxe(e,t,r){var i=oAe(e)?ILe:NLe,n=arguments.length<3;return i(e,MRe(t,4),r,n,FRe)}function e4e(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 t4e(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 r4e(t){var r=t.decisionStates.length,i=Array(r);for(let e=0;e<r;e++)i[e]=e4e(t.decisionStates[e],e);return i}function i4e(e,t,r,i){let n=e[t](r),a=n.start;return void 0===a&&(e=y4e(n.atnStartState),a=m4e(n,g4e(e)),n.start=a),n4e.apply(this,[n,a,r,i])}function n4e(e,t,r,i){let n=t,a=1,s=[],o=this.LA(a++);for(;;){var l=h4e(n,o);if((l=void 0===l?a4e.apply(this,[e,n,o,a,r,i]):l)===nLe)return c4e(s,n,o);if(!0===l.isAcceptState)return l.prediction;n=l,s.push(o),o=this.LA(a++)}}function a4e(e,t,r,i,n,a){var s=u4e(t.configs,r,n);if(0===s.size)return f4e(e,t,r,nLe),nLe;let o=g4e(s),l=p4e(s,n);return void 0!==l?(o.isAcceptState=!0,o.prediction=l,o.configs.uniqueAlt=l):k4e(s)&&(n=lLe(s.alts),o.isAcceptState=!0,o.prediction=n,o.configs.uniqueAlt=n,s4e.apply(this,[e,i,s.alts,a])),o=f4e(e,t,r,o)}function s4e(e,t,r,i){var n=[];for(let e=1;e<=t;e++)n.push(this.LA(e).tokenType);i(o4e({topLevelRule:(e=e.atnStartState).rule,ambiguityIndices:r,production:e.production,prefixPath:n}))}function o4e(e){var t=qRe(e.prefixPath,e=>i2e(e)).join(", "),r=0===e.production.idx?"":e.production.idx;return`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${l4e(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 l4e(e){if(e instanceof Q_e)return"SUBRULE";if(e instanceof t7e)return"OPTION";if(e instanceof s7e)return"OR";if(e instanceof r7e)return"AT_LEAST_ONE";if(e instanceof i7e)return"AT_LEAST_ONE_SEP";if(e instanceof a7e)return"MANY_SEP";if(e instanceof n7e)return"MANY";if(e instanceof o7e)return"CONSUME";throw Error("non exhaustive match")}function c4e(e,t,r){return t=dLe(t.configs.elements,e=>e.state.transitions),{actualToken:r,possibleTokenTypes:wLe(t.filter(e=>e instanceof tLe).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}function h4e(e,t){return e.edges[t.tokenTypeIdx]}function u4e(e,t,r){var i,n=new aLe,a=[];for(i of e.elements)if(!1!==r.is(i.alt))if(i.state.type===HRe)a.push(i);else{var s=i.state.transitions.length;for(let e=0;e<s;e++){var o=d4e(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 aLe;for(var c of n.elements)v4e(c,l)}if(0<a.length&&!x4e(l))for(var h of a)l.add(h);return l}function d4e(e,t){if(e instanceof tLe&&l2e(t,e.tokenType))return e.target}function p4e(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 g4e(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function f4e(e,t,r,i){return i=m4e(e,i),t.edges[r.tokenTypeIdx]=i}function m4e(e,t){var r,i;return t===nLe?t:(r=t.configs.key,void 0!==(i=e.states[r])?i:(t.configs.finalize(),e.states[r]=t))}function y4e(t){var r=new aLe,i=t.transitions.length;for(let e=0;e<i;e++)v4e({state:t.transitions[e].target,alt:e,stack:[]},r);return r}function v4e(t,r){var e,i=t.state;if(i.type===HRe)0<t.stack.length?v4e({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=b4e(t,i.transitions[e]);void 0!==a&&v4e(a,r)}}}function b4e(e,t){var r;return t instanceof rLe?{state:t.target,alt:e.alt,stack:e.stack}:t instanceof iLe?(r=[...e.stack,t.followState],{state:t.target,alt:e.alt,stack:r}):void 0}function x4e(e){for(var t of e.elements)if(t.state.type===HRe)return!0;return!1}function T4e(e){for(var t of e.elements)if(t.state.type!==HRe)return!1;return!0}function k4e(e){return!!T4e(e)||C4e(e=w4e(e.elements))&&!S4e(e)}function w4e(e){var r,i=new Map;for(r of e){let e=Lxe(r,!1),t=i.get(e);void 0===t&&(t={},i.set(e,t)),t[r.alt]=!0}return i}function C4e(e){for(var t of Array.from(e.values()))if(1<Object.keys(t).length)return!0;return!1}function S4e(e){for(var t of Array.from(e.values()))if(1===Object.keys(t).length)return!0;return!1}function E4e(e){return e.$type===WLe}function _4e(e,t,r){return A4e({parser:t,tokens:r,ruleNames:new Map},e),t}function A4e(e,t){let r=L0e(t,!1),i=Pde(t.rules).filter(Ape).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,L4e(a,n.definition))}var s;for(s of Pde(t.rules).filter(ype).filter(e=>r.has(e)))e.parser.rule(s,R4e(e,s))}function R4e(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($pe(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},c=(s.elements.push(o,l),i.map(e=>r.tokens[e.value]).map((e,t)=>({ALT:yt(()=>r.parser.consume(t,e,o),"ALT")}))),h;return e=>{h=h??j4e(r,t),r.parser.subrule(0,h,!1,a,e),r.parser.many(0,{DEF:yt(()=>{r.parser.alternatives(0,c),r.parser.subrule(1,h,!1,l,e)},"DEF")})}}function L4e(t,r,e=!1){let i;if(Tpe(r))i=z4e(t,r);else if(tpe(r))i=I4e(t,r);else if(ape(r))i=L4e(t,r.terminal);else if(hpe(r))i=F4e(t,r);else if(Npe(r))i=N4e(t,r);else if(rpe(r))i=O4e(t,r);else if(Upe(r))i=P4e(t,r);else if(fpe(r))i=B4e(t,r);else{if(!dpe(r))throw new Hwe(r.$cstNode,"Unexpected element type: "+r.$type);{let e=t.consume++;i=yt(()=>t.parser.consume(e,B7e,r),"method")}}return q4e(t,e?void 0:$4e(r),i,r.cardinality)}function I4e(e,t){let r=J0e(t);return()=>e.parser.action(r,t)}function N4e(a,s){let o=s.rule.ref;if(Qde(o)){let t=a.subrule++,r=Ape(o)&&o.fragment,i=0<s.arguments.length?D4e(o,s.arguments):()=>({}),n;return e=>{n=n??j4e(a,o),a.parser.subrule(t,n,r,s,i(e))}}if($pe(o)){let e=a.consume++,t=U4e(a,o.name);return()=>a.parser.consume(e,t,s)}if(!o)throw new Hwe(s.$cstNode,"Undefined rule: "+s.rule.$refText);g0e(o)}function D4e(s,e){if(e.some(e=>e.calledByName)){let n=e.map(e=>({parameterName:e.parameter?.ref?.name,predicate:M4e(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=>M4e(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 M4e(i){if(upe(i)){let t=M4e(i.left),r=M4e(i.right);return e=>t(e)||r(e)}if(cpe(i)){let t=M4e(i.left),r=M4e(i.right);return e=>t(e)&&r(e)}if(Cpe(i)){let t=M4e(i.value);return e=>!t(e)}if(_pe(i)){let t=i.parameter.ref.name;return e=>void 0!==e&&!0===e[t]}if(spe(i)){let e=!!i.true;return()=>e}g0e()}function O4e(r,i){if(1===i.elements.length)return L4e(r,i.elements[0]);{let e=[];for(var n of i.elements){var a={ALT:L4e(r,n,!0)};(n=$4e(n))&&(a.GATE=M4e(n)),e.push(a)}let t=r.or++;return i=>r.parser.alternatives(t,e.map(e=>{let t={ALT:yt(()=>e.ALT(i),"ALT")},r=e.GATE;return r&&(t.GATE=()=>r(i)),t}))}}function P4e(s,e){if(1===e.elements.length)return L4e(s,e.elements[0]);let t=[];for(var r of e.elements){var i={ALT:L4e(s,r,!0)};(r=$4e(r))&&(i.GATE=M4e(r)),t.push(i)}let o=s.or++,l=yt((e,t)=>`uGroup_${e}_`+t.getRuleStack().join("-"),"idFunc"),n=yt(a=>s.parser.alternatives(o,t.map((t,r)=>{let e={ALT:yt(()=>!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=q4e(s,$4e(e),n,"*");return e=>{a(e),s.parser.isRecording()||s.parser.unorderedGroups.delete(l(o,s.parser))}}function B4e(t,e){let r=e.elements.map(e=>L4e(t,e));return t=>r.forEach(e=>e(t))}function $4e(e){if(fpe(e))return e.guardCondition}function F4e(n,a,s=a.terminal){if(s){if(Npe(s)&&Ape(s.rule.ref)){let t=s.rule.ref,r=n.subrule++,i;return e=>{i=i??j4e(n,t),n.parser.subrule(r,i,!1,a,e)}}if(Npe(s)&&$pe(s.rule.ref)){let e=n.consume++,t=U4e(n,s.rule.ref.name);return()=>n.parser.consume(e,t,a)}if(Tpe(s)){let e=n.consume++,t=U4e(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=j0e(a.type.ref)?.terminal)return F4e(n,a,s);throw new Error("Could not find name assignment for type: "+J0e(a.type.ref))}function z4e(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 q4e(i,e,n,t){let a=e&&M4e(e);if(!t){if(a){let t=i.or++;return e=>i.parser.alternatives(t,[{ALT:yt(()=>n(e),"ALT"),GATE:yt(()=>a(e),"GATE")},{ALT:uve(),GATE:yt(()=>!a(e),"GATE")}])}return n}if("*"===t){let t=i.many++;return e=>i.parser.many(t,{DEF:yt(()=>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:yt(()=>i.parser.atLeastOne(r,{DEF:yt(()=>n(e),"DEF")}),"ALT"),GATE:yt(()=>a(e),"GATE")},{ALT:uve(),GATE:yt(()=>!a(e),"GATE")}])}return e=>i.parser.atLeastOne(r,{DEF:yt(()=>n(e),"DEF")})}if("?"===t){let t=i.optional++;return e=>i.parser.optional(t,{DEF:yt(()=>n(e),"DEF"),GATE:a?()=>a(e):void 0})}g0e()}function j4e(e,t){if(t=W4e(e,t),e=e.parser.getRule(t))return e;throw new Error(`Rule "${t}" not found."`)}function W4e(i,n){if(Qde(n))return n.name;if(i.ruleNames.has(n))return i.ruleNames.get(n);{let e=n,t=e.$container,r=n.$type;for(;!Ape(t);)(fpe(t)||rpe(t)||Upe(t))&&(r=t.elements.indexOf(e).toString()+":"+r),t=(e=t).$container;return r=t.name+":"+r,i.ruleNames.set(n,r),r}}function U4e(e,t){if(e=e.tokens[t])return e;throw new Error(`Token "${t}" not found."`)}function G4e(e){var t=e.Grammar,r=e.parser.Lexer;return _4e(t,e=new XLe(e),r.definition),e.finalize(),e}function V4e(e){return(e=Y4e(e)).finalize(),e}function Y4e(e){var t=e.Grammar,r=e.parser.Lexer;return _4e(t,new VLe(e),r.definition)}function H4e(){return new Promise(e=>{"u"<typeof setImmediate?setTimeout(e,0):setImmediate(e)})}function X4e(){return i9e=performance.now(),new r9e.CancellationTokenSource}function K4e(e){n9e=e}function Z4e(e){return e===a9e}async function Q4e(e){if(e!==r9e.CancellationToken.None){var t=performance.now();if(n9e<=t-i9e&&(i9e=t,await H4e(),i9e=performance.now()),e.isCancellationRequested)throw a9e}}function J4e(i,n){if(!(i.length<=1)){var a=i.length/2|0,s=i.slice(0,a),o=i.slice(a);J4e(s,n),J4e(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 eTe(t,e,r=0){var i=e?[r]:[];for(let e=0;e<t.length;e++){var n=t.charCodeAt(e);tTe(n)&&(13===n&&e+1<t.length&&10===t.charCodeAt(e+1)&&e++,i.push(r+e+1))}return i}function tTe(e){return 13===e||10===e}function rTe(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 iTe(e){var t=rTe(e.range);return t!==e.range?{newText:e.newText,range:t}:e}function nTe(e){return"string"==typeof e.name}function aTe(e){return"string"==typeof e.$comment}function sTe(e){return"object"==typeof e&&!!e&&("$ref"in e||"$error"in e)}function oTe(e){return{code:e}}function lTe(e){if(e.range)return e.range;let t;return"string"==typeof e.property?t=P0e(e.node.$cstNode,e.property,e.index):"string"==typeof e.keyword&&(t=F0e(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 cTe(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 hTe(e){switch(e){case"error":return oTe(z9e.LexingError);case"warning":return oTe(z9e.LexingWarning);case"info":return oTe(z9e.LexingInfo);case"hint":return oTe(z9e.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}function uTe(e){return Array.isArray(e)&&(0===e.length||"name"in e[0])}function dTe(e){return e&&"modes"in e&&"defaultMode"in e}function pTe(e){return!uTe(e)&&!dTe(e)}function gTe(e,t,r){let i,n;return i="string"==typeof e?(n=t,r):(n=e.range.start,t),n=n||v5e.create(0,0),r=mTe(e),t=ATe(i),TTe({index:0,tokens:yTe({lines:r,position:n,options:t}),position:n})}function fTe(e,t){var r,i,t=ATe(t);return 0!==(e=mTe(e)).length&&(r=e[e.length-1],i=t.start,t=t.end,!!i?.exec(e[0]))&&!!t?.exec(r)}function mTe(e){return("string"==typeof e?e:e.text).split(iCe)}function yTe(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 c,h,u,d,p,g;e&&a.options.start?(c=a.options.start?.exec(r))&&(i=c.index+c[0].length):(c=a.options.line?.exec(r))&&(i=c.index+c[0].length),bTe(r=(r=t&&(h=a.options.end?.exec(r))?r.substring(0,h.index):r).substring(0,xTe(r)),i)>=r.length?0<s.length&&(h=v5e.create(o,l),s.push({type:"break",content:"",range:b5e.create(h,h)})):(eIe.lastIndex=i,(p=eIe.exec(r))&&(u=p[0],p=p[1],g=v5e.create(o,l+i),d=v5e.create(o,l+i+u.length),s.push({type:"tag",content:p,range:b5e.create(g,d)}),i+=u.length,i=bTe(r,i)),i<r.length&&(p=r.substring(i),g=Array.from(p.matchAll(tIe)),s.push(...vTe(g,p,o,l+i)))),o++,l=0}return 0<s.length&&"break"===s[s.length-1].type?s.slice(0,-1):s}function vTe(e,i,n,a){var s=[];if(0===e.length){var t=v5e.create(n,a),r=v5e.create(n,a+i.length);s.push({type:"text",content:i,range:b5e.create(t,r)})}else{let r=0;for(var o of e){var l=o.index,c=i.substring(r,l);0<c.length&&s.push({type:"text",content:i.substring(r,l),range:b5e.create(v5e.create(n,r+a),v5e.create(n,l+a))});let e=c.length+1,t=o[1];s.push({type:"inline-tag",content:t,range:b5e.create(v5e.create(n,r+e+a),v5e.create(n,r+e+t.length+a))}),e+=t.length,4===o.length?(e+=o[2].length,s.push({type:"text",content:c=o[3],range:b5e.create(v5e.create(n,r+e+a),v5e.create(n,r+e+c.length+a))})):s.push({type:"text",content:"",range:b5e.create(v5e.create(n,r+e+a),v5e.create(n,r+e+a))}),r=l+o[0].length}0<(t=i.substring(r)).length&&s.push({type:"text",content:t,range:b5e.create(v5e.create(n,r+a),v5e.create(n,r+a+t.length))})}return s}function bTe(e,t){var r=e.substring(t).match(rIe);return r?t+r.index:e.length}function xTe(e){if((e=e.match(iIe))&&"number"==typeof e.index)return e.index}function TTe(e){var t=v5e.create(e.position.line,e.position.character);if(0===e.tokens.length)return new nIe([],b5e.create(t,t));for(var r=[];e.index<e.tokens.length;){var i=kTe(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 nIe(r,b5e.create(n,t))}function kTe(e,t){var r=e.tokens[e.index];return"tag"===r.type?ETe(e,!1):"text"===r.type||"inline-tag"===r.type?CTe(e):(wTe(r,t),void e.index++)}function wTe(e,t){t&&(e=new oIe("",e.range),("inlines"in t?t:t.content).inlines.push(e))}function CTe(e){let t=e.tokens[e.index],r=t,i=t,n=[];for(;t&&"break"!==t.type&&"tag"!==t.type;)n.push(STe(e)),i=t,t=e.tokens[e.index];return new sIe(n,b5e.create(r.range.start,i.range.end))}function STe(e){return"inline-tag"===e.tokens[e.index].type?ETe(e,!0):_Te(e)}function ETe(e,t){var r,i=e.tokens[e.index++],n=i.content.substring(1);return"text"===e.tokens[e.index]?.type?t?(r=_Te(e),new aIe(n,new sIe([r],r.range),t,b5e.create(i.range.start,r.range.end))):(r=CTe(e),new aIe(n,r,t,b5e.create(i.range.start,r.range.end))):(e=i.range,new aIe(n,new sIe([],e),t,e))}function _Te(e){return e=e.tokens[e.index++],new oIe(e.content,e.range)}function ATe(e){var t,r;return e?({start:e,end:t,line:r}=e,{start:RTe(e,!0),end:RTe(t,!1),line:RTe(r,!0)}):ATe({start:"/**",end:"*/",line:"*"})}function RTe(e,t){var r;return"string"==typeof e||"object"==typeof e?(r="string"==typeof e?S0e(e):e.source,t?new RegExp("^\\s*"+r):new RegExp(`\\s*${r}\\s*$`)):e}function LTe(i,n,a){if("linkplain"===i||"linkcode"===i||"link"===i){let e=n.indexOf(" "),t=n,r;return 0<e&&(r=bTe(n,e),t=n.substring(r),n=n.substring(0,e)),("linkcode"===i||"link"===i&&"code"===a.link)&&(t=`\`${t}\``),a.renderLink?.(n,t)??ITe(n,t)}}function ITe(e,t){try{return h9e.parse(e,!0),`[${t}](${e})`}catch{return e}}function NTe(e){return e.endsWith(`
|
||
`)?`
|
||
`:`
|
||
|
||
`}function DTe(e){return{documentation:{CommentProvider:yt(e=>new cIe(e),"CommentProvider"),DocumentationProvider:yt(e=>new lIe(e),"DocumentationProvider")},parser:{AsyncParser:yt(e=>new hIe(e),"AsyncParser"),GrammarConfig:yt(e=>dge(e),"GrammarConfig"),LangiumParser:yt(e=>V4e(e),"LangiumParser"),CompletionParser:yt(e=>G4e(e),"CompletionParser"),ValueConverter:yt(()=>new e9e,"ValueConverter"),TokenBuilder:yt(()=>new JLe,"TokenBuilder"),Lexer:yt(e=>new J9e(e),"Lexer"),ParserErrorMessageProvider:yt(()=>new HLe,"ParserErrorMessageProvider"),LexerErrorMessageProvider:yt(()=>new Z9e,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:yt(()=>new W9e,"AstNodeLocator"),AstNodeDescriptionProvider:yt(e=>new q9e(e),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:yt(e=>new j9e(e),"ReferenceDescriptionProvider")},references:{Linker:yt(e=>new v9e(e),"Linker"),NameProvider:yt(()=>new b9e,"NameProvider"),ScopeProvider:yt(e=>new D9e(e),"ScopeProvider"),ScopeComputation:yt(e=>new w9e(e),"ScopeComputation"),References:yt(e=>new x9e(e),"References")},serializer:{Hydrator:yt(e=>new gIe(e),"Hydrator"),JsonSerializer:yt(e=>new M9e(e),"JsonSerializer")},validation:{DocumentValidator:yt(e=>new F9e(e),"DocumentValidator"),ValidationRegistry:yt(e=>new B9e(e),"ValidationRegistry")},shared:yt(()=>e.shared,"shared")}}function MTe(t){return{ServiceRegistry:yt(e=>new O9e(e),"ServiceRegistry"),workspace:{LangiumDocuments:yt(e=>new m9e(e),"LangiumDocuments"),LangiumDocumentFactory:yt(e=>new f9e(e),"LangiumDocumentFactory"),DocumentBuilder:yt(e=>new H9e(e),"DocumentBuilder"),IndexManager:yt(e=>new X9e(e),"IndexManager"),WorkspaceManager:yt(e=>new K9e(e),"WorkspaceManager"),FileSystemProvider:yt(e=>t.fileSystemProvider(e),"FileSystemProvider"),WorkspaceLock:yt(()=>new pIe,"WorkspaceLock"),ConfigurationProvider:yt(e=>new G9e(e),"ConfigurationProvider")},profilers:{}}}function OTe(e,t,r,i,n,a,s,o,l){return BTe([e,t,r,i,n,a,s,o,l].reduce(FTe,{}))}function PTe(e){if(e&&e[mIe])for(var t of Object.values(e))PTe(t);return e}function BTe(r,i){let n=new Proxy({},{deleteProperty:yt(()=>!1,"deleteProperty"),set:yt(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:yt((e,t)=>t===mIe||$Te(e,t,r,i||n),"get"),getOwnPropertyDescriptor:yt((e,t)=>($Te(e,t,r,i||n),Object.getOwnPropertyDescriptor(e,t)),"getOwnPropertyDescriptor"),has:yt((e,t)=>t in r,"has"),ownKeys:yt(()=>[...Object.getOwnPropertyNames(r)],"ownKeys")});return n}function $Te(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]===yIe)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]=yIe;try{e[t]="function"==typeof r?r(i):BTe(r,i)}catch(r){throw e[t]=r instanceof Error?r:void 0,r}return e[t]}}function FTe(e,t){if(t)for(var[r,i]of Object.entries(t)){var n;null!=i&&("object"==typeof i?(n=e[r],e[r]=FTe("object"==typeof n&&null!==n?n:{},i)):e[r]=i)}return e}function zTe(){var e=OTe(MTe(wIe),SIe),t=OTe(DTe({shared:e}),CIe);return e.ServiceRegistry.register(t),t}function qTe(e){var t=zTe(),e=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(e,h9e.parse(`memory:/${e.name??"grammar"}.langium`)),e}function jTe(e){return WNe.isInstance(e,jIe.$type)}function WTe(e){return WNe.isInstance(e,UIe.$type)}function UTe(e){return WNe.isInstance(e,HIe.$type)}function GTe(e){return"rmo"===e||"readmodel"===e||"ui"===e||"cmd"===e||"command"===e||"evt"===e||"event"===e||"pcr"===e||"processor"===e}function VTe(e){return WNe.isInstance(e,lNe.$type)}function YTe(e){return WNe.isInstance(e,fNe.$type)}function HTe(e){return WNe.isInstance(e,yNe.$type)}function XTe(e){return WNe.isInstance(e,wNe.$type)}function KTe(e){return WNe.isInstance(e,ENe.$type)}function ZTe(e){return WNe.isInstance(e,_Ne.$type)}function QTe(e){return WNe.isInstance(e,ANe.$type)}function JTe(e){return WNe.isInstance(e,RNe.$type)}function e5e(e){return WNe.isInstance(e,BNe.$type)}function t5e(e){return WNe.isInstance(e,qNe.$type)}var r5e,i5e,n5e,a5e,s5e,o5e,yt,l5e,c5e,h5e,u5e,d5e,p5e,g5e,f5e,m5e,y5e,v5e,b5e,x5e,T5e,k5e,w5e,C5e,S5e,E5e,_5e,A5e,R5e,L5e,I5e,N5e,D5e,M5e,O5e,P5e,B5e,$5e,F5e,z5e,q5e,j5e,W5e,U5e,G5e,V5e,Y5e,H5e,X5e,K5e,Z5e,Q5e,J5e,e3e,t3e,r3e,i3e,n3e,a3e,s3e,o3e,l3e,c3e,h3e,u3e,d3e,p3e,g3e,f3e,m3e,y3e,v3e,b3e,x3e,T3e,k3e,w3e,C3e,S3e,E3e,_3e,A3e,R3e,L3e,I3e,N3e,D3e,M3e,O3e,P3e,B3e,$3e,F3e,z3e,q3e,j3e,W3e,vt,U3e,G3e,V3e,Y3e,H3e,X3e,K3e,Z3e,Q3e,J3e,eke,tke,rke,ike,nke,ake,ske,oke,lke,cke,hke,uke,dke,pke,gke,fke,mke,yke,vke,bke,xke,Tke,kke,wke,Cke,Ske,Eke,_ke,Ake,Rke,Lke,Ike,Nke,Dke,Mke,Oke,Pke,Bke,$ke,Fke,zke,qke,jke,Wke,Uke,Gke,Vke,Yke,Hke,Xke,Kke,Zke,Qke,Jke,ewe,twe,rwe,iwe,nwe,awe,swe,owe,lwe,cwe,hwe,uwe,dwe,pwe,gwe,fwe,mwe,ywe,vwe,bwe,xwe,Twe,kwe,wwe,Cwe,Swe,Ewe,_we,Awe,Rwe,Lwe,Iwe,Nwe,Dwe,Mwe,Owe,Pwe,Bwe,$we,Fwe,zwe,qwe,jwe,Wwe,Uwe,Gwe,Vwe,Ywe,Hwe,Xwe,Kwe,Zwe,Qwe,Jwe,eCe,tCe,rCe,iCe,nCe,aCe,sCe,oCe,lCe,cCe,hCe,uCe,dCe,pCe,gCe,fCe,mCe,yCe,vCe,bCe,xCe,TCe,kCe,wCe,CCe,SCe,ECe,_Ce,ACe,RCe,LCe,ICe,NCe,DCe,MCe,OCe,PCe,BCe,$Ce,FCe,zCe,qCe,jCe,WCe,UCe,GCe,VCe,YCe,HCe,XCe,KCe,ZCe,QCe,JCe,e6e,t6e,r6e,i6e,n6e,a6e,s6e,o6e,l6e,c6e,h6e,u6e,d6e,p6e,g6e,f6e,m6e,y6e,v6e,b6e,x6e,T6e,k6e,w6e,C6e,S6e,E6e,_6e,A6e,R6e,L6e,I6e,N6e,D6e,M6e,O6e,P6e,B6e,$6e,F6e,z6e,q6e,j6e,W6e,U6e,G6e,V6e,Y6e,H6e,X6e,K6e,Z6e,Q6e,J6e,eSe,tSe,rSe,iSe,nSe,aSe,sSe,oSe,lSe,cSe,hSe,uSe,dSe,pSe,gSe,fSe,mSe,ySe,vSe,bSe,xSe,TSe,kSe,wSe,CSe,SSe,ESe,_Se,ASe,RSe,LSe,ISe,NSe,DSe,MSe,OSe,PSe,BSe,$Se,FSe,zSe,qSe,jSe,WSe,USe,GSe,VSe,YSe,HSe,XSe,KSe,ZSe,QSe,JSe,eEe,tEe,rEe,iEe,nEe,aEe,sEe,oEe,lEe,cEe,hEe,uEe,dEe,pEe,gEe,fEe,mEe,yEe,vEe,bEe,xEe,TEe,kEe,wEe,CEe,SEe,EEe,_Ee,AEe,REe,LEe,IEe,NEe,DEe,MEe,OEe,PEe,BEe,$Ee,FEe,zEe,qEe,jEe,WEe,UEe,GEe,VEe,YEe,HEe,XEe,KEe,ZEe,QEe,JEe,e_e,t_e,r_e,i_e,n_e,a_e,s_e,o_e,l_e,c_e,h_e,u_e,d_e,p_e,g_e,f_e,m_e,y_e,v_e,b_e,x_e,T_e,k_e,w_e,C_e,S_e,E_e,__e,A_e,R_e,L_e,I_e,N_e,D_e,M_e,O_e,P_e,B_e,$_e,F_e,z_e,q_e,j_e,W_e,U_e,G_e,V_e,Y_e,H_e,X_e,K_e,Z_e,Q_e,J_e,e7e,t7e,r7e,i7e,n7e,a7e,s7e,o7e,l7e,c7e,h7e,u7e,d7e,p7e,g7e,f7e,m7e,y7e,v7e,b7e,x7e,T7e,k7e,w7e,C7e,S7e,E7e,_7e,A7e,R7e,L7e,I7e,N7e,D7e,M7e,O7e,P7e,B7e,$7e,F7e,z7e,q7e,j7e,W7e,U7e,G7e,V7e,Y7e,H7e,X7e,K7e,Z7e,Q7e,J7e,e8e,t8e,r8e,i8e,n8e,a8e,s8e,o8e,l8e,c8e,h8e,u8e,d8e,p8e,g8e,f8e,m8e,y8e,v8e,b8e,x8e,T8e,k8e,w8e,F,C8e,S8e,E8e,_8e,A8e,R8e,L8e,I8e,N8e,D8e,M8e,O8e,P8e,B8e,$8e,F8e,z8e,q8e,j8e,W8e,U8e,G8e,V8e,Y8e,H8e,X8e,K8e,Z8e,Q8e,J8e,eAe,tAe,rAe,iAe,nAe,aAe,sAe,oAe,lAe,cAe,hAe,uAe,dAe,pAe,gAe,fAe,mAe,yAe,vAe,bAe,xAe,TAe,kAe,wAe,CAe,SAe,EAe,_Ae,AAe,RAe,LAe,IAe,NAe,DAe,MAe,OAe,PAe,BAe,$Ae,FAe,zAe,qAe,jAe,WAe,UAe,GAe,VAe,YAe,HAe,XAe,KAe,ZAe,QAe,JAe,eRe,tRe,rRe,iRe,nRe,aRe,sRe,oRe,lRe,cRe,hRe,uRe,dRe,pRe,gRe,fRe,mRe,yRe,vRe,bRe,xRe,TRe,kRe,wRe,CRe,SRe,ERe,_Re,ARe,RRe,LRe,IRe,NRe,DRe,MRe,ORe,PRe,BRe,$Re,FRe,zRe,qRe,jRe,WRe,URe,GRe,VRe,YRe,HRe,XRe,KRe,ZRe,QRe,JRe,eLe,tLe,rLe,iLe,nLe,aLe,sLe,oLe,lLe,cLe,hLe,uLe,dLe,pLe,gLe,fLe,mLe,yLe,vLe,bLe,xLe,TLe,kLe,wLe,CLe,SLe,ELe,_Le,ALe,RLe,LLe,ILe,NLe,DLe,MLe,OLe,PLe,BLe,$Le,FLe,zLe,qLe,jLe,WLe,ULe,GLe,VLe,YLe,HLe,XLe,KLe,ZLe,QLe,JLe,e9e,t9e,r9e,i9e,n9e,a9e,s9e,o9e,l9e,c9e,h9e,u9e,d9e,p9e,g9e,f9e,m9e,y9e,v9e,b9e,x9e,T9e,k9e,w9e,C9e,S9e,E9e,_9e,A9e,R9e,L9e,I9e,N9e,D9e,M9e,O9e,P9e,B9e,$9e,F9e,z9e,q9e,j9e,W9e,U9e,G9e,V9e,Y9e,H9e,X9e,K9e,Z9e,Q9e,J9e,eIe,tIe,rIe,iIe,nIe,aIe,sIe,oIe,lIe,cIe,hIe,uIe,dIe,pIe,gIe,fIe,mIe,yIe,vIe,bIe,xIe,TIe,z,kIe,wIe,CIe,SIe,EIe,_Ie,AIe,RIe,LIe,IIe,NIe,DIe,MIe,OIe,PIe,BIe,$Ie,FIe,zIe,qIe,jIe,WIe,UIe,GIe,VIe,YIe,HIe,XIe,KIe,ZIe,QIe,JIe,eNe,tNe,rNe,iNe,nNe,aNe,sNe,oNe,lNe,cNe,hNe,uNe,dNe,pNe,gNe,fNe,mNe,yNe,vNe,bNe,xNe,TNe,kNe,wNe,CNe,SNe,ENe,_Ne,ANe,RNe,LNe,INe,NNe,DNe,MNe,ONe,PNe,BNe,$Ne,FNe,zNe,qNe,jNe,WNe,UNe,GNe,VNe,YNe,HNe,XNe,KNe,ZNe,QNe,JNe,eDe,tDe,rDe,iDe,nDe,aDe,sDe,oDe,lDe,cDe,hDe,uDe,dDe,pDe,gDe,fDe,mDe,yDe,vDe,bDe,xDe,TDe,kDe,wDe,CDe,SDe,EDe,_De,ADe,RDe,LDe,IDe,NDe,DDe,MDe,ODe=r(()=>{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))}r5e=Object.create,i5e=Object.defineProperty,n5e=Object.getOwnPropertyDescriptor,a5e=Object.getOwnPropertyNames,s5e=Object.getPrototypeOf,o5e=Object.prototype.hasOwnProperty,yt=mt((e,t)=>i5e(e,"name",{value:t,configurable:!0}),"__name"),Mke=mt((e,t)=>mt(function(){return t=e?(0,e[a5e(e)[0]])(e=0):t},"__init"),"__esm"),Oke=mt((e,t)=>mt(function(){return t||(0,e[a5e(e)[0]])((t={exports:{}}).exports,t),t.exports},"__require"),"__commonJS"),l5e=mt((e,t)=>{for(var r in t)i5e(e,r,{get:t[r],enumerable:!0})},"__export"),c5e=mt((t,r,i,n)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let e of a5e(r))o5e.call(t,e)||e===i||i5e(t,e,{get:mt(()=>r[e],"get"),enumerable:!(n=n5e(r,e))||n.enumerable});return t},"__copyProps"),h5e=mt((e,t,r)=>(c5e(e,t,"default"),r&&c5e(r,t,"default")),"__reExport"),u5e=mt((e,t,r)=>(r=null!=e?r5e(s5e(e)):{},c5e(!t&&e&&e.__esModule?r:i5e(r,"default",{value:e,enumerable:!0}),e)),"__toESM"),d5e=mt(e=>c5e(i5e({},"__esModule",{value:!0}),e),"__toCommonJS"),l5e(p5e={},{AnnotatedTextEdit:mt(()=>P5e,"AnnotatedTextEdit"),ChangeAnnotation:mt(()=>M5e,"ChangeAnnotation"),ChangeAnnotationIdentifier:mt(()=>O5e,"ChangeAnnotationIdentifier"),CodeAction:mt(()=>b3e,"CodeAction"),CodeActionContext:mt(()=>v3e,"CodeActionContext"),CodeActionKind:mt(()=>m3e,"CodeActionKind"),CodeActionTriggerKind:mt(()=>y3e,"CodeActionTriggerKind"),CodeDescription:mt(()=>L5e,"CodeDescription"),CodeLens:mt(()=>x3e,"CodeLens"),Color:mt(()=>k5e,"Color"),ColorInformation:mt(()=>w5e,"ColorInformation"),ColorPresentation:mt(()=>C5e,"ColorPresentation"),Command:mt(()=>N5e,"Command"),CompletionItem:mt(()=>i3e,"CompletionItem"),CompletionItemKind:mt(()=>Z5e,"CompletionItemKind"),CompletionItemLabelDetails:mt(()=>r3e,"CompletionItemLabelDetails"),CompletionItemTag:mt(()=>J5e,"CompletionItemTag"),CompletionList:mt(()=>n3e,"CompletionList"),CreateFile:mt(()=>$5e,"CreateFile"),DeleteFile:mt(()=>z5e,"DeleteFile"),Diagnostic:mt(()=>I5e,"Diagnostic"),DiagnosticRelatedInformation:mt(()=>_5e,"DiagnosticRelatedInformation"),DiagnosticSeverity:mt(()=>A5e,"DiagnosticSeverity"),DiagnosticTag:mt(()=>R5e,"DiagnosticTag"),DocumentHighlight:mt(()=>h3e,"DocumentHighlight"),DocumentHighlightKind:mt(()=>c3e,"DocumentHighlightKind"),DocumentLink:mt(()=>k3e,"DocumentLink"),DocumentSymbol:mt(()=>f3e,"DocumentSymbol"),DocumentUri:mt(()=>g5e,"DocumentUri"),EOL:mt(()=>q3e,"EOL"),FoldingRange:mt(()=>E5e,"FoldingRange"),FoldingRangeKind:mt(()=>S5e,"FoldingRangeKind"),FormattingOptions:mt(()=>T3e,"FormattingOptions"),Hover:mt(()=>s3e,"Hover"),InlayHint:mt(()=>D3e,"InlayHint"),InlayHintKind:mt(()=>I3e,"InlayHintKind"),InlayHintLabelPart:mt(()=>N3e,"InlayHintLabelPart"),InlineCompletionContext:mt(()=>F3e,"InlineCompletionContext"),InlineCompletionItem:mt(()=>O3e,"InlineCompletionItem"),InlineCompletionList:mt(()=>P3e,"InlineCompletionList"),InlineCompletionTriggerKind:mt(()=>B3e,"InlineCompletionTriggerKind"),InlineValueContext:mt(()=>L3e,"InlineValueContext"),InlineValueEvaluatableExpression:mt(()=>R3e,"InlineValueEvaluatableExpression"),InlineValueText:mt(()=>_3e,"InlineValueText"),InlineValueVariableLookup:mt(()=>A3e,"InlineValueVariableLookup"),InsertReplaceEdit:mt(()=>e3e,"InsertReplaceEdit"),InsertTextFormat:mt(()=>Q5e,"InsertTextFormat"),InsertTextMode:mt(()=>t3e,"InsertTextMode"),Location:mt(()=>x5e,"Location"),LocationLink:mt(()=>T5e,"LocationLink"),MarkedString:mt(()=>a3e,"MarkedString"),MarkupContent:mt(()=>K5e,"MarkupContent"),MarkupKind:mt(()=>X5e,"MarkupKind"),OptionalVersionedTextDocumentIdentifier:mt(()=>Y5e,"OptionalVersionedTextDocumentIdentifier"),ParameterInformation:mt(()=>o3e,"ParameterInformation"),Position:mt(()=>v5e,"Position"),Range:mt(()=>b5e,"Range"),RenameFile:mt(()=>F5e,"RenameFile"),SelectedCompletionInfo:mt(()=>$3e,"SelectedCompletionInfo"),SelectionRange:mt(()=>w3e,"SelectionRange"),SemanticTokenModifiers:mt(()=>S3e,"SemanticTokenModifiers"),SemanticTokenTypes:mt(()=>C3e,"SemanticTokenTypes"),SemanticTokens:mt(()=>E3e,"SemanticTokens"),SignatureInformation:mt(()=>l3e,"SignatureInformation"),StringValue:mt(()=>M3e,"StringValue"),SymbolInformation:mt(()=>p3e,"SymbolInformation"),SymbolKind:mt(()=>u3e,"SymbolKind"),SymbolTag:mt(()=>d3e,"SymbolTag"),TextDocument:mt(()=>j3e,"TextDocument"),TextDocumentEdit:mt(()=>B5e,"TextDocumentEdit"),TextDocumentIdentifier:mt(()=>G5e,"TextDocumentIdentifier"),TextDocumentItem:mt(()=>H5e,"TextDocumentItem"),TextEdit:mt(()=>D5e,"TextEdit"),URI:mt(()=>f5e,"URI"),VersionedTextDocumentIdentifier:mt(()=>V5e,"VersionedTextDocumentIdentifier"),WorkspaceChange:mt(()=>U5e,"WorkspaceChange"),WorkspaceEdit:mt(()=>q5e,"WorkspaceEdit"),WorkspaceFolder:mt(()=>z3e,"WorkspaceFolder"),WorkspaceSymbol:mt(()=>g3e,"WorkspaceSymbol"),integer:mt(()=>m5e,"integer"),uinteger:mt(()=>y5e,"uinteger")}),U3e=Mke({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){b=g5e=g5e||{},mt(ft,"is"),yt(ft,"is"),b.is=ft,b=f5e=f5e||{},mt(gt,"is"),yt(gt,"is"),b.is=gt,(v=m5e=m5e||{}).MIN_VALUE=-2147483648,v.MAX_VALUE=2147483647,mt(pt,"is"),yt(pt,"is"),v.is=pt,(y=y5e=y5e||{}).MIN_VALUE=0,y.MAX_VALUE=2147483647,mt(dt,"is"),yt(dt,"is"),y.is=dt,b=v5e=v5e||{},mt(ht,"create"),yt(ht,"create"),b.create=ht,mt(ut,"is"),yt(ut,"is"),b.is=ut,b=b5e=b5e||{},mt(lt,"create"),yt(lt,"create"),b.create=lt,mt(ct,"is"),yt(ct,"is"),b.is=ct,b=x5e=x5e||{},mt(st,"create"),yt(st,"create"),b.create=st,mt(ot,"is"),yt(ot,"is"),b.is=ot,b=T5e=T5e||{},mt(nt,"create"),yt(nt,"create"),b.create=nt,mt(at,"is"),yt(at,"is"),b.is=at,b=k5e=k5e||{},mt(rt,"create"),yt(rt,"create"),b.create=rt,mt(it,"is"),yt(it,"is"),b.is=it,b=w5e=w5e||{},mt(et,"create"),yt(et,"create"),b.create=et,mt(tt,"is"),yt(tt,"is"),b.is=tt,b=C5e=C5e||{},mt(Qe,"create"),yt(Qe,"create"),b.create=Qe,mt(Je,"is"),yt(Je,"is"),b.is=Je,(b=S5e=S5e||{}).Comment="comment",b.Imports="imports",b.Region="region",b=E5e=E5e||{},mt(Ke,"create"),yt(Ke,"create"),b.create=Ke,mt(Ze,"is"),yt(Ze,"is"),b.is=Ze,b=_5e=_5e||{},mt(He,"create"),yt(He,"create"),b.create=He,mt(Xe,"is"),yt(Xe,"is"),b.is=Xe,(b=A5e=A5e||{}).Error=1,b.Warning=2,b.Information=3,b.Hint=4,(b=R5e=R5e||{}).Unnecessary=1,b.Deprecated=2,b=L5e=L5e||{},mt(Ye,"is"),yt(Ye,"is"),b.is=Ye,b=I5e=I5e||{},mt(Ge,"create"),yt(Ge,"create"),b.create=Ge,mt(Ve,"is"),yt(Ve,"is"),b.is=Ve,b=N5e=N5e||{},mt(We,"create"),yt(We,"create"),b.create=We,mt(Ue,"is"),yt(Ue,"is"),b.is=Ue,b=D5e=D5e||{},mt(Fe,"replace"),yt(Fe,"replace"),b.replace=Fe,mt(ze,"insert"),yt(ze,"insert"),b.insert=ze,mt(qe,"del"),yt(qe,"del"),b.del=qe,mt(je,"is"),yt(je,"is"),b.is=je,b=M5e=M5e||{},mt(Be,"create"),yt(Be,"create"),b.create=Be,mt($e,"is"),yt($e,"is"),b.is=$e,b=O5e=O5e||{},mt(Pe,"is"),yt(Pe,"is"),b.is=Pe,b=P5e=P5e||{},mt(Ne,"replace"),yt(Ne,"replace"),b.replace=Ne,mt(De,"insert"),yt(De,"insert"),b.insert=De,mt(Me,"del"),yt(Me,"del"),b.del=Me,mt(Oe,"is"),yt(Oe,"is"),b.is=Oe,b=B5e=B5e||{},mt(Le,"create"),yt(Le,"create"),b.create=Le,mt(Ie,"is"),yt(Ie,"is"),b.is=Ie,b=$5e=$5e||{},mt(Ae,"create"),yt(Ae,"create"),b.create=Ae,mt(Re,"is"),yt(Re,"is"),b.is=Re,b=F5e=F5e||{},mt(Ee,"create"),yt(Ee,"create"),b.create=Ee,mt(_e,"is"),yt(_e,"is"),b.is=_e,b=z5e=z5e||{},mt(Ce,"create"),yt(Ce,"create"),b.create=Ce,mt(Se,"is"),yt(Se,"is"),b.is=Se,b=q5e=q5e||{},mt(we,"is"),yt(we,"is"),b.is=we,j5e=class{static{mt(this,"TextEditChangeImpl")}static{yt(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let i,n;if(i=void 0===r?D5e.insert(e,t):O5e.is(r)?(n=r,P5e.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(r),P5e.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?D5e.replace(e,t):O5e.is(r)?(n=r,P5e.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(r),P5e.replace(e,t,n)),this.edits.push(i),void 0!==n)return n}delete(e,t){let r,i;if(r=void 0===t?D5e.del(e):O5e.is(t)?(i=t,P5e.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),P5e.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.")}},W5e=class{static{mt(this,"ChangeAnnotations")}static{yt(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(O5e.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()}},U5e=class{static{mt(this,"WorkspaceChange")}static{yt(this,"WorkspaceChange")}constructor(r){this._textEditChanges=Object.create(null),void 0!==r?(this._workspaceEdit=r).documentChanges?(this._changeAnnotations=new W5e(r.changeAnnotations),r.changeAnnotations=this._changeAnnotations.all(),r.documentChanges.forEach(e=>{var t;B5e.is(e)&&(t=new j5e(e.edits,this._changeAnnotations),this._textEditChanges[e.textDocument.uri]=t)})):r.changes&&Object.keys(r.changes).forEach(e=>{var t=new j5e(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(Y5e.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 j5e(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 j5e(i),this._textEditChanges[r]=e),e}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new W5e,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;M5e.is(t)||O5e.is(t)?i=t:r=t;let n,a;if(n=void 0===i?$5e.create(e,r):(a=O5e.is(i)?i:this._changeAnnotations.manage(i),$5e.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;M5e.is(r)||O5e.is(r)?n=r:i=r;let a,s;if(a=void 0===n?F5e.create(e,t,i):(s=O5e.is(n)?n:this._changeAnnotations.manage(n),F5e.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;M5e.is(t)||O5e.is(t)?i=t:r=t;let n,a;if(n=void 0===i?z5e.create(e,r):(a=O5e.is(i)?i:this._changeAnnotations.manage(i),z5e.create(e,r,a)),this._workspaceEdit.documentChanges.push(n),void 0!==a)return a}},b=G5e=G5e||{},mt(Te,"create"),yt(Te,"create"),b.create=Te,mt(ke,"is"),yt(ke,"is"),b.is=ke,b=V5e=V5e||{},mt(be,"create"),yt(be,"create"),b.create=be,mt(xe,"is"),yt(xe,"is"),b.is=xe,b=Y5e=Y5e||{},mt(ye,"create"),yt(ye,"create"),b.create=ye,mt(ve,"is"),yt(ve,"is"),b.is=ve,b=H5e=H5e||{},mt(fe,"create"),yt(fe,"create"),b.create=fe,mt(me,"is"),yt(me,"is"),b.is=me,(m=X5e=X5e||{}).PlainText="plaintext",m.Markdown="markdown",mt(ge,"is"),yt(ge,"is"),m.is=ge,b=K5e=K5e||{},mt(pe,"is"),yt(pe,"is"),b.is=pe,(b=Z5e=Z5e||{}).Text=1,b.Method=2,b.Function=3,b.Constructor=4,b.Field=5,b.Variable=6,b.Class=7,b.Interface=8,b.Module=9,b.Property=10,b.Unit=11,b.Value=12,b.Enum=13,b.Keyword=14,b.Snippet=15,b.Color=16,b.File=17,b.Reference=18,b.Folder=19,b.EnumMember=20,b.Constant=21,b.Struct=22,b.Event=23,b.Operator=24,b.TypeParameter=25,(b=Q5e=Q5e||{}).PlainText=1,b.Snippet=2,(J5e=J5e||{}).Deprecated=1,b=e3e=e3e||{},mt(ue,"create"),yt(ue,"create"),b.create=ue,mt(de,"is"),yt(de,"is"),b.is=de,(b=t3e=t3e||{}).asIs=1,b.adjustIndentation=2,b=r3e=r3e||{},mt(he,"is"),yt(he,"is"),b.is=he,b=i3e=i3e||{},mt(ce,"create"),yt(ce,"create"),b.create=ce,b=n3e=n3e||{},mt(le,"create"),yt(le,"create"),b.create=le,b=a3e=a3e||{},mt(se,"fromPlainText"),yt(se,"fromPlainText"),b.fromPlainText=se,mt(oe,"is"),yt(oe,"is"),b.is=oe,b=s3e=s3e||{},mt(ae,"is"),yt(ae,"is"),b.is=ae,b=o3e=o3e||{},mt(ne,"create"),yt(ne,"create"),b.create=ne,b=l3e=l3e||{},mt(ie,"create"),yt(ie,"create"),b.create=ie,(b=c3e=c3e||{}).Text=1,b.Read=2,b.Write=3,b=h3e=h3e||{},mt(re,"create"),yt(re,"create"),b.create=re,(b=u3e=u3e||{}).File=1,b.Module=2,b.Namespace=3,b.Package=4,b.Class=5,b.Method=6,b.Property=7,b.Field=8,b.Constructor=9,b.Enum=10,b.Interface=11,b.Function=12,b.Variable=13,b.Constant=14,b.String=15,b.Number=16,b.Boolean=17,b.Array=18,b.Object=19,b.Key=20,b.Null=21,b.EnumMember=22,b.Struct=23,b.Event=24,b.Operator=25,b.TypeParameter=26,(d3e=d3e||{}).Deprecated=1,b=p3e=p3e||{},mt(te,"create"),yt(te,"create"),b.create=te,b=g3e=g3e||{},mt(ee,"create"),yt(ee,"create"),b.create=ee,b=f3e=f3e||{},mt(Q,"create"),yt(Q,"create"),b.create=Q,mt(J,"is"),yt(J,"is"),b.is=J,(b=m3e=m3e||{}).Empty="",b.QuickFix="quickfix",b.Refactor="refactor",b.RefactorExtract="refactor.extract",b.RefactorInline="refactor.inline",b.RefactorRewrite="refactor.rewrite",b.Source="source",b.SourceOrganizeImports="source.organizeImports",b.SourceFixAll="source.fixAll",(b=y3e=y3e||{}).Invoked=1,b.Automatic=2,b=v3e=v3e||{},mt(K,"create"),yt(K,"create"),b.create=K,mt(Z,"is"),yt(Z,"is"),b.is=Z,b=b3e=b3e||{},mt(H,"create"),yt(H,"create"),b.create=H,mt(X,"is"),yt(X,"is"),b.is=X,b=x3e=x3e||{},mt(V,"create"),yt(V,"create"),b.create=V,mt(Y,"is"),yt(Y,"is"),b.is=Y,b=T3e=T3e||{},mt(U,"create"),yt(U,"create"),b.create=U,mt(G,"is"),yt(G,"is"),b.is=G,b=k3e=k3e||{},mt(j,"create"),yt(j,"create"),b.create=j,mt(W,"is"),yt(W,"is"),b.is=W,f=w3e=w3e||{},mt(z,"create"),yt(z,"create"),f.create=z,mt(q,"is"),yt(q,"is"),f.is=q,(b=C3e=C3e||{}).namespace="namespace",b.type="type",b.class="class",b.enum="enum",b.interface="interface",b.struct="struct",b.typeParameter="typeParameter",b.parameter="parameter",b.variable="variable",b.property="property",b.enumMember="enumMember",b.event="event",b.function="function",b.method="method",b.macro="macro",b.keyword="keyword",b.modifier="modifier",b.comment="comment",b.string="string",b.number="number",b.regexp="regexp",b.operator="operator",b.decorator="decorator",(b=S3e=S3e||{}).declaration="declaration",b.definition="definition",b.readonly="readonly",b.static="static",b.deprecated="deprecated",b.abstract="abstract",b.async="async",b.modification="modification",b.documentation="documentation",b.defaultLibrary="defaultLibrary",b=E3e=E3e||{},mt(F,"is"),yt(F,"is"),b.is=F,b=_3e=_3e||{},mt(B,"create"),yt(B,"create"),b.create=B,mt($,"is"),yt($,"is"),b.is=$,b=A3e=A3e||{},mt(O,"create"),yt(O,"create"),b.create=O,mt(P,"is"),yt(P,"is"),b.is=P,b=R3e=R3e||{},mt(D,"create"),yt(D,"create"),b.create=D,mt(M,"is"),yt(M,"is"),b.is=M,b=L3e=L3e||{},mt(I,"create"),yt(I,"create"),b.create=I,mt(N,"is"),yt(N,"is"),b.is=N,(b=I3e=I3e||{}).Type=1,b.Parameter=2,mt(L,"is"),yt(L,"is"),b.is=L,b=N3e=N3e||{},mt(A,"create"),yt(A,"create"),b.create=A,mt(R,"is"),yt(R,"is"),b.is=R,b=D3e=D3e||{},mt(E,"create"),yt(E,"create"),b.create=E,mt(_,"is"),yt(_,"is"),b.is=_,b=M3e=M3e||{},mt(S,"createSnippet"),yt(S,"createSnippet"),b.createSnippet=S,b=O3e=O3e||{},mt(C,"create"),yt(C,"create"),b.create=C,b=P3e=P3e||{},mt(w,"create"),yt(w,"create"),b.create=w,(b=B3e=B3e||{}).Invoked=0,b.Automatic=1,b=$3e=$3e||{},mt(k,"create"),yt(k,"create"),b.create=k,b=F3e=F3e||{},mt(T,"create"),yt(T,"create"),b.create=T,b=z3e=z3e||{},mt(x,"is"),yt(x,"is"),b.is=x,q3e=[`
|
||
`,`\r
|
||
`,"\r"],b=j3e=j3e||{},mt(i,"create"),yt(i,"create"),b.create=i,mt(d,"is"),yt(d,"is"),b.is=d,mt(p,"applyEdits"),yt(p,"applyEdits"),b.applyEdits=p,mt(g,"mergeSort2"),yt(g,"mergeSort"),W3e=class{static{mt(this,"FullTextDocument")}static{yt(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 v5e.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 v5e.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}};{b=vt=vt||{};let i=Object.prototype.toString;function e(e){return typeof e<"u"}function t(e){return"u"<typeof e}function r(e){return!0===e||!1===e}function n(e){return"[object String]"===i.call(e)}function a(e){return"[object Number]"===i.call(e)}function s(e,t,r){return"[object Number]"===i.call(e)&&t<=e&&e<=r}function o(e){return"[object Number]"===i.call(e)&&-2147483648<=e&&e<=2147483647}function l(e){return"[object Number]"===i.call(e)&&0<=e&&e<=2147483647}function c(e){return"[object Function]"===i.call(e)}function h(e){return null!==e&&"object"==typeof e}function u(e,t){return Array.isArray(e)&&e.every(t)}mt(e,"defined"),yt(e,"defined"),b.defined=e,mt(t,"undefined2"),yt(t,"undefined"),b.undefined=t,mt(r,"boolean"),yt(r,"boolean"),b.boolean=r,mt(n,"string"),yt(n,"string"),b.string=n,mt(a,"number"),yt(a,"number"),b.number=a,mt(s,"numberRange"),yt(s,"numberRange"),b.numberRange=s,mt(o,"integer2"),yt(o,"integer"),b.integer=o,mt(l,"uinteger2"),yt(l,"uinteger"),b.uinteger=l,mt(c,"func"),yt(c,"func"),b.func=c,mt(h,"objectLiteral"),yt(h,"objectLiteral"),b.objectLiteral=h,mt(u,"typedArray"),yt(u,"typedArray"),b.typedArray=u}function i(e,t,r,i){return new W3e(e,t,r,i)}function d(e){return!!(vt.defined(e)&&vt.string(e.uri)&&(vt.undefined(e.languageId)||vt.string(e.languageId))&&vt.uinteger(e.lineCount)&&vt.func(e.getText)&&vt.func(e.positionAt)&&vt.func(e.offsetAt))}function p(t,e){let r=t.getText(),i=g(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 g(i,n){if(!(i.length<=1)){var a=i.length/2|0,s=i.slice(0,a),o=i.slice(a);g(s,n),g(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}var f,m,y,v,b;function x(e){return vt.objectLiteral(e)&&f5e.is(e.uri)&&vt.string(e.name)}function T(e,t){return{triggerKind:e,selectedCompletionInfo:t}}function k(e,t){return{range:e,text:t}}function w(e){return{items:e}}function C(e,t,r,i){return{insertText:e,filterText:t,range:r,command:i}}function S(e){return{kind:"snippet",value:e}}function E(e,t,r){return e={position:e,label:t},void 0!==r&&(e.kind=r),e}function _(e){return vt.objectLiteral(e)&&v5e.is(e.position)&&(vt.string(e.label)||vt.typedArray(e.label,N3e.is))&&(void 0===e.kind||I3e.is(e.kind))&&void 0===e.textEdits||vt.typedArray(e.textEdits,D5e.is)&&(void 0===e.tooltip||vt.string(e.tooltip)||K5e.is(e.tooltip))&&(void 0===e.paddingLeft||vt.boolean(e.paddingLeft))&&(void 0===e.paddingRight||vt.boolean(e.paddingRight))}function A(e){return{value:e}}function R(e){return vt.objectLiteral(e)&&(void 0===e.tooltip||vt.string(e.tooltip)||K5e.is(e.tooltip))&&(void 0===e.location||x5e.is(e.location))&&(void 0===e.command||N5e.is(e.command))}function L(e){return 1===e||2===e}function I(e,t){return{frameId:e,stoppedLocation:t}}function N(e){return vt.defined(e)&&b5e.is(e.stoppedLocation)}function D(e,t){return{range:e,expression:t}}function M(e){return null!=e&&b5e.is(e.range)&&(vt.string(e.expression)||void 0===e.expression)}function O(e,t,r){return{range:e,variableName:t,caseSensitiveLookup:r}}function P(e){return null!=e&&b5e.is(e.range)&&vt.boolean(e.caseSensitiveLookup)&&(vt.string(e.variableName)||void 0===e.variableName)}function B(e,t){return{range:e,text:t}}function $(e){return null!=e&&b5e.is(e.range)&&vt.string(e.text)}function F(e){return vt.objectLiteral(e)&&(void 0===e.resultId||"string"==typeof e.resultId)&&Array.isArray(e.data)&&(0===e.data.length||"number"==typeof e.data[0])}function z(e,t){return{range:e,parent:t}}function q(e){return vt.objectLiteral(e)&&b5e.is(e.range)&&(void 0===e.parent||f.is(e.parent))}function j(e,t,r){return{range:e,target:t,data:r}}function W(e){return vt.defined(e)&&b5e.is(e.range)&&(vt.undefined(e.target)||vt.string(e.target))}function U(e,t){return{tabSize:e,insertSpaces:t}}function G(e){return vt.defined(e)&&vt.uinteger(e.tabSize)&&vt.boolean(e.insertSpaces)}function V(e,t){return e={range:e},vt.defined(t)&&(e.data=t),e}function Y(e){return vt.defined(e)&&b5e.is(e.range)&&(vt.undefined(e.command)||N5e.is(e.command))}function H(e,t,r){let i={title:e},n=!0;return"string"==typeof t?(n=!1,i.kind=t):N5e.is(t)?i.command=t:i.edit=t,n&&void 0!==r&&(i.kind=r),i}function X(e){return e&&vt.string(e.title)&&(void 0===e.diagnostics||vt.typedArray(e.diagnostics,I5e.is))&&(void 0===e.kind||vt.string(e.kind))&&(void 0!==e.edit||void 0!==e.command)&&(void 0===e.command||N5e.is(e.command))&&(void 0===e.isPreferred||vt.boolean(e.isPreferred))&&(void 0===e.edit||q5e.is(e.edit))}function K(e,t,r){return e={diagnostics:e},null!=t&&(e.only=t),null!=r&&(e.triggerKind=r),e}function Z(e){return vt.defined(e)&&vt.typedArray(e.diagnostics,I5e.is)&&(void 0===e.only||vt.typedArray(e.only,vt.string))&&(void 0===e.triggerKind||e.triggerKind===y3e.Invoked||e.triggerKind===y3e.Automatic)}function Q(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 J(e){return e&&vt.string(e.name)&&vt.number(e.kind)&&b5e.is(e.range)&&b5e.is(e.selectionRange)&&(void 0===e.detail||vt.string(e.detail))&&(void 0===e.deprecated||vt.boolean(e.deprecated))&&(void 0===e.children||Array.isArray(e.children))&&(void 0===e.tags||Array.isArray(e.tags))}function ee(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 te(e,t,r,i,n){return e={name:e,kind:t,location:{uri:i,range:r}},n&&(e.containerName=n),e}function re(e,t){return e={range:e},vt.number(t)&&(e.kind=t),e}function ie(e,t,...r){return e={label:e},vt.defined(t)&&(e.documentation=t),vt.defined(r)?e.parameters=r:e.parameters=[],e}function ne(e,t){return t?{label:e,documentation:t}:{label:e}}function ae(e){var t=e;return!!t&&vt.objectLiteral(t)&&(K5e.is(t.contents)||a3e.is(t.contents)||vt.typedArray(t.contents,a3e.is))&&(void 0===e.range||b5e.is(e.range))}function se(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function oe(e){return vt.string(e)||vt.objectLiteral(e)&&vt.string(e.language)&&vt.string(e.value)}function le(e,t){return{items:e||[],isIncomplete:!!t}}function ce(e){return{label:e}}function he(e){return e&&(vt.string(e.detail)||void 0===e.detail)&&(vt.string(e.description)||void 0===e.description)}function ue(e,t,r){return{newText:e,insert:t,replace:r}}function de(e){return e&&vt.string(e.newText)&&b5e.is(e.insert)&&b5e.is(e.replace)}function pe(e){var t=e;return vt.objectLiteral(e)&&X5e.is(t.kind)&&vt.string(t.value)}function ge(e){return e===m.PlainText||e===m.Markdown}function fe(e,t,r,i){return{uri:e,languageId:t,version:r,text:i}}function me(e){return vt.defined(e)&&vt.string(e.uri)&&vt.string(e.languageId)&&vt.integer(e.version)&&vt.string(e.text)}function ye(e,t){return{uri:e,version:t}}function ve(e){return vt.defined(e)&&vt.string(e.uri)&&(null===e.version||vt.integer(e.version))}function be(e,t){return{uri:e,version:t}}function xe(e){return vt.defined(e)&&vt.string(e.uri)&&vt.integer(e.version)}function Te(e){return{uri:e}}function ke(e){return vt.defined(e)&&vt.string(e.uri)}function we(e){return e&&(void 0!==e.changes||void 0!==e.documentChanges)&&(void 0===e.documentChanges||e.documentChanges.every(e=>vt.string(e.kind)?$5e.is(e)||F5e.is(e)||z5e.is(e):B5e.is(e)))}function Ce(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 Se(e){return e&&"delete"===e.kind&&vt.string(e.uri)&&(void 0===e.options||(void 0===e.options.recursive||vt.boolean(e.options.recursive))&&(void 0===e.options.ignoreIfNotExists||vt.boolean(e.options.ignoreIfNotExists)))&&(void 0===e.annotationId||O5e.is(e.annotationId))}function Ee(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 _e(e){return e&&"rename"===e.kind&&vt.string(e.oldUri)&&vt.string(e.newUri)&&(void 0===e.options||(void 0===e.options.overwrite||vt.boolean(e.options.overwrite))&&(void 0===e.options.ignoreIfExists||vt.boolean(e.options.ignoreIfExists)))&&(void 0===e.annotationId||O5e.is(e.annotationId))}function Ae(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 Re(e){return e&&"create"===e.kind&&vt.string(e.uri)&&(void 0===e.options||(void 0===e.options.overwrite||vt.boolean(e.options.overwrite))&&(void 0===e.options.ignoreIfExists||vt.boolean(e.options.ignoreIfExists)))&&(void 0===e.annotationId||O5e.is(e.annotationId))}function Le(e,t){return{textDocument:e,edits:t}}function Ie(e){return vt.defined(e)&&Y5e.is(e.textDocument)&&Array.isArray(e.edits)}function Ne(e,t,r){return{range:e,newText:t,annotationId:r}}function De(e,t,r){return{range:{start:e,end:e},newText:t,annotationId:r}}function Me(e,t){return{range:e,newText:"",annotationId:t}}function Oe(e){return D5e.is(e)&&(M5e.is(e.annotationId)||O5e.is(e.annotationId))}function Pe(e){return vt.string(e)}function Be(e,t,r){return e={label:e},void 0!==t&&(e.needsConfirmation=t),void 0!==r&&(e.description=r),e}function $e(e){return vt.objectLiteral(e)&&vt.string(e.label)&&(vt.boolean(e.needsConfirmation)||void 0===e.needsConfirmation)&&(vt.string(e.description)||void 0===e.description)}function Fe(e,t){return{range:e,newText:t}}function ze(e,t){return{range:{start:e,end:e},newText:t}}function qe(e){return{range:e,newText:""}}function je(e){return vt.objectLiteral(e)&&vt.string(e.newText)&&b5e.is(e.range)}function We(e,t,...r){return e={title:e,command:t},vt.defined(r)&&0<r.length&&(e.arguments=r),e}function Ue(e){return vt.defined(e)&&vt.string(e.title)&&vt.string(e.command)}function Ge(e,t,r,i,n,a){return e={range:e,message:t},vt.defined(r)&&(e.severity=r),vt.defined(i)&&(e.code=i),vt.defined(n)&&(e.source=n),vt.defined(a)&&(e.relatedInformation=a),e}function Ve(e){var t;return vt.defined(e)&&b5e.is(e.range)&&vt.string(e.message)&&(vt.number(e.severity)||vt.undefined(e.severity))&&(vt.integer(e.code)||vt.string(e.code)||vt.undefined(e.code))&&(vt.undefined(e.codeDescription)||vt.string(null==(t=e.codeDescription)?void 0:t.href))&&(vt.string(e.source)||vt.undefined(e.source))&&(vt.undefined(e.relatedInformation)||vt.typedArray(e.relatedInformation,_5e.is))}function Ye(e){return vt.objectLiteral(e)&&vt.string(e.href)}function He(e,t){return{location:e,message:t}}function Xe(e){return vt.defined(e)&&x5e.is(e.location)&&vt.string(e.message)}function Ke(e,t,r,i,n,a){return e={startLine:e,endLine:t},vt.defined(r)&&(e.startCharacter=r),vt.defined(i)&&(e.endCharacter=i),vt.defined(n)&&(e.kind=n),vt.defined(a)&&(e.collapsedText=a),e}function Ze(e){return vt.objectLiteral(e)&&vt.uinteger(e.startLine)&&vt.uinteger(e.startLine)&&(vt.undefined(e.startCharacter)||vt.uinteger(e.startCharacter))&&(vt.undefined(e.endCharacter)||vt.uinteger(e.endCharacter))&&(vt.undefined(e.kind)||vt.string(e.kind))}function Qe(e,t,r){return{label:e,textEdit:t,additionalTextEdits:r}}function Je(e){return vt.objectLiteral(e)&&vt.string(e.label)&&(vt.undefined(e.textEdit)||D5e.is(e))&&(vt.undefined(e.additionalTextEdits)||vt.typedArray(e.additionalTextEdits,D5e.is))}function et(e,t){return{range:e,color:t}}function tt(e){return vt.objectLiteral(e)&&b5e.is(e.range)&&k5e.is(e.color)}function rt(e,t,r,i){return{red:e,green:t,blue:r,alpha:i}}function it(e){return vt.objectLiteral(e)&&vt.numberRange(e.red,0,1)&&vt.numberRange(e.green,0,1)&&vt.numberRange(e.blue,0,1)&&vt.numberRange(e.alpha,0,1)}function nt(e,t,r,i){return{targetUri:e,targetRange:t,targetSelectionRange:r,originSelectionRange:i}}function at(e){return vt.objectLiteral(e)&&b5e.is(e.targetRange)&&vt.string(e.targetUri)&&b5e.is(e.targetSelectionRange)&&(b5e.is(e.originSelectionRange)||vt.undefined(e.originSelectionRange))}function st(e,t){return{uri:e,range:t}}function ot(e){return vt.objectLiteral(e)&&b5e.is(e.range)&&(vt.string(e.uri)||vt.undefined(e.uri))}function lt(e,t,r,i){if(vt.uinteger(e)&&vt.uinteger(t)&&vt.uinteger(r)&&vt.uinteger(i))return{start:v5e.create(e,t),end:v5e.create(r,i)};if(v5e.is(e)&&v5e.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${r}, ${i}]`)}function ct(e){return vt.objectLiteral(e)&&v5e.is(e.start)&&v5e.is(e.end)}function ht(e,t){return{line:e=e===Number.MAX_VALUE?y5e.MAX_VALUE:e,character:t=t===Number.MAX_VALUE?y5e.MAX_VALUE:t}}function ut(e){return vt.objectLiteral(e)&&vt.uinteger(e.line)&&vt.uinteger(e.character)}function dt(e){return"number"==typeof e&&y.MIN_VALUE<=e&&e<=y.MAX_VALUE}function pt(e){return"number"==typeof e&&v.MIN_VALUE<=e&&e<=v.MAX_VALUE}function gt(e){return"string"==typeof e}function ft(e){return"string"==typeof e}}}),G3e=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/ral.js"(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"),yt(i,"RAL"),r=i,mt(n,"install"),yt(n,"install"),r.install=n,e.default=i}}),V3e=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/is.js"(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"),yt(t,"boolean"),e.boolean=t,mt(r,"string"),yt(r,"string"),e.string=r,mt(i,"number"),yt(i,"number"),e.number=i,mt(n,"error"),yt(n,"error"),e.error=n,mt(a,"func"),yt(a,"func"),e.func=a,mt(s,"array"),yt(s,"array"),e.array=s,mt(o,"stringArray"),yt(o,"stringArray"),e.stringArray=o}}),Y3e=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;var s=G3e();{var r=t.Event={};let e={dispose(){}};r.None=function(){return e}}var n=class{static{mt(this,"CallbackList")}static{yt(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:yt(()=>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")}static{yt(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:yt(()=>{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(){}}}),H3e=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var t,r,i=G3e(),n=V3e(),a=Y3e();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"),yt(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")}static{yt(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)}},c=class{static{mt(this,"CancellationTokenSource3")}static{yt(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=c}}),X3e=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js"(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=V3e(),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 c extends Error{static{mt(this,"_ResponseError")}static{yt(this,"ResponseError")}constructor(e,t,r){super(t),this.code=n.number(e)?e:i.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,c.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 h{static{mt(this,"_ParameterStructures")}static{yt(this,"ParameterStructures")}constructor(e){this.kind=e}static is(e){return e===h.auto||e===h.byName||e===h.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")}static{yt(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")}static{yt(this,"RequestType0")}constructor(e){super(e,0)}}),a=(e.RequestType0=a,class extends t{static{mt(this,"RequestType")}static{yt(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")}static{yt(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")}static{yt(this,"RequestType2")}constructor(e){super(e,2)}}),a=(e.RequestType2=a,class extends t{static{mt(this,"RequestType3")}static{yt(this,"RequestType3")}constructor(e){super(e,3)}}),a=(e.RequestType3=a,class extends t{static{mt(this,"RequestType4")}static{yt(this,"RequestType4")}constructor(e){super(e,4)}}),a=(e.RequestType4=a,class extends t{static{mt(this,"RequestType5")}static{yt(this,"RequestType5")}constructor(e){super(e,5)}}),a=(e.RequestType5=a,class extends t{static{mt(this,"RequestType6")}static{yt(this,"RequestType6")}constructor(e){super(e,6)}}),a=(e.RequestType6=a,class extends t{static{mt(this,"RequestType7")}static{yt(this,"RequestType7")}constructor(e){super(e,7)}}),a=(e.RequestType7=a,class extends t{static{mt(this,"RequestType8")}static{yt(this,"RequestType8")}constructor(e){super(e,8)}}),a=(e.RequestType8=a,class extends t{static{mt(this,"RequestType9")}static{yt(this,"RequestType9")}constructor(e){super(e,9)}}),a=(e.RequestType9=a,class extends t{static{mt(this,"NotificationType")}static{yt(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")}static{yt(this,"NotificationType0")}constructor(e){super(e,0)}}),a=(e.NotificationType0=a,class extends t{static{mt(this,"NotificationType1")}static{yt(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")}static{yt(this,"NotificationType2")}constructor(e){super(e,2)}}),a=(e.NotificationType2=a,class extends t{static{mt(this,"NotificationType3")}static{yt(this,"NotificationType3")}constructor(e){super(e,3)}}),a=(e.NotificationType3=a,class extends t{static{mt(this,"NotificationType4")}static{yt(this,"NotificationType4")}constructor(e){super(e,4)}}),a=(e.NotificationType4=a,class extends t{static{mt(this,"NotificationType5")}static{yt(this,"NotificationType5")}constructor(e){super(e,5)}}),a=(e.NotificationType5=a,class extends t{static{mt(this,"NotificationType6")}static{yt(this,"NotificationType6")}constructor(e){super(e,6)}}),a=(e.NotificationType6=a,class extends t{static{mt(this,"NotificationType7")}static{yt(this,"NotificationType7")}constructor(e){super(e,7)}}),a=(e.NotificationType7=a,class extends t{static{mt(this,"NotificationType8")}static{yt(this,"NotificationType8")}constructor(e){super(e,8)}}),a=(e.NotificationType8=a,class extends t{static{mt(this,"NotificationType9")}static{yt(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"),yt(s,"isRequest"),t.isRequest=s,mt(o,"isNotification"),yt(o,"isNotification"),t.isNotification=o,mt(l,"isResponse"),yt(l,"isResponse"),t.isResponse=l}}),K3e=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(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")}static{yt(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:yt(()=>{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:yt(()=>{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:yt(()=>{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")}static{yt(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}}),Z3e=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/disposable.js"(e){function t(e){return{dispose:e}}Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0,e=e.Disposable={},mt(t,"create"),yt(t,"create"),e.create=t}}),Q3e=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var r,t=H3e(),i=((i=r={}).Continue=0,i.Cancelled=1,class{static{mt(this,"SharedArraySenderStrategy")}static{yt(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")}static{yt(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")}static{yt(this,"SharedArrayBufferCancellationTokenSource")}constructor(e){this.token=new n(e)}cancel(){}dispose(){}},i=class{static{mt(this,"SharedArrayReceiverStrategy")}static{yt(this,"SharedArrayReceiverStrategy")}constructor(){this.kind="request"}createCancellationTokenSource(e){return void 0===(e=e.$cancellationData)?new t.CancellationTokenSource:new a(e)}};e.SharedArrayReceiverStrategy=i}}),J3e=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;var t=G3e(),r=class{static{mt(this,"Semaphore")}static{yt(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}}),eke=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var l=G3e(),t=V3e(),r=Y3e(),i=J3e();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"),yt(n,"is"),s.is=n;var a,s=class{static{mt(this,"AbstractMessageReader")}static{yt(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,c=a={},mt(o,"fromOptions"),yt(o,"fromOptions"),c.fromOptions=o;var c=class extends s{static{mt(this,"ReadableStreamMessageReader")}static{yt(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=c}}),tke=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;var t=G3e(),r=V3e(),i=J3e(),n=Y3e();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"),yt(a,"is"),o.is=a;var s,o=class{static{mt(this,"AbstractMessageWriter")}static{yt(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,c=s={},mt(l,"fromOptions"),yt(l,"fromOptions"),c.fromOptions=l;var c=class extends o{static{mt(this,"WriteableStreamMessageWriter")}static{yt(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=c}}),rke=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0;var t=class{static{mt(this,"AbstractMessageBuffer")}static{yt(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 c=(u=l[e]).indexOf(":");if(-1===c)throw new Error(`Message header must separate key and value using ':'
|
||
`+u);var h=u.substr(0,c),u=u.substr(c+1).trim();o.set(n?h.toLowerCase():h,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}}),ike=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/connection.js"(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,Re=G3e(),fe=V3e(),me=X3e(),Le=K3e(),ye=Y3e(),ve=H3e();function e(e){return"string"==typeof e||"number"==typeof e}(de={}).type=new me.NotificationType("$/cancelRequest"),i=pe||(ue.ProgressToken=pe={}),mt(e,"is"),yt(e,"is"),i.is=e,(ge={}).type=new me.NotificationType("$/progress");var Ie,be,t,xe,r,Te,ke,we,i=class{static{mt(this,"ProgressType")}static{yt(this,"ProgressType")}constructor(){}};function n(e){return fe.func(e)}function a(e){if(!fe.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 fe.string(e)&&"json"===(e=e.toLowerCase())?r.JSON:r.Text}ue.ProgressType=i,i=Ie={},mt(n,"is"),yt(n,"is"),i.is=n,ue.NullLogger=Object.freeze({error:yt(()=>{},"error"),warn:yt(()=>{},"warn"),info:yt(()=>{},"info"),log:yt(()=>{},"log")}),(i=be||(ue.Trace=be={}))[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=be||(ue.Trace=be={}),mt(a,"fromString"),yt(a,"fromString"),t.fromString=a,mt(s,"toString4"),yt(s,"toString"),t.toString=s,(i=xe||(ue.TraceFormat=xe={})).Text="text",i.JSON="json",r=xe||(ue.TraceFormat=xe={}),mt(o,"fromString"),yt(o,"fromString"),r.fromString=o,(Te||(ue.SetTraceNotification=Te={})).type=new me.NotificationType("$/setTrace"),(ke||(ue.LogTraceNotification=ke={})).type=new me.NotificationType("$/logTrace"),(i=we||(ue.ConnectionErrors=we={}))[i.Closed=1]="Closed",i[i.Disposed=2]="Disposed",i[i.AlreadyListening=3]="AlreadyListening";var l,Ce,c,h,u,Se,Ee,_e,Ae=class T extends Error{static{mt(this,"_ConnectionError")}static{yt(this,"ConnectionError")}constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,T.prototype)}};function d(e){return e&&fe.func(e.cancelUndispatched)}function p(e){return e&&(void 0===e.kind||"id"===e.kind)&&fe.func(e.createCancellationTokenSource)&&(void 0===e.dispose||fe.func(e.dispose))}function g(e){return e&&"request"===e.kind&&fe.func(e.createCancellationTokenSource)&&(void 0===e.dispose||fe.func(e.dispose))}function f(e){return Ce.is(e)||c.is(e)}function m(e){return e&&fe.func(e.sendCancellation)&&fe.func(e.cleanup)}function y(e){return e&&h.is(e.receiver)&&u.is(e.sender)}function v(e){return e&&fe.func(e.handleMessage)}function b(e){return e&&(Se.is(e.cancellationStrategy)||l.is(e.connectionStrategy)||Ee.is(e.messageStrategy))}function x(r,p,P,o){let g=void 0!==P?P:ue.NullLogger,B=0,$=0,F=0,f="2.0",u,d=new Map,a,s=new Map,i=new Map,z,l=new Le.LinkedMap,m=new Map,y=new Set,v=new Map,c=be.Off,h=xe.Text,b,n=_e.New,q=new ye.Emitter,j=new ye.Emitter,W=new ye.Emitter,U=new ye.Emitter,G=new ye.Emitter,x=o&&o.cancellationStrategy?o.cancellationStrategy:Se.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 V(e){return null===e?"res-unknown-"+(++F).toString():"res-"+e.toString()}function Y(){return"not-"+(++$).toString()}function H(e,t){me.Message.isRequest(t)?e.set(T(t.id),t):me.Message.isResponse(t)?e.set(V(t.id),t):e.set(Y(),t)}function X(e){}function e(){return n===_e.Listening}function k(){return n===_e.Closed}function w(){return n===_e.Disposed}function t(){n!==_e.New&&n!==_e.Listening||(n=_e.Closed,j.fire(void 0))}function K(e){q.fire([e,void 0,void 0])}function Z(e){q.fire(e)}function C(){z||0===l.size||(z=(0,Re.default)().timer.setImmediate(()=>{z=void 0,Q()}))}function S(e){(me.Message.isRequest(e)?ee:me.Message.isNotification(e)?re:me.Message.isResponse(e)?te:ie)(e)}function Q(){if(0!==l.size){var e=l.shift();try{var t=o?.messageStrategy;Ee.is(t)?t.handleMessage(e,S):S(e)}finally{C()}}}mt(T,"createRequestQueueKey"),yt(T,"createRequestQueueKey"),mt(V,"createResponseQueueKey"),yt(V,"createResponseQueueKey"),mt(Y,"createNotificationQueueKey"),yt(Y,"createNotificationQueueKey"),mt(H,"addMessageToQueue"),yt(H,"addMessageToQueue"),mt(X,"cancelUndispatched"),yt(X,"cancelUndispatched"),mt(e,"isListening"),yt(e,"isListening"),mt(k,"isClosed"),yt(k,"isClosed"),mt(w,"isDisposed"),yt(w,"isDisposed"),mt(t,"closeHandler"),yt(t,"closeHandler"),mt(K,"readErrorHandler"),yt(K,"readErrorHandler"),mt(Z,"writeErrorHandler"),yt(Z,"writeErrorHandler"),r.onClose(t),r.onError(K),p.onClose(t),p.onError(Z),mt(C,"triggerMessageQueue"),yt(C,"triggerMessageQueue"),mt(S,"handleMessage"),yt(S,"handleMessage"),mt(Q,"processMessageQueue"),yt(Q,"processMessageQueue");let J=yt(e=>{try{if(me.Message.isNotification(e)&&e.method===de.type.method){var t=e.params.id,r=T(t),i=l.get(r);if(me.Message.isRequest(i)){var n=o?.connectionStrategy,a=n&&n.cancelUndispatched?n.cancelUndispatched(i,X):void 0;if(a&&(void 0!==a.error||void 0!==a.result))return l.delete(r),v.delete(t),a.id=i.id,_(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 A(e);y.add(t)}H(l,e)}finally{C()}},"callback");function ee(s){if(!w()){mt(l,"reply"),yt(l,"reply"),mt(c,"replyError"),yt(c,"replyError"),mt(h,"replySuccess"),yt(h,"replySuccess"),se(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=Ce.is(x.receiver)?x.receiver.createCancellationTokenSource(t):x.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 c(new me.ResponseError(me.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===me.ParameterStructures.byName)return void c(new me.ResponseError(me.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===me.ParameterStructures.byPosition)return void c(new me.ResponseError(me.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 me.ResponseError?c(e,s.method,a):e&&fe.string(e.message)?c(new me.ResponseError(me.ErrorCodes.InternalError,`Request ${s.method} failed with message: `+e.message),s.method,a):c(new me.ResponseError(me.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),h(e,s.method,a))}catch(e){v.delete(t),e instanceof me.ResponseError?l(e,s.method,a):e&&fe.string(e.message)?c(new me.ResponseError(me.ErrorCodes.InternalError,`Request ${s.method} failed with message: `+e.message),s.method,a):c(new me.ResponseError(me.ErrorCodes.InternalError,`Request ${s.method} failed unexpectedly without providing any details.`),s.method,a)}}else c(new me.ResponseError(me.ErrorCodes.MethodNotFound,"Unhandled method "+s.method),s.method,a);function l(e,t,r){var i={jsonrpc:f,id:s.id};e instanceof me.ResponseError?i.error=e.toJson():i.result=void 0===e?null:e,_(i,t,r),p.write(i).catch(()=>g.error("Sending response failed."))}function c(e,t,r){_(e={jsonrpc:f,id:s.id,error:e.toJson()},t,r),p.write(e).catch(()=>g.error("Sending response failed."))}function h(e,t,r){void 0===e&&(e=null),_(e={jsonrpc:f,id:s.id,result:e},t,r),p.write(e).catch(()=>g.error("Sending response failed."))}}}function te(e){if(!w())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(oe(e,r),void 0!==r){m.delete(t);try{if(e.error){var i=e.error;r.reject(new me.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 re(r){if(!w()){let e,t;var i,n;if(r.method===de.type.method)i=r.params.id,y.delete(i),A(r);else if((i=s.get(r.method))&&(t=i.handler,e=i.type),t||a)try{A(r),t?void 0===r.params?(void 0!==e&&0!==e.numberOfParams&&e.parameterStructures!==me.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===me.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===me.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 W.fire(r)}}function ie(e){e?(g.error(`Received message which is neither a response nor a notification message:
|
||
`+JSON.stringify(e,null,4)),(fe.string(e.id)||fe.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 E(e){if(null!=e)switch(c){case be.Verbose:return JSON.stringify(e,null,4);case be.Compact:return JSON.stringify(e);default:return}}function ne(t){if(c!==be.Off&&b)if(h===xe.Text){let e;c!==be.Verbose&&c!==be.Compact||!t.params||(e=`Params: ${E(t.params)}
|
||
|
||
`),b.log(`Sending request '${t.method} - (${t.id})'.`,e)}else R("send-request",t)}function ae(t){if(c!==be.Off&&b)if(h===xe.Text){let e;c!==be.Verbose&&c!==be.Compact||(e=t.params?`Params: ${E(t.params)}
|
||
|
||
`:`No parameters provided.
|
||
|
||
`),b.log(`Sending notification '${t.method}'.`,e)}else R("send-notification",t)}function _(t,r,i){if(c!==be.Off&&b)if(h===xe.Text){let e;c!==be.Verbose&&c!==be.Compact||(t.error&&t.error.data?e=`Error data: ${E(t.error.data)}
|
||
|
||
`:t.result?e=`Result: ${E(t.result)}
|
||
|
||
`:void 0===t.error&&(e=`No result returned.
|
||
|
||
`)),b.log(`Sending response '${r} - (${t.id})'. Processing request took ${Date.now()-i}ms`,e)}else R("send-response",t)}function se(t){if(c!==be.Off&&b)if(h===xe.Text){let e;c!==be.Verbose&&c!==be.Compact||!t.params||(e=`Params: ${E(t.params)}
|
||
|
||
`),b.log(`Received request '${t.method} - (${t.id})'.`,e)}else R("receive-request",t)}function A(t){if(c!==be.Off&&b&&t.method!==ke.type.method)if(h===xe.Text){let e;c!==be.Verbose&&c!==be.Compact||(e=t.params?`Params: ${E(t.params)}
|
||
|
||
`:`No parameters provided.
|
||
|
||
`),b.log(`Received notification '${t.method}'.`,e)}else R("receive-notification",t)}function oe(r,i){if(c!==be.Off&&b)if(h===xe.Text){let e,t;c!==be.Verbose&&c!==be.Compact||(r.error&&r.error.data?e=`Error data: ${E(r.error.data)}
|
||
|
||
`:r.result?e=`Result: ${E(r.result)}
|
||
|
||
`:void 0===r.error&&(e=`No result returned.
|
||
|
||
`)),i?(t=r.error?` Request failed: ${r.error.message} (${r.error.code}).`:"",b.log(`Received response '${i.method} - (${r.id})' in ${Date.now()-i.timerStart}ms.`+t,e)):b.log(`Received response ${r.id} without active response promise.`,e)}else R("receive-response",r)}function R(e,t){b&&c!==be.Off&&(e={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()},b.log(e))}function L(){if(k())throw new Ae(we.Closed,"Connection is closed.");if(w())throw new Ae(we.Disposed,"Connection is disposed.")}function le(){if(e())throw new Ae(we.AlreadyListening,"Connection is already listening")}function ce(){if(!e())throw new Error("Call listen() first.")}function I(e){return void 0===e?null:e}function N(e){if(null!==e)return e}function D(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function M(e,t){switch(e){case me.ParameterStructures.auto:return D(t)?N(t):[I(t)];case me.ParameterStructures.byName:if(D(t))return N(t);throw new Error("Received parameters by name but param is not an object literal.");case me.ParameterStructures.byPosition:return[I(t)];default:throw new Error("Unknown parameter structure "+e.toString())}}function he(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(I(t[e]));if(t.length<i)for(let e=t.length;e<i;e++)r.push(null)}return r}mt(ee,"handleRequest"),yt(ee,"handleRequest"),mt(te,"handleResponse"),yt(te,"handleResponse"),mt(re,"handleNotification"),yt(re,"handleNotification"),mt(ie,"handleInvalidMessage"),yt(ie,"handleInvalidMessage"),mt(E,"stringifyTrace"),yt(E,"stringifyTrace"),mt(ne,"traceSendingRequest"),yt(ne,"traceSendingRequest"),mt(ae,"traceSendingNotification"),yt(ae,"traceSendingNotification"),mt(_,"traceSendingResponse"),yt(_,"traceSendingResponse"),mt(se,"traceReceivedRequest"),yt(se,"traceReceivedRequest"),mt(A,"traceReceivedNotification"),yt(A,"traceReceivedNotification"),mt(oe,"traceReceivedResponse"),yt(oe,"traceReceivedResponse"),mt(R,"logLSPMessage"),yt(R,"logLSPMessage"),mt(L,"throwIfClosedOrDisposed"),yt(L,"throwIfClosedOrDisposed"),mt(le,"throwIfListening"),yt(le,"throwIfListening"),mt(ce,"throwIfNotListening"),yt(ce,"throwIfNotListening"),mt(I,"undefinedToNull"),yt(I,"undefinedToNull"),mt(N,"nullToUndefined"),yt(N,"nullToUndefined"),mt(D,"isNamedParam"),yt(D,"isNamedParam"),mt(M,"computeSingleParam"),yt(M,"computeSingleParam"),mt(he,"computeMessageParams"),yt(he,"computeMessageParams");let O={sendNotification:yt((i,...n)=>{L();let a,s;if(fe.string(i)){a=i;let e=n[0],t=0,r=me.ParameterStructures.auto;me.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===me.ParameterStructures.byName)throw new Error(`Received ${l} parameters for 'by Name' notification parameter structure.`);s=n.slice(t,o).map(e=>I(e))}}else a=i.method,s=he(i,n);return ae(i={jsonrpc:f,method:a,params:s}),p.write(i).catch(e=>{throw g.error("Sending notification failed."),e})},"sendNotification"),onNotification:yt((e,t)=>{L();let r;return fe.func(e)?a=e:t&&(fe.string(e)?(r=e,s.set(e,{type:void 0,handler:t})):(r=e.method,s.set(e.method,{type:e,handler:t}))),{dispose:yt(()=>{void 0!==r?s.delete(r):a=void 0},"dispose")}},"onNotification"),onProgress:yt((e,t,r)=>{if(i.has(t))throw new Error(`Progress handler for token ${t} already registered`);return i.set(t,r),{dispose:yt(()=>{i.delete(t)},"dispose")}},"onProgress"),sendProgress:yt((e,t,r)=>O.sendNotification(ge.type,{token:t,value:r}),"sendProgress"),onUnhandledProgress:U.event,sendRequest:yt((a,...s)=>{L(),ce();let o,l,c;if(fe.string(a)){o=a;let e=s[0],t=s[s.length-1],r=0,i=me.ParameterStructures.auto,n=(me.ParameterStructures.is(e)&&(r=1,i=e),s.length);ve.CancellationToken.is(t)&&(--n,c=t);var h=n-r;switch(h){case 0:l=void 0;break;case 1:l=M(i,s[r]);break;default:if(i===me.ParameterStructures.byName)throw new Error(`Received ${h} parameters for 'by Name' request parameter structure.`);l=s.slice(r,n).map(e=>I(e))}}else{var e=s,a=(o=a.method,l=he(a,e),a.numberOfParams);c=ve.CancellationToken.is(e[a])?e[a]:void 0}let n=B++,u,d=(c&&(u=c.onCancellationRequested(()=>{var e=x.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 ne(d),"function"==typeof x.sender.enableCancellation&&x.sender.enableCancellation(d),new Promise(async(t,r)=>{var e=yt(e=>{t(e),x.sender.cleanup(n),u?.dispose()},"resolveWithCleanup"),i=yt(e=>{r(e),x.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 me.ResponseError(me.ErrorCodes.MessageWriteError,i.message||"Unknown reason")),i}})},"sendRequest"),onRequest:yt((e,t)=>{L();let r=null;return Ie.is(e)?(r=void 0,u=e):fe.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:yt(()=>{null!==r&&(void 0!==r?d.delete(r):u=void 0)},"dispose")}},"onRequest"),hasPendingResponse:yt(()=>0<m.size,"hasPendingResponse"),trace:yt(async(e,t,r)=>{let i=!1,n=xe.Text;void 0!==r&&(fe.boolean(r)?i=r:(i=r.sendNotification||!1,n=r.traceFormat||xe.Text)),c=e,h=n,b=c===be.Off?void 0:t,!i||k()||w()||await O.sendNotification(Te.type,{value:be.toString(e)})},"trace"),onError:q.event,onClose:j.event,onUnhandledNotification:W.event,onDispose:G.event,end:yt(()=>{p.end()},"end"),dispose:yt(()=>{if(!w()){n=_e.Disposed,G.fire(void 0);var e,t=new me.ResponseError(me.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 Le.LinkedMap,fe.func(p.dispose)&&p.dispose(),fe.func(r.dispose)&&r.dispose()}},"dispose"),listen:yt(()=>{L(),le(),n=_e.Listening,r.listen(J)},"listen"),inspect:yt(()=>{(0,Re.default)().console.log("inspect")},"inspect")};return O.onNotification(ke.type,e=>{var t;c!==be.Off&&b&&(t=c===be.Verbose||c===be.Compact,b.log(e.message,t?e.verbose:void 0))}),O.onNotification(ge.type,e=>{var t=i.get(e.token);t?t(e.value):U.fire(e)}),O}ue.ConnectionError=Ae,i=l||(ue.ConnectionStrategy=l={}),mt(d,"is"),yt(d,"is"),i.is=d,i=Ce||(ue.IdCancellationReceiverStrategy=Ce={}),mt(p,"is"),yt(p,"is"),i.is=p,i=c||(ue.RequestCancellationReceiverStrategy=c={}),mt(g,"is"),yt(g,"is"),i.is=g,(i=h||(ue.CancellationReceiverStrategy=h={})).Message=Object.freeze({createCancellationTokenSource(e){return new ve.CancellationTokenSource}}),mt(f,"is"),yt(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"),yt(m,"is"),i.is=m,(i=Se||(ue.CancellationStrategy=Se={})).Message=Object.freeze({receiver:h.Message,sender:u.Message}),mt(y,"is"),yt(y,"is"),i.is=y,i=Ee||(ue.MessageStrategy=Ee={}),mt(v,"is"),yt(v,"is"),i.is=v,i=ue.ConnectionOptions={},mt(b,"is"),yt(b,"is"),i.is=b,i=_e={New:1,1:"New",Listening:2,2:"Listening",Closed:3,3:"Closed",Disposed:4,4:"Disposed"},mt(x,"createMessageConnection"),yt(x,"createMessageConnection"),ue.createMessageConnection=x}}),nke=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/api.js"(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=X3e(),r=(Object.defineProperty(e,"Message",{enumerable:!0,get:yt(function(){return t.Message},"get")}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:yt(function(){return t.RequestType},"get")}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:yt(function(){return t.RequestType0},"get")}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:yt(function(){return t.RequestType1},"get")}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:yt(function(){return t.RequestType2},"get")}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:yt(function(){return t.RequestType3},"get")}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:yt(function(){return t.RequestType4},"get")}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:yt(function(){return t.RequestType5},"get")}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:yt(function(){return t.RequestType6},"get")}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:yt(function(){return t.RequestType7},"get")}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:yt(function(){return t.RequestType8},"get")}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:yt(function(){return t.RequestType9},"get")}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:yt(function(){return t.ResponseError},"get")}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:yt(function(){return t.ErrorCodes},"get")}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:yt(function(){return t.NotificationType},"get")}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:yt(function(){return t.NotificationType0},"get")}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:yt(function(){return t.NotificationType1},"get")}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:yt(function(){return t.NotificationType2},"get")}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:yt(function(){return t.NotificationType3},"get")}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:yt(function(){return t.NotificationType4},"get")}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:yt(function(){return t.NotificationType5},"get")}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:yt(function(){return t.NotificationType6},"get")}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:yt(function(){return t.NotificationType7},"get")}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:yt(function(){return t.NotificationType8},"get")}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:yt(function(){return t.NotificationType9},"get")}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:yt(function(){return t.ParameterStructures},"get")}),K3e()),i=(Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:yt(function(){return r.LinkedMap},"get")}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:yt(function(){return r.LRUCache},"get")}),Object.defineProperty(e,"Touch",{enumerable:!0,get:yt(function(){return r.Touch},"get")}),Z3e()),n=(Object.defineProperty(e,"Disposable",{enumerable:!0,get:yt(function(){return i.Disposable},"get")}),Y3e()),a=(Object.defineProperty(e,"Event",{enumerable:!0,get:yt(function(){return n.Event},"get")}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:yt(function(){return n.Emitter},"get")}),H3e()),s=(Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:yt(function(){return a.CancellationTokenSource},"get")}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:yt(function(){return a.CancellationToken},"get")}),Q3e()),o=(Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:yt(function(){return s.SharedArraySenderStrategy},"get")}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:yt(function(){return s.SharedArrayReceiverStrategy},"get")}),eke()),l=(Object.defineProperty(e,"MessageReader",{enumerable:!0,get:yt(function(){return o.MessageReader},"get")}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:yt(function(){return o.AbstractMessageReader},"get")}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:yt(function(){return o.ReadableStreamMessageReader},"get")}),tke()),c=(Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:yt(function(){return l.MessageWriter},"get")}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:yt(function(){return l.AbstractMessageWriter},"get")}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:yt(function(){return l.WriteableStreamMessageWriter},"get")}),rke()),h=(Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:yt(function(){return c.AbstractMessageBuffer},"get")}),ike()),u=(Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:yt(function(){return h.ConnectionStrategy},"get")}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:yt(function(){return h.ConnectionOptions},"get")}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:yt(function(){return h.NullLogger},"get")}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:yt(function(){return h.createMessageConnection},"get")}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:yt(function(){return h.ProgressToken},"get")}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:yt(function(){return h.ProgressType},"get")}),Object.defineProperty(e,"Trace",{enumerable:!0,get:yt(function(){return h.Trace},"get")}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:yt(function(){return h.TraceValues},"get")}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:yt(function(){return h.TraceFormat},"get")}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:yt(function(){return h.SetTraceNotification},"get")}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:yt(function(){return h.LogTraceNotification},"get")}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:yt(function(){return h.ConnectionErrors},"get")}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:yt(function(){return h.ConnectionError},"get")}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:yt(function(){return h.CancellationReceiverStrategy},"get")}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:yt(function(){return h.CancellationSenderStrategy},"get")}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:yt(function(){return h.CancellationStrategy},"get")}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:yt(function(){return h.MessageStrategy},"get")}),G3e());e.RAL=u.default}}),ake=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/ril.js"(e){Object.defineProperty(e,"__esModule",{value:!0});var t,r=nke(),i=class h extends r.AbstractMessageBuffer{static{mt(this,"_MessageBuffer")}static{yt(this,"MessageBuffer")}constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return h.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")}static{yt(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")}static{yt(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:yt(e=>new i(e),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:yt((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:yt((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:yt(e=>new n(e),"asReadableStream"),asWritableStream:yt(e=>new a(e),"asWritableStream")}),console:console,timer:Object.freeze({setTimeout(e,t,...r){let i=setTimeout(e,t,...r);return{dispose:yt(()=>clearTimeout(i),"dispose")}},setImmediate(e,...t){let r=setTimeout(e,0,...t);return{dispose:yt(()=>clearTimeout(r),"dispose")}},setInterval(e,t,...r){let i=setInterval(e,t,...r);return{dispose:yt(()=>clearInterval(i),"dispose")}}})});function l(){return o}function c(){r.RAL.install(o)}mt(l,"RIL"),yt(l,"RIL"),t=l,mt(c,"install"),yt(c,"install"),t.install=c,e.default=l}}),ske=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/main.js"(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:yt(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,ake().default.install(),nke()),t=(t(nke(),e),class extends n.AbstractMessageReader{static{mt(this,"BrowserMessageReader")}static{yt(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")}static{yt(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"),yt(r,"createMessageConnection"),e.createMessageConnection=r}}),oke=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(e,t){t.exports=ske()}}),lke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;var t=ske(),r=(e.MessageDirection={clientToServer:"clientToServer",serverToClient:"serverToClient",both:"both"},class{static{mt(this,"RegistrationType")}static{yt(this,"RegistrationType")}constructor(e){this.method=e}}),r=(e.RegistrationType=r,class extends t.RequestType0{static{mt(this,"ProtocolRequestType0")}static{yt(this,"ProtocolRequestType0")}constructor(e){super(e)}}),r=(e.ProtocolRequestType0=r,class extends t.RequestType{static{mt(this,"ProtocolRequestType")}static{yt(this,"ProtocolRequestType")}constructor(e){super(e,t.ParameterStructures.byName)}}),r=(e.ProtocolRequestType=r,class extends t.NotificationType0{static{mt(this,"ProtocolNotificationType0")}static{yt(this,"ProtocolNotificationType0")}constructor(e){super(e)}}),r=(e.ProtocolNotificationType0=r,class extends t.NotificationType{static{mt(this,"ProtocolNotificationType")}static{yt(this,"ProtocolNotificationType")}constructor(e){super(e,t.ParameterStructures.byName)}});e.ProtocolNotificationType=r}}),cke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(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 c(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"),yt(t,"boolean"),e.boolean=t,mt(r,"string"),yt(r,"string"),e.string=r,mt(i,"number"),yt(i,"number"),e.number=i,mt(n,"error"),yt(n,"error"),e.error=n,mt(a,"func"),yt(a,"func"),e.func=a,mt(s,"array"),yt(s,"array"),e.array=s,mt(o,"stringArray"),yt(o,"stringArray"),e.stringArray=o,mt(l,"typedArray"),yt(l,"typedArray"),e.typedArray=l,mt(c,"objectLiteral"),yt(c,"objectLiteral"),e.objectLiteral=c}}),hke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;var t=lke();(e=e.ImplementationRequest={method:"textDocument/implementation"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}}),uke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TypeDefinitionRequest=void 0;var t=lke();(e=e.TypeDefinitionRequest={method:"textDocument/typeDefinition"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}}),dke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;var t,r=lke();(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)}}),pke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;var t=lke();(e=e.ConfigurationRequest={method:"workspace/configuration"}).messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)}}),gke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;var t,r=lke();(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)}}),fke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;var t,r=lke();(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)}}),mke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;var t=lke();(e=e.DeclarationRequest={method:"textDocument/declaration"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}}),yke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRangeRequest=void 0;var t=lke();(e=e.SelectionRangeRequest={method:"textDocument/selectionRange"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}}),vke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;var t,r=ske(),i=lke();function n(e){return e===t.type}(t=e.WorkDoneProgress={}).type=new r.ProgressType,mt(n,"is"),yt(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)}}),bke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;var t,r=lke();(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)}}),xke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(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=lke();(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)}}),Tke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentRequest=void 0;var t=lke();(e=e.ShowDocumentRequest={method:"window/showDocument"}).messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)}}),kke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;var t=lke();(e=e.LinkedEditingRangeRequest={method:"textDocument/linkedEditingRange"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}}),wke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(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=lke();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)}}),Cke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;var t=lke();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)}}),Ske=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t,r=lke();(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)}}),Eke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;var t,r=lke();(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)}}),_ke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;var t,r=lke();(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)}}),Ake=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;var t,r=ske(),i=cke(),n=lke();function a(e){return e&&i.boolean(e.retriggerRequest)}t=e.DiagnosticServerCancellationData={},mt(a,"is"),yt(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)}}),Rke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(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,U3e();var t,i,r,n,a,s=d5e(p5e),o=cke(),l=lke();function c(e){return 1===e||2===e}function h(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 b(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 x(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(c,"is"),yt(c,"is"),a.is=c,a=i||(e.ExecutionSummary=i={}),mt(h,"create"),yt(h,"create"),a.create=h,mt(u,"is"),yt(u,"is"),a.is=u,mt(d,"equals"),yt(d,"equals"),a.equals=d,a=r||(e.NotebookCell=r={}),mt(p,"create"),yt(p,"create"),a.create=p,mt(g,"is"),yt(g,"is"),a.is=g,mt(f,"diff"),yt(f,"diff"),a.diff=f,mt(m,"equalsMetadata"),yt(m,"equalsMetadata"),a=e.NotebookDocument={},mt(y,"create"),yt(y,"create"),a.create=y,mt(v,"is"),yt(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(b,"is"),yt(b,"is"),a.is=b,mt(x,"create"),yt(x,"create"),a.create=x,(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}}),Lke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionRequest=void 0;var t=lke();(e=e.InlineCompletionRequest={method:"textDocument/inlineCompletion"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}}),Ike=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.js"(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=lke(),o=(U3e(),d5e(p5e)),l=cke(),c=hke(),h=(Object.defineProperty(e,"ImplementationRequest",{enumerable:!0,get:yt(function(){return c.ImplementationRequest},"get")}),uke()),u=(Object.defineProperty(e,"TypeDefinitionRequest",{enumerable:!0,get:yt(function(){return h.TypeDefinitionRequest},"get")}),dke()),d=(Object.defineProperty(e,"WorkspaceFoldersRequest",{enumerable:!0,get:yt(function(){return u.WorkspaceFoldersRequest},"get")}),Object.defineProperty(e,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:yt(function(){return u.DidChangeWorkspaceFoldersNotification},"get")}),pke()),p=(Object.defineProperty(e,"ConfigurationRequest",{enumerable:!0,get:yt(function(){return d.ConfigurationRequest},"get")}),gke()),g=(Object.defineProperty(e,"DocumentColorRequest",{enumerable:!0,get:yt(function(){return p.DocumentColorRequest},"get")}),Object.defineProperty(e,"ColorPresentationRequest",{enumerable:!0,get:yt(function(){return p.ColorPresentationRequest},"get")}),fke()),P=(Object.defineProperty(e,"FoldingRangeRequest",{enumerable:!0,get:yt(function(){return g.FoldingRangeRequest},"get")}),Object.defineProperty(e,"FoldingRangeRefreshRequest",{enumerable:!0,get:yt(function(){return g.FoldingRangeRefreshRequest},"get")}),mke()),B=(Object.defineProperty(e,"DeclarationRequest",{enumerable:!0,get:yt(function(){return P.DeclarationRequest},"get")}),yke()),f=(Object.defineProperty(e,"SelectionRangeRequest",{enumerable:!0,get:yt(function(){return B.SelectionRangeRequest},"get")}),vke()),m=(Object.defineProperty(e,"WorkDoneProgress",{enumerable:!0,get:yt(function(){return f.WorkDoneProgress},"get")}),Object.defineProperty(e,"WorkDoneProgressCreateRequest",{enumerable:!0,get:yt(function(){return f.WorkDoneProgressCreateRequest},"get")}),Object.defineProperty(e,"WorkDoneProgressCancelNotification",{enumerable:!0,get:yt(function(){return f.WorkDoneProgressCancelNotification},"get")}),bke()),y=(Object.defineProperty(e,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:yt(function(){return m.CallHierarchyIncomingCallsRequest},"get")}),Object.defineProperty(e,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:yt(function(){return m.CallHierarchyOutgoingCallsRequest},"get")}),Object.defineProperty(e,"CallHierarchyPrepareRequest",{enumerable:!0,get:yt(function(){return m.CallHierarchyPrepareRequest},"get")}),xke()),$=(Object.defineProperty(e,"TokenFormat",{enumerable:!0,get:yt(function(){return y.TokenFormat},"get")}),Object.defineProperty(e,"SemanticTokensRequest",{enumerable:!0,get:yt(function(){return y.SemanticTokensRequest},"get")}),Object.defineProperty(e,"SemanticTokensDeltaRequest",{enumerable:!0,get:yt(function(){return y.SemanticTokensDeltaRequest},"get")}),Object.defineProperty(e,"SemanticTokensRangeRequest",{enumerable:!0,get:yt(function(){return y.SemanticTokensRangeRequest},"get")}),Object.defineProperty(e,"SemanticTokensRefreshRequest",{enumerable:!0,get:yt(function(){return y.SemanticTokensRefreshRequest},"get")}),Object.defineProperty(e,"SemanticTokensRegistrationType",{enumerable:!0,get:yt(function(){return y.SemanticTokensRegistrationType},"get")}),Tke()),F=(Object.defineProperty(e,"ShowDocumentRequest",{enumerable:!0,get:yt(function(){return $.ShowDocumentRequest},"get")}),kke()),v=(Object.defineProperty(e,"LinkedEditingRangeRequest",{enumerable:!0,get:yt(function(){return F.LinkedEditingRangeRequest},"get")}),wke()),b=(Object.defineProperty(e,"FileOperationPatternKind",{enumerable:!0,get:yt(function(){return v.FileOperationPatternKind},"get")}),Object.defineProperty(e,"DidCreateFilesNotification",{enumerable:!0,get:yt(function(){return v.DidCreateFilesNotification},"get")}),Object.defineProperty(e,"WillCreateFilesRequest",{enumerable:!0,get:yt(function(){return v.WillCreateFilesRequest},"get")}),Object.defineProperty(e,"DidRenameFilesNotification",{enumerable:!0,get:yt(function(){return v.DidRenameFilesNotification},"get")}),Object.defineProperty(e,"WillRenameFilesRequest",{enumerable:!0,get:yt(function(){return v.WillRenameFilesRequest},"get")}),Object.defineProperty(e,"DidDeleteFilesNotification",{enumerable:!0,get:yt(function(){return v.DidDeleteFilesNotification},"get")}),Object.defineProperty(e,"WillDeleteFilesRequest",{enumerable:!0,get:yt(function(){return v.WillDeleteFilesRequest},"get")}),Cke()),x=(Object.defineProperty(e,"UniquenessLevel",{enumerable:!0,get:yt(function(){return b.UniquenessLevel},"get")}),Object.defineProperty(e,"MonikerKind",{enumerable:!0,get:yt(function(){return b.MonikerKind},"get")}),Object.defineProperty(e,"MonikerRequest",{enumerable:!0,get:yt(function(){return b.MonikerRequest},"get")}),Ske()),T=(Object.defineProperty(e,"TypeHierarchyPrepareRequest",{enumerable:!0,get:yt(function(){return x.TypeHierarchyPrepareRequest},"get")}),Object.defineProperty(e,"TypeHierarchySubtypesRequest",{enumerable:!0,get:yt(function(){return x.TypeHierarchySubtypesRequest},"get")}),Object.defineProperty(e,"TypeHierarchySupertypesRequest",{enumerable:!0,get:yt(function(){return x.TypeHierarchySupertypesRequest},"get")}),Eke()),k=(Object.defineProperty(e,"InlineValueRequest",{enumerable:!0,get:yt(function(){return T.InlineValueRequest},"get")}),Object.defineProperty(e,"InlineValueRefreshRequest",{enumerable:!0,get:yt(function(){return T.InlineValueRefreshRequest},"get")}),_ke()),w=(Object.defineProperty(e,"InlayHintRequest",{enumerable:!0,get:yt(function(){return k.InlayHintRequest},"get")}),Object.defineProperty(e,"InlayHintResolveRequest",{enumerable:!0,get:yt(function(){return k.InlayHintResolveRequest},"get")}),Object.defineProperty(e,"InlayHintRefreshRequest",{enumerable:!0,get:yt(function(){return k.InlayHintRefreshRequest},"get")}),Ake()),C=(Object.defineProperty(e,"DiagnosticServerCancellationData",{enumerable:!0,get:yt(function(){return w.DiagnosticServerCancellationData},"get")}),Object.defineProperty(e,"DocumentDiagnosticReportKind",{enumerable:!0,get:yt(function(){return w.DocumentDiagnosticReportKind},"get")}),Object.defineProperty(e,"DocumentDiagnosticRequest",{enumerable:!0,get:yt(function(){return w.DocumentDiagnosticRequest},"get")}),Object.defineProperty(e,"WorkspaceDiagnosticRequest",{enumerable:!0,get:yt(function(){return w.WorkspaceDiagnosticRequest},"get")}),Object.defineProperty(e,"DiagnosticRefreshRequest",{enumerable:!0,get:yt(function(){return w.DiagnosticRefreshRequest},"get")}),Rke()),z=(Object.defineProperty(e,"NotebookCellKind",{enumerable:!0,get:yt(function(){return C.NotebookCellKind},"get")}),Object.defineProperty(e,"ExecutionSummary",{enumerable:!0,get:yt(function(){return C.ExecutionSummary},"get")}),Object.defineProperty(e,"NotebookCell",{enumerable:!0,get:yt(function(){return C.NotebookCell},"get")}),Object.defineProperty(e,"NotebookDocument",{enumerable:!0,get:yt(function(){return C.NotebookDocument},"get")}),Object.defineProperty(e,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:yt(function(){return C.NotebookDocumentSyncRegistrationType},"get")}),Object.defineProperty(e,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:yt(function(){return C.DidOpenNotebookDocumentNotification},"get")}),Object.defineProperty(e,"NotebookCellArrayChange",{enumerable:!0,get:yt(function(){return C.NotebookCellArrayChange},"get")}),Object.defineProperty(e,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:yt(function(){return C.DidChangeNotebookDocumentNotification},"get")}),Object.defineProperty(e,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:yt(function(){return C.DidSaveNotebookDocumentNotification},"get")}),Object.defineProperty(e,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:yt(function(){return C.DidCloseNotebookDocumentNotification},"get")}),Lke());function S(e){return l.string(e)||l.string(e.language)||l.string(e.scheme)||l.string(e.pattern)}function E(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 R(e){return e&&l.string(e.id)&&0<e.id.length}function L(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:yt(function(){return z.InlineCompletionRequest},"get")}),a=r||(e.TextDocumentFilter=r={}),mt(S,"is"),yt(S,"is"),a.is=S,a=t||(e.NotebookDocumentFilter=t={}),mt(E,"is"),yt(E,"is"),a.is=E,a=i||(e.NotebookCellTextDocumentFilter=i={}),mt(_,"is"),yt(_,"is"),a.is=_,a=n||(e.DocumentSelector=n={}),mt(A,"is"),yt(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(R,"hasId"),yt(R,"hasId"),a.hasId=R,a=e.TextDocumentRegistrationOptions={},mt(L,"is"),yt(L,"is"),a.is=L,a=e.WorkDoneProgressOptions={},mt(I,"is"),yt(I,"is"),a.is=I,mt(N,"hasWorkDoneProgress"),yt(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"),yt(D,"isIncremental"),a.isIncremental=D,mt(M,"isFull"),yt(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"),yt(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")}}),Nke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var n=ske();function t(e,t,r,i){return n.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,n.createMessageConnection)(e,t,r,i)}mt(t,"createProtocolConnection"),yt(t,"createProtocolConnection"),e.createProtocolConnection=t}}),Dke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/api.js"(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:yt(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(ske(),e),t((U3e(),d5e(p5e)),e),t(lke(),e),t(Ike(),e),Nke());Object.defineProperty(e,"createProtocolConnection",{enumerable:!0,get:yt(function(){return r.createProtocolConnection},"get")}),e.LSPErrorCodes={lspReservedErrorRangeStart:-32899,RequestFailed:-32803,ServerCancelled:-32802,ContentModified:-32801,RequestCancelled:-32800,lspReservedErrorRangeEnd:-32800}}}),Mke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/browser/main.js"(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:yt(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,oke());function r(e,t,r,i){return(0,n.createMessageConnection)(e,t,r,i)}t(oke(),e),t(Dke(),e),mt(r,"createProtocolConnection"),yt(r,"createProtocolConnection"),e.createProtocolConnection=r}}),l5e(Oke={},{AbstractAstReflection:mt(()=>Bke,"AbstractAstReflection"),AbstractCstNode:mt(()=>$Le,"AbstractCstNode"),AbstractLangiumParser:mt(()=>GLe,"AbstractLangiumParser"),AbstractParserErrorMessageProvider:mt(()=>YLe,"AbstractParserErrorMessageProvider"),AbstractThreadedAsyncParser:mt(()=>uIe,"AbstractThreadedAsyncParser"),AstUtils:mt(()=>Wke,"AstUtils"),BiMap:mt(()=>k9e,"BiMap"),Cancellation:mt(()=>r9e,"Cancellation"),CompositeCstNodeImpl:mt(()=>zLe,"CompositeCstNodeImpl"),ContextCache:mt(()=>L9e,"ContextCache"),CstNodeBuilder:mt(()=>BLe,"CstNodeBuilder"),CstUtils:mt(()=>Pke,"CstUtils"),DEFAULT_TOKENIZE_OPTIONS:mt(()=>Q9e,"DEFAULT_TOKENIZE_OPTIONS"),DONE_RESULT:mt(()=>zke,"DONE_RESULT"),DatatypeSymbol:mt(()=>WLe,"DatatypeSymbol"),DefaultAstNodeDescriptionProvider:mt(()=>q9e,"DefaultAstNodeDescriptionProvider"),DefaultAstNodeLocator:mt(()=>W9e,"DefaultAstNodeLocator"),DefaultAsyncParser:mt(()=>hIe,"DefaultAsyncParser"),DefaultCommentProvider:mt(()=>cIe,"DefaultCommentProvider"),DefaultConfigurationProvider:mt(()=>G9e,"DefaultConfigurationProvider"),DefaultDocumentBuilder:mt(()=>H9e,"DefaultDocumentBuilder"),DefaultDocumentValidator:mt(()=>F9e,"DefaultDocumentValidator"),DefaultHydrator:mt(()=>gIe,"DefaultHydrator"),DefaultIndexManager:mt(()=>X9e,"DefaultIndexManager"),DefaultJsonSerializer:mt(()=>M9e,"DefaultJsonSerializer"),DefaultLangiumDocumentFactory:mt(()=>f9e,"DefaultLangiumDocumentFactory"),DefaultLangiumDocuments:mt(()=>m9e,"DefaultLangiumDocuments"),DefaultLangiumProfiler:mt(()=>EIe,"DefaultLangiumProfiler"),DefaultLexer:mt(()=>J9e,"DefaultLexer"),DefaultLexerErrorMessageProvider:mt(()=>Z9e,"DefaultLexerErrorMessageProvider"),DefaultLinker:mt(()=>v9e,"DefaultLinker"),DefaultNameProvider:mt(()=>b9e,"DefaultNameProvider"),DefaultReferenceDescriptionProvider:mt(()=>j9e,"DefaultReferenceDescriptionProvider"),DefaultReferences:mt(()=>x9e,"DefaultReferences"),DefaultScopeComputation:mt(()=>w9e,"DefaultScopeComputation"),DefaultScopeProvider:mt(()=>D9e,"DefaultScopeProvider"),DefaultServiceRegistry:mt(()=>O9e,"DefaultServiceRegistry"),DefaultTokenBuilder:mt(()=>JLe,"DefaultTokenBuilder"),DefaultValueConverter:mt(()=>e9e,"DefaultValueConverter"),DefaultWorkspaceLock:mt(()=>pIe,"DefaultWorkspaceLock"),DefaultWorkspaceManager:mt(()=>K9e,"DefaultWorkspaceManager"),Deferred:mt(()=>s9e,"Deferred"),Disposable:mt(()=>Y9e,"Disposable"),DisposableCache:mt(()=>A9e,"DisposableCache"),DocumentCache:mt(()=>I9e,"DocumentCache"),DocumentState:mt(()=>g9e,"DocumentState"),DocumentValidator:mt(()=>z9e,"DocumentValidator"),EMPTY_SCOPE:mt(()=>_9e,"EMPTY_SCOPE"),EMPTY_STREAM:mt(()=>Fke,"EMPTY_STREAM"),EmptyFileSystem:mt(()=>wIe,"EmptyFileSystem"),EmptyFileSystemProvider:mt(()=>kIe,"EmptyFileSystemProvider"),ErrorWithLocation:mt(()=>Hwe,"ErrorWithLocation"),GrammarAST:mt(()=>Uke,"GrammarAST"),GrammarUtils:mt(()=>Ywe,"GrammarUtils"),IndentationAwareLexer:mt(()=>TIe,"IndentationAwareLexer"),IndentationAwareTokenBuilder:mt(()=>xIe,"IndentationAwareTokenBuilder"),JSDocDocumentationProvider:mt(()=>lIe,"JSDocDocumentationProvider"),LangiumCompletionParser:mt(()=>XLe,"LangiumCompletionParser"),LangiumParser:mt(()=>VLe,"LangiumParser"),LangiumParserErrorMessageProvider:mt(()=>HLe,"LangiumParserErrorMessageProvider"),LeafCstNodeImpl:mt(()=>FLe,"LeafCstNodeImpl"),LexingMode:mt(()=>bIe,"LexingMode"),MapScope:mt(()=>S9e,"MapScope"),Module:mt(()=>fIe,"Module"),MultiMap:mt(()=>T9e,"MultiMap"),MultiMapScope:mt(()=>E9e,"MultiMapScope"),OperationCancelled:mt(()=>a9e,"OperationCancelled"),ParserWorker:mt(()=>dIe,"ParserWorker"),ProfilingTask:mt(()=>_Ie,"ProfilingTask"),Reduction:mt(()=>jke,"Reduction"),RefResolving:mt(()=>y9e,"RefResolving"),RegExpUtils:mt(()=>Xwe,"RegExpUtils"),RootCstNodeImpl:mt(()=>jLe,"RootCstNodeImpl"),SimpleCache:mt(()=>R9e,"SimpleCache"),StreamImpl:mt(()=>$ke,"StreamImpl"),StreamScope:mt(()=>C9e,"StreamScope"),TextDocument:mt(()=>l9e,"TextDocument"),TreeStreamImpl:mt(()=>qke,"TreeStreamImpl"),URI:mt(()=>h9e,"URI"),UriTrie:mt(()=>p9e,"UriTrie"),UriUtils:mt(()=>d9e,"UriUtils"),VALIDATE_EACH_NODE:mt(()=>$9e,"VALIDATE_EACH_NODE"),ValidationCategory:mt(()=>P9e,"ValidationCategory"),ValidationRegistry:mt(()=>B9e,"ValidationRegistry"),ValueConverter:mt(()=>t9e,"ValueConverter"),WorkspaceCache:mt(()=>N9e,"WorkspaceCache"),assertCondition:mt(()=>f0e,"assertCondition"),assertUnreachable:mt(()=>g0e,"assertUnreachable"),createCompletionParser:mt(()=>G4e,"createCompletionParser"),createDefaultCoreModule:mt(()=>DTe,"createDefaultCoreModule"),createDefaultSharedCoreModule:mt(()=>MTe,"createDefaultSharedCoreModule"),createGrammarConfig:mt(()=>dge,"createGrammarConfig"),createLangiumParser:mt(()=>V4e,"createLangiumParser"),createParser:mt(()=>_4e,"createParser"),delayNextTick:mt(()=>H4e,"delayNextTick"),diagnosticData:mt(()=>oTe,"diagnosticData"),eagerLoad:mt(()=>PTe,"eagerLoad"),getDiagnosticRange:mt(()=>lTe,"getDiagnosticRange"),indentationBuilderDefaultOptions:mt(()=>vIe,"indentationBuilderDefaultOptions"),inject:mt(()=>OTe,"inject"),interruptAndCheck:mt(()=>Q4e,"interruptAndCheck"),isAstNode:mt(()=>Ede,"isAstNode"),isAstNodeDescription:mt(()=>Rde,"isAstNodeDescription"),isAstNodeWithComment:mt(()=>aTe,"isAstNodeWithComment"),isCompositeCstNode:mt(()=>Ide,"isCompositeCstNode"),isIMultiModeLexerDefinition:mt(()=>dTe,"isIMultiModeLexerDefinition"),isJSDoc:mt(()=>fTe,"isJSDoc"),isLeafCstNode:mt(()=>Nde,"isLeafCstNode"),isLinkingError:mt(()=>Lde,"isLinkingError"),isMultiReference:mt(()=>Ade,"isMultiReference"),isNamed:mt(()=>nTe,"isNamed"),isOperationCancelled:mt(()=>Z4e,"isOperationCancelled"),isReference:mt(()=>_de,"isReference"),isRootCstNode:mt(()=>Dde,"isRootCstNode"),isTokenTypeArray:mt(()=>uTe,"isTokenTypeArray"),isTokenTypeDictionary:mt(()=>pTe,"isTokenTypeDictionary"),loadGrammarFromJson:mt(()=>qTe,"loadGrammarFromJson"),parseJSDoc:mt(()=>gTe,"parseJSDoc"),prepareLangiumParser:mt(()=>Y4e,"prepareLangiumParser"),setInterruptionPeriod:mt(()=>K4e,"setInterruptionPeriod"),startCancelableOperation:mt(()=>X4e,"startCancelableOperation"),stream:mt(()=>Pde,"stream"),toDiagnosticData:mt(()=>hTe,"toDiagnosticData"),toDiagnosticSeverity:mt(()=>cTe,"toDiagnosticSeverity")}),l5e(Pke={},{DefaultNameRegexp:mt(()=>Vwe,"DefaultNameRegexp"),RangeComparison:mt(()=>Gwe,"RangeComparison"),compareRange:mt(()=>e0e,"compareRange"),findCommentNode:mt(()=>i0e,"findCommentNode"),findDeclarationNodeAtOffset:mt(()=>r0e,"findDeclarationNodeAtOffset"),findLeafNodeAtOffset:mt(()=>a0e,"findLeafNodeAtOffset"),findLeafNodeBeforeOffset:mt(()=>s0e,"findLeafNodeBeforeOffset"),flattenCst:mt(()=>Kpe,"flattenCst"),getDatatypeNode:mt(()=>Hpe,"getDatatypeNode"),getInteriorNodes:mt(()=>u0e,"getInteriorNodes"),getNextNode:mt(()=>c0e,"getNextNode"),getPreviousNode:mt(()=>l0e,"getPreviousNode"),getStartlineNode:mt(()=>h0e,"getStartlineNode"),inRange:mt(()=>t0e,"inRange"),isChildNode:mt(()=>Zpe,"isChildNode"),isCommentNode:mt(()=>n0e,"isCommentNode"),streamCst:mt(()=>Xpe,"streamCst"),toDocumentSegment:mt(()=>Jpe,"toDocumentSegment"),tokenToRange:mt(()=>Qpe,"tokenToRange")}),mt(Ede,"isAstNode"),yt(Ede,"isAstNode"),mt(_de,"isReference"),yt(_de,"isReference"),mt(Ade,"isMultiReference"),yt(Ade,"isMultiReference"),mt(Rde,"isAstNodeDescription"),yt(Rde,"isAstNodeDescription"),mt(Lde,"isLinkingError"),yt(Lde,"isLinkingError"),Bke=class{static{mt(this,"AbstractAstReflection")}static{yt(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 Ede(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(Ide,"isCompositeCstNode"),yt(Ide,"isCompositeCstNode"),mt(Nde,"isLeafCstNode"),yt(Nde,"isLeafCstNode"),mt(Dde,"isRootCstNode"),yt(Dde,"isRootCstNode"),$ke=class N{static{mt(this,"_StreamImpl")}static{yt(this,"StreamImpl")}constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){let e={state:this.startFn(),next:yt(()=>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 N(()=>({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 zke})}join(e=","){let t=this.iterator(),r="",i,n=!1;for(;(i=t.next()).done||(n&&(r+=e),r+=Mde(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 N(this.startFn,e=>{var{done:e,value:t}=this.nextFn(e);return e?zke:{done:!1,value:r(t)}})}filter(r){return new N(this.startFn,e=>{var t;do{if(!(t=this.nextFn(e)).done&&r(t.value))return t}while(!t.done);return zke})}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 N(()=>({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(!Ode(r=i(r)))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return zke})}flat(e){if((e=void 0===e?1:e)<=0)return this;let i=1<e?this.flat(e-1):this;return new N(()=>({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(!Ode(r))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return zke})}head(){var e=this.iterator().next();if(!e.done)return e.value}tail(r=1){return new N(()=>{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 N(()=>({size:0,state:this.startFn()}),e=>(e.size++,t<e.size?zke:this.nextFn(e.state)))}distinct(i){return new N(()=>({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 zke})}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(Mde,"toString"),yt(Mde,"toString"),mt(Ode,"isIterable"),yt(Ode,"isIterable"),Fke=new $ke(()=>{},()=>zke),zke=Object.freeze({done:!0,value:void 0}),mt(Pde,"stream"),yt(Pde,"stream"),qke=class extends $ke{static{mt(this,"TreeStreamImpl")}static{yt(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 zke})}iterator(){let e={state:this.startFn(),next:yt(()=>this.nextFn(e.state),"next"),prune:yt(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}},E=jke=jke||{},mt(e,"sum"),yt(e,"sum"),E.sum=e,mt(t,"product"),yt(t,"product"),E.product=t,mt(r,"min2"),yt(r,"min"),E.min=r,mt(i,"max"),yt(i,"max"),E.max=i,l5e(Wke={},{assignMandatoryProperties:mt(()=>Hde,"assignMandatoryProperties"),copyAstNode:mt(()=>Kde,"copyAstNode"),findRootNode:mt(()=>qde,"findRootNode"),getContainerOfType:mt(()=>$de,"getContainerOfType"),getDocument:mt(()=>zde,"getDocument"),getReferenceNodes:mt(()=>jde,"getReferenceNodes"),hasContainerOfType:mt(()=>Fde,"hasContainerOfType"),linkContentToContainer:mt(()=>Bde,"linkContentToContainer"),streamAllContents:mt(()=>Ude,"streamAllContents"),streamAst:mt(()=>Gde,"streamAst"),streamContents:mt(()=>Wde,"streamContents"),streamReferences:mt(()=>Yde,"streamReferences")}),mt(Bde,"linkContentToContainer"),yt(Bde,"linkContentToContainer"),mt($de,"getContainerOfType"),yt($de,"getContainerOfType"),mt(Fde,"hasContainerOfType"),yt(Fde,"hasContainerOfType"),mt(zde,"getDocument"),yt(zde,"getDocument"),mt(qde,"findRootNode"),yt(qde,"findRootNode"),mt(jde,"getReferenceNodes"),yt(jde,"getReferenceNodes"),mt(Wde,"streamContents"),yt(Wde,"streamContents"),mt(Ude,"streamAllContents"),yt(Ude,"streamAllContents"),mt(Gde,"streamAst"),yt(Gde,"streamAst"),mt(Vde,"isAstNodeInRange"),yt(Vde,"isAstNodeInRange"),mt(Yde,"streamReferences"),yt(Yde,"streamReferences"),mt(Hde,"assignMandatoryProperties"),yt(Hde,"assignMandatoryProperties"),mt(Xde,"copyDefaultValue"),yt(Xde,"copyDefaultValue"),mt(Kde,"copyAstNode"),yt(Kde,"copyAstNode"),l5e(Uke={},{AbstractElement:mt(()=>Vke,"AbstractElement"),AbstractParserRule:mt(()=>Yke,"AbstractParserRule"),AbstractRule:mt(()=>Hke,"AbstractRule"),AbstractType:mt(()=>Xke,"AbstractType"),Action:mt(()=>Kke,"Action"),Alternatives:mt(()=>Zke,"Alternatives"),ArrayLiteral:mt(()=>Qke,"ArrayLiteral"),ArrayType:mt(()=>Jke,"ArrayType"),Assignment:mt(()=>ewe,"Assignment"),BooleanLiteral:mt(()=>twe,"BooleanLiteral"),CharacterRange:mt(()=>rwe,"CharacterRange"),Condition:mt(()=>iwe,"Condition"),Conjunction:mt(()=>nwe,"Conjunction"),CrossReference:mt(()=>awe,"CrossReference"),Disjunction:mt(()=>swe,"Disjunction"),EndOfFile:mt(()=>owe,"EndOfFile"),Grammar:mt(()=>lwe,"Grammar"),GrammarImport:mt(()=>cwe,"GrammarImport"),Group:mt(()=>hwe,"Group"),InferredType:mt(()=>uwe,"InferredType"),InfixRule:mt(()=>dwe,"InfixRule"),InfixRuleOperatorList:mt(()=>pwe,"InfixRuleOperatorList"),InfixRuleOperators:mt(()=>gwe,"InfixRuleOperators"),Interface:mt(()=>fwe,"Interface"),Keyword:mt(()=>mwe,"Keyword"),LangiumGrammarAstReflection:mt(()=>Wwe,"LangiumGrammarAstReflection"),LangiumGrammarTerminals:mt(()=>Gke,"LangiumGrammarTerminals"),NamedArgument:mt(()=>ywe,"NamedArgument"),NegatedToken:mt(()=>vwe,"NegatedToken"),Negation:mt(()=>bwe,"Negation"),NumberLiteral:mt(()=>xwe,"NumberLiteral"),Parameter:mt(()=>Twe,"Parameter"),ParameterReference:mt(()=>kwe,"ParameterReference"),ParserRule:mt(()=>wwe,"ParserRule"),ReferenceType:mt(()=>Cwe,"ReferenceType"),RegexToken:mt(()=>Swe,"RegexToken"),ReturnType:mt(()=>Ewe,"ReturnType"),RuleCall:mt(()=>_we,"RuleCall"),SimpleType:mt(()=>Awe,"SimpleType"),StringLiteral:mt(()=>Rwe,"StringLiteral"),TerminalAlternatives:mt(()=>Lwe,"TerminalAlternatives"),TerminalElement:mt(()=>Iwe,"TerminalElement"),TerminalGroup:mt(()=>Nwe,"TerminalGroup"),TerminalRule:mt(()=>Dwe,"TerminalRule"),TerminalRuleCall:mt(()=>Mwe,"TerminalRuleCall"),Type:mt(()=>Owe,"Type"),TypeAttribute:mt(()=>Pwe,"TypeAttribute"),TypeDefinition:mt(()=>Bwe,"TypeDefinition"),UnionType:mt(()=>$we,"UnionType"),UnorderedGroup:mt(()=>Fwe,"UnorderedGroup"),UntilToken:mt(()=>zwe,"UntilToken"),ValueLiteral:mt(()=>qwe,"ValueLiteral"),Wildcard:mt(()=>jwe,"Wildcard"),isAbstractElement:mt(()=>Zde,"isAbstractElement"),isAbstractParserRule:mt(()=>Qde,"isAbstractParserRule"),isAbstractRule:mt(()=>Jde,"isAbstractRule"),isAbstractType:mt(()=>epe,"isAbstractType"),isAction:mt(()=>tpe,"isAction"),isAlternatives:mt(()=>rpe,"isAlternatives"),isArrayLiteral:mt(()=>ipe,"isArrayLiteral"),isArrayType:mt(()=>npe,"isArrayType"),isAssignment:mt(()=>ape,"isAssignment"),isBooleanLiteral:mt(()=>spe,"isBooleanLiteral"),isCharacterRange:mt(()=>ope,"isCharacterRange"),isCondition:mt(()=>lpe,"isCondition"),isConjunction:mt(()=>cpe,"isConjunction"),isCrossReference:mt(()=>hpe,"isCrossReference"),isDisjunction:mt(()=>upe,"isDisjunction"),isEndOfFile:mt(()=>dpe,"isEndOfFile"),isGrammar:mt(()=>ppe,"isGrammar"),isGrammarImport:mt(()=>gpe,"isGrammarImport"),isGroup:mt(()=>fpe,"isGroup"),isInferredType:mt(()=>mpe,"isInferredType"),isInfixRule:mt(()=>ype,"isInfixRule"),isInfixRuleOperatorList:mt(()=>vpe,"isInfixRuleOperatorList"),isInfixRuleOperators:mt(()=>bpe,"isInfixRuleOperators"),isInterface:mt(()=>xpe,"isInterface"),isKeyword:mt(()=>Tpe,"isKeyword"),isNamedArgument:mt(()=>kpe,"isNamedArgument"),isNegatedToken:mt(()=>wpe,"isNegatedToken"),isNegation:mt(()=>Cpe,"isNegation"),isNumberLiteral:mt(()=>Spe,"isNumberLiteral"),isParameter:mt(()=>Epe,"isParameter"),isParameterReference:mt(()=>_pe,"isParameterReference"),isParserRule:mt(()=>Ape,"isParserRule"),isReferenceType:mt(()=>Rpe,"isReferenceType"),isRegexToken:mt(()=>Lpe,"isRegexToken"),isReturnType:mt(()=>Ipe,"isReturnType"),isRuleCall:mt(()=>Npe,"isRuleCall"),isSimpleType:mt(()=>Dpe,"isSimpleType"),isStringLiteral:mt(()=>Mpe,"isStringLiteral"),isTerminalAlternatives:mt(()=>Ope,"isTerminalAlternatives"),isTerminalElement:mt(()=>Ppe,"isTerminalElement"),isTerminalGroup:mt(()=>Bpe,"isTerminalGroup"),isTerminalRule:mt(()=>$pe,"isTerminalRule"),isTerminalRuleCall:mt(()=>Fpe,"isTerminalRuleCall"),isType:mt(()=>zpe,"isType"),isTypeAttribute:mt(()=>qpe,"isTypeAttribute"),isTypeDefinition:mt(()=>jpe,"isTypeDefinition"),isUnionType:mt(()=>Wpe,"isUnionType"),isUnorderedGroup:mt(()=>Upe,"isUnorderedGroup"),isUntilToken:mt(()=>Gpe,"isUntilToken"),isValueLiteral:mt(()=>Vpe,"isValueLiteral"),isWildcard:mt(()=>Ype,"isWildcard"),reflection:mt(()=>Uwe,"reflection")}),Gke={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]*/},Vke={$type:"AbstractElement",cardinality:"cardinality"},mt(Zde,"isAbstractElement"),yt(Zde,"isAbstractElement"),Yke={$type:"AbstractParserRule"},mt(Qde,"isAbstractParserRule"),yt(Qde,"isAbstractParserRule"),Hke={$type:"AbstractRule"},mt(Jde,"isAbstractRule"),yt(Jde,"isAbstractRule"),Xke={$type:"AbstractType"},mt(epe,"isAbstractType"),yt(epe,"isAbstractType"),Kke={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"},mt(tpe,"isAction"),yt(tpe,"isAction"),Zke={$type:"Alternatives",cardinality:"cardinality",elements:"elements"},mt(rpe,"isAlternatives"),yt(rpe,"isAlternatives"),Qke={$type:"ArrayLiteral",elements:"elements"},mt(ipe,"isArrayLiteral"),yt(ipe,"isArrayLiteral"),Jke={$type:"ArrayType",elementType:"elementType"},mt(npe,"isArrayType"),yt(npe,"isArrayType"),ewe={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"},mt(ape,"isAssignment"),yt(ape,"isAssignment"),twe={$type:"BooleanLiteral",true:"true"},mt(spe,"isBooleanLiteral"),yt(spe,"isBooleanLiteral"),rwe={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"},mt(ope,"isCharacterRange"),yt(ope,"isCharacterRange"),iwe={$type:"Condition"},mt(lpe,"isCondition"),yt(lpe,"isCondition"),nwe={$type:"Conjunction",left:"left",right:"right"},mt(cpe,"isConjunction"),yt(cpe,"isConjunction"),awe={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"},mt(hpe,"isCrossReference"),yt(hpe,"isCrossReference"),swe={$type:"Disjunction",left:"left",right:"right"},mt(upe,"isDisjunction"),yt(upe,"isDisjunction"),owe={$type:"EndOfFile",cardinality:"cardinality"},mt(dpe,"isEndOfFile"),yt(dpe,"isEndOfFile"),lwe={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},mt(ppe,"isGrammar"),yt(ppe,"isGrammar"),cwe={$type:"GrammarImport",path:"path"},mt(gpe,"isGrammarImport"),yt(gpe,"isGrammarImport"),hwe={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"},mt(fpe,"isGroup"),yt(fpe,"isGroup"),uwe={$type:"InferredType",name:"name"},mt(mpe,"isInferredType"),yt(mpe,"isInferredType"),dwe={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"},mt(ype,"isInfixRule"),yt(ype,"isInfixRule"),pwe={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},mt(vpe,"isInfixRuleOperatorList"),yt(vpe,"isInfixRuleOperatorList"),gwe={$type:"InfixRuleOperators",precedences:"precedences"},mt(bpe,"isInfixRuleOperators"),yt(bpe,"isInfixRuleOperators"),fwe={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"},mt(xpe,"isInterface"),yt(xpe,"isInterface"),mwe={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"},mt(Tpe,"isKeyword"),yt(Tpe,"isKeyword"),ywe={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},mt(kpe,"isNamedArgument"),yt(kpe,"isNamedArgument"),vwe={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"},mt(wpe,"isNegatedToken"),yt(wpe,"isNegatedToken"),bwe={$type:"Negation",value:"value"},mt(Cpe,"isNegation"),yt(Cpe,"isNegation"),xwe={$type:"NumberLiteral",value:"value"},mt(Spe,"isNumberLiteral"),yt(Spe,"isNumberLiteral"),Twe={$type:"Parameter",name:"name"},mt(Epe,"isParameter"),yt(Epe,"isParameter"),kwe={$type:"ParameterReference",parameter:"parameter"},mt(_pe,"isParameterReference"),yt(_pe,"isParameterReference"),wwe={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"},mt(Ape,"isParserRule"),yt(Ape,"isParserRule"),Cwe={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},mt(Rpe,"isReferenceType"),yt(Rpe,"isReferenceType"),Swe={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"},mt(Lpe,"isRegexToken"),yt(Lpe,"isRegexToken"),Ewe={$type:"ReturnType",name:"name"},mt(Ipe,"isReturnType"),yt(Ipe,"isReturnType"),_we={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"},mt(Npe,"isRuleCall"),yt(Npe,"isRuleCall"),Awe={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"},mt(Dpe,"isSimpleType"),yt(Dpe,"isSimpleType"),Rwe={$type:"StringLiteral",value:"value"},mt(Mpe,"isStringLiteral"),yt(Mpe,"isStringLiteral"),Lwe={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"},mt(Ope,"isTerminalAlternatives"),yt(Ope,"isTerminalAlternatives"),Iwe={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},mt(Ppe,"isTerminalElement"),yt(Ppe,"isTerminalElement"),Nwe={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"},mt(Bpe,"isTerminalGroup"),yt(Bpe,"isTerminalGroup"),Dwe={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"},mt($pe,"isTerminalRule"),yt($pe,"isTerminalRule"),Mwe={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"},mt(Fpe,"isTerminalRuleCall"),yt(Fpe,"isTerminalRuleCall"),Owe={$type:"Type",name:"name",type:"type"},mt(zpe,"isType"),yt(zpe,"isType"),Pwe={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},mt(qpe,"isTypeAttribute"),yt(qpe,"isTypeAttribute"),Bwe={$type:"TypeDefinition"},mt(jpe,"isTypeDefinition"),yt(jpe,"isTypeDefinition"),$we={$type:"UnionType",types:"types"},mt(Wpe,"isUnionType"),yt(Wpe,"isUnionType"),Fwe={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"},mt(Upe,"isUnorderedGroup"),yt(Upe,"isUnorderedGroup"),zwe={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"},mt(Gpe,"isUntilToken"),yt(Gpe,"isUntilToken"),qwe={$type:"ValueLiteral"},mt(Vpe,"isValueLiteral"),yt(Vpe,"isValueLiteral"),jwe={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},mt(Ype,"isWildcard"),yt(Ype,"isWildcard"),Wwe=class extends Bke{static{mt(this,"LangiumGrammarAstReflection")}static{yt(this,"LangiumGrammarAstReflection")}constructor(){super(...arguments),this.types={AbstractElement:{name:Vke.$type,properties:{cardinality:{name:Vke.cardinality}},superTypes:[]},AbstractParserRule:{name:Yke.$type,properties:{},superTypes:[Hke.$type,Xke.$type]},AbstractRule:{name:Hke.$type,properties:{},superTypes:[]},AbstractType:{name:Xke.$type,properties:{},superTypes:[]},Action:{name:Kke.$type,properties:{cardinality:{name:Kke.cardinality},feature:{name:Kke.feature},inferredType:{name:Kke.inferredType},operator:{name:Kke.operator},type:{name:Kke.type,referenceType:Xke.$type}},superTypes:[Vke.$type]},Alternatives:{name:Zke.$type,properties:{cardinality:{name:Zke.cardinality},elements:{name:Zke.elements,defaultValue:[]}},superTypes:[Vke.$type]},ArrayLiteral:{name:Qke.$type,properties:{elements:{name:Qke.elements,defaultValue:[]}},superTypes:[qwe.$type]},ArrayType:{name:Jke.$type,properties:{elementType:{name:Jke.elementType}},superTypes:[Bwe.$type]},Assignment:{name:ewe.$type,properties:{cardinality:{name:ewe.cardinality},feature:{name:ewe.feature},operator:{name:ewe.operator},predicate:{name:ewe.predicate},terminal:{name:ewe.terminal}},superTypes:[Vke.$type]},BooleanLiteral:{name:twe.$type,properties:{true:{name:twe.true,defaultValue:!1}},superTypes:[iwe.$type,qwe.$type]},CharacterRange:{name:rwe.$type,properties:{cardinality:{name:rwe.cardinality},left:{name:rwe.left},lookahead:{name:rwe.lookahead},parenthesized:{name:rwe.parenthesized,defaultValue:!1},right:{name:rwe.right}},superTypes:[Iwe.$type]},Condition:{name:iwe.$type,properties:{},superTypes:[]},Conjunction:{name:nwe.$type,properties:{left:{name:nwe.left},right:{name:nwe.right}},superTypes:[iwe.$type]},CrossReference:{name:awe.$type,properties:{cardinality:{name:awe.cardinality},deprecatedSyntax:{name:awe.deprecatedSyntax,defaultValue:!1},isMulti:{name:awe.isMulti,defaultValue:!1},terminal:{name:awe.terminal},type:{name:awe.type,referenceType:Xke.$type}},superTypes:[Vke.$type]},Disjunction:{name:swe.$type,properties:{left:{name:swe.left},right:{name:swe.right}},superTypes:[iwe.$type]},EndOfFile:{name:owe.$type,properties:{cardinality:{name:owe.cardinality}},superTypes:[Vke.$type]},Grammar:{name:lwe.$type,properties:{imports:{name:lwe.imports,defaultValue:[]},interfaces:{name:lwe.interfaces,defaultValue:[]},isDeclared:{name:lwe.isDeclared,defaultValue:!1},name:{name:lwe.name},rules:{name:lwe.rules,defaultValue:[]},types:{name:lwe.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:cwe.$type,properties:{path:{name:cwe.path}},superTypes:[]},Group:{name:hwe.$type,properties:{cardinality:{name:hwe.cardinality},elements:{name:hwe.elements,defaultValue:[]},guardCondition:{name:hwe.guardCondition},predicate:{name:hwe.predicate}},superTypes:[Vke.$type]},InferredType:{name:uwe.$type,properties:{name:{name:uwe.name}},superTypes:[Xke.$type]},InfixRule:{name:dwe.$type,properties:{call:{name:dwe.call},dataType:{name:dwe.dataType},inferredType:{name:dwe.inferredType},name:{name:dwe.name},operators:{name:dwe.operators},parameters:{name:dwe.parameters,defaultValue:[]},returnType:{name:dwe.returnType,referenceType:Xke.$type}},superTypes:[Yke.$type]},InfixRuleOperatorList:{name:pwe.$type,properties:{associativity:{name:pwe.associativity},operators:{name:pwe.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:gwe.$type,properties:{precedences:{name:gwe.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:fwe.$type,properties:{attributes:{name:fwe.attributes,defaultValue:[]},name:{name:fwe.name},superTypes:{name:fwe.superTypes,defaultValue:[],referenceType:Xke.$type}},superTypes:[Xke.$type]},Keyword:{name:mwe.$type,properties:{cardinality:{name:mwe.cardinality},predicate:{name:mwe.predicate},value:{name:mwe.value}},superTypes:[Vke.$type]},NamedArgument:{name:ywe.$type,properties:{calledByName:{name:ywe.calledByName,defaultValue:!1},parameter:{name:ywe.parameter,referenceType:Twe.$type},value:{name:ywe.value}},superTypes:[]},NegatedToken:{name:vwe.$type,properties:{cardinality:{name:vwe.cardinality},lookahead:{name:vwe.lookahead},parenthesized:{name:vwe.parenthesized,defaultValue:!1},terminal:{name:vwe.terminal}},superTypes:[Iwe.$type]},Negation:{name:bwe.$type,properties:{value:{name:bwe.value}},superTypes:[iwe.$type]},NumberLiteral:{name:xwe.$type,properties:{value:{name:xwe.value}},superTypes:[qwe.$type]},Parameter:{name:Twe.$type,properties:{name:{name:Twe.name}},superTypes:[]},ParameterReference:{name:kwe.$type,properties:{parameter:{name:kwe.parameter,referenceType:Twe.$type}},superTypes:[iwe.$type]},ParserRule:{name:wwe.$type,properties:{dataType:{name:wwe.dataType},definition:{name:wwe.definition},entry:{name:wwe.entry,defaultValue:!1},fragment:{name:wwe.fragment,defaultValue:!1},inferredType:{name:wwe.inferredType},name:{name:wwe.name},parameters:{name:wwe.parameters,defaultValue:[]},returnType:{name:wwe.returnType,referenceType:Xke.$type}},superTypes:[Yke.$type]},ReferenceType:{name:Cwe.$type,properties:{isMulti:{name:Cwe.isMulti,defaultValue:!1},referenceType:{name:Cwe.referenceType}},superTypes:[Bwe.$type]},RegexToken:{name:Swe.$type,properties:{cardinality:{name:Swe.cardinality},lookahead:{name:Swe.lookahead},parenthesized:{name:Swe.parenthesized,defaultValue:!1},regex:{name:Swe.regex}},superTypes:[Iwe.$type]},ReturnType:{name:Ewe.$type,properties:{name:{name:Ewe.name}},superTypes:[]},RuleCall:{name:_we.$type,properties:{arguments:{name:_we.arguments,defaultValue:[]},cardinality:{name:_we.cardinality},predicate:{name:_we.predicate},rule:{name:_we.rule,referenceType:Hke.$type}},superTypes:[Vke.$type]},SimpleType:{name:Awe.$type,properties:{primitiveType:{name:Awe.primitiveType},stringType:{name:Awe.stringType},typeRef:{name:Awe.typeRef,referenceType:Xke.$type}},superTypes:[Bwe.$type]},StringLiteral:{name:Rwe.$type,properties:{value:{name:Rwe.value}},superTypes:[qwe.$type]},TerminalAlternatives:{name:Lwe.$type,properties:{cardinality:{name:Lwe.cardinality},elements:{name:Lwe.elements,defaultValue:[]},lookahead:{name:Lwe.lookahead},parenthesized:{name:Lwe.parenthesized,defaultValue:!1}},superTypes:[Iwe.$type]},TerminalElement:{name:Iwe.$type,properties:{cardinality:{name:Iwe.cardinality},lookahead:{name:Iwe.lookahead},parenthesized:{name:Iwe.parenthesized,defaultValue:!1}},superTypes:[Vke.$type]},TerminalGroup:{name:Nwe.$type,properties:{cardinality:{name:Nwe.cardinality},elements:{name:Nwe.elements,defaultValue:[]},lookahead:{name:Nwe.lookahead},parenthesized:{name:Nwe.parenthesized,defaultValue:!1}},superTypes:[Iwe.$type]},TerminalRule:{name:Dwe.$type,properties:{definition:{name:Dwe.definition},fragment:{name:Dwe.fragment,defaultValue:!1},hidden:{name:Dwe.hidden,defaultValue:!1},name:{name:Dwe.name},type:{name:Dwe.type}},superTypes:[Hke.$type]},TerminalRuleCall:{name:Mwe.$type,properties:{cardinality:{name:Mwe.cardinality},lookahead:{name:Mwe.lookahead},parenthesized:{name:Mwe.parenthesized,defaultValue:!1},rule:{name:Mwe.rule,referenceType:Dwe.$type}},superTypes:[Iwe.$type]},Type:{name:Owe.$type,properties:{name:{name:Owe.name},type:{name:Owe.type}},superTypes:[Xke.$type]},TypeAttribute:{name:Pwe.$type,properties:{defaultValue:{name:Pwe.defaultValue},isOptional:{name:Pwe.isOptional,defaultValue:!1},name:{name:Pwe.name},type:{name:Pwe.type}},superTypes:[]},TypeDefinition:{name:Bwe.$type,properties:{},superTypes:[]},UnionType:{name:$we.$type,properties:{types:{name:$we.types,defaultValue:[]}},superTypes:[Bwe.$type]},UnorderedGroup:{name:Fwe.$type,properties:{cardinality:{name:Fwe.cardinality},elements:{name:Fwe.elements,defaultValue:[]}},superTypes:[Vke.$type]},UntilToken:{name:zwe.$type,properties:{cardinality:{name:zwe.cardinality},lookahead:{name:zwe.lookahead},parenthesized:{name:zwe.parenthesized,defaultValue:!1},terminal:{name:zwe.terminal}},superTypes:[Iwe.$type]},ValueLiteral:{name:qwe.$type,properties:{},superTypes:[]},Wildcard:{name:jwe.$type,properties:{cardinality:{name:jwe.cardinality},lookahead:{name:jwe.lookahead},parenthesized:{name:jwe.parenthesized,defaultValue:!1}},superTypes:[Iwe.$type]}}}},Uwe=new Wwe,mt(Hpe,"getDatatypeNode"),yt(Hpe,"getDatatypeNode"),mt(Xpe,"streamCst"),yt(Xpe,"streamCst"),mt(Kpe,"flattenCst"),yt(Kpe,"flattenCst"),mt(Zpe,"isChildNode"),yt(Zpe,"isChildNode"),mt(Qpe,"tokenToRange"),yt(Qpe,"tokenToRange"),mt(Jpe,"toDocumentSegment"),yt(Jpe,"toDocumentSegment"),(E=Gwe=Gwe||{})[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(e0e,"compareRange"),yt(e0e,"compareRange"),mt(t0e,"inRange"),yt(t0e,"inRange"),Vwe=/^[\w\p{L}]$/u,mt(r0e,"findDeclarationNodeAtOffset"),yt(r0e,"findDeclarationNodeAtOffset"),mt(i0e,"findCommentNode"),yt(i0e,"findCommentNode"),mt(n0e,"isCommentNode"),yt(n0e,"isCommentNode"),mt(a0e,"findLeafNodeAtOffset"),yt(a0e,"findLeafNodeAtOffset"),mt(s0e,"findLeafNodeBeforeOffset"),yt(s0e,"findLeafNodeBeforeOffset"),mt(o0e,"binarySearch"),yt(o0e,"binarySearch"),mt(l0e,"getPreviousNode"),yt(l0e,"getPreviousNode"),mt(c0e,"getNextNode"),yt(c0e,"getNextNode"),mt(h0e,"getStartlineNode"),yt(h0e,"getStartlineNode"),mt(u0e,"getInteriorNodes"),yt(u0e,"getInteriorNodes"),mt(d0e,"getCommonParent"),yt(d0e,"getCommonParent"),mt(p0e,"getParentChain"),yt(p0e,"getParentChain"),l5e(Ywe={},{findAssignment:mt(()=>q0e,"findAssignment"),findNameAssignment:mt(()=>j0e,"findNameAssignment"),findNodeForKeyword:mt(()=>F0e,"findNodeForKeyword"),findNodeForProperty:mt(()=>P0e,"findNodeForProperty"),findNodesForKeyword:mt(()=>$0e,"findNodesForKeyword"),findNodesForKeywordInternal:mt(()=>z0e,"findNodesForKeywordInternal"),findNodesForProperty:mt(()=>O0e,"findNodesForProperty"),getActionAtElement:mt(()=>U0e,"getActionAtElement"),getActionType:mt(()=>ege,"getActionType"),getAllReachableRules:mt(()=>L0e,"getAllReachableRules"),getAllRulesUsedForCrossReferences:mt(()=>N0e,"getAllRulesUsedForCrossReferences"),getCrossReferenceTerminal:mt(()=>D0e,"getCrossReferenceTerminal"),getEntryRule:mt(()=>A0e,"getEntryRule"),getExplicitRuleType:mt(()=>Q0e,"getExplicitRuleType"),getHiddenRules:mt(()=>R0e,"getHiddenRules"),getRuleType:mt(()=>rge,"getRuleType"),getRuleTypeName:mt(()=>tge,"getRuleTypeName"),getTypeName:mt(()=>J0e,"getTypeName"),isArrayCardinality:mt(()=>V0e,"isArrayCardinality"),isArrayOperator:mt(()=>Y0e,"isArrayOperator"),isCommentTerminal:mt(()=>M0e,"isCommentTerminal"),isDataType:mt(()=>K0e,"isDataType"),isDataTypeRule:mt(()=>H0e,"isDataTypeRule"),isOptionalCardinality:mt(()=>G0e,"isOptionalCardinality"),terminalRegex:mt(()=>ige,"terminalRegex")}),Hwe=class extends Error{static{mt(this,"ErrorWithLocation")}static{yt(this,"ErrorWithLocation")}constructor(e,t){super(e?`${t} at ${e.range.start.line}:`+e.range.start.character:t)}},mt(g0e,"assertUnreachable"),yt(g0e,"assertUnreachable"),mt(f0e,"assertCondition"),yt(f0e,"assertCondition"),l5e(Xwe={},{NEWLINE_REGEXP:mt(()=>iCe,"NEWLINE_REGEXP"),escapeRegExp:mt(()=>S0e,"escapeRegExp"),getTerminalParts:mt(()=>k0e,"getTerminalParts"),isMultilineComment:mt(()=>w0e,"isMultilineComment"),isWhitespace:mt(()=>C0e,"isWhitespace"),partialMatches:mt(()=>E0e,"partialMatches"),partialRegExp:mt(()=>_0e,"partialRegExp"),whitespaceCharacters:mt(()=>sCe,"whitespaceCharacters")}),mt(m0e,"cc"),yt(m0e,"cc"),mt(y0e,"insertToSet"),yt(y0e,"insertToSet"),mt(v0e,"addFlag"),yt(v0e,"addFlag"),mt(b0e,"ASSERT_EXISTS"),yt(b0e,"ASSERT_EXISTS"),mt(x0e,"ASSERT_NEVER_REACH_HERE"),yt(x0e,"ASSERT_NEVER_REACH_HERE"),mt(T0e,"isCharacter"),yt(T0e,"isCharacter"),Kwe=[];for(let e=m0e("0");e<=m0e("9");e++)Kwe.push(e);Zwe=[m0e("_")].concat(Kwe);for(let e=m0e("a");e<=m0e("z");e++)Zwe.push(e);for(let e=m0e("A");e<=m0e("Z");e++)Zwe.push(e);function n(){}function a(t){let r="";for(let e=1;e<t.length-1;e++){var i,n=t.charAt(e);"\\"===n?(i=t.charAt(++e),r+=s(i)):r+=n}return r}function s(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 o(e){return"^"===e.charAt(0)?e.substring(1):e}function l(e){return parseInt(e)}function c(e){return BigInt(e)}function h(e){return new Date(e)}function u(e){return Number(e)}function d(e){return"true"===e.toLowerCase()}function p(e,t,r,i){return new o9e(e,t,r,i)}function g(e,t,r){if(e instanceof o9e)return e.update(t,r),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")}function f(e,t){let r=e.getText(),i=J4e(t.map(iTe),(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("")}Qwe=[m0e(" "),m0e("\f"),m0e(`
|
||
`),m0e("\r"),m0e("\t"),m0e("\v"),m0e("\t"),m0e(" "),m0e(" "),m0e(" "),m0e(" "),m0e(" "),m0e(" "),m0e(" "),m0e(" "),m0e(" "),m0e(" "),m0e(" "),m0e(" "),m0e(" "),m0e("\u2028"),m0e("\u2029"),m0e(" "),m0e(" "),m0e(" "),m0e("\ufeff")],Jwe=/[0-9a-fA-F]/,eCe=/[0-9]/,tCe=/[1-9]/,eLe=class{static{mt(this,"RegExpParser")}static{yt(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":v0e(r,"global");break;case"i":v0e(r,"ignoreCase");break;case"m":v0e(r,"multiLine");break;case"u":v0e(r,"unicode");break;case"y":v0e(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"}}b0e(e);var r=this.disjunction();return this.consumeChar(")"),{type:e,value:r,loc:this.loc(t)}}return x0e()}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;b0e(t)}if((!0!==e||void 0!==t)&&b0e(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 b0e(e=void 0===e&&this.isPatternCharacter()?this.patternCharacter():e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):x0e()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[m0e(`
|
||
`),m0e("\r"),m0e("\u2028"),m0e("\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=Kwe;break;case"D":e=Kwe,t=!0;break;case"s":e=Qwe;break;case"S":e=Qwe,t=!0;break;case"w":e=Zwe;break;case"W":e=Zwe,t=!0}return b0e(e)?{type:"Set",value:e,complement:t}:x0e()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=m0e("\f");break;case"n":e=m0e(`
|
||
`);break;case"r":e=m0e("\r");break;case"t":e=m0e("\t");break;case"v":e=m0e("\v")}return b0e(e)?{type:"Character",value:e}:x0e()}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:m0e("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:m0e(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
||
`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:m0e(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,T0e(r)&&this.isRangeDash()){this.consumeChar("-");var i=this.classAtom();if(i.type,T0e(i)){if(i.value<r.value)throw Error("Range out of order in character class");e.push({from:r.value,to:i.value})}else y0e(r.value,e),e.push(m0e("-")),y0e(i.value,e)}else y0e(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:m0e("\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===tCe.test(e))throw Error("Expecting a positive integer");for(;eCe.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(!1===eCe.test(e))throw Error("Expecting an integer");for(;eCe.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:m0e(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 eCe.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===Jwe.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}}},rCe=class{static{mt(this,"BaseRegExpVisitor")}static{yt(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){}},iCe=/\r?\n/gm,nCe=new eLe,z=class extends rCe{static{mt(this,"TerminalRegExpVisitor")}static{yt(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=S0e(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)}},aCe=new z,mt(k0e,"getTerminalParts"),yt(k0e,"getTerminalParts"),mt(w0e,"isMultilineComment"),yt(w0e,"isMultilineComment"),sCe=`
|
||
\r
`.split(""),mt(C0e,"isWhitespace"),yt(C0e,"isWhitespace"),mt(S0e,"escapeRegExp"),yt(S0e,"escapeRegExp"),mt(E0e,"partialMatches"),yt(E0e,"partialMatches"),mt(_0e,"partialRegExp"),yt(_0e,"partialRegExp"),mt(A0e,"getEntryRule"),yt(A0e,"getEntryRule"),mt(R0e,"getHiddenRules"),yt(R0e,"getHiddenRules"),mt(L0e,"getAllReachableRules"),yt(L0e,"getAllReachableRules"),mt(I0e,"ruleDfs"),yt(I0e,"ruleDfs"),mt(N0e,"getAllRulesUsedForCrossReferences"),yt(N0e,"getAllRulesUsedForCrossReferences"),mt(D0e,"getCrossReferenceTerminal"),yt(D0e,"getCrossReferenceTerminal"),mt(M0e,"isCommentTerminal"),yt(M0e,"isCommentTerminal"),mt(O0e,"findNodesForProperty"),yt(O0e,"findNodesForProperty"),mt(P0e,"findNodeForProperty"),yt(P0e,"findNodeForProperty"),mt(B0e,"findNodesForPropertyInternal"),yt(B0e,"findNodesForPropertyInternal"),mt($0e,"findNodesForKeyword"),yt($0e,"findNodesForKeyword"),mt(F0e,"findNodeForKeyword"),yt(F0e,"findNodeForKeyword"),mt(z0e,"findNodesForKeywordInternal"),yt(z0e,"findNodesForKeywordInternal"),mt(q0e,"findAssignment"),yt(q0e,"findAssignment"),mt(j0e,"findNameAssignment"),yt(j0e,"findNameAssignment"),mt(W0e,"findNameAssignmentInternal"),yt(W0e,"findNameAssignmentInternal"),mt(U0e,"getActionAtElement"),yt(U0e,"getActionAtElement"),mt(G0e,"isOptionalCardinality"),yt(G0e,"isOptionalCardinality"),mt(V0e,"isArrayCardinality"),yt(V0e,"isArrayCardinality"),mt(Y0e,"isArrayOperator"),yt(Y0e,"isArrayOperator"),mt(H0e,"isDataTypeRule"),yt(H0e,"isDataTypeRule"),mt(X0e,"isDataTypeRuleInternal"),yt(X0e,"isDataTypeRuleInternal"),mt(K0e,"isDataType"),yt(K0e,"isDataType"),mt(Z0e,"isDataTypeInternal"),yt(Z0e,"isDataTypeInternal"),mt(Q0e,"getExplicitRuleType"),yt(Q0e,"getExplicitRuleType"),mt(J0e,"getTypeName"),yt(J0e,"getTypeName"),mt(ege,"getActionType"),yt(ege,"getActionType"),mt(tge,"getRuleTypeName"),yt(tge,"getRuleTypeName"),mt(rge,"getRuleType"),yt(rge,"getRuleType"),mt(ige,"terminalRegex"),yt(ige,"terminalRegex"),oCe=/[\s\S]/.source,mt(nge,"abstractElementToRegex"),yt(nge,"abstractElementToRegex"),mt(age,"terminalAlternativesToRegex"),yt(age,"terminalAlternativesToRegex"),mt(sge,"terminalGroupToRegex"),yt(sge,"terminalGroupToRegex"),mt(oge,"untilTokenToRegex"),yt(oge,"untilTokenToRegex"),mt(lge,"negateTokenToRegex"),yt(lge,"negateTokenToRegex"),mt(cge,"characterRangeToRegex"),yt(cge,"characterRangeToRegex"),mt(hge,"keywordToRegex"),yt(hge,"keywordToRegex"),mt(uge,"withCardinality"),yt(uge,"withCardinality"),mt(dge,"createGrammarConfig"),yt(dge,"createGrammarConfig"),z="object"==typeof global&&global&&global.Object===Object&&global,u9e="object"==typeof self&&self&&self.Object===Object&&self,u9e=z||u9e||Function("return this")(),fRe=u9e.Symbol,F=Object.prototype,lCe=F.hasOwnProperty,cCe=F.toString,hCe=fRe?fRe.toStringTag:void 0,mt(pge,"getRawTag"),yt(pge,"getRawTag"),uCe=pge,F=Object.prototype,dCe=F.toString,mt(gge,"objectToString"),yt(gge,"objectToString"),pCe=gge,gCe=fRe?fRe.toStringTag:void 0,mt(fge,"baseGetTag"),yt(fge,"baseGetTag"),fCe=fge,mt(mge,"isObjectLike"),yt(mge,"isObjectLike"),mCe=mge,mt(yge,"isSymbol"),yt(yge,"isSymbol"),yCe=yge,mt(vge,"arrayMap"),yt(vge,"arrayMap"),vCe=vge,F=Array.isArray,bCe=F,xCe=1/0,F=fRe?fRe.prototype:void 0,TCe=F?F.toString:void 0,mt(bge,"baseToString"),yt(bge,"baseToString"),kCe=bge,wCe=/\s/,mt(xge,"trimmedEndIndex"),yt(xge,"trimmedEndIndex"),CCe=xge,SCe=/^\s+/,mt(Tge,"baseTrim"),yt(Tge,"baseTrim"),ECe=Tge,mt(kge,"isObject"),yt(kge,"isObject"),_Ce=kge,ACe=NaN,RCe=/^[-+]0x[0-9a-f]+$/i,LCe=/^0b[01]+$/i,ICe=/^0o[0-7]+$/i,NCe=parseInt,mt(wge,"toNumber"),yt(wge,"toNumber"),DCe=wge,mt(Cge,"toFinite"),yt(Cge,"toFinite"),MCe=Cge,mt(Sge,"toInteger"),yt(Sge,"toInteger"),OCe=Sge,mt(Ege,"identity"),yt(Ege,"identity"),PCe=Ege,mt(_ge,"isFunction"),yt(_ge,"isFunction"),BCe=_ge,F=u9e["__core-js_shared__"],E=/[^.]+$/.exec(F&&F.keys&&F.keys.IE_PROTO||""),$Ce=E?"Symbol(src)_1."+E:"",mt(Age,"isMasked"),yt(Age,"isMasked"),FCe=Age,F=Function.prototype,zCe=F.toString,mt(Rge,"toSource"),yt(Rge,"toSource"),qCe=Rge,F=/[\\^$.*+?()[\]{}|]/g,jCe=/^\[object .+?Constructor\]$/,v8e=Function.prototype,BRe=Object.prototype,v8e=v8e.toString,BRe=BRe.hasOwnProperty,WCe=RegExp("^"+v8e.call(BRe).replace(F,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt(Lge,"baseIsNative"),yt(Lge,"baseIsNative"),UCe=Lge,mt(Ige,"getValue"),yt(Ige,"getValue"),GCe=Ige,mt(Nge,"getNative"),yt(Nge,"getNative"),v8e=(VCe=Nge)(u9e,"WeakMap"),BRe=v8e,YCe=Object.create,mt(n,"object"),yt(n,"object"),HCe=function(e){return _Ce(e)?YCe?YCe(e):(n.prototype=e,e=new n,n.prototype=void 0,e):{}},mt(Dge,"apply"),yt(Dge,"apply"),XCe=Dge,mt(Mge,"noop"),yt(Mge,"noop"),KCe=Mge,mt(Oge,"copyArray"),yt(Oge,"copyArray"),ZCe=Oge,QCe=Date.now,mt(Pge,"shortOut"),yt(Pge,"shortOut"),F=Pge,mt(Bge,"constant"),yt(Bge,"constant"),JCe=Bge,v8e=(()=>{try{var e=VCe(Object,"defineProperty");return e({},"",{}),e}catch{}})(),F=F((e6e=v8e)?function(e,t){return e6e(e,"toString",{configurable:!0,enumerable:!1,value:JCe(t),writable:!0})}:PCe),t6e=F,mt($ge,"arrayEach"),yt($ge,"arrayEach"),r6e=$ge,mt(Fge,"baseFindIndex"),yt(Fge,"baseFindIndex"),i6e=Fge,mt(zge,"baseIsNaN"),yt(zge,"baseIsNaN"),n6e=zge,mt(qge,"strictIndexOf"),yt(qge,"strictIndexOf"),a6e=qge,mt(jge,"baseIndexOf"),yt(jge,"baseIndexOf"),s6e=jge,mt(Wge,"arrayIncludes"),yt(Wge,"arrayIncludes"),o6e=Wge,l6e=/^(?:0|[1-9]\d*)$/,mt(Uge,"isIndex"),yt(Uge,"isIndex"),c6e=Uge,mt(Gge,"baseAssignValue"),yt(Gge,"baseAssignValue"),h6e=Gge,mt(Vge,"eq"),yt(Vge,"eq"),u6e=Vge,v8e=Object.prototype,d6e=v8e.hasOwnProperty,mt(Yge,"assignValue"),yt(Yge,"assignValue"),p6e=Yge,mt(Hge,"copyObject"),yt(Hge,"copyObject"),g6e=Hge,f6e=Math.max,mt(Xge,"overRest"),yt(Xge,"overRest"),m6e=Xge,mt(Kge,"baseRest"),yt(Kge,"baseRest"),y6e=Kge,mt(Zge,"isLength"),yt(Zge,"isLength"),v6e=Zge,mt(Qge,"isArrayLike"),yt(Qge,"isArrayLike"),b6e=Qge,mt(Jge,"isIterateeCall"),yt(Jge,"isIterateeCall"),x6e=Jge,mt(efe,"createAssigner"),yt(efe,"createAssigner"),F=efe,T6e=Object.prototype,mt(tfe,"isPrototype"),yt(tfe,"isPrototype"),k6e=tfe,mt(rfe,"baseTimes"),yt(rfe,"baseTimes"),w6e=rfe,mt(ife,"baseIsArguments"),yt(ife,"baseIsArguments"),v8e=ife,ALe=Object.prototype,C6e=ALe.hasOwnProperty,S6e=ALe.propertyIsEnumerable,ALe=v8e(function(){return arguments}())?v8e:function(e){return mCe(e)&&C6e.call(e,"callee")&&!S6e.call(e,"callee")},E6e=ALe,mt(nfe,"stubFalse"),yt(nfe,"stubFalse"),v8e=nfe,ALe="object"==typeof exports&&exports&&!exports.nodeType&&exports,bLe=(bLe=ALe&&"object"==typeof module&&module&&!module.nodeType&&module)&&bLe.exports===ALe?u9e.Buffer:void 0,ALe=bLe?bLe.isBuffer:void 0,_6e=ALe||v8e,(A6e={})["[object Float32Array]"]=A6e["[object Float64Array]"]=A6e["[object Int8Array]"]=A6e["[object Int16Array]"]=A6e["[object Int32Array]"]=A6e["[object Uint8Array]"]=A6e["[object Uint8ClampedArray]"]=A6e["[object Uint16Array]"]=A6e["[object Uint32Array]"]=!0,A6e["[object Arguments]"]=A6e["[object Array]"]=A6e["[object ArrayBuffer]"]=A6e["[object Boolean]"]=A6e["[object DataView]"]=A6e["[object Date]"]=A6e["[object Error]"]=A6e["[object Function]"]=A6e["[object Map]"]=A6e["[object Number]"]=A6e["[object Object]"]=A6e["[object RegExp]"]=A6e["[object Set]"]=A6e["[object String]"]=A6e["[object WeakMap]"]=!1,mt(afe,"baseIsTypedArray"),yt(afe,"baseIsTypedArray"),bLe=afe,mt(sfe,"baseUnary"),yt(sfe,"baseUnary"),R6e=sfe,ALe="object"==typeof exports&&exports&&!exports.nodeType&&exports,L6e=ALe&&"object"==typeof module&&module&&!module.nodeType&&module,v8e=L6e&&L6e.exports===ALe,I6e=v8e&&z.process,ALe=(()=>{try{return L6e&&L6e.require&&L6e.require("util").types||I6e&&I6e.binding&&I6e.binding("util")}catch{}})(),z=(v8e=ALe)&&v8e.isTypedArray,ALe=z?R6e(z):bLe,N6e=ALe,z=Object.prototype,D6e=z.hasOwnProperty,mt(ofe,"arrayLikeKeys"),yt(ofe,"arrayLikeKeys"),M6e=ofe,mt(lfe,"overArg"),yt(lfe,"overArg"),ALe=(bLe=lfe)(Object.keys,Object),O6e=ALe,z=Object.prototype,P6e=z.hasOwnProperty,mt(cfe,"baseKeys"),yt(cfe,"baseKeys"),B6e=cfe,mt(hfe,"keys"),yt(hfe,"keys"),$6e=hfe,ALe=Object.prototype,F6e=ALe.hasOwnProperty,z=F(function(e,t){if(k6e(t)||b6e(t))g6e(t,$6e(t),e);else for(var r in t)F6e.call(t,r)&&p6e(e,r,t[r])}),z6e=z,mt(ufe,"nativeKeysIn"),yt(ufe,"nativeKeysIn"),q6e=ufe,ALe=Object.prototype,j6e=ALe.hasOwnProperty,mt(dfe,"baseKeysIn"),yt(dfe,"baseKeysIn"),W6e=dfe,mt(pfe,"keysIn"),yt(pfe,"keysIn"),U6e=pfe,G6e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,V6e=/^\w*$/,mt(gfe,"isKey"),yt(gfe,"isKey"),Y6e=gfe,F=VCe(Object,"create"),H6e=F,mt(ffe,"hashClear"),yt(ffe,"hashClear"),z=ffe,mt(mfe,"hashDelete"),yt(mfe,"hashDelete"),ALe=mfe,F=Object.prototype,X6e=F.hasOwnProperty,mt(yfe,"hashGet"),yt(yfe,"hashGet"),F=yfe,$Re=Object.prototype,K6e=$Re.hasOwnProperty,mt(vfe,"hashHas"),yt(vfe,"hashHas"),$Re=vfe,mt(bfe,"hashSet"),yt(bfe,"hashSet"),ORe=bfe,mt(xfe,"Hash"),yt(xfe,"Hash"),xfe.prototype.clear=z,xfe.prototype.delete=ALe,xfe.prototype.get=F,xfe.prototype.has=$Re,xfe.prototype.set=ORe,Z6e=xfe,mt(Tfe,"listCacheClear"),yt(Tfe,"listCacheClear"),z=Tfe,mt(kfe,"assocIndexOf"),yt(kfe,"assocIndexOf"),Q6e=kfe,ALe=Array.prototype,J6e=ALe.splice,mt(wfe,"listCacheDelete"),yt(wfe,"listCacheDelete"),F=wfe,mt(Cfe,"listCacheGet"),yt(Cfe,"listCacheGet"),$Re=Cfe,mt(Sfe,"listCacheHas"),yt(Sfe,"listCacheHas"),ORe=Sfe,mt(Efe,"listCacheSet"),yt(Efe,"listCacheSet"),ALe=Efe,mt(_fe,"ListCache"),yt(_fe,"ListCache"),_fe.prototype.clear=z,_fe.prototype.delete=F,_fe.prototype.get=$Re,_fe.prototype.has=ORe,_fe.prototype.set=ALe,eSe=_fe,z=VCe(u9e,"Map"),tSe=z,mt(Afe,"mapCacheClear"),yt(Afe,"mapCacheClear"),F=Afe,mt(Rfe,"isKeyable"),yt(Rfe,"isKeyable"),rSe=Rfe,mt(Lfe,"getMapData"),yt(Lfe,"getMapData"),iSe=Lfe,mt(Ife,"mapCacheDelete"),yt(Ife,"mapCacheDelete"),$Re=Ife,mt(Nfe,"mapCacheGet"),yt(Nfe,"mapCacheGet"),ORe=Nfe,mt(Dfe,"mapCacheHas"),yt(Dfe,"mapCacheHas"),ALe=Dfe,mt(Mfe,"mapCacheSet"),yt(Mfe,"mapCacheSet"),z=Mfe,mt(Ofe,"MapCache"),yt(Ofe,"MapCache"),Ofe.prototype.clear=F,Ofe.prototype.delete=$Re,Ofe.prototype.get=ORe,Ofe.prototype.has=ALe,Ofe.prototype.set=z,nSe=Ofe,aSe="Expected a function",mt(Pfe,"memoize"),yt(Pfe,"memoize"),Pfe.Cache=nSe,sSe=Pfe,mt(Bfe,"memoizeCapped"),yt(Bfe,"memoizeCapped"),oSe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,lSe=/\\(\\)?/g,F=Bfe(function(e){var n=[];return 46===e.charCodeAt(0)&&n.push(""),e.replace(oSe,function(e,t,r,i){n.push(r?i.replace(lSe,"$1"):t||e)}),n}),cSe=F,mt($fe,"toString2"),yt($fe,"toString"),hSe=$fe,mt(Ffe,"castPath"),yt(Ffe,"castPath"),uSe=Ffe,mt(zfe,"toKey"),yt(zfe,"toKey"),dSe=zfe,mt(qfe,"baseGet"),yt(qfe,"baseGet"),pSe=qfe,mt(jfe,"get"),yt(jfe,"get"),gSe=jfe,mt(Wfe,"arrayPush"),yt(Wfe,"arrayPush"),fSe=Wfe,mSe=fRe?fRe.isConcatSpreadable:void 0,mt(Ufe,"isFlattenable"),yt(Ufe,"isFlattenable"),ySe=Ufe,mt(Gfe,"baseFlatten"),yt(Gfe,"baseFlatten"),vSe=Gfe,mt(Vfe,"flatten"),yt(Vfe,"flatten"),bSe=Vfe,$Re=bLe(Object.getPrototypeOf,Object),xSe=$Re,mt(Yfe,"baseSlice"),yt(Yfe,"baseSlice"),TSe=Yfe,mt(Hfe,"arrayReduce"),yt(Hfe,"arrayReduce"),kSe=Hfe,mt(Xfe,"stackClear"),yt(Xfe,"stackClear"),ORe=Xfe,mt(Kfe,"stackDelete"),yt(Kfe,"stackDelete"),ALe=Kfe,mt(Zfe,"stackGet"),yt(Zfe,"stackGet"),z=Zfe,mt(Qfe,"stackHas"),yt(Qfe,"stackHas"),F=Qfe,mt(Jfe,"stackSet"),yt(Jfe,"stackSet"),bLe=Jfe,mt(e1e,"Stack"),yt(e1e,"Stack"),e1e.prototype.clear=ORe,e1e.prototype.delete=ALe,e1e.prototype.get=z,e1e.prototype.has=F,e1e.prototype.set=bLe,wSe=e1e,mt(t1e,"baseAssign"),yt(t1e,"baseAssign"),CSe=t1e,mt(r1e,"baseAssignIn"),yt(r1e,"baseAssignIn"),SSe=r1e,$Re="object"==typeof exports&&exports&&!exports.nodeType&&exports,ORe=$Re&&"object"==typeof module&&module&&!module.nodeType&&module,ALe=ORe&&ORe.exports===$Re?u9e.Buffer:void 0,ESe=ALe?ALe.allocUnsafe:void 0,mt(i1e,"cloneBuffer"),yt(i1e,"cloneBuffer"),_Se=i1e,mt(n1e,"arrayFilter"),yt(n1e,"arrayFilter"),ASe=n1e,mt(a1e,"stubArray"),yt(a1e,"stubArray"),z=a1e,F=Object.prototype,RSe=F.propertyIsEnumerable,ISe=(LSe=Object.getOwnPropertySymbols)?function(t){return null==t?[]:(t=Object(t),ASe(LSe(t),function(e){return RSe.call(t,e)}))}:z,mt(s1e,"copySymbols"),yt(s1e,"copySymbols"),NSe=s1e,bLe=Object.getOwnPropertySymbols,DSe=bLe?function(e){for(var t=[];e;)fSe(t,ISe(e)),e=xSe(e);return t}:z,mt(o1e,"copySymbolsIn"),yt(o1e,"copySymbolsIn"),MSe=o1e,mt(l1e,"baseGetAllKeys"),yt(l1e,"baseGetAllKeys"),OSe=l1e,mt(c1e,"getAllKeys"),yt(c1e,"getAllKeys"),PSe=c1e,mt(h1e,"getAllKeysIn"),yt(h1e,"getAllKeysIn"),BSe=h1e,ORe=VCe(u9e,"DataView"),$Re=ORe,ALe=VCe(u9e,"Promise"),F=ALe,bLe=VCe(u9e,"Set"),$Se=bLe,FSe="[object Map]",zSe="[object Promise]",qSe="[object Set]",jSe="[object WeakMap]",WSe="[object DataView]",USe=qCe($Re),GSe=qCe(tSe),VSe=qCe(F),YSe=qCe($Se),HSe=qCe(BRe),z=fCe,($Re&&z(new $Re(new ArrayBuffer(1)))!=WSe||tSe&&z(new tSe)!=FSe||F&&z(F.resolve())!=zSe||$Se&&z(new $Se)!=qSe||BRe&&z(new BRe)!=jSe)&&(z=yt(function(e){var t=fCe(e);if(e=(e="[object Object]"==t?e.constructor:void 0)?qCe(e):"")switch(e){case USe:return WSe;case GSe:return FSe;case VSe:return zSe;case YSe:return qSe;case HSe:return jSe}return t},"getTag")),XSe=z,ORe=Object.prototype,KSe=ORe.hasOwnProperty,mt(u1e,"initCloneArray"),yt(u1e,"initCloneArray"),ZSe=u1e,ALe=u9e.Uint8Array,QSe=ALe,mt(d1e,"cloneArrayBuffer"),yt(d1e,"cloneArrayBuffer"),JSe=d1e,mt(p1e,"cloneDataView"),yt(p1e,"cloneDataView"),eEe=p1e,tEe=/\w*$/,mt(g1e,"cloneRegExp"),yt(g1e,"cloneRegExp"),rEe=g1e,bLe=fRe?fRe.prototype:void 0,iEe=bLe?bLe.valueOf:void 0,mt(f1e,"cloneSymbol"),yt(f1e,"cloneSymbol"),nEe=f1e,mt(m1e,"cloneTypedArray"),yt(m1e,"cloneTypedArray"),aEe=m1e,mt(y1e,"initCloneByTag"),yt(y1e,"initCloneByTag"),sEe=y1e,mt(v1e,"initCloneObject"),yt(v1e,"initCloneObject"),oEe=v1e,mt(b1e,"baseIsMap"),yt(b1e,"baseIsMap"),$Re=b1e,F=v8e&&v8e.isMap,BRe=F?R6e(F):$Re,lEe=BRe,mt(x1e,"baseIsSet"),yt(x1e,"baseIsSet"),z=x1e,ORe=v8e&&v8e.isSet,u9e=ORe?R6e(ORe):z,cEe=u9e,hEe=1,uEe=2,dEe=4,gEe="[object Function]",fEe="[object GeneratorFunction]",mEe="[object Object]",(yEe={})[pEe="[object Arguments]"]=yEe["[object Array]"]=yEe["[object ArrayBuffer]"]=yEe["[object DataView]"]=yEe["[object Boolean]"]=yEe["[object Date]"]=yEe["[object Float32Array]"]=yEe["[object Float64Array]"]=yEe["[object Int8Array]"]=yEe["[object Int16Array]"]=yEe["[object Int32Array]"]=yEe["[object Map]"]=yEe["[object Number]"]=yEe[mEe]=yEe["[object RegExp]"]=yEe["[object Set]"]=yEe["[object String]"]=yEe["[object Symbol]"]=yEe["[object Uint8Array]"]=yEe["[object Uint8ClampedArray]"]=yEe["[object Uint16Array]"]=yEe["[object Uint32Array]"]=!0,yEe["[object Error]"]=yEe[gEe]=yEe["[object WeakMap]"]=!1,mt(T1e,"baseClone"),yt(T1e,"baseClone"),vEe=T1e,mt(k1e,"clone"),yt(k1e,"clone"),bEe=k1e,mt(w1e,"compact"),yt(w1e,"compact"),xEe=w1e,mt(C1e,"setCacheAdd"),yt(C1e,"setCacheAdd"),ALe=C1e,mt(S1e,"setCacheHas"),yt(S1e,"setCacheHas"),bLe=S1e,mt(E1e,"SetCache"),yt(E1e,"SetCache"),E1e.prototype.add=E1e.prototype.push=ALe,E1e.prototype.has=bLe,TEe=E1e,mt(_1e,"arraySome"),yt(_1e,"arraySome"),kEe=_1e,mt(A1e,"cacheHas"),yt(A1e,"cacheHas"),wEe=A1e,mt(R1e,"equalArrays"),yt(R1e,"equalArrays"),CEe=R1e,mt(L1e,"mapToArray"),yt(L1e,"mapToArray"),SEe=L1e,mt(I1e,"setToArray"),yt(I1e,"setToArray"),EEe=I1e,F=fRe?fRe.prototype:void 0,_Ee=F?F.valueOf:void 0,mt(N1e,"equalByTag"),yt(N1e,"equalByTag"),AEe=N1e,$Re=Object.prototype,REe=$Re.hasOwnProperty,mt(D1e,"equalObjects"),yt(D1e,"equalObjects"),LEe=D1e,IEe="[object Arguments]",NEe="[object Array]",DEe="[object Object]",BRe=Object.prototype,MEe=BRe.hasOwnProperty,mt(M1e,"baseIsEqualDeep"),yt(M1e,"baseIsEqualDeep"),OEe=M1e,mt(O1e,"baseIsEqual"),yt(O1e,"baseIsEqual"),PEe=O1e,mt(P1e,"baseIsMatch"),yt(P1e,"baseIsMatch"),BEe=P1e,mt(B1e,"isStrictComparable"),yt(B1e,"isStrictComparable"),$Ee=B1e,mt($1e,"getMatchData"),yt($1e,"getMatchData"),FEe=$1e,mt(F1e,"matchesStrictComparable"),yt(F1e,"matchesStrictComparable"),zEe=F1e,mt(z1e,"baseMatches"),yt(z1e,"baseMatches"),qEe=z1e,mt(q1e,"baseHasIn"),yt(q1e,"baseHasIn"),jEe=q1e,mt(j1e,"hasPath"),yt(j1e,"hasPath"),WEe=j1e,mt(W1e,"hasIn"),yt(W1e,"hasIn"),UEe=W1e,mt(U1e,"baseMatchesProperty"),yt(U1e,"baseMatchesProperty"),GEe=U1e,mt(G1e,"baseProperty"),yt(G1e,"baseProperty"),VEe=G1e,mt(V1e,"basePropertyDeep"),yt(V1e,"basePropertyDeep"),YEe=V1e,mt(Y1e,"property"),yt(Y1e,"property"),HEe=Y1e,mt(H1e,"baseIteratee"),yt(H1e,"baseIteratee"),XEe=H1e,mt(X1e,"arrayAggregator"),yt(X1e,"arrayAggregator"),KEe=X1e,mt(K1e,"createBaseFor"),yt(K1e,"createBaseFor"),ORe=K1e(),ZEe=ORe,mt(Z1e,"baseForOwn"),yt(Z1e,"baseForOwn"),z=Z1e,mt(Q1e,"createBaseEach"),yt(Q1e,"createBaseEach"),u9e=Q1e(z),QEe=u9e,mt(J1e,"baseAggregator"),yt(J1e,"baseAggregator"),JEe=J1e,mt(eme,"createAggregator"),yt(eme,"createAggregator"),ALe=eme,e_e=Object.prototype,t_e=e_e.hasOwnProperty,bLe=y6e(function(e,t){e=Object(e);var r=-1,i=t.length,n=2<i?t[2]:void 0;for(n&&x6e(t[0],t[1],n)&&(i=1);++r<i;)for(var a=t[r],s=U6e(a),o=-1,l=s.length;++o<l;){var c=s[o],h=e[c];(void 0===h||u6e(h,e_e[c])&&!t_e.call(e,c))&&(e[c]=a[c])}return e}),r_e=bLe,mt(tme,"isArrayLikeObject"),yt(tme,"isArrayLikeObject"),i_e=tme,mt(rme,"arrayIncludesWith"),yt(rme,"arrayIncludesWith"),n_e=rme,mt(ime,"baseDifference"),yt(ime,"baseDifference"),a_e=ime,fRe=y6e(function(e,t){return i_e(e)?a_e(e,vSe(t,1,i_e,!0)):[]}),s_e=fRe,mt(nme,"last"),yt(nme,"last"),o_e=nme,mt(ame,"drop"),yt(ame,"drop"),l_e=ame,mt(sme,"dropRight"),yt(sme,"dropRight"),c_e=sme,mt(ome,"castFunction"),yt(ome,"castFunction"),h_e=ome,mt(lme,"forEach"),yt(lme,"forEach"),u_e=lme,mt(cme,"arrayEvery"),yt(cme,"arrayEvery"),d_e=cme,mt(hme,"baseEvery"),yt(hme,"baseEvery"),p_e=hme,mt(ume,"every"),yt(ume,"every"),g_e=ume,mt(dme,"baseFilter"),yt(dme,"baseFilter"),f_e=dme,mt(pme,"filter"),yt(pme,"filter"),m_e=pme,mt(gme,"createFind"),yt(gme,"createFind"),F=gme,y_e=Math.max,mt(fme,"findIndex"),yt(fme,"findIndex"),$Re=F(fme),v_e=$Re,mt(mme,"head"),yt(mme,"head"),b_e=mme,mt(yme,"baseMap"),yt(yme,"baseMap"),x_e=yme,mt(vme,"map"),yt(vme,"map"),T_e=vme,mt(bme,"flatMap"),yt(bme,"flatMap"),k_e=bme,BRe=Object.prototype,w_e=BRe.hasOwnProperty,ORe=ALe(function(e,t,r){w_e.call(e,r)?e[r].push(t):h6e(e,r,[t])}),C_e=ORe,z=Object.prototype,S_e=z.hasOwnProperty,mt(xme,"baseHas"),yt(xme,"baseHas"),E_e=xme,mt(Tme,"has"),yt(Tme,"has"),__e=Tme,mt(kme,"isString"),yt(kme,"isString"),A_e=kme,mt(wme,"baseValues"),yt(wme,"baseValues"),R_e=wme,mt(Cme,"values"),yt(Cme,"values"),L_e=Cme,I_e=Math.max,mt(Sme,"includes"),yt(Sme,"includes"),N_e=Sme,D_e=Math.max,mt(Eme,"indexOf"),yt(Eme,"indexOf"),M_e=Eme,u9e=Object.prototype,O_e=u9e.hasOwnProperty,mt(_me,"isEmpty"),yt(_me,"isEmpty"),P_e=_me,mt(Ame,"baseIsRegExp"),yt(Ame,"baseIsRegExp"),bLe=Ame,fRe=v8e&&v8e.isRegExp,F=fRe?R6e(fRe):bLe,B_e=F,mt(Rme,"isUndefined"),yt(Rme,"isUndefined"),$_e=Rme,mt(Lme,"negate"),yt(Lme,"negate"),F_e=Lme,mt(Ime,"baseSet"),yt(Ime,"baseSet"),z_e=Ime,mt(Nme,"basePickBy"),yt(Nme,"basePickBy"),q_e=Nme,mt(Dme,"pickBy"),yt(Dme,"pickBy"),j_e=Dme,mt(Mme,"baseReduce"),yt(Mme,"baseReduce"),W_e=Mme,mt(Ome,"reduce"),yt(Ome,"reduce"),U_e=Ome,mt(Pme,"reject"),yt(Pme,"reject"),G_e=Pme,mt(Bme,"baseSome"),yt(Bme,"baseSome"),V_e=Bme,mt($me,"some"),yt($me,"some"),Y_e=$me,$Re=$Se&&1/EEe(new $Se([,-0]))[1]==1/0?function(e){return new $Se(e)}:KCe,H_e=$Re,mt(Fme,"baseUniq"),yt(Fme,"baseUniq"),X_e=Fme,mt(zme,"uniq"),yt(zme,"uniq"),K_e=zme,mt(qme,"PRINT_ERROR"),yt(qme,"PRINT_ERROR"),mt(jme,"PRINT_WARNING"),yt(jme,"PRINT_WARNING"),mt(Wme,"timer"),yt(Wme,"timer"),mt(Ume,"toFastProperties"),yt(Ume,"toFastProperties"),mt(Gme,"tokenLabel"),yt(Gme,"tokenLabel"),mt(Vme,"hasTokenLabel"),yt(Vme,"hasTokenLabel"),Z_e=class{static{mt(this,"AbstractProduction")}static{yt(this,"AbstractProduction")}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(t){t.visit(this),u_e(this.definition,e=>{e.accept(t)})}},Q_e=class extends Z_e{static{mt(this,"NonTerminal")}static{yt(this,"NonTerminal")}constructor(e){super([]),this.idx=1,z6e(this,j_e(e,e=>void 0!==e))}set definition(e){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(e){e.visit(this)}},J_e=class extends Z_e{static{mt(this,"Rule")}static{yt(this,"Rule")}constructor(e){super(e.definition),this.orgText="",z6e(this,j_e(e,e=>void 0!==e))}},e7e=class extends Z_e{static{mt(this,"Alternative")}static{yt(this,"Alternative")}constructor(e){super(e.definition),this.ignoreAmbiguities=!1,z6e(this,j_e(e,e=>void 0!==e))}},t7e=class extends Z_e{static{mt(this,"Option")}static{yt(this,"Option")}constructor(e){super(e.definition),this.idx=1,z6e(this,j_e(e,e=>void 0!==e))}},r7e=class extends Z_e{static{mt(this,"RepetitionMandatory")}static{yt(this,"RepetitionMandatory")}constructor(e){super(e.definition),this.idx=1,z6e(this,j_e(e,e=>void 0!==e))}},i7e=class extends Z_e{static{mt(this,"RepetitionMandatoryWithSeparator")}static{yt(this,"RepetitionMandatoryWithSeparator")}constructor(e){super(e.definition),this.idx=1,z6e(this,j_e(e,e=>void 0!==e))}},n7e=class extends Z_e{static{mt(this,"Repetition")}static{yt(this,"Repetition")}constructor(e){super(e.definition),this.idx=1,z6e(this,j_e(e,e=>void 0!==e))}},a7e=class extends Z_e{static{mt(this,"RepetitionWithSeparator")}static{yt(this,"RepetitionWithSeparator")}constructor(e){super(e.definition),this.idx=1,z6e(this,j_e(e,e=>void 0!==e))}},s7e=class extends Z_e{static{mt(this,"Alternation")}static{yt(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,z6e(this,j_e(e,e=>void 0!==e))}},o7e=class{static{mt(this,"Terminal")}static{yt(this,"Terminal")}constructor(e){this.idx=1,z6e(this,j_e(e,e=>void 0!==e))}accept(e){e.visit(this)}},mt(Yme,"serializeGrammar"),yt(Yme,"serializeGrammar"),mt(Hme,"serializeProduction"),yt(Hme,"serializeProduction"),BRe=class{static{mt(this,"GAstVisitor")}static{yt(this,"GAstVisitor")}visit(e){var t=e;switch(t.constructor){case Q_e:return this.visitNonTerminal(t);case e7e:return this.visitAlternative(t);case t7e:return this.visitOption(t);case r7e:return this.visitRepetitionMandatory(t);case i7e:return this.visitRepetitionMandatoryWithSeparator(t);case a7e:return this.visitRepetitionWithSeparator(t);case n7e:return this.visitRepetition(t);case s7e:return this.visitAlternation(t);case o7e:return this.visitTerminal(t);case J_e: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){}},mt(Xme,"isSequenceProd"),yt(Xme,"isSequenceProd"),mt(Kme,"isOptionalProd"),yt(Kme,"isOptionalProd"),mt(Zme,"isBranchingProd"),yt(Zme,"isBranchingProd"),mt(Qme,"getProductionDslName"),yt(Qme,"getProductionDslName"),ALe=class{static{mt(this,"RestWalker")}static{yt(this,"RestWalker")}walk(r,i=[]){u_e(r.definition,(e,t)=>{if(t=l_e(r.definition,t+1),e instanceof Q_e)this.walkProdRef(e,t,i);else if(e instanceof o7e)this.walkTerminal(e,t,i);else if(e instanceof e7e)this.walkFlat(e,t,i);else if(e instanceof t7e)this.walkOption(e,t,i);else if(e instanceof r7e)this.walkAtLeastOne(e,t,i);else if(e instanceof i7e)this.walkAtLeastOneSep(e,t,i);else if(e instanceof a7e)this.walkManySep(e,t,i);else if(e instanceof n7e)this.walkMany(e,t,i);else{if(!(e instanceof s7e))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 t7e({definition:e.definition})].concat(t,r),this.walk(e,t)}walkAtLeastOneSep(e,t,r){t=Jme(e,t,r),this.walk(e,t)}walkMany(e,t,r){t=[new t7e({definition:e.definition})].concat(t,r),this.walk(e,t)}walkManySep(e,t,r){t=Jme(e,t,r),this.walk(e,t)}walkOr(e,t,r){let i=t.concat(r);u_e(e.definition,e=>{e=new e7e({definition:[e]}),this.walk(e,i)})}},mt(Jme,"restForRepetitionWithSeparator"),yt(Jme,"restForRepetitionWithSeparator"),mt(eye,"first"),yt(eye,"first"),mt(tye,"firstForSequence"),yt(tye,"firstForSequence"),mt(rye,"firstForBranching"),yt(rye,"firstForBranching"),mt(iye,"firstForTerminal"),yt(iye,"firstForTerminal"),l7e=class extends ALe{static{mt(this,"ResyncFollowsWalker")}static{yt(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=aye(e.referencedRule,e.idx)+this.topProd.name,t=t.concat(r),r=eye(new e7e({definition:t})),this.follows[e]=r}},mt(nye,"computeAllProdsFollows"),yt(nye,"computeAllProdsFollows"),mt(aye,"buildBetweenProdsFollowPrefix"),yt(aye,"buildBetweenProdsFollowPrefix"),c7e={},h7e=new eLe,mt(sye,"getRegExpAst"),yt(sye,"getRegExpAst"),mt(oye,"clearRegExpParserCache"),yt(oye,"clearRegExpParserCache"),u7e="Complement Sets are not supported for first char optimization",d7e=`Unable to use "first char" lexer optimizations:
|
||
`,mt(lye,"getOptimizedStartCodesIndices"),yt(lye,"getOptimizedStartCodesIndices"),mt(cye,"firstCharOptimizedIndices"),yt(cye,"firstCharOptimizedIndices"),mt(hye,"addOptimizedIdxToResult"),yt(hye,"addOptimizedIdxToResult"),mt(uye,"handleIgnoreCase"),yt(uye,"handleIgnoreCase"),mt(dye,"findCode"),yt(dye,"findCode"),mt(pye,"isWholeOptional"),yt(pye,"isWholeOptional"),p7e=class extends rCe{static{mt(this,"CharCodeFinder")}static{yt(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){N_e(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?void 0===dye(e,this.targetCharCodes)&&(this.found=!0):void 0!==dye(e,this.targetCharCodes)&&(this.found=!0)}},mt(gye,"canMatchCharCode"),yt(gye,"canMatchCharCode"),g7e="PATTERN",f7e="defaultMode",m7e="boolean"==typeof new RegExp("(?:)").sticky,mt(fye,"analyzeTokenTypes"),yt(fye,"analyzeTokenTypes"),mt(mye,"validatePatterns"),yt(mye,"validatePatterns"),mt(yye,"validateRegExpPattern"),yt(yye,"validateRegExpPattern"),mt(vye,"findMissingPatterns"),yt(vye,"findMissingPatterns"),mt(bye,"findInvalidPatterns"),yt(bye,"findInvalidPatterns"),y7e=/[^\\][$]/,mt(xye,"findEndOfInputAnchor"),yt(xye,"findEndOfInputAnchor"),mt(Tye,"findEmptyMatchRegExps"),yt(Tye,"findEmptyMatchRegExps"),v7e=/[^\\[][\^]|^\^/,mt(kye,"findStartOfInputAnchor"),yt(kye,"findStartOfInputAnchor"),mt(wye,"findUnsupportedFlags"),yt(wye,"findUnsupportedFlags"),mt(Cye,"findDuplicatePatterns"),yt(Cye,"findDuplicatePatterns"),mt(Sye,"findInvalidGroupType"),yt(Sye,"findInvalidGroupType"),mt(Eye,"findModesThatDoNotExist"),yt(Eye,"findModesThatDoNotExist"),mt(_ye,"findUnreachablePatterns"),yt(_ye,"findUnreachablePatterns"),mt(Aye,"tryToMatchStrToPattern"),yt(Aye,"tryToMatchStrToPattern"),mt(Rye,"noMetaChar"),yt(Rye,"noMetaChar"),mt(Lye,"usesLookAheadOrBehind"),yt(Lye,"usesLookAheadOrBehind"),mt(Iye,"addStartOfInput"),yt(Iye,"addStartOfInput"),mt(Nye,"addStickyFlag"),yt(Nye,"addStickyFlag"),mt(Dye,"performRuntimeChecks"),yt(Dye,"performRuntimeChecks"),mt(Mye,"performWarningRuntimeChecks"),yt(Mye,"performWarningRuntimeChecks"),mt(Oye,"cloneEmptyGroups"),yt(Oye,"cloneEmptyGroups"),mt(Pye,"isCustomPattern"),yt(Pye,"isCustomPattern"),mt(Bye,"isShortPattern"),yt(Bye,"isShortPattern"),b7e={test:yt(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($ye,"checkLineBreaksIssues"),yt($ye,"checkLineBreaksIssues"),mt(Fye,"buildLineBreakIssueMessage"),yt(Fye,"buildLineBreakIssueMessage"),mt(zye,"getCharCodes"),yt(zye,"getCharCodes"),mt(qye,"addToMapOfArrays"),yt(qye,"addToMapOfArrays"),x7e=256,T7e=[],mt(jye,"charCodeToOptimizedIndex"),yt(jye,"charCodeToOptimizedIndex"),mt(Wye,"initCharCodeToOptimizedIndexMap"),yt(Wye,"initCharCodeToOptimizedIndexMap"),mt(Uye,"tokenStructuredMatcher"),yt(Uye,"tokenStructuredMatcher"),mt(Gye,"tokenStructuredMatcherNoCategories"),yt(Gye,"tokenStructuredMatcherNoCategories"),k7e=1,w7e={},mt(Vye,"augmentTokenTypes"),yt(Vye,"augmentTokenTypes"),mt(Yye,"expandCategories"),yt(Yye,"expandCategories"),mt(Hye,"assignTokenDefaultProps"),yt(Hye,"assignTokenDefaultProps"),mt(Xye,"assignCategoriesTokensProp"),yt(Xye,"assignCategoriesTokensProp"),mt(Kye,"assignCategoriesMapProp"),yt(Kye,"assignCategoriesMapProp"),mt(Zye,"singleAssignCategoriesToksMap"),yt(Zye,"singleAssignCategoriesToksMap"),mt(Qye,"hasShortKeyProperty"),yt(Qye,"hasShortKeyProperty"),mt(Jye,"hasCategoriesProperty"),yt(Jye,"hasCategoriesProperty"),mt(e2e,"hasExtendingTokensTypesProperty"),yt(e2e,"hasExtendingTokensTypesProperty"),mt(t2e,"hasExtendingTokensTypesMapProperty"),yt(t2e,"hasExtendingTokensTypesMapProperty"),mt(r2e,"isTokenType"),yt(r2e,"isTokenType"),C7e={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.`}},(E=S7e=S7e||{})[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",E7e={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
|
||
`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:C7e,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0},Object.freeze(E7e),(_7e=class{static{mt(this,"Lexer")}static{yt(this,"Lexer")}constructor(n,a=E7e){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}>`),Wme(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=z6e({},E7e,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===E7e.lineTerminatorsPattern)this.config.lineTerminatorsPattern=b7e;else if(this.config.lineTerminatorCharacters===E7e.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=bCe(n)?{modes:{defaultMode:bEe(n)},defaultMode:f7e}:(e=!1,bEe(n))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Dye(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(Mye(r,this.trackStartLines,this.config.lineTerminatorCharacters))})),r.modes=r.modes||{},u_e(r.modes,(e,t)=>{r.modes[t]=G_e(e,e=>$_e(e))}),$6e(r.modes)),t;if(u_e(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(mye(t,i))}),P_e(this.lexerDefinitionErrors)){Vye(t);let e;this.TRACE_INIT("analyzeTokenTypes",()=>{e=fye(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=z6e({},this.emptyGroups,e.emptyGroups),this.hasCustom=e.hasCustom||this.hasCustom,this.canModeBeOptimized[r]=e.canBeOptimized}})}),this.defaultMode=r.defaultMode,!P_e(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling)throw t=T_e(this.lexerDefinitionErrors,e=>e.message).join(`-----------------------
|
||
`),new Error(`Errors detected in definition of Lexer:
|
||
`+t);u_e(this.lexerDefinitionWarning,e=>{jme(e.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(m7e?(this.chopInput=PCe,this.match=this.matchWithTest):(this.updateLastIndex=KCe,this.match=this.matchWithExec),e&&(this.handleModes=KCe),!1===this.trackStartLines&&(this.computeNewColumn=PCe),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=KCe),/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=U_e(this.canModeBeOptimized,(e,t,r)=>(!1===t&&e.push(r),e),[]);if(a.ensureOptimizations&&!P_e(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",()=>{oye()}),this.TRACE_INIT("toFastProperties",()=>{Ume(this)})})}tokenize(e,t=this.defaultMode){if(P_e(this.lexerDefinitionErrors))return this.tokenizeInternal(e,t);throw e=T_e(this.lexerDefinitionErrors,e=>e.message).join(`-----------------------
|
||
`),new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
|
||
`+e)}tokenizeInternal(n,P){let e,a,t,r,i,s,o,l,c,h,B,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=[],b=this.trackStartLines?1:void 0,x=this.trackStartLines?1:void 0,T=Oye(this.emptyGroups),q=this.trackStartLines,k=this.config.lineTerminatorsPattern,w=0,C=[],S=[],E=[],j=[];Object.freeze(j);let _;function A(){return C}function R(e){return e=jye(e),void 0===(e=S[e])?j:e}mt(A,"getPossiblePatternsSlow"),yt(A,"getPossiblePatternsSlow"),mt(R,"getPossiblePatternsOptimized"),yt(R,"getPossiblePatternsOptimized");var W=yt(e=>{var t;1===E.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})):(E.pop(),e=o_e(E),C=this.patternIdxToConfig[e],S=this.charCodeToPatternIdxToConfig[e],w=C.length,t=this.canModeBeOptimized[e]&&!1===this.config.safeMode,_=S&&t?R:A)},"pop_mode");function L(e){E.push(e),S=this.charCodeToPatternIdxToConfig[e],C=this.patternIdxToConfig[e],w=C.length,w=C.length,e=this.canModeBeOptimized[e]&&!1===this.config.safeMode,_=S&&e?R:A}mt(L,"push_mode"),yt(L,"push_mode"),L.call(this,P);let I,U=this.config.recoveryEnabled;for(;f<F;){s=null;var G=g.charCodeAt(f),V=_(G),Y=V.length;for(e=0;e<Y;e++){var N=(I=V[e]).pattern,H=(o=null,I.short);if(!1!==H?G===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(c=s.length,void 0!==(h=I.group)&&(B=I.tokenTypeIdx,u=this.createTokenInstance(s,f,B,I.tokenType,b,x,c),this.handlePayload(u,o),!1===h?m=this.addToken(y,m,u):T[h].push(u)),n=this.chopInput(n,c),f+=c,x=this.computeNewColumn(x,c),!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&&(b+=e,x=c-r,this.updateTokenEndLineColumnLocation(u,h,r,e,b,x,c))}this.handleModes(I,W,L,u)}else{let e=f,t=b,r=x,i=!1===U;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,x=this.computeNewColumn(x,d),$=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(g,e,d,t,r,o_e(E)),v.push({offset:e,line:t,column:r,length:d,message:$}),!1===U)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.",_7e.NA=/NOT_APPLICABLE/,mt(i2e,"tokenLabel2"),yt(i2e,"tokenLabel"),mt(n2e,"hasTokenLabel2"),yt(n2e,"hasTokenLabel"),A7e="parent",R7e="categories",L7e="label",I7e="group",N7e="push_mode",D7e="pop_mode",M7e="longer_alt",O7e="line_breaks",P7e="start_chars_hint",mt(a2e,"createToken"),yt(a2e,"createToken"),mt(s2e,"createTokenInternal"),yt(s2e,"createTokenInternal"),Vye([B7e=a2e({name:"EOF",pattern:_7e.NA})]),mt(o2e,"createTokenInstance"),yt(o2e,"createTokenInstance"),mt(l2e,"tokenMatcher"),yt(l2e,"tokenMatcher"),$7e={buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${n2e(e)?`--> ${i2e(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: '`+b_e(t).image+"'";return r?i+r+t:(r=U_e(e,(e,t)=>e.concat(t),[]),e=T_e(r,e=>`[${T_e(e,e=>i2e(e)).join(", ")}]`),i+`one of these possible Token sequences:
|
||
`+T_e(e,(e,t)=>` ${t+1}. `+e).join(`
|
||
`)+t)},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r}){var i="Expecting: ",t=`
|
||
but found: '`+b_e(t).image+"'";return r?i+r+t:i+`expecting at least one iteration which starts with one of these possible Token sequences::
|
||
<${T_e(e,e=>`[${T_e(e,e=>i2e(e)).join(",")}]`).join(" ,")}>`+t}},Object.freeze($7e),F7e={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<-
|
||
inside top level rule: ->`+e.name+"<-"}},z7e={buildDuplicateFoundError(e,t){function r(e){return e instanceof o7e?e.terminalType.name:e instanceof Q_e?e.nonTerminalName:""}mt(r,"getExtraProductionArgument2"),yt(r,"getExtraProductionArgument");let i=e.name,n=b_e(t),a=n.idx,s=Qme(n),o=r(n),l=0<a,c=`->${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 c=(c=c.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=T_e(e.prefixPath,e=>i2e(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=T_e(e.prefixPath,e=>i2e(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=Qme(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 "+T_e(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 J_e?e.topLevelRule.name:e.topLevelRule}<- is already defined in the grammar: ->${e.grammarName}<-`}},mt(c2e,"resolveGrammar"),yt(c2e,"resolveGrammar"),q7e=class extends BRe{static{mt(this,"GastRefResolverVisitor")}static{yt(this,"GastRefResolverVisitor")}constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){u_e(L_e(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:y8e.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName}))}},ORe=class extends ALe{static{mt(this,"AbstractNextPossibleTokensWalker")}static{yt(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=bEe(this.path.ruleStack).reverse(),this.occurrenceStack=bEe(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(){P_e(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},j7e=class extends ORe{static{mt(this,"NextAfterTokenWalker")}static{yt(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 e7e({definition:e}),this.possibleTokTypes=eye(t),this.found=!0)}},z=class extends ALe{static{mt(this,"AbstractNextTerminalAfterProductionWalker")}static{yt(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}},W7e=class extends z{static{mt(this,"NextTerminalAfterManyWalker")}static{yt(this,"NextTerminalAfterManyWalker")}walkMany(e,t,r){var i;e.idx===this.occurrence?(i=b_e(t.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof o7e&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkMany(e,t,r)}},U7e=class extends z{static{mt(this,"NextTerminalAfterManySepWalker")}static{yt(this,"NextTerminalAfterManySepWalker")}walkManySep(e,t,r){var i;e.idx===this.occurrence?(i=b_e(t.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof o7e&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkManySep(e,t,r)}},G7e=class extends z{static{mt(this,"NextTerminalAfterAtLeastOneWalker")}static{yt(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(e,t,r){var i;e.idx===this.occurrence?(i=b_e(t.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof o7e&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkAtLeastOne(e,t,r)}},V7e=class extends z{static{mt(this,"NextTerminalAfterAtLeastOneSepWalker")}static{yt(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(e,t,r){var i;e.idx===this.occurrence?(i=b_e(t.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof o7e&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkAtLeastOneSep(e,t,r)}},mt(h2e,"possiblePathsFrom"),yt(h2e,"possiblePathsFrom"),mt(u2e,"nextPossibleTokensAfter"),yt(u2e,"nextPossibleTokensAfter"),mt(d2e,"expandTopLevelRule"),yt(d2e,"expandTopLevelRule"),(E=Y7e=Y7e||{})[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(p2e,"getProdType"),yt(p2e,"getProdType"),mt(g2e,"getLookaheadPaths"),yt(g2e,"getLookaheadPaths"),mt(f2e,"buildLookaheadFuncForOr"),yt(f2e,"buildLookaheadFuncForOr"),mt(m2e,"buildLookaheadFuncForOptionalProd"),yt(m2e,"buildLookaheadFuncForOptionalProd"),mt(y2e,"buildAlternativesLookAheadFunc"),yt(y2e,"buildAlternativesLookAheadFunc"),mt(v2e,"buildSingleAlternativeLookaheadFunction"),yt(v2e,"buildSingleAlternativeLookaheadFunction"),H7e=class extends ALe{static{mt(this,"RestDefinitionFinderWalker")}static{yt(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,Y7e.OPTION,t,r)||super.walkOption(e,t,r)}walkAtLeastOne(e,t,r){this.checkIsTarget(e,Y7e.REPETITION_MANDATORY,t,r)||super.walkOption(e,t,r)}walkAtLeastOneSep(e,t,r){this.checkIsTarget(e,Y7e.REPETITION_MANDATORY_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}walkMany(e,t,r){this.checkIsTarget(e,Y7e.REPETITION,t,r)||super.walkOption(e,t,r)}walkManySep(e,t,r){this.checkIsTarget(e,Y7e.REPETITION_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}},X7e=class extends BRe{static{mt(this,"InsideDefinitionFinderVisitor")}static{yt(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,Y7e.OPTION)}visitRepetition(e){this.checkIsTarget(e,Y7e.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Y7e.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Y7e.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Y7e.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Y7e.ALTERNATION)}},mt(b2e,"initializeArrayOfArrays"),yt(b2e,"initializeArrayOfArrays"),mt(x2e,"pathToHashKeys"),yt(x2e,"pathToHashKeys"),mt(T2e,"isUniquePrefixHash"),yt(T2e,"isUniquePrefixHash"),mt(k2e,"lookAheadSequenceFromAlternatives"),yt(k2e,"lookAheadSequenceFromAlternatives"),mt(w2e,"getLookaheadPathsForOr"),yt(w2e,"getLookaheadPathsForOr"),mt(C2e,"getLookaheadPathsForOptionalProd"),yt(C2e,"getLookaheadPathsForOptionalProd"),mt(S2e,"containsPath"),yt(S2e,"containsPath"),mt(E2e,"isStrictPrefixOfPath"),yt(E2e,"isStrictPrefixOfPath"),mt(_2e,"areTokenCategoriesNotUsed"),yt(_2e,"areTokenCategoriesNotUsed"),mt(A2e,"validateLookahead"),yt(A2e,"validateLookahead"),mt(R2e,"validateGrammar"),yt(R2e,"validateGrammar"),mt(L2e,"validateDuplicateProductions"),yt(L2e,"validateDuplicateProductions"),mt(I2e,"identifyProductionForDuplicates"),yt(I2e,"identifyProductionForDuplicates"),mt(N2e,"getExtraProductionArgument"),yt(N2e,"getExtraProductionArgument"),K7e=class extends BRe{static{mt(this,"OccurrenceValidationCollector")}static{yt(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(D2e,"validateRuleDoesNotAlreadyExist"),yt(D2e,"validateRuleDoesNotAlreadyExist"),mt(M2e,"validateRuleIsOverridden"),yt(M2e,"validateRuleIsOverridden"),mt(O2e,"validateNoLeftRecursion"),yt(O2e,"validateNoLeftRecursion"),mt(P2e,"getFirstNoneTerminal"),yt(P2e,"getFirstNoneTerminal"),Z7e=class extends BRe{static{mt(this,"OrCollector")}static{yt(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}},mt(B2e,"validateEmptyOrAlternative"),yt(B2e,"validateEmptyOrAlternative"),mt($2e,"validateAmbiguousAlternationAlternatives"),yt($2e,"validateAmbiguousAlternationAlternatives"),Q7e=class extends BRe{static{mt(this,"RepetitionCollector")}static{yt(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(F2e,"validateTooManyAlts"),yt(F2e,"validateTooManyAlts"),mt(z2e,"validateSomeNonEmptyLookaheadPath"),yt(z2e,"validateSomeNonEmptyLookaheadPath"),mt(q2e,"checkAlternativesAmbiguities"),yt(q2e,"checkAlternativesAmbiguities"),mt(j2e,"checkPrefixAlternativesAmbiguities"),yt(j2e,"checkPrefixAlternativesAmbiguities"),mt(W2e,"checkTerminalAndNoneTerminalsNameSpace"),yt(W2e,"checkTerminalAndNoneTerminalsNameSpace"),mt(U2e,"resolveGrammar2"),yt(U2e,"resolveGrammar"),mt(G2e,"validateGrammar2"),yt(G2e,"validateGrammar"),J7e=["MismatchedTokenException","NoViableAltException","EarlyExitException","NotAllInputParsedException"],Object.freeze(J7e),mt(V2e,"isRecognitionException"),yt(V2e,"isRecognitionException"),u9e=class extends Error{static{mt(this,"RecognitionException")}static{yt(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)}},e8e=class extends u9e{static{mt(this,"MismatchedTokenException")}static{yt(this,"MismatchedTokenException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name="MismatchedTokenException"}},t8e=class extends u9e{static{mt(this,"NoViableAltException")}static{yt(this,"NoViableAltException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name="NoViableAltException"}},r8e=class extends u9e{static{mt(this,"NotAllInputParsedException")}static{yt(this,"NotAllInputParsedException")}constructor(e,t){super(e,t),this.name="NotAllInputParsedException"}},i8e=class extends u9e{static{mt(this,"EarlyExitException")}static{yt(this,"EarlyExitException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name="EarlyExitException"}},n8e={},a8e="InRuleRecoveryException",s8e=class extends Error{static{mt(this,"InRuleRecoveryException")}static{yt(this,"InRuleRecoveryException")}constructor(e){super(e),this.name=a8e}},v8e=class{static{mt(this,"Recoverable")}static{yt(this,"Recoverable")}initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(__e(e,"recoveryEnabled")?e:f8e).recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Y2e)}getTokenToInsert(e){return(e=o2e(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),c=this.LA(1),h=yt(()=>{var e=this.LA(0),e=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:l,previous:e,ruleName:this.getCurrRuleFullName()});(e=new e8e(e,l,this.LA(0))).resyncedTokens=c_e(s),this.SAVE_ERROR(e)},"generateErrorMessage");for(;!o;){if(this.tokenMatcher(c,i))return void h();if(r.call(this))return h(),void e.apply(this,t);this.tokenMatcher(c,n)?o=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,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 s8e("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||P_e(t))return!1;let r=this.LA(1);return void 0!==v_e(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 N_e(t,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA(1),r=2;for(;;){var i=v_e(e,e=>l2e(t,e));if(void 0!==i)return i;t=this.LA(r),r++}}getCurrFollowKey(){var e,t,r;return 1===this.RULE_STACK.length?n8e:(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 T_e(r,(e,t)=>0===t?n8e:{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:i[t],inRule:this.shortRuleNameToFullName(r[t-1])})}flattenFollowSet(){var e=T_e(this.buildFullFollowKeyStack(),e=>this.getFollowSetFromFollowKey(e));return bSe(e)}getFollowSetFromFollowKey(e){return e===n8e?[B7e]:(e=e.ruleName+e.idxInCallingRule+"_~IN~_"+e.inRule,this.resyncFollows[e])}addToResyncTokens(e,t){return this.tokenMatcher(e,B7e)||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 c_e(t)}attemptInRepetitionRecovery(e,t,r,i,n,a,s){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:bEe(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return T_e(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}},mt(Y2e,"attemptInRepetitionRecovery"),yt(Y2e,"attemptInRepetitionRecovery"),mt(H2e,"getKeyForAutomaticLookahead"),yt(H2e,"getKeyForAutomaticLookahead"),o8e=class{static{mt(this,"LLkLookaheadStrategy")}static{yt(this,"LLkLookaheadStrategy")}constructor(e){this.maxLookahead=null!=(e=e?.maxLookahead)?e:f8e.maxLookahead}validate(e){var t,r,i=this.validateNoLeftRecursion(e.rules);return P_e(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 k_e(e,e=>O2e(e,e,z7e))}validateEmptyOrAlternatives(e){return k_e(e,e=>B2e(e,z7e))}validateAmbiguousAlternationAlternatives(e,t){return k_e(e,e=>$2e(e,t,z7e))}validateSomeNonEmptyLookaheadPath(e,t){return z2e(e,t,z7e)}buildLookaheadForAlternation(e){return f2e(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,y2e)}buildLookaheadForOptional(e){return m2e(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,p2e(e.prodType),v2e)}},fRe=class{static{mt(this,"LooksAhead")}static{yt(this,"LooksAhead")}initLooksAhead(e){this.dynamicTokensEnabled=(__e(e,"dynamicTokensEnabled")?e:f8e).dynamicTokensEnabled,this.maxLookahead=(__e(e,"maxLookahead")?e:f8e).maxLookahead,this.lookaheadStrategy=__e(e,"lookaheadStrategy")?e.lookaheadStrategy:new o8e({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){u_e(e,s=>{this.TRACE_INIT(s.name+" Rule Lookahead",()=>{var{alternation:e,repetition:t,option:r,repetitionMandatory:i,repetitionMandatoryWithSeparator:n,repetitionWithSeparator:a}=X2e(s);u_e(e,r=>{var e=0===r.idx?"":r.idx;this.TRACE_INIT(""+Qme(r)+e,()=>{var e=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:r.idx,rule:s,maxLookahead:r.maxLookahead||this.maxLookahead,hasPredicates:r.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),t=H2e(this.fullRuleNameToShort[s.name],256,r.idx);this.setLaFuncCache(t,e)})}),u_e(t,e=>{this.computeLookaheadFunc(s,e.idx,768,"Repetition",e.maxLookahead,Qme(e))}),u_e(r,e=>{this.computeLookaheadFunc(s,e.idx,512,"Option",e.maxLookahead,Qme(e))}),u_e(i,e=>{this.computeLookaheadFunc(s,e.idx,1024,"RepetitionMandatory",e.maxLookahead,Qme(e))}),u_e(n,e=>{this.computeLookaheadFunc(s,e.idx,1536,"RepetitionMandatoryWithSeparator",e.maxLookahead,Qme(e))}),u_e(a,e=>{this.computeLookaheadFunc(s,e.idx,1280,"RepetitionWithSeparator",e.maxLookahead,Qme(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=H2e(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)}},bLe=class extends BRe{static{mt(this,"DslMethodsCollectorVisitor")}static{yt(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)}},l8e=new bLe,mt(X2e,"collectMethods"),yt(X2e,"collectMethods"),mt(K2e,"setNodeLocationOnlyOffset"),yt(K2e,"setNodeLocationOnlyOffset"),mt(Z2e,"setNodeLocationFull"),yt(Z2e,"setNodeLocationFull"),mt(Q2e,"addTerminalToCst"),yt(Q2e,"addTerminalToCst"),mt(J2e,"addNoneTerminalToCst"),yt(J2e,"addNoneTerminalToCst"),mt(eve,"defineNameProp"),yt(eve,"defineNameProp"),mt(tve,"defaultVisit"),yt(tve,"defaultVisit"),mt(rve,"createBaseSemanticVisitorConstructor"),yt(rve,"createBaseSemanticVisitorConstructor"),mt(ive,"createBaseVisitorConstructorWithDefaults"),yt(ive,"createBaseVisitorConstructorWithDefaults"),(E=c8e=c8e||{})[E.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",E[E.MISSING_METHOD=1]="MISSING_METHOD",mt(nve,"validateVisitor"),yt(nve,"validateVisitor"),mt(ave,"validateMissingCstMethods"),yt(ave,"validateMissingCstMethods"),F=class{static{mt(this,"TreeBuilder")}static{yt(this,"TreeBuilder")}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(__e(e,"nodeLocationTracking")?e:f8e).nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Z2e,this.setNodeLocationFromNode=Z2e,this.cstPostRule=KCe,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=KCe,this.setNodeLocationFromNode=KCe,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=K2e,this.setNodeLocationFromNode=K2e,this.cstPostRule=KCe,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=KCe,this.setNodeLocationFromNode=KCe,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=KCe,this.setNodeLocationFromNode=KCe,this.cstPostRule=KCe,this.setInitialNodeLocation=KCe}else this.cstInvocationStateUpdate=KCe,this.cstFinallyStateUpdate=KCe,this.cstPostTerminal=KCe,this.cstPostNonTerminal=KCe,this.cstPostRule=KCe}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];Q2e(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){var r=this.CST_STACK[this.CST_STACK.length-1];J2e(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){var e;return $_e(this.baseCstVisitorConstructor)?(e=rve(this.className,$6e(this.gastProductionsCache)),this.baseCstVisitorConstructor=e):this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){var e;return $_e(this.baseCstVisitorWithDefaultsConstructor)?(e=ive(this.className,$6e(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]}},$Re=class{static{mt(this,"LexerAdapter")}static{yt(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)):g8e}LA(e){return(e=this.currIdx+e)<0||this.tokVectorLength<=e?g8e: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()}},eLe=class{static{mt(this,"RecognizerApi")}static{yt(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=m8e){N_e(this.definedRulesNames,e)&&(i={message:z7e.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:y8e.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=m8e){var i=M2e(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(V2e(e))return!1;throw e}finally{this.reloadRecogState(e),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Yme(L_e(this.gastProductionsCache))}},ORe=class{static{mt(this,"RecognizerEngine")}static{yt(this,"RecognizerEngine")}initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Gye,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},__e(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(bCe(e)){if(P_e(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(bCe(e))this.tokensMap=U_e(e,(e,t)=>(e[t.name]=t,e),{});else if(__e(e,"modes")&&g_e(bSe(L_e(e.modes)),r2e))t=bSe(L_e(e.modes)),t=K_e(t),this.tokensMap=U_e(t,(e,t)=>(e[t.name]=t,e),{});else{if(!_Ce(e))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=bEe(e)}this.tokensMap.EOF=B7e,t=__e(e,"modes")?bSe(L_e(e.modes)):L_e(e),e=g_e(t,e=>P_e(e.categoryMatches)),this.tokenMatcher=e?Gye:Uye,Vye(L_e(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=(__e(e,"resyncEnabled")?e:m8e).resyncEnabled,a=(__e(e,"recoveryValueFunc")?e:m8e).recoveryValueFunc,s=this.ruleShortNameIdx<<12;return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=r,this.fullRuleNameToShort[r]=s,e=!0===this.outputCst?yt(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()}},"invokeRuleWithTry2"),"invokeRuleWithTry"):yt(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"),"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(V2e(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=yt(()=>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=yt(()=>t.call(this)&&e.call(this),"lookAheadFunc")}}else n=r;if(!0!==i.call(this))throw this.raiseEarlyExitException(e,Y7e.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,G7e)}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,Y7e.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);for(i.call(this),r=yt(()=>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,V7e],r,1536,e,V7e)}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=yt(()=>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,W7e,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=yt(()=>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,U7e],t,1280,e,U7e)}}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=bCe(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 r8e(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 V2e(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 e8e(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===a8e?r:e}}saveRecogState(){var e=this.errors,t=bEe(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),B7e)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},z=class{static{mt(this,"ErrorHandler")}static{yt(this,"ErrorHandler")}initErrorHandler(e){this._errors=[],this.errorMessageProvider=(__e(e,"errorMessageProvider")?e:f8e).errorMessageProvider}SAVE_ERROR(e){if(V2e(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:bEe(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return bEe(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 i8e(t,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){var r=this.getCurrRuleFullName(),e=w2e(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 t8e(e,this.LA(1),r))}},ALe=class{static{mt(this,"ContentAssist")}static{yt(this,"ContentAssist")}initContentAssist(){}computeContentAssist(e,t){var r=this.gastProductionsCache[e];if($_e(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return u2e([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){var t=b_e(e.ruleStack),t=this.getGAstProductions()[t];return new j7e(t,e).startWalking()}},h8e={description:"This Object indicates the Parser is during Recording Phase"},Object.freeze(h8e),u8e=Math.pow(2,8)-1,Vye([u9e=a2e({name:"RECORDING_PHASE_TOKEN",pattern:_7e.NA})]),d8e=o2e(u9e,`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(d8e),p8e={name:`This CSTNode indicates the Parser is in Recording Phase
|
||
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},BRe=class{static{mt(this,"GastRecorder")}static{yt(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 g8e}topLevelRuleRecord(e,t){try{var r=new J_e({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 sve.call(this,t7e,e,t)}atLeastOneInternalRecord(e,t){sve.call(this,r7e,t,e)}atLeastOneSepFirstInternalRecord(e,t){sve.call(this,i7e,t,e,!0)}manyInternalRecord(e,t){sve.call(this,n7e,t,e)}manySepFirstInternalRecord(e,t){sve.call(this,a7e,t,e,!0)}orInternalRecord(e,t){return ove.call(this,e,t)}subruleInternalRecord(e,t,r){var i,n;if(cve(t),e&&!1!==__e(e,"ruleName"))return i=o_e(this.recordingProdStack),n=e.ruleName,n=new Q_e({idx:t,nonTerminalName:n,label:r?.LABEL,referencedRule:void 0}),i.definition.push(n),this.outputCst?p8e:h8e;throw(r=new Error(`<SUBRULE${lve(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(cve(t),Qye(e))return i=o_e(this.recordingProdStack),r=new o7e({idx:t,terminalType:e,label:r?.LABEL}),i.definition.push(r),d8e;throw(i=new Error(`<CONSUME${lve(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(sve,"recordProd"),yt(sve,"recordProd"),mt(ove,"recordOrProd"),yt(ove,"recordOrProd"),mt(lve,"getIdxSuffix"),yt(lve,"getIdxSuffix"),mt(cve,"assertMethodIdxIsValid"),yt(cve,"assertMethodIdxIsValid"),bLe=class{static{mt(this,"PerformanceTracer")}static{yt(this,"PerformanceTracer")}initPerformanceTracer(e){var t;__e(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=f8e.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}>`),Wme(t)),a=10<i?console.warn:console.log,this.traceInitIndent<this.traceInitMaxIdent&&a(r+`<-- <${e}> time: ${i}ms`),this.traceInitIndent--,n):t()}},mt(hve,"applyMixins"),yt(hve,"applyMixins"),g8e=o2e(B7e,"",NaN,NaN,NaN,NaN,NaN,NaN),Object.freeze(g8e),f8e=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:$7e,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),m8e=Object.freeze({recoveryValueFunc:yt(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),(E=y8e=y8e||{})[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(uve,"EMPTY_ALT"),yt(uve,"EMPTY_ALT"),(u9e=class B{static{mt(this,"_Parser")}static{yt(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",()=>{Ume(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),u_e(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=U2e({rules:L_e(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(i)}),this.TRACE_INIT("Grammar Validations",()=>{var e,t;P_e(i)&&!1===this.skipValidations&&(e=G2e({rules:L_e(this.gastProductionsCache),tokenTypes:L_e(this.tokensMap),errMsgProvider:z7e,grammarName:r}),t=A2e({lookaheadStrategy:this.lookaheadStrategy,rules:L_e(this.gastProductionsCache),tokenTypes:L_e(this.tokensMap),grammarName:r}),this.definitionErrors=this.definitionErrors.concat(e,t))}),P_e(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{var e=nye(L_e(this.gastProductionsCache));this.resyncFollows=e}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var e,t;null!=(t=(e=this.lookaheadStrategy).initialize)&&t.call(e,{rules:L_e(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(L_e(this.gastProductionsCache))})),!B.DEFER_DEFINITION_ERRORS_HANDLING&&!P_e(this.definitionErrors))throw e=T_e(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),__e(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=(__e(t,"skipValidations")?t:f8e).skipValidations}}).DEFER_DEFINITION_ERRORS_HANDLING=!1,hve(u9e,[v8e,fRe,F,$Re,ORe,eLe,z,ALe,BRe,bLe]),v8e=class extends u9e{static{mt(this,"EmbeddedActionsParser")}static{yt(this,"EmbeddedActionsParser")}constructor(e,t=f8e){(t=bEe(t)).outputCst=!1,super(e,t)}},mt(dve,"arrayMap2"),yt(dve,"arrayMap"),b8e=dve,mt(pve,"listCacheClear2"),yt(pve,"listCacheClear"),fRe=pve,mt(gve,"eq2"),yt(gve,"eq"),x8e=gve,mt(fve,"assocIndexOf2"),yt(fve,"assocIndexOf"),T8e=fve,F=Array.prototype,k8e=F.splice,mt(mve,"listCacheDelete2"),yt(mve,"listCacheDelete"),$Re=mve,mt(yve,"listCacheGet2"),yt(yve,"listCacheGet"),ORe=yve,mt(vve,"listCacheHas2"),yt(vve,"listCacheHas"),eLe=vve,mt(bve,"listCacheSet2"),yt(bve,"listCacheSet"),z=bve,mt(xve,"ListCache2"),yt(xve,"ListCache"),xve.prototype.clear=fRe,xve.prototype.delete=$Re,xve.prototype.get=ORe,xve.prototype.has=eLe,xve.prototype.set=z,w8e=xve,mt(Tve,"stackClear2"),yt(Tve,"stackClear"),ALe=Tve,mt(kve,"stackDelete2"),yt(kve,"stackDelete"),BRe=kve,mt(wve,"stackGet2"),yt(wve,"stackGet"),bLe=wve,mt(Cve,"stackHas2"),yt(Cve,"stackHas"),u9e=Cve,F="object"==typeof global&&global&&global.Object===Object&&global,fRe=F,$Re="object"==typeof self&&self&&self.Object===Object&&self,ORe=fRe||$Re||Function("return this")(),z=(eLe=ORe).Symbol,F=z,$Re=Object.prototype,C8e=$Re.hasOwnProperty,S8e=$Re.toString,E8e=F?F.toStringTag:void 0,mt(Sve,"getRawTag2"),yt(Sve,"getRawTag"),_8e=Sve,ORe=Object.prototype,A8e=ORe.toString,mt(Eve,"objectToString2"),yt(Eve,"objectToString"),R8e=Eve,L8e=F?F.toStringTag:void 0,mt(_ve,"baseGetTag2"),yt(_ve,"baseGetTag"),I8e=_ve,mt(Ave,"isObject2"),yt(Ave,"isObject"),N8e=Ave,mt(Rve,"isFunction2"),yt(Rve,"isFunction"),D8e=Rve,z=eLe["__core-js_shared__"],E=/[^.]+$/.exec(($Re=z)&&$Re.keys&&$Re.keys.IE_PROTO||""),M8e=E?"Symbol(src)_1."+E:"",mt(Lve,"isMasked2"),yt(Lve,"isMasked"),O8e=Lve,ORe=Function.prototype,P8e=ORe.toString,mt(Ive,"toSource2"),yt(Ive,"toSource"),B8e=Ive,z=/[\\^$.*+?()[\]{}|]/g,$8e=/^\[object .+?Constructor\]$/,$Re=Function.prototype,ORe=Object.prototype,$Re=$Re.toString,ORe=ORe.hasOwnProperty,F8e=RegExp("^"+$Re.call(ORe).replace(z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt(Nve,"baseIsNative2"),yt(Nve,"baseIsNative"),z8e=Nve,mt(Dve,"getValue2"),yt(Dve,"getValue"),q8e=Dve,mt(Mve,"getNative2"),yt(Mve,"getNative"),ORe=($Re=Mve)(eLe,"Map"),j8e=ORe,z=$Re(Object,"create"),W8e=z,mt(Ove,"hashClear2"),yt(Ove,"hashClear"),ORe=Ove,mt(Pve,"hashDelete2"),yt(Pve,"hashDelete"),z=Pve,c9e=Object.prototype,U8e=c9e.hasOwnProperty,mt(Bve,"hashGet2"),yt(Bve,"hashGet"),c9e=Bve,xLe=Object.prototype,G8e=xLe.hasOwnProperty,mt($ve,"hashHas2"),yt($ve,"hashHas"),xLe=$ve,mt(Fve,"hashSet2"),yt(Fve,"hashSet"),vRe=Fve,mt(zve,"Hash2"),yt(zve,"Hash"),zve.prototype.clear=ORe,zve.prototype.delete=z,zve.prototype.get=c9e,zve.prototype.has=xLe,zve.prototype.set=vRe,V8e=zve,mt(qve,"mapCacheClear2"),yt(qve,"mapCacheClear"),ORe=qve,mt(jve,"isKeyable2"),yt(jve,"isKeyable"),Y8e=jve,mt(Wve,"getMapData2"),yt(Wve,"getMapData"),H8e=Wve,mt(Uve,"mapCacheDelete2");yt(Uve,"mapCacheDelete"),z=Uve,mt(Gve,"mapCacheGet2"),yt(Gve,"mapCacheGet"),c9e=Gve,mt(Vve,"mapCacheHas2"),yt(Vve,"mapCacheHas"),xLe=Vve,mt(Yve,"mapCacheSet2"),yt(Yve,"mapCacheSet"),vRe=Yve,mt(Hve,"MapCache2"),yt(Hve,"MapCache"),Hve.prototype.clear=ORe,Hve.prototype.delete=z,Hve.prototype.get=c9e,Hve.prototype.has=xLe,Hve.prototype.set=vRe,X8e=Hve,mt(Xve,"stackSet2"),yt(Xve,"stackSet"),ORe=Xve,mt(Kve,"Stack2"),yt(Kve,"Stack"),Kve.prototype.clear=ALe,Kve.prototype.delete=BRe,Kve.prototype.get=bLe,Kve.prototype.has=u9e,Kve.prototype.set=ORe,K8e=Kve,mt(Zve,"setCacheAdd2"),yt(Zve,"setCacheAdd"),z=Zve,mt(Qve,"setCacheHas2"),yt(Qve,"setCacheHas"),c9e=Qve,mt(Jve,"SetCache2"),yt(Jve,"SetCache"),Jve.prototype.add=Jve.prototype.push=z,Jve.prototype.has=c9e,Z8e=Jve,mt(ebe,"arraySome2"),yt(ebe,"arraySome"),Q8e=ebe,mt(tbe,"cacheHas2"),yt(tbe,"cacheHas"),J8e=tbe,mt(rbe,"equalArrays2"),yt(rbe,"equalArrays"),eAe=rbe,xLe=eLe.Uint8Array,tAe=xLe,mt(ibe,"mapToArray2"),yt(ibe,"mapToArray"),rAe=ibe,mt(nbe,"setToArray2"),yt(nbe,"setToArray"),iAe=nbe,vRe=F?F.prototype:void 0,nAe=vRe?vRe.valueOf:void 0,mt(abe,"equalByTag2"),yt(abe,"equalByTag"),aAe=abe,mt(sbe,"arrayPush2"),yt(sbe,"arrayPush"),sAe=sbe,ALe=Array.isArray,oAe=ALe,mt(obe,"baseGetAllKeys2"),yt(obe,"baseGetAllKeys"),lAe=obe,mt(lbe,"arrayFilter2"),yt(lbe,"arrayFilter"),cAe=lbe,mt(cbe,"stubArray2"),yt(cbe,"stubArray"),BRe=cbe,bLe=Object.prototype,hAe=bLe.propertyIsEnumerable,dAe=(uAe=Object.getOwnPropertySymbols)?function(t){return null==t?[]:(t=Object(t),cAe(uAe(t),function(e){return hAe.call(t,e)}))}:BRe,mt(hbe,"baseTimes2"),yt(hbe,"baseTimes"),pAe=hbe,mt(ube,"isObjectLike2"),yt(ube,"isObjectLike"),gAe=ube,mt(dbe,"baseIsArguments2"),yt(dbe,"baseIsArguments"),u9e=dbe,ORe=Object.prototype,fAe=ORe.hasOwnProperty,mAe=ORe.propertyIsEnumerable,z=u9e(function(){return arguments}())?u9e:function(e){return gAe(e)&&fAe.call(e,"callee")&&!mAe.call(e,"callee")},yAe=z,mt(pbe,"stubFalse2"),yt(pbe,"stubFalse"),c9e=pbe,xLe="object"==typeof exports&&exports&&!exports.nodeType&&exports,vRe=xLe&&"object"==typeof module&&module&&!module.nodeType&&module,ALe=vRe&&vRe.exports===xLe?eLe.Buffer:void 0,bLe=ALe?ALe.isBuffer:void 0,vAe=bLe||c9e,bAe=/^(?:0|[1-9]\d*)$/,mt(gbe,"isIndex2"),yt(gbe,"isIndex"),xAe=gbe,mt(fbe,"isLength2"),yt(fbe,"isLength"),TAe=fbe,(kAe={})["[object Float32Array]"]=kAe["[object Float64Array]"]=kAe["[object Int8Array]"]=kAe["[object Int16Array]"]=kAe["[object Int32Array]"]=kAe["[object Uint8Array]"]=kAe["[object Uint8ClampedArray]"]=kAe["[object Uint16Array]"]=kAe["[object Uint32Array]"]=!0,kAe["[object Arguments]"]=kAe["[object Array]"]=kAe["[object ArrayBuffer]"]=kAe["[object Boolean]"]=kAe["[object DataView]"]=kAe["[object Date]"]=kAe["[object Error]"]=kAe["[object Function]"]=kAe["[object Map]"]=kAe["[object Number]"]=kAe["[object Object]"]=kAe["[object RegExp]"]=kAe["[object Set]"]=kAe["[object String]"]=kAe["[object WeakMap]"]=!1,mt(mbe,"baseIsTypedArray2"),yt(mbe,"baseIsTypedArray"),BRe=mbe,mt(ybe,"baseUnary2"),yt(ybe,"baseUnary"),ORe=ybe,u9e="object"==typeof exports&&exports&&!exports.nodeType&&exports,wAe=u9e&&"object"==typeof module&&module&&!module.nodeType&&module,z=wAe&&wAe.exports===u9e,CAe=z&&fRe.process,vRe=(()=>{try{return wAe&&wAe.require&&wAe.require("util").types||CAe&&CAe.binding&&CAe.binding("util")}catch{}})(),ALe=(xLe=vRe)&&xLe.isTypedArray,bLe=ALe?ORe(ALe):BRe,SAe=bLe,c9e=Object.prototype,EAe=c9e.hasOwnProperty,mt(vbe,"arrayLikeKeys2"),yt(vbe,"arrayLikeKeys"),_Ae=vbe,AAe=Object.prototype,mt(bbe,"isPrototype2"),yt(bbe,"isPrototype"),RAe=bbe,mt(xbe,"overArg2"),yt(xbe,"overArg"),u9e=xbe(Object.keys,Object),LAe=u9e,IAe=(z=Object.prototype).hasOwnProperty,mt(Tbe,"baseKeys2"),yt(Tbe,"baseKeys"),NAe=Tbe,mt(kbe,"isArrayLike2"),yt(kbe,"isArrayLike"),DAe=kbe,mt(wbe,"keys2"),yt(wbe,"keys"),MAe=wbe,mt(Cbe,"getAllKeys2"),yt(Cbe,"getAllKeys"),OAe=Cbe,fRe=Object.prototype,PAe=fRe.hasOwnProperty,mt(Sbe,"equalObjects2"),yt(Sbe,"equalObjects"),BAe=Sbe,vRe=$Re(eLe,"DataView"),xLe=vRe,ORe=$Re(eLe,"Promise"),ALe=ORe,BRe=$Re(eLe,"Set"),$Ae=BRe,bLe=$Re(eLe,"WeakMap"),c9e=bLe,FAe="[object Map]",zAe="[object Promise]",qAe="[object Set]",jAe="[object WeakMap]",WAe="[object DataView]",UAe=B8e(xLe),GAe=B8e(j8e),VAe=B8e(ALe),YAe=B8e($Ae),HAe=B8e(c9e),u9e=I8e,(xLe&&u9e(new xLe(new ArrayBuffer(1)))!=WAe||j8e&&u9e(new j8e)!=FAe||ALe&&u9e(ALe.resolve())!=zAe||$Ae&&u9e(new $Ae)!=qAe||c9e&&u9e(new c9e)!=jAe)&&(u9e=yt(function(e){var t=I8e(e);if(e=(e="[object Object]"==t?e.constructor:void 0)?B8e(e):"")switch(e){case UAe:return WAe;case GAe:return FAe;case VAe:return zAe;case YAe:return qAe;case HAe:return jAe}return t},"getTag")),XAe=u9e,KAe="[object Arguments]",ZAe="[object Array]",QAe="[object Object]",z=Object.prototype,JAe=z.hasOwnProperty,mt(Ebe,"baseIsEqualDeep2"),yt(Ebe,"baseIsEqualDeep"),eRe=Ebe,mt(_be,"baseIsEqual2"),yt(_be,"baseIsEqual"),tRe=_be,mt(Abe,"baseIsMatch2"),yt(Abe,"baseIsMatch"),rRe=Abe,mt(Rbe,"isStrictComparable2"),yt(Rbe,"isStrictComparable"),iRe=Rbe,mt(Lbe,"getMatchData2"),yt(Lbe,"getMatchData"),nRe=Lbe,mt(Ibe,"matchesStrictComparable2"),yt(Ibe,"matchesStrictComparable"),aRe=Ibe,mt(Nbe,"baseMatches2"),yt(Nbe,"baseMatches"),sRe=Nbe,mt(Dbe,"isSymbol2"),yt(Dbe,"isSymbol"),oRe=Dbe,lRe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cRe=/^\w*$/,mt(Mbe,"isKey2"),yt(Mbe,"isKey"),hRe=Mbe,uRe="Expected a function",mt(Obe,"memoize2"),yt(Obe,"memoize"),Obe.Cache=X8e,dRe=Obe,mt(Pbe,"memoizeCapped2"),yt(Pbe,"memoizeCapped"),pRe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gRe=/\\(\\)?/g,fRe=Pbe(function(e){var n=[];return 46===e.charCodeAt(0)&&n.push(""),e.replace(pRe,function(e,t,r,i){n.push(r?i.replace(gRe,"$1"):t||e)}),n}),mRe=fRe,yRe=1/0,vRe=F?F.prototype:void 0,bRe=vRe?vRe.toString:void 0,mt(Bbe,"baseToString2"),yt(Bbe,"baseToString"),xRe=Bbe,mt($be,"toString3"),yt($be,"toString"),TRe=$be,mt(Fbe,"castPath2"),yt(Fbe,"castPath"),kRe=Fbe,mt(zbe,"toKey2"),yt(zbe,"toKey"),wRe=zbe,mt(qbe,"baseGet2"),yt(qbe,"baseGet"),CRe=qbe,mt(jbe,"get2"),yt(jbe,"get"),SRe=jbe,mt(Wbe,"baseHasIn2"),yt(Wbe,"baseHasIn"),ERe=Wbe,mt(Ube,"hasPath2"),yt(Ube,"hasPath"),_Re=Ube,mt(Gbe,"hasIn2"),yt(Gbe,"hasIn"),ARe=Gbe,mt(Vbe,"baseMatchesProperty2"),yt(Vbe,"baseMatchesProperty"),RRe=Vbe,mt(Ybe,"identity2"),yt(Ybe,"identity"),LRe=Ybe,mt(Hbe,"baseProperty2"),yt(Hbe,"baseProperty"),IRe=Hbe,mt(Xbe,"basePropertyDeep2"),yt(Xbe,"basePropertyDeep"),NRe=Xbe,mt(Kbe,"property2"),yt(Kbe,"property"),DRe=Kbe,mt(Zbe,"baseIteratee2"),yt(Zbe,"baseIteratee"),MRe=Zbe,mt(Qbe,"createBaseFor2"),yt(Qbe,"createBaseFor"),ORe=Qbe(),PRe=ORe,mt(Jbe,"baseForOwn2"),yt(Jbe,"baseForOwn"),BRe=Jbe,mt(exe,"createBaseEach2"),yt(exe,"createBaseEach"),$Re=exe(BRe),FRe=$Re,mt(txe,"baseMap2"),yt(txe,"baseMap"),zRe=txe,mt(rxe,"map2"),yt(rxe,"map"),qRe=rxe,mt(ixe,"baseFilter2"),yt(ixe,"baseFilter"),jRe=ixe,mt(nxe,"filter2"),yt(nxe,"filter"),WRe=nxe,mt(axe,"buildATNKey"),yt(axe,"buildATNKey"),URe=1,GRe=2,VRe=4,YRe=5,HRe=7,XRe=8,KRe=9,ZRe=10,QRe=11,JRe=12,eLe=class{static{mt(this,"AbstractTransition")}static{yt(this,"AbstractTransition")}constructor(e){this.target=e}isEpsilon(){return!1}},tLe=class extends eLe{static{mt(this,"AtomTransition")}static{yt(this,"AtomTransition")}constructor(e,t){super(e),this.tokenType=t}},rLe=class extends eLe{static{mt(this,"EpsilonTransition")}static{yt(this,"EpsilonTransition")}constructor(e){super(e)}isEpsilon(){return!0}},iLe=class extends eLe{static{mt(this,"RuleTransition")}static{yt(this,"RuleTransition")}constructor(e,t,r){super(e),this.rule=t,this.followState=r}isEpsilon(){return!0}},mt(sxe,"createATN"),yt(sxe,"createATN"),mt(oxe,"createRuleStartAndStopATNStates"),yt(oxe,"createRuleStartAndStopATNStates"),mt(lxe,"atom"),yt(lxe,"atom"),mt(cxe,"repetition"),yt(cxe,"repetition"),mt(hxe,"repetitionSep"),yt(hxe,"repetitionSep"),mt(uxe,"repetitionMandatory"),yt(uxe,"repetitionMandatory"),mt(dxe,"repetitionMandatorySep"),yt(dxe,"repetitionMandatorySep"),mt(pxe,"alternation"),yt(pxe,"alternation"),mt(gxe,"option"),yt(gxe,"option"),mt(fxe,"block"),yt(fxe,"block"),mt(mxe,"plus"),yt(mxe,"plus"),mt(yxe,"star"),yt(yxe,"star"),mt(vxe,"optional"),yt(vxe,"optional"),mt(bxe,"defineDecisionState"),yt(bxe,"defineDecisionState"),mt(xxe,"makeAlts"),yt(xxe,"makeAlts"),mt(Txe,"getProdType2"),yt(Txe,"getProdType"),mt(kxe,"makeBlock"),yt(kxe,"makeBlock"),mt(wxe,"tokenRef"),yt(wxe,"tokenRef"),mt(Cxe,"ruleRef"),yt(Cxe,"ruleRef"),mt(Sxe,"buildRuleHandle"),yt(Sxe,"buildRuleHandle"),mt(Exe,"epsilon"),yt(Exe,"epsilon"),mt(_xe,"newState"),yt(_xe,"newState"),mt(Axe,"addTransition"),yt(Axe,"addTransition"),mt(Rxe,"removeState"),yt(Rxe,"removeState"),nLe={},aLe=class{static{mt(this,"ATNConfigSet")}static{yt(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){var t=Lxe(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return qRe(this.configs,e=>e.alt)}get key(){let e="";for(var t in this.map)e+=t+":";return e}},mt(Lxe,"getATNConfigKey"),yt(Lxe,"getATNConfigKey"),mt(Ixe,"baseExtremum"),yt(Ixe,"baseExtremum"),sLe=Ixe,mt(Nxe,"baseLt"),yt(Nxe,"baseLt"),oLe=Nxe,mt(Dxe,"min"),yt(Dxe,"min"),lLe=Dxe,cLe=F?F.isConcatSpreadable:void 0,mt(Mxe,"isFlattenable2"),yt(Mxe,"isFlattenable"),hLe=Mxe,mt(Oxe,"baseFlatten2"),yt(Oxe,"baseFlatten"),uLe=Oxe,mt(Pxe,"flatMap2"),yt(Pxe,"flatMap"),dLe=Pxe,mt(Bxe,"baseFindIndex2"),yt(Bxe,"baseFindIndex"),pLe=Bxe,mt($xe,"baseIsNaN2"),yt($xe,"baseIsNaN"),gLe=$xe,mt(Fxe,"strictIndexOf2"),yt(Fxe,"strictIndexOf"),fLe=Fxe,mt(zxe,"baseIndexOf2"),yt(zxe,"baseIndexOf"),mLe=zxe,mt(qxe,"arrayIncludes2"),yt(qxe,"arrayIncludes"),yLe=qxe,mt(jxe,"arrayIncludesWith2"),yt(jxe,"arrayIncludesWith"),vLe=jxe,mt(Wxe,"noop2"),yt(Wxe,"noop"),bLe=Wxe,xLe=$Ae&&1/iAe(new $Ae([,-0]))[1]==1/0?function(e){return new $Ae(e)}:bLe,TLe=xLe,mt(Uxe,"baseUniq2"),yt(Uxe,"baseUniq"),kLe=Uxe,mt(Gxe,"uniqBy"),yt(Gxe,"uniqBy"),wLe=Gxe,mt(Vxe,"flatten2"),yt(Vxe,"flatten"),CLe=Vxe,mt(Yxe,"arrayEach2"),yt(Yxe,"arrayEach"),SLe=Yxe,mt(Hxe,"castFunction2"),yt(Hxe,"castFunction"),ELe=Hxe,mt(Xxe,"forEach2"),yt(Xxe,"forEach"),_Le=Xxe,ALe=Object.prototype,RLe=ALe.hasOwnProperty,mt(Kxe,"isEmpty2"),yt(Kxe,"isEmpty"),LLe=Kxe,mt(Zxe,"arrayReduce2"),yt(Zxe,"arrayReduce"),ILe=Zxe,mt(Qxe,"baseReduce2"),yt(Qxe,"baseReduce"),NLe=Qxe,mt(Jxe,"reduce2"),yt(Jxe,"reduce"),DLe=Jxe,mt(e4e,"createDFACache"),yt(e4e,"createDFACache"),MLe=class{static{mt(this,"PredicateSet")}static{yt(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}},OLe=new MLe,PLe=class extends o8e{static{mt(this,"LLStarLookaheadStrategy")}static{yt(this,"LLStarLookaheadStrategy")}constructor(e){super(),this.logging=null!=(e=e?.logging)?e:e=>console.log(e)}initialize(e){this.atn=sxe(e.rules),this.dfas=r4e(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=axe(r,"Alternation",t),l=this.atn.decisionMap[o].decision,c=qRe(g2e({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),e=>qRe(e,e=>e[0]));if(!t4e(c,!1)||n)return i?function(t){var r=new MLe,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=i4e.call(this,a,l,r,s);return"number"==typeof e?e:void 0}:function(){var e=i4e.call(this,a,l,OLe,s);return"number"==typeof e?e:void 0};{let r=DLe(c,(t,e,r)=>(_Le(e,e=>{e&&(t[e.tokenTypeIdx]=r,_Le(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=axe(t,i,e),l=this.atn.decisionMap[o].decision,c=qRe(g2e({maxLookahead:1,occurrence:e,prodType:i,rule:t}),e=>qRe(e,e=>e[0]));if(t4e(c)&&c[0][0]&&!n){if(r=c[0],1===(r=CLe(r)).length&&LLe(r[0].categoryMatches)){let e=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{let t=DLe(r,(t,e)=>(void 0!==e&&(t[e.tokenTypeIdx]=!0,_Le(e.categoryMatches,e=>{t[e]=!0})),t),{});return function(){var e=this.LA(1);return!0===t[e.tokenTypeIdx]}}}return function(){var e=i4e.call(this,a,l,OLe,s);return"object"!=typeof e&&0===e}}},mt(t4e,"isLL1Sequence"),yt(t4e,"isLL1Sequence"),mt(r4e,"initATNSimulator"),yt(r4e,"initATNSimulator"),mt(i4e,"adaptivePredict"),yt(i4e,"adaptivePredict"),mt(n4e,"performLookahead"),yt(n4e,"performLookahead"),mt(a4e,"computeLookaheadTarget"),yt(a4e,"computeLookaheadTarget"),mt(s4e,"reportLookaheadAmbiguity"),yt(s4e,"reportLookaheadAmbiguity"),mt(o4e,"buildAmbiguityError"),yt(o4e,"buildAmbiguityError"),mt(l4e,"getProductionDslName2"),yt(l4e,"getProductionDslName"),mt(c4e,"buildAdaptivePredictError"),yt(c4e,"buildAdaptivePredictError"),mt(h4e,"getExistingTargetState"),yt(h4e,"getExistingTargetState"),mt(u4e,"computeReachSet"),yt(u4e,"computeReachSet"),mt(d4e,"getReachableTarget"),yt(d4e,"getReachableTarget"),mt(p4e,"getUniqueAlt"),yt(p4e,"getUniqueAlt"),mt(g4e,"newDFAState"),yt(g4e,"newDFAState"),mt(f4e,"addDFAEdge"),yt(f4e,"addDFAEdge"),mt(m4e,"addDFAState"),yt(m4e,"addDFAState"),mt(y4e,"computeStartState"),yt(y4e,"computeStartState"),mt(v4e,"closure"),yt(v4e,"closure"),mt(b4e,"getEpsilonTarget"),yt(b4e,"getEpsilonTarget"),mt(x4e,"hasConfigInRuleStopState"),yt(x4e,"hasConfigInRuleStopState"),mt(T4e,"allConfigsInRuleStopStates"),yt(T4e,"allConfigsInRuleStopStates"),mt(k4e,"hasConflictTerminatingPrediction"),yt(k4e,"hasConflictTerminatingPrediction"),mt(w4e,"getConflictingAltSets"),yt(w4e,"getConflictingAltSets"),mt(C4e,"hasConflictingAltSet"),yt(C4e,"hasConflictingAltSet"),mt(S4e,"hasStateAssociatedWithOneAlt"),yt(S4e,"hasStateAssociatedWithOneAlt"),U3e(),BLe=class{static{mt(this,"CstNodeBuilder")}static{yt(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new jLe(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){var t=new zLe;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){return(e=new FLe(e.startOffset,e.image.length,Qpe(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 FLe(t.startOffset,t.image.length,Qpe(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)}},$Le=class{static{mt(this,"AbstractCstNode")}static{yt(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)}},FLe=class extends $Le{static{mt(this,"LeafCstNodeImpl")}static{yt(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}},zLe=class extends $Le{static{mt(this,"CompositeCstNodeImpl")}static{yt(this,"CompositeCstNodeImpl")}constructor(){super(...arguments),this.content=new qLe(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:v5e.create(0,0),end:v5e.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]}},qLe=class $ extends Array{static{mt(this,"_CstNodeContainer")}static{yt(this,"CstNodeContainer")}constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,$.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}},jLe=class extends zLe{static{mt(this,"RootCstNodeImpl")}static{yt(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??""}},WLe=Symbol("Datatype"),mt(E4e,"isDataTypeNode"),yt(E4e,"isDataTypeNode"),ULe=yt(e=>e.endsWith("")?e:e+"","withRuleSuffix"),GLe=class{static{mt(this,"AbstractLangiumParser")}static{yt(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 QLe(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new ZLe(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()}},VLe=class extends GLe{static{mt(this,"LangiumParser")}static{yt(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new BLe,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 ype(e)&&(i=e.name,this.registerPrecedenceMap(e)),t=this.wrapper.DEFINE_RULE(ULe(e.name),this.startImplementation(r,i,t).bind(this)),this.allRules.set(e.name,t),Ape(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 ype(e)?J0e(e):e.fragment?void 0:H0e(e)?WLe:J0e(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(),Bde(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===WLe?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=Tpe(i)?t.image:this.converter.convert(t.image,r);this.assign(e.operator,e.feature,s,r,n)}else if(E4e(a)){let e=t.image;Tpe(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):E4e(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)):E4e(e)?this.converter.convert(e.value,e.$cstNode):(Hde(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),c=n.slice(0,t+1),n=n.slice(t+1),c={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:c,operators:o},o={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:n,operators:l},n=this.constructInfix(c,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=$de(e,ape),this.assignmentMap.set(e,{assignment:t,crossRef:t&&hpe(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}},YLe=class{static{mt(this,"AbstractParserErrorMessageProvider")}static{yt(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(e){return $7e.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return $7e.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return $7e.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return $7e.buildEarlyExitMessage(e)}},HLe=class extends YLe{static{mt(this,"LangiumParserErrorMessageProvider")}static{yt(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}\`.`}},XLe=class extends GLe{static{mt(this,"LangiumCompletionParser")}static{yt(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(ULe(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}},KLe={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new HLe},ZLe=class extends v8e{static{mt(this,"ChevrotainWrapper")}static{yt(this,"ChevrotainWrapper")}constructor(e,t){var r=t&&"maxLookahead"in t;super(e,{...KLe,lookaheadStrategy:r?new o8e({maxLookahead:t.maxLookahead}):new PLe({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,{})}},QLe=class extends ZLe{static{mt(this,"ProfilerWrapper")}static{yt(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))}}},mt(_4e,"createParser"),yt(_4e,"createParser"),mt(A4e,"buildRules"),yt(A4e,"buildRules"),mt(R4e,"buildInfixRule"),yt(R4e,"buildInfixRule"),mt(L4e,"buildElement"),yt(L4e,"buildElement"),mt(I4e,"buildAction"),yt(I4e,"buildAction"),mt(N4e,"buildRuleCall"),yt(N4e,"buildRuleCall"),mt(D4e,"buildRuleCallPredicate"),yt(D4e,"buildRuleCallPredicate"),mt(M4e,"buildPredicate"),yt(M4e,"buildPredicate"),mt(O4e,"buildAlternatives"),yt(O4e,"buildAlternatives"),mt(P4e,"buildUnorderedGroup"),yt(P4e,"buildUnorderedGroup"),mt(B4e,"buildGroup"),yt(B4e,"buildGroup"),mt($4e,"getGuardCondition"),yt($4e,"getGuardCondition"),mt(F4e,"buildCrossReference"),yt(F4e,"buildCrossReference"),mt(z4e,"buildKeyword"),yt(z4e,"buildKeyword"),mt(q4e,"wrap"),yt(q4e,"wrap"),mt(j4e,"getRule"),yt(j4e,"getRule"),mt(W4e,"getRuleName"),yt(W4e,"getRuleName"),mt(U4e,"getToken"),yt(U4e,"getToken"),mt(G4e,"createCompletionParser"),yt(G4e,"createCompletionParser"),mt(V4e,"createLangiumParser"),yt(V4e,"createLangiumParser"),mt(Y4e,"prepareLangiumParser"),yt(Y4e,"prepareLangiumParser"),JLe=class{static{mt(this,"DefaultTokenBuilder")}static{yt(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(e,t){var e=Pde(L0e(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($pe).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){var t=ige(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=C0e(t)?_7e.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(Qde).flatMap(e=>Ude(e).filter(Tpe)).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(S0e(e.value),"i"):e.value}findLongerAlt(i,e){return e.reduce((e,t)=>{var r=t?.PATTERN;return r?.source&&E0e("^"+r.source+"$",i.value)&&e.push(t),e},[])}},e9e=class{static{mt(this,"DefaultValueConverter")}static{yt(this,"DefaultValueConverter")}convert(e,t){var r=t.grammarSource;if(Npe(r=hpe(r)?D0e(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 t9e.convertInt(t);case"STRING":return t9e.convertString(t);case"ID":return t9e.convertID(t)}switch(rge(e)?.toLowerCase()){case"number":return t9e.convertNumber(t);case"boolean":return t9e.convertBoolean(t);case"bigint":return t9e.convertBigint(t);case"date":return t9e.convertDate(t);default:return t}}},E=t9e=t9e||{},mt(a,"convertString"),yt(a,"convertString"),E.convertString=a,mt(s,"convertEscapeCharacter"),yt(s,"convertEscapeCharacter"),mt(o,"convertID"),yt(o,"convertID"),E.convertID=o,mt(l,"convertInt"),yt(l,"convertInt"),E.convertInt=l,mt(c,"convertBigint"),yt(c,"convertBigint"),E.convertBigint=c,mt(h,"convertDate"),yt(h,"convertDate"),E.convertDate=h,mt(u,"convertNumber"),yt(u,"convertNumber"),E.convertNumber=u,mt(d,"convertBoolean"),yt(d,"convertBoolean"),E.convertBoolean=d,h5e(r9e={},u5e(H3e(),1)),mt(H4e,"delayNextTick"),yt(H4e,"delayNextTick"),i9e=0,n9e=10,mt(X4e,"startCancelableOperation"),yt(X4e,"startCancelableOperation"),mt(K4e,"setInterruptionPeriod"),yt(K4e,"setInterruptionPeriod"),a9e=Symbol("OperationCancelled"),mt(Z4e,"isOperationCancelled"),yt(Z4e,"isOperationCancelled"),mt(Q4e,"interruptAndCheck"),yt(Q4e,"interruptAndCheck"),s9e=class{static{mt(this,"Deferred")}static{yt(this,"Deferred")}constructor(){this.promise=new Promise((t,r)=>{this.resolve=e=>(t(e),this),this.reject=e=>(r(e),this)})}},o9e=class D{static{mt(this,"_FullTextDocument")}static{yt(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(D.isIncremental(a)){var s=rTe(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=eTe(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 c=a.text.length-(l-o);if(0!=c)for(let e=r+1+n.length,t=i.length;e<t;e++)i[e]=i[e]+c}else{if(!D.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=eTe(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&&tTe(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}},E=l9e=l9e||{},mt(p,"create"),yt(p,"create"),E.create=p,mt(g,"update"),yt(g,"update"),E.update=g,mt(f,"applyEdits"),yt(f,"applyEdits"),E.applyEdits=f,mt(J4e,"mergeSort"),yt(J4e,"mergeSort"),mt(eTe,"computeLineOffsets"),yt(eTe,"computeLineOffsets"),mt(tTe,"isEOL"),yt(tTe,"isEOL"),mt(rTe,"getWellformedRange"),yt(rTe,"getWellformedRange"),mt(iTe,"getWellformedEdit"),yt(iTe,"getWellformedEdit");{var m,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,"e2"),yt(d,"e"),mt(a,"r2"),yt(a,"r");var p={resolve:yt(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:yt(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:yt(function(e){return d(e),0<e.length&&47===e.charCodeAt(0)},"isAbsolute"),join:yt(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:yt(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,c=0;c<=o;++c){if(c===o){if(o<s){if(47===t.charCodeAt(a+c))return t.slice(a+c+1);if(0===c)return t.slice(a+c)}else o<n&&(47===e.charCodeAt(r+c)?l=c:0===c&&(l=0));break}var h=e.charCodeAt(r+c);if(h!==t.charCodeAt(a+c))break;47===h&&(l=c)}for(var u="",c=r+l+1;c<=i;++c)c!==i&&47!==e.charCodeAt(c)||(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:yt(function(e){return e},"_makeLong"),dirname:yt(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:yt(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:yt(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:yt(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:yt(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,c=e.length-1,h=0;n<=c;--c)if(47!==(r=e.charCodeAt(c)))-1===o&&(l=!1,o=c+1),46===r?-1===a?a=c:1!==h&&(h=1):-1!==a&&(h=-1);else if(!l){s=c+1;break}-1===a||-1===o||0===h||1===h&&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}},y={};function v(e){var t=y[e];return void 0===t&&(t=y[e]={exports:{}},P[e](t,t.exports,v)),t.exports}mt(v,"r"),yt(v,"r"),v.d=(e,t)=>{for(var r in t)v.o(t,r)&&!v.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},v.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);let e={},i,r=((v.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e),v.d(e,{URI:yt(()=>M,"URI"),Utils:yt(()=>m,"Utils")}),"object"==typeof process?i="win32"===process.platform:"object"==typeof navigator&&(i=0<=navigator.userAgent.indexOf("Windows")),/^\w[\w\d+.-]*$/),n=/^\//,a=/^\/\//;function b(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(b,"a"),yt(b,"a");let s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class M{static{mt(this,"l")}static{yt(this,"l")}static isUri(e){return e instanceof M||!!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||"",b(this,a))}get fsPath(){return k(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 O(t,r,i,n,a)}static parse(e,t=!1){return(e=s.exec(e))?new O(e[2]||"",S(e[4]||""),S(e[5]||""),S(e[7]||""),S(e[9]||""),t):new O("","","","","")}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 O("file",t,e,"","")}static from(e){return b(e=new O(e.scheme,e.authority,e.path,e.query,e.fragment),!0),e}toString(e=!1){return w(this,e)}toJSON(){return this}static revive(e){var t;return e&&(e instanceof M?e:((t=new O(e))._formatted=e.external,t._fsPath=e._sep===o?e.fsPath:null,t))}}let o=i?1:void 0;class O extends M{static{mt(this,"d")}static{yt(this,"d")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=k(this,!1)),this._fsPath}toString(e=!1){return e?w(this,!0):(this._formatted||(this._formatted=w(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 x(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 T(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 k(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 w(t,e){let r=e?T:x,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:x(l,!1,!1)):i}function C(e){try{return decodeURIComponent(e)}catch{return 3<e.length?e.substr(0,3)+C(e.substr(3)):e}}mt(x,"m"),yt(x,"m"),mt(T,"y"),yt(T,"y"),mt(k,"v"),yt(k,"v"),mt(w,"b"),yt(w,"b"),mt(C,"C"),yt(C,"C");let t=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function S(e){return e.match(t)?e.replace(t,e=>C(e)):e}mt(S,"w"),yt(S,"w");let c=v(975),h=c.posix||c;(E=m=m||{}).joinPath=function(e,...t){return e.with({path:h.join(e.path,...t)})},E.resolvePath=function(e,...t){let r=e.path,i=!1,n=("/"!==r[0]&&(r="/"+r,i=!0),h.resolve(r,...t));return i&&"/"===n[0]&&!e.authority&&(n=n.substring(1)),e.with({path:n})},E.dirname=function(e){if(0===e.path.length||"/"===e.path)return e;let t=h.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},E.basename=function(e){return h.basename(e.path)},E.extname=function(e){return h.extname(e.path)},c9e=e}({URI:h9e,Utils:u9e}=c9e);{var E=d9e=d9e||{};E.basename=u9e.basename,E.dirname=u9e.dirname,E.extname=u9e.extname,E.joinPath=u9e.joinPath,E.resolvePath=u9e.resolvePath;let a="object"==typeof process&&"win32"===process?.platform;function _(e,t){return e?.toString()===t?.toString()}function A(e,t){var e=("string"==typeof e?h9e.parse(e):e).path,t=("string"==typeof t?h9e.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 R(e){return h9e.parse(e.toString()).toString()}function L(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(_,"equals"),yt(_,"equals"),E.equals=_,mt(A,"relative"),yt(A,"relative"),E.relative=A,mt(R,"normalize"),yt(R,"normalize"),E.normalize=R,mt(L,"contains"),yt(L,"contains"),E.contains=L}function I(e){return{dispose:yt(async()=>e(),"dispose")}}p9e=class{static{mt(this,"UriTrie")}static{yt(this,"UriTrie")}constructor(){this.root={name:"",children:new Map}}normalizeUri(e){return d9e.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:d9e.joinPath(h9e.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:d9e.joinPath(h9e.parse(t),e.name).toString(),element:e.element})):[]}all(){return this.collectValues(this.root)}findAll(e){return(e=this.getNode(d9e.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}},(E=g9e=g9e||{})[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",f9e=class{static{mt(this,"DefaultLangiumDocumentFactory")}static{yt(this,"DefaultLangiumDocumentFactory")}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=r9e.CancellationToken.None){var r=await this.fileSystemProvider.readFile(e);return this.createAsync(e,r,t)}fromTextDocument(e,t,r){return t=t??h9e.parse(e.uri),r9e.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromString(e,t,r){return r9e.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:g9e.Parsed,references:[],textDocument:e};else{let e=this.createTextDocumentGetter(r,i);n={parseResult:t,uri:r,state:g9e.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=g9e.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??l9e.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??"")}},m9e=class{static{mt(this,"DefaultLangiumDocuments")}static{yt(this,"DefaultLangiumDocuments")}constructor(e){this.documentTrie=new p9e,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return Pde(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,g9e.Changed),e}deleteDocument(e){var e=e.toString(),t=this.documentTrie.find(e);return t&&(t.state=g9e.Changed,this.documentTrie.delete(e)),t}deleteDocuments(e){var t,e=e.toString(),r=this.documentTrie.findAll(e);for(t of r)t.state=g9e.Changed;return this.documentTrie.delete(e),r}},y9e=Symbol("RefResolving"),v9e=class{static{mt(this,"DefaultLinker")}static{yt(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=r9e.CancellationToken.None){if(this.profiler?.isActive("linking")){let i=this.profiler.createTask("linking",this.languageId);i.start();try{for(let r of Gde(n.parseResult.value))await Q4e(e),Yde(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 Gde(n.parseResult.value))await Q4e(e),Yde(t).forEach(e=>this.doLink(e,n))}doLink(e,t){var r=e.reference;if("_ref"in r&&void 0===r._ref){r._ref=y9e;try{var i=this.getCandidate(e);Lde(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=y9e;try{var a=this.getCandidates(e),s=[];if(Lde(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(Ede(this._ref))return this._ref;if(Rde(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=y9e;var e=qde(r).$document,t=a.getLinkedNode({reference:s,container:r,property:i});if(t.error&&e&&e.state<g9e.ComputedScopes)return this._ref=void 0;this._ref=t.node??t.error,this._nodeDescription=t.descr,e?.references.push(this)}else this._ref===y9e&&a.throwCyclicReferenceError(r,i,n);return Ede(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return Lde(this._ref)?this._ref:void 0}};return s}buildMultiReference(a,s,e,o){let l=this,c={$refNode:e,$refText:o,_items:void 0,get items(){if(Array.isArray(this._items))return this._items;if(void 0===this._items){this._items=y9e;var e=qde(a).$document,t=l.getCandidates({reference:c,container:a,property:s}),r=[];if(Lde(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===y9e&&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:c,container:a,property:s}))}};return c}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 Lde(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<g9e.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}}},mt(nTe,"isNamed"),yt(nTe,"isNamed"),b9e=class{static{mt(this,"DefaultNameProvider")}static{yt(this,"DefaultNameProvider")}getName(e){if(nTe(e))return e.name}getNameNode(e){return P0e(e.$cstNode,"name")}},x9e=class{static{mt(this,"DefaultReferences")}static{yt(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=Gde(e.Grammar).some(e=>hpe(e)&&e.isMulti)}findDeclarations(e){if(e){var t=q0e(e),r=e.astNode;if(t&&r){if(_de(t=r[t.feature])||Ade(t))return jde(t);if(Array.isArray(t))for(var i of t)if((_de(i)||Ade(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||Zpe(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 Yde(e))if(Ade(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=>d9e.equals(e.sourceUri,t.documentUri))),r.push(...i),Pde(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:Jpe(a),local:!0}))}return r}},T9e=class{static{mt(this,"MultiMap")}static{yt(this,"MultiMap")}constructor(e){if(this.map=new Map,e)for(var[t,r]of e)this.add(t,r)}get size(){return jke.sum(Pde(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))?Pde(e):Fke}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 Pde(this.map.entries()).flatMap(([t,e])=>e.map(e=>[t,e]))}keys(){return Pde(this.map.keys())}values(){return Pde(this.map.values()).flat()}entriesGroupedByKey(){return Pde(this.map.entries())}},k9e=class{static{mt(this,"BiMap")}static{yt(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)}},w9e=class{static{mt(this,"DefaultScopeComputation")}static{yt(this,"DefaultScopeComputation")}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=r9e.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,r=Wde,i=r9e.CancellationToken.None){var n,a=[];this.addExportedSymbol(e,a,t);for(n of r(e))await Q4e(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=r9e.CancellationToken.None){var r,i=e.parseResult.value,n=new T9e;for(r of Ude(i))await Q4e(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))}},C9e=class{static{mt(this,"StreamScope")}static{yt(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}},S9e=class{static{mt(this,"MapScope")}static{yt(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?Pde(t).concat(this.outerScope.getElements(e)):Pde(t)}getAllElements(){let e=Pde(this.elements.values());return e=this.outerScope?e.concat(this.outerScope.getAllElements()):e}},E9e=class{static{mt(this,"MultiMapScope")}static{yt(this,"MultiMapScope")}constructor(e,t,r){this.elements=new T9e,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?Pde(t).concat(this.outerScope.getElements(e)):Pde(t)}getAllElements(){let e=Pde(this.elements.values());return e=this.outerScope?e.concat(this.outerScope.getAllElements()):e}},_9e={getElement(){},getElements(){return Fke},getAllElements(){return Fke}},A9e=class{static{mt(this,"DisposableCache")}static{yt(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")}},R9e=class extends A9e{static{mt(this,"SimpleCache")}static{yt(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()}},L9e=class extends A9e{static{mt(this,"ContextCache")}static{yt(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}},I9e=class extends L9e{static{mt(this,"DocumentCache")}static{yt(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)}))}},N9e=class extends R9e{static{mt(this,"WorkspaceCache")}static{yt(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()}))}},D9e=class{static{mt(this,"DefaultScopeProvider")}static{yt(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 N9e(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 C9e(Pde(e),t,r)}createScopeForNodes(e,t,r){return e=Pde(e).map(e=>{var t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)}).nonNullable(),new C9e(e,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new E9e(this.indexManager.allElements(e)))}},mt(aTe,"isAstNodeWithComment"),yt(aTe,"isAstNodeWithComment"),mt(sTe,"isIntermediateReference"),yt(sTe,"isIntermediateReference"),M9e=class{static{mt(this,"DefaultJsonSerializer")}static{yt(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=yt((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(_de(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(Ade(r)){var c,o=e?r.$refText:void 0,h=[];for(c of r.items){let e=c.ref,t=zde(c.ref),r="";this.currentDocument&&this.currentDocument!==t&&(r=s?s(t.uri,e):t.uri.toString());var u=this.astNodeLocator.getAstNodePath(e);h.push(r+"#"+u)}return{$refs:h,$refText:o}}if(Ede(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=yt(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=O0e(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];sTe(l)?o[e]=this.reviveReference(t,s,r,l,i):Ede(l)&&this.linkNode(l,r,i,t,s,e)}else sTe(o)?t[s]=this.reviveReference(t,s,r,o,i):Ede(o)&&this.linkNode(o,r,i,t,s);var c=t;c.$container=e,c.$containerProperty=n,c.$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(Ede(l))return{$refText:(a=a||this.nameProvider.getName(l))??"",ref:l};s=l}else if(i.$refs){var c,h=[];for(c of i.$refs){var u=this.getRefNode(r,c,n.uriConverter);Ede(u)&&h.push({ref:u})}if(0!==h.length)return{$refText:a??"",items:h};o={$refText:a??"",items:h},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):h9e.parse(t),(n=this.langiumDocuments.getDocument(i))?n.parseResult.value:"Could not find document for URI: "+t):(a=r?r(t.substring(0,o)):h9e.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)}}},O9e=class{static{mt(this,"DefaultServiceRegistry")}static{yt(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=d9e.extname(e),e=d9e.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())}},mt(oTe,"diagnosticData"),yt(oTe,"diagnosticData"),(E=P9e=P9e||{}).defaults=["fast","slow","built-in"],E.all=E.defaults,B9e=class{static{mt(this,"ValidationRegistry")}static{yt(this,"ValidationRegistry")}constructor(e){this.entries=new T9e,this.knownCategories=new Set(P9e.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)):g0e()}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(Z4e(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=Pde(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}},$9e=Object.freeze({validateNode:!0,validateChildren:!0}),F9e=class{static{mt(this,"DefaultDocumentValidator")}static{yt(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=r9e.CancellationToken.None){var i=e.parseResult,n=[];if(await Q4e(r),t.categories&&!t.categories.includes("built-in")||(this.processLexingErrors(i,n,t),!(t.stopAfterLexingErrors&&n.some(e=>e.data?.code===z9e.LexingError)||(this.processParsingErrors(i,n,t),t.stopAfterParsingErrors&&n.some(e=>e.data?.code===z9e.ParsingError))||(this.processLinkingErrors(e,n,t),t.stopAfterLinkingErrors&&n.some(e=>e.data?.code===z9e.LinkingError))))){try{n.push(...await this.validateAst(i.value,t,r))}catch(e){if(Z4e(e))throw e;console.error("An error occurred during validation:",e)}await Q4e(r)}return n}processLexingErrors(e,t,r){var i;for(i of[...e.lexerErrors,...e.lexerReport?.diagnostics??[]]){var n={severity:cTe(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:hTe(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=Qpe(i.token),e&&(a={severity:cTe("error"),range:e,message:i.message,data:oTe(z9e.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:z9e.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=r9e.CancellationToken.None){let i=[],n=yt((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=r9e.CancellationToken.None){var n;for(n of this.validationRegistry.checksBefore)await Q4e(i),await n(e,r,t.categories??[],i)}async validateAstNodes(e,t,r,i=r9e.CancellationToken.None){if(this.profiler?.isActive("validating")){var n=this.profiler.createTask("validating",this.languageId);n.start();try{var a,s=Gde(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 c,h=Gde(e).iterator();for(c of h){await Q4e(i);var u,d=this.validateSingleNodeOptions(c,t);if(d.validateNode)for(u of this.validationRegistry.getChecks(c.$type,t.categories))await u(c,r,i);d.validateChildren||h.prune()}}}validateSingleNodeOptions(e,t){return $9e}async validateAstAfter(e,t,r,i=r9e.CancellationToken.None){var n;for(n of this.validationRegistry.checksAfter)await Q4e(i),await n(e,r,t.categories??[],i)}toDiagnostic(e,t,r){return{message:t,range:lTe(r),severity:cTe(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(lTe,"getDiagnosticRange"),yt(lTe,"getDiagnosticRange"),mt(cTe,"toDiagnosticSeverity"),yt(cTe,"toDiagnosticSeverity"),mt(hTe,"toDiagnosticData"),yt(hTe,"toDiagnosticData"),(E=z9e=z9e||{}).LexingError="lexing-error",E.LexingWarning="lexing-warning",E.LexingInfo="lexing-info",E.LexingHint="lexing-hint",E.ParsingError="parsing-error",E.LinkingError="linking-error",q9e=class{static{mt(this,"DefaultAstNodeDescriptionProvider")}static{yt(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=yt(()=>n=n??Jpe(this.nameProvider.getNameNode(e)??e.$cstNode),"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return a()},selectionSegment:Jpe(e.$cstNode),type:e.$type,documentUri:r.uri,path:i}}},j9e=class{static{mt(this,"DefaultReferenceDescriptionProvider")}static{yt(this,"DefaultReferenceDescriptionProvider")}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=r9e.CancellationToken.None){let r=[],i=e.parseResult.value;for(var n of Gde(i))await Q4e(t),Yde(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=[];_de(t)&&t.$nodeDescription?r=[t.$nodeDescription]:Ade(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=Jpe(t.$refNode);for(i of r)s.push({sourceUri:n,sourcePath:a,targetUri:i.documentUri,targetPath:i.path,segment:o,local:d9e.equals(i.documentUri,n)});return s}},W9e=class{static{mt(this,"DefaultAstNodeLocator")}static{yt(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)}},h5e(U9e={},u5e(Y3e(),1)),G9e=class{static{mt(this,"DefaultConfigurationProvider")}static{yt(this,"DefaultConfigurationProvider")}constructor(e){this._ready=new s9e,this.onConfigurationSectionUpdateEmitter=new U9e.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}},V9e=u5e(Mke(),1),E=Y9e=Y9e||{},mt(I,"create"),yt(I,"create"),E.create=I,H9e=class{static{mt(this,"DefaultDocumentBuilder")}static{yt(this,"DefaultDocumentBuilder")}constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new T9e,this.documentPhaseListeners=new T9e,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=g9e.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=r9e.CancellationToken.None){for(var i of e){var n,a=i.uri.toString();i.state===g9e.Validated?"boolean"==typeof t.validation&&t.validation?this.resetToState(i,g9e.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=g9e.IndexedReferences):this.buildState.delete(a)}this.currentState=g9e.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,t,r)}async update(e,t,r=r9e.CancellationToken.None){this.currentState=g9e.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=g9e.Changed,this.langiumDocuments.addDocument(e)),this.resetToState(e,g9e.Changed)}let o=Pde(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,g9e.ComputedScopes)),await this.emitUpdate(t,s),await Q4e(r),e=this.sortDocuments(this.langiumDocuments.all.filter(e=>e.state<g9e.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 Pde(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),Y9e.create(()=>{var e=this.updateListeners.indexOf(t);0<=e&&this.updateListeners.splice(e,1)})}resetToState(e,t){switch(t){case g9e.Changed:case g9e.Parsed:this.indexManager.removeContent(e.uri);case g9e.IndexedContent:e.localSymbols=void 0;case g9e.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case g9e.Linked:this.indexManager.removeReferences(e.uri);case g9e.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case g9e.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=g9e.Changed}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,g9e.Parsed,r,e=>this.langiumDocumentFactory.update(e,r)),await this.runCancelable(e,g9e.IndexedContent,r,e=>this.indexManager.updateContent(e,r)),await this.runCancelable(e,g9e.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,g9e.Linked,r,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,r)),await this.runCancelable(t,g9e.IndexedReferences,r,e=>this.indexManager.updateReferences(e,r)),t=e.filter(e=>!!this.shouldValidate(e)||(this.markAsCompleted(e),!1)),await this.runCancelable(t,g9e.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 Q4e(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),Y9e.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),Y9e.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,r){let i;return t&&"path"in t?i=t:r=t,r=r??r9e.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(a9e):this.currentState>=n&&n>e.state?Promise.reject(new V9e.ResponseError(V9e.LSPErrorCodes.RequestFailed,`Document state of ${a.toString()} is ${g9e[e.state]}, requiring ${g9e[n]}, but workspace state is already ${g9e[this.currentState]}. Returning undefined.`)):new Promise((t,e)=>{let r=this.onDocumentPhase(n,e=>{d9e.equals(e.uri,a)&&(r.dispose(),i.dispose(),t(e.uri))}),i=s.onCancellationRequested(()=>{r.dispose(),i.dispose(),e(a9e)})}):Promise.reject(new V9e.ResponseError(V9e.LSPErrorCodes.ServerCancelled,"No document found for URI: "+a.toString()))}awaitBuilderState(n,a){return this.currentState>=n?Promise.resolve():a.isCancellationRequested?Promise.reject(a9e):new Promise((e,t)=>{let r=this.onBuildPhase(n,()=>{r.dispose(),i.dispose(),e()}),i=a.onCancellationRequested(()=>{r.dispose(),i.dispose(),t(a9e)})})}async notifyDocumentPhase(e,t,r){var i;for(i of this.documentPhaseListeners.get(t).slice())try{await Q4e(r),await i(e,r)}catch(e){if(!Z4e(e))throw e}}async notifyBuildPhase(e,t,r){var i;if(0!==e.length)for(i of this.buildPhaseListeners.get(t).slice())await Q4e(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=Pde(r.result.validationChecks).concat(i.categories).distinct().toArray():r.result.validationChecks=[...i.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}},X9e=class{static{mt(this,"DefaultIndexManager")}static{yt(this,"DefaultIndexManager")}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new L9e,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=>{d9e.equals(e.targetUri,r)&&e.targetPath===t&&i.push(e)})}),Pde(i)}allElements(t,r){let e=Pde(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=r9e.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=r9e.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()))}},K9e=class{static{mt(this,"DefaultWorkspaceManager")}static{yt(this,"DefaultWorkspaceManager")}constructor(e){this.initialBuildOptions={},this._ready=new s9e,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=r9e.CancellationToken.None){e=await this.performStartup(e),await Q4e(t),await this.documentBuilder.build(e,this.initialBuildOptions,t)}async performStartup(e){let t=[],r=yt(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=Pde(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 h9e.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=d9e.basename(e.uri);return!t.startsWith(".")&&(e.isDirectory?"node_modules"!==t&&"out"!==t:!!e.isFile&&this.serviceRegistry.hasServices(e.uri))}},Z9e=class{static{mt(this,"DefaultLexerErrorMessageProvider")}static{yt(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(e,t,r,i,n){return C7e.buildUnexpectedCharactersMessage(e,t,r,i,n)}buildUnableToPopLexerModeMessage(e){return C7e.buildUnableToPopLexerModeMessage(e)}},Q9e={mode:"full"},J9e=class{static{mt(this,"DefaultLexer")}static{yt(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),pTe(t)?Object.values(t):t),e="production"===e.LanguageMetaData.mode;this.chevrotainLexer=new _7e(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(pTe(e))return e;let t=dTe(e)?Object.values(e.modes).flat():e,r={};return t.forEach(e=>r[e.name]=e),r}},mt(uTe,"isTokenTypeArray"),yt(uTe,"isTokenTypeArray"),mt(dTe,"isIMultiModeLexerDefinition"),yt(dTe,"isIMultiModeLexerDefinition"),mt(pTe,"isTokenTypeDictionary"),yt(pTe,"isTokenTypeDictionary"),U3e(),mt(gTe,"parseJSDoc"),yt(gTe,"parseJSDoc"),mt(fTe,"isJSDoc"),yt(fTe,"isJSDoc"),mt(mTe,"getLines"),yt(mTe,"getLines"),eIe=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,tIe=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu,mt(yTe,"tokenize"),yt(yTe,"tokenize"),mt(vTe,"buildInlineTokens"),yt(vTe,"buildInlineTokens"),rIe=/\S/,iIe=/\s*$/,mt(bTe,"skipWhitespace"),yt(bTe,"skipWhitespace"),mt(xTe,"lastCharacter"),yt(xTe,"lastCharacter"),mt(TTe,"parseJSDocComment"),yt(TTe,"parseJSDocComment"),mt(kTe,"parseJSDocElement"),yt(kTe,"parseJSDocElement"),mt(wTe,"appendEmptyLine"),yt(wTe,"appendEmptyLine"),mt(CTe,"parseJSDocText"),yt(CTe,"parseJSDocText"),mt(STe,"parseJSDocInline"),yt(STe,"parseJSDocInline"),mt(ETe,"parseJSDocTag"),yt(ETe,"parseJSDocTag"),mt(_Te,"parseJSDocLine"),yt(_Te,"parseJSDocLine"),mt(ATe,"normalizeOptions"),yt(ATe,"normalizeOptions"),mt(RTe,"normalizeOption"),yt(RTe,"normalizeOption"),nIe=class{static{mt(this,"JSDocCommentImpl")}static{yt(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+=NTe(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+=NTe(t)+r);return t.trim()}},aIe=class{static{mt(this,"JSDocTagImpl")}static{yt(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=LTe(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(LTe,"renderInlineTag"),yt(LTe,"renderInlineTag"),mt(ITe,"renderLinkDefault"),yt(ITe,"renderLinkDefault"),sIe=class{static{mt(this,"JSDocTextImpl")}static{yt(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}},oIe=class{static{mt(this,"JSDocLineImpl")}static{yt(this,"JSDocLineImpl")}constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}},mt(NTe,"fillNewlines"),yt(NTe,"fillNewlines"),lIe=class{static{mt(this,"JSDocDocumentationProvider")}static{yt(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&&fTe(e))return gTe(e).toMarkdown({renderLink:yt((e,t)=>this.documentationLinkRenderer(r,e,t),"renderLink"),renderTag:yt(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)}},cIe=class{static{mt(this,"DefaultCommentProvider")}static{yt(this,"DefaultCommentProvider")}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return aTe(e)?e.$comment:i0e(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}},hIe=class{static{mt(this,"DefaultAsyncParser")}static{yt(this,"DefaultAsyncParser")}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},uIe=class{static{mt(this,"AbstractThreadedAsyncParser")}static{yt(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 s9e,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 s9e;return e.onCancellationRequested(()=>{var e=this.queue.indexOf(r);0<=e&&this.queue.splice(e,1),r.reject(a9e)}),this.queue.push(r),r.promise}},dIe=class{static{mt(this,"ParserWorker")}static{yt(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,r,i){this.onReadyEmitter=new U9e.Emitter,this.deferred=new s9e,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(a9e),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 s9e,this.sendMessage(e),this.deferred.promise}},pIe=class{static{mt(this,"DefaultWorkspaceLock")}static{yt(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new r9e.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();var t=X4e();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,r=r9e.CancellationToken.None){var i=new s9e;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){Z4e(e)?t.resolve(void 0):t.reject(e)}})),this.done=!0,this.performNextOperation()}}cancelWrite(){this.previousTokenSource.cancel()}},gIe=class{static{mt(this,"DefaultHydrator")}static{yt(this,"DefaultHydrator")}constructor(e){this.grammarElementIdMap=new k9e,this.tokenTypeIdMap=new k9e,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 Gde(e))r.set(t,{});if(e.$cstNode)for(var n of Xpe(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)Ede(a)?s.push(this.dehydrateAstNode(a,t)):_de(a)?s.push(this.dehydrateReference(a,t)):s.push(a)}else Ede(i)?n[r]=this.dehydrateAstNode(i,t):_de(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 Dde(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),Ide(e)?r.content=e.content.map(e=>this.dehydrateCstNode(e,t)):Nde(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 Gde(e))r.set(t,{});let n;if(e.$cstNode)for(var a of Xpe(e.$cstNode)){let e;"fullText"in a?(e=new jLe(a.fullText),n=e):"content"in a?e=new zLe:"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)Ede(a)?s.push(this.setParent(this.hydrateAstNode(a,t),n)):_de(a)?s.push(this.hydrateReference(a,n,r,t)):s.push(a)}else Ede(i)?n[r]=this.setParent(this.hydrateAstNode(i,t),n):_de(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),Ide(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 FLe(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 Gde(this.grammar))Zde(t)&&this.grammarElementIdMap.set(t,e++)}},mt(DTe,"createDefaultCoreModule"),yt(DTe,"createDefaultCoreModule"),mt(MTe,"createDefaultSharedCoreModule"),yt(MTe,"createDefaultSharedCoreModule"),(fIe=fIe||{}).merge=(e,t)=>FTe(FTe({},e),t),mt(OTe,"inject"),yt(OTe,"inject"),mIe=Symbol("isProxy"),mt(PTe,"eagerLoad"),yt(PTe,"eagerLoad"),mt(BTe,"_inject"),yt(BTe,"_inject"),yIe=Symbol(),mt($Te,"_resolve"),yt($Te,"_resolve"),mt(FTe,"_merge"),yt(FTe,"_merge"),vIe={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]},(E=bIe=bIe||{}).REGULAR="indentation-sensitive",E.IGNORE_INDENTATION="ignore-indentation",xIe=class extends JLe{static{mt(this,"IndentationAwareTokenBuilder")}static{yt(this,"IndentationAwareTokenBuilder")}constructor(e=vIe){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...vIe,...e},this.indentTokenType=a2e({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=a2e({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){var r;if(!uTe(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,c,h=[];for(r of e){for(var[u,d]of s)r.name===u?r.PUSH_MODE=bIe.IGNORE_INDENTATION:r.name===d&&(r.POP_MODE=!0);r.name===n?o=r:r.name===i?l=r:r.name===a?c=r:h.push(r)}if(o&&l&&c)return 0<s.length?{modes:{[bIe.REGULAR]:[o,l,...h,c],[bIe.IGNORE_INDENTATION]:[...h,c]},defaultMode:bIe.REGULAR}:[o,l,c,...h];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),o2e(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?a2e({name:i,pattern:this.whitespaceRegExp,group:_7e.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}},TIe=class extends J9e{static{mt(this,"IndentationAwareLexer")}static{yt(this,"IndentationAwareLexer")}constructor(e){if(super(e),!(e.parser.TokenBuilder instanceof xIe))throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder");this.indentationTokenBuilder=e.parser.TokenBuilder}tokenize(e,t=Q9e){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}},l5e(z={},{AstUtils:mt(()=>Wke,"AstUtils"),BiMap:mt(()=>k9e,"BiMap"),Cancellation:mt(()=>r9e,"Cancellation"),ContextCache:mt(()=>L9e,"ContextCache"),CstUtils:mt(()=>Pke,"CstUtils"),DONE_RESULT:mt(()=>zke,"DONE_RESULT"),Deferred:mt(()=>s9e,"Deferred"),Disposable:mt(()=>Y9e,"Disposable"),DisposableCache:mt(()=>A9e,"DisposableCache"),DocumentCache:mt(()=>I9e,"DocumentCache"),EMPTY_STREAM:mt(()=>Fke,"EMPTY_STREAM"),ErrorWithLocation:mt(()=>Hwe,"ErrorWithLocation"),GrammarUtils:mt(()=>Ywe,"GrammarUtils"),MultiMap:mt(()=>T9e,"MultiMap"),OperationCancelled:mt(()=>a9e,"OperationCancelled"),Reduction:mt(()=>jke,"Reduction"),RegExpUtils:mt(()=>Xwe,"RegExpUtils"),SimpleCache:mt(()=>R9e,"SimpleCache"),StreamImpl:mt(()=>$ke,"StreamImpl"),TreeStreamImpl:mt(()=>qke,"TreeStreamImpl"),URI:mt(()=>h9e,"URI"),UriTrie:mt(()=>p9e,"UriTrie"),UriUtils:mt(()=>d9e,"UriUtils"),WorkspaceCache:mt(()=>N9e,"WorkspaceCache"),assertCondition:mt(()=>f0e,"assertCondition"),assertUnreachable:mt(()=>g0e,"assertUnreachable"),delayNextTick:mt(()=>H4e,"delayNextTick"),interruptAndCheck:mt(()=>Q4e,"interruptAndCheck"),isOperationCancelled:mt(()=>Z4e,"isOperationCancelled"),loadGrammarFromJson:mt(()=>qTe,"loadGrammarFromJson"),setInterruptionPeriod:mt(()=>K4e,"setInterruptionPeriod"),startCancelableOperation:mt(()=>X4e,"startCancelableOperation"),stream:mt(()=>Pde,"stream")}),h5e(z,U9e),kIe=class{static{mt(this,"EmptyFileSystemProvider")}static{yt(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[]}},wIe={fileSystemProvider:yt(()=>new kIe,"fileSystemProvider")},CIe={Grammar:yt(()=>{},"Grammar"),LanguageMetaData:yt(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},SIe={AstReflection:yt(()=>new Wwe,"AstReflection")},mt(zTe,"createMinimalGrammarServices"),yt(zTe,"createMinimalGrammarServices"),mt(qTe,"loadGrammarFromJson"),yt(qTe,"loadGrammarFromJson"),h5e(Oke,z),EIe=class{static{mt(this,"DefaultLangiumProfiler")}static{yt(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 T9e}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 _Ie(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"),yt(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])}},_Ie=class{static{mt(this,"ProfilingTask")}static{yt(this,"ProfilingTask")}constructor(e,t){this.stack=[],this.entries=new T9e,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)}},(AIe=AIe||{}).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 ]+)\]/},(RIe=RIe||{}).Terminals={EM_ID:/[_a-zA-Z][\w_]*/,EM_FID:/\d{1,3}/,EM_DATA_INLINE:/\{(.*)\}|"(.*)"|'(.*)'/,EM_DATA_BLOCK:/\{[\t ]*\r?\n(?:[\S\s]*?\r?\n)?\}(?:\r?\n|(?!\S))/,EM_ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EM_ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,EM_TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,EM_WS:/\s+/,EM_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EM_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EM_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EM_ML_COMMENT:/\/\*[\s\S]*?\*\//,EM_SL_COMMENT:/\/\/[^\n\r]*/},(LIe=LIe||{}).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])?/},(IIe=IIe||{}).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]*/},(NIe=NIe||{}).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]*/},(DIe=DIe||{}).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]*/},(MIe=MIe||{}).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]*/},(OIe=OIe||{}).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:/"[^"]*"|'[^']*'/},(PIe=PIe||{}).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:/"[^"]*"|'[^']*'/},(BIe=BIe||{}).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]*/},{...AIe.Terminals,...RIe.Terminals,...LIe.Terminals,...IIe.Terminals,...NIe.Terminals,...DIe.Terminals,...MIe.Terminals,...PIe.Terminals,...OIe.Terminals,...BIe.Terminals},$Ie={$type:"Accelerator",name:"name",x:"x",y:"y"},FIe={$type:"Anchor",evolution:"evolution",name:"name",visibility:"visibility"},zIe={$type:"Annotation",number:"number",text:"text",x:"x",y:"y"},qIe={$type:"Annotations",x:"x",y:"y"},jIe={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"},mt(jTe,"isArchitecture"),yt(jTe,"isArchitecture"),WIe={$type:"Axis",label:"label",name:"name"},UIe={$type:"Branch",name:"name",order:"order"},mt(WTe,"isBranch"),yt(WTe,"isBranch"),GIe={$type:"Checkout",branch:"branch"},VIe={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"},YIe={$type:"ClassDefStatement",className:"className",styleText:"styleText"},HIe={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"},mt(UTe,"isCommit"),yt(UTe,"isCommit"),XIe={$type:"Common",accDescr:"accDescr",accTitle:"accTitle",title:"title"},KIe={$type:"Component",decorator:"decorator",evolution:"evolution",inertia:"inertia",label:"label",name:"name",visibility:"visibility"},ZIe={$type:"Curve",entries:"entries",label:"label",name:"name"},QIe={$type:"Deaccelerator",name:"name",x:"x",y:"y"},JIe={$type:"Decorator",strategy:"strategy"},eNe={$type:"Direction",accDescr:"accDescr",accTitle:"accTitle",dir:"dir",statements:"statements",title:"title"},tNe={$type:"Edge",lhsDir:"lhsDir",lhsGroup:"lhsGroup",lhsId:"lhsId",lhsInto:"lhsInto",rhsDir:"rhsDir",rhsGroup:"rhsGroup",rhsId:"rhsId",rhsInto:"rhsInto",title:"title"},rNe={$type:"EmDataEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",name:"name"},iNe={$type:"EmFrame"},nNe={$type:"EmGwt",givenStatements:"givenStatements",sourceFrame:"sourceFrame",thenStatements:"thenStatements",whenStatements:"whenStatements"},aNe={$type:"EmGwtStatement",entityIdentifier:"entityIdentifier"},sNe={$type:"EmModelEntity",name:"name"},mt(GTe,"isEmModelEntityType"),yt(GTe,"isEmModelEntityType"),oNe={$type:"EmNoteEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",sourceFrame:"sourceFrame"},lNe={$type:"EmResetFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"},mt(VTe,"isEmResetFrame"),yt(VTe,"isEmResetFrame"),cNe={$type:"EmTimeFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"},hNe={$type:"Entry",axis:"axis",value:"value"},uNe={$type:"EventModel",accDescr:"accDescr",accTitle:"accTitle",dataEntities:"dataEntities",frames:"frames",gwtEntities:"gwtEntities",modelEntities:"modelEntities",noteEntities:"noteEntities",title:"title"},dNe={$type:"Evolution",stages:"stages"},pNe={$type:"EvolutionStage",boundary:"boundary",name:"name",secondName:"secondName"},gNe={$type:"Evolve",component:"component",target:"target"},fNe={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"},mt(YTe,"isGitGraph"),yt(YTe,"isGitGraph"),mNe={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"},yNe={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"},mt(HTe,"isInfo"),yt(HTe,"isInfo"),vNe={$type:"Item",classSelector:"classSelector",name:"name"},bNe={$type:"Junction",id:"id",in:"in"},xNe={$type:"Label",negX:"negX",negY:"negY",offsetX:"offsetX",offsetY:"offsetY"},TNe={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"},kNe={$type:"Link",arrow:"arrow",from:"from",fromPort:"fromPort",linkLabel:"linkLabel",to:"to",toPort:"toPort"},wNe={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"},mt(XTe,"isMerge"),yt(XTe,"isMerge"),CNe={$type:"Note",evolution:"evolution",text:"text",visibility:"visibility"},SNe={$type:"Option",name:"name",value:"value"},ENe={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"},mt(KTe,"isPacket"),yt(KTe,"isPacket"),_Ne={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"},mt(ZTe,"isPacketBlock"),yt(ZTe,"isPacketBlock"),ANe={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"},mt(QTe,"isPie"),yt(QTe,"isPie"),RNe={$type:"PieSection",label:"label",value:"value"},mt(JTe,"isPieSection"),yt(JTe,"isPieSection"),LNe={$type:"Pipeline",components:"components",parent:"parent"},INe={$type:"PipelineComponent",evolution:"evolution",label:"label",name:"name"},NNe={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"},DNe={$type:"Section",classSelector:"classSelector",name:"name"},MNe={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"},ONe={$type:"Size",height:"height",width:"width"},PNe={$type:"Statement"},BNe={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"},mt(e5e,"isTreemap"),yt(e5e,"isTreemap"),$Ne={$type:"TreemapRow",indent:"indent",item:"item"},FNe={$type:"TreeNode",indent:"indent",name:"name"},zNe={$type:"TreeView",accDescr:"accDescr",accTitle:"accTitle",nodes:"nodes",title:"title"},qNe={$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(t5e,"isWardley"),yt(t5e,"isWardley"),jNe=class extends Bke{static{mt(this,"MermaidAstReflection")}constructor(){super(...arguments),this.types={Accelerator:{name:$Ie.$type,properties:{name:{name:$Ie.name},x:{name:$Ie.x},y:{name:$Ie.y}},superTypes:[]},Anchor:{name:FIe.$type,properties:{evolution:{name:FIe.evolution},name:{name:FIe.name},visibility:{name:FIe.visibility}},superTypes:[]},Annotation:{name:zIe.$type,properties:{number:{name:zIe.number},text:{name:zIe.text},x:{name:zIe.x},y:{name:zIe.y}},superTypes:[]},Annotations:{name:qIe.$type,properties:{x:{name:qIe.x},y:{name:qIe.y}},superTypes:[]},Architecture:{name:jIe.$type,properties:{accDescr:{name:jIe.accDescr},accTitle:{name:jIe.accTitle},edges:{name:jIe.edges,defaultValue:[]},groups:{name:jIe.groups,defaultValue:[]},junctions:{name:jIe.junctions,defaultValue:[]},services:{name:jIe.services,defaultValue:[]},title:{name:jIe.title}},superTypes:[]},Axis:{name:WIe.$type,properties:{label:{name:WIe.label},name:{name:WIe.name}},superTypes:[]},Branch:{name:UIe.$type,properties:{name:{name:UIe.name},order:{name:UIe.order}},superTypes:[PNe.$type]},Checkout:{name:GIe.$type,properties:{branch:{name:GIe.branch}},superTypes:[PNe.$type]},CherryPicking:{name:VIe.$type,properties:{id:{name:VIe.id},parent:{name:VIe.parent},tags:{name:VIe.tags,defaultValue:[]}},superTypes:[PNe.$type]},ClassDefStatement:{name:YIe.$type,properties:{className:{name:YIe.className},styleText:{name:YIe.styleText}},superTypes:[]},Commit:{name:HIe.$type,properties:{id:{name:HIe.id},message:{name:HIe.message},tags:{name:HIe.tags,defaultValue:[]},type:{name:HIe.type}},superTypes:[PNe.$type]},Common:{name:XIe.$type,properties:{accDescr:{name:XIe.accDescr},accTitle:{name:XIe.accTitle},title:{name:XIe.title}},superTypes:[]},Component:{name:KIe.$type,properties:{decorator:{name:KIe.decorator},evolution:{name:KIe.evolution},inertia:{name:KIe.inertia,defaultValue:!1},label:{name:KIe.label},name:{name:KIe.name},visibility:{name:KIe.visibility}},superTypes:[]},Curve:{name:ZIe.$type,properties:{entries:{name:ZIe.entries,defaultValue:[]},label:{name:ZIe.label},name:{name:ZIe.name}},superTypes:[]},Deaccelerator:{name:QIe.$type,properties:{name:{name:QIe.name},x:{name:QIe.x},y:{name:QIe.y}},superTypes:[]},Decorator:{name:JIe.$type,properties:{strategy:{name:JIe.strategy}},superTypes:[]},Direction:{name:eNe.$type,properties:{accDescr:{name:eNe.accDescr},accTitle:{name:eNe.accTitle},dir:{name:eNe.dir},statements:{name:eNe.statements,defaultValue:[]},title:{name:eNe.title}},superTypes:[fNe.$type]},Edge:{name:tNe.$type,properties:{lhsDir:{name:tNe.lhsDir},lhsGroup:{name:tNe.lhsGroup,defaultValue:!1},lhsId:{name:tNe.lhsId},lhsInto:{name:tNe.lhsInto,defaultValue:!1},rhsDir:{name:tNe.rhsDir},rhsGroup:{name:tNe.rhsGroup,defaultValue:!1},rhsId:{name:tNe.rhsId},rhsInto:{name:tNe.rhsInto,defaultValue:!1},title:{name:tNe.title}},superTypes:[]},EmDataEntity:{name:rNe.$type,properties:{dataBlockValue:{name:rNe.dataBlockValue},dataType:{name:rNe.dataType},name:{name:rNe.name}},superTypes:[]},EmFrame:{name:iNe.$type,properties:{},superTypes:[]},EmGwt:{name:nNe.$type,properties:{givenStatements:{name:nNe.givenStatements,defaultValue:[]},sourceFrame:{name:nNe.sourceFrame,referenceType:iNe.$type},thenStatements:{name:nNe.thenStatements,defaultValue:[]},whenStatements:{name:nNe.whenStatements,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:aNe.$type,properties:{entityIdentifier:{name:aNe.entityIdentifier,referenceType:sNe.$type}},superTypes:[]},EmModelEntity:{name:sNe.$type,properties:{name:{name:sNe.name}},superTypes:[]},EmNoteEntity:{name:oNe.$type,properties:{dataBlockValue:{name:oNe.dataBlockValue},dataType:{name:oNe.dataType},sourceFrame:{name:oNe.sourceFrame,referenceType:iNe.$type}},superTypes:[]},EmResetFrame:{name:lNe.$type,properties:{dataInlineValue:{name:lNe.dataInlineValue},dataReference:{name:lNe.dataReference,referenceType:rNe.$type},dataType:{name:lNe.dataType},entityIdentifier:{name:lNe.entityIdentifier},modelEntityType:{name:lNe.modelEntityType},name:{name:lNe.name},sourceFrames:{name:lNe.sourceFrames,defaultValue:[],referenceType:iNe.$type}},superTypes:[iNe.$type]},EmTimeFrame:{name:cNe.$type,properties:{dataInlineValue:{name:cNe.dataInlineValue},dataReference:{name:cNe.dataReference,referenceType:rNe.$type},dataType:{name:cNe.dataType},entityIdentifier:{name:cNe.entityIdentifier},modelEntityType:{name:cNe.modelEntityType},name:{name:cNe.name},sourceFrames:{name:cNe.sourceFrames,defaultValue:[],referenceType:iNe.$type}},superTypes:[iNe.$type]},Entry:{name:hNe.$type,properties:{axis:{name:hNe.axis,referenceType:WIe.$type},value:{name:hNe.value}},superTypes:[]},EventModel:{name:uNe.$type,properties:{accDescr:{name:uNe.accDescr},accTitle:{name:uNe.accTitle},dataEntities:{name:uNe.dataEntities,defaultValue:[]},frames:{name:uNe.frames,defaultValue:[]},gwtEntities:{name:uNe.gwtEntities,defaultValue:[]},modelEntities:{name:uNe.modelEntities,defaultValue:[]},noteEntities:{name:uNe.noteEntities,defaultValue:[]},title:{name:uNe.title}},superTypes:[]},Evolution:{name:dNe.$type,properties:{stages:{name:dNe.stages,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:pNe.$type,properties:{boundary:{name:pNe.boundary},name:{name:pNe.name},secondName:{name:pNe.secondName}},superTypes:[]},Evolve:{name:gNe.$type,properties:{component:{name:gNe.component},target:{name:gNe.target}},superTypes:[]},GitGraph:{name:fNe.$type,properties:{accDescr:{name:fNe.accDescr},accTitle:{name:fNe.accTitle},statements:{name:fNe.statements,defaultValue:[]},title:{name:fNe.title}},superTypes:[]},Group:{name:mNe.$type,properties:{icon:{name:mNe.icon},id:{name:mNe.id},in:{name:mNe.in},title:{name:mNe.title}},superTypes:[]},Info:{name:yNe.$type,properties:{accDescr:{name:yNe.accDescr},accTitle:{name:yNe.accTitle},title:{name:yNe.title}},superTypes:[]},Item:{name:vNe.$type,properties:{classSelector:{name:vNe.classSelector},name:{name:vNe.name}},superTypes:[]},Junction:{name:bNe.$type,properties:{id:{name:bNe.id},in:{name:bNe.in}},superTypes:[]},Label:{name:xNe.$type,properties:{negX:{name:xNe.negX,defaultValue:!1},negY:{name:xNe.negY,defaultValue:!1},offsetX:{name:xNe.offsetX},offsetY:{name:xNe.offsetY}},superTypes:[]},Leaf:{name:TNe.$type,properties:{classSelector:{name:TNe.classSelector},name:{name:TNe.name},value:{name:TNe.value}},superTypes:[vNe.$type]},Link:{name:kNe.$type,properties:{arrow:{name:kNe.arrow},from:{name:kNe.from},fromPort:{name:kNe.fromPort},linkLabel:{name:kNe.linkLabel},to:{name:kNe.to},toPort:{name:kNe.toPort}},superTypes:[]},Merge:{name:wNe.$type,properties:{branch:{name:wNe.branch},id:{name:wNe.id},tags:{name:wNe.tags,defaultValue:[]},type:{name:wNe.type}},superTypes:[PNe.$type]},Note:{name:CNe.$type,properties:{evolution:{name:CNe.evolution},text:{name:CNe.text},visibility:{name:CNe.visibility}},superTypes:[]},Option:{name:SNe.$type,properties:{name:{name:SNe.name},value:{name:SNe.value,defaultValue:!1}},superTypes:[]},Packet:{name:ENe.$type,properties:{accDescr:{name:ENe.accDescr},accTitle:{name:ENe.accTitle},blocks:{name:ENe.blocks,defaultValue:[]},title:{name:ENe.title}},superTypes:[]},PacketBlock:{name:_Ne.$type,properties:{bits:{name:_Ne.bits},end:{name:_Ne.end},label:{name:_Ne.label},start:{name:_Ne.start}},superTypes:[]},Pie:{name:ANe.$type,properties:{accDescr:{name:ANe.accDescr},accTitle:{name:ANe.accTitle},sections:{name:ANe.sections,defaultValue:[]},showData:{name:ANe.showData,defaultValue:!1},title:{name:ANe.title}},superTypes:[]},PieSection:{name:RNe.$type,properties:{label:{name:RNe.label},value:{name:RNe.value}},superTypes:[]},Pipeline:{name:LNe.$type,properties:{components:{name:LNe.components,defaultValue:[]},parent:{name:LNe.parent}},superTypes:[]},PipelineComponent:{name:INe.$type,properties:{evolution:{name:INe.evolution},label:{name:INe.label},name:{name:INe.name}},superTypes:[]},Radar:{name:NNe.$type,properties:{accDescr:{name:NNe.accDescr},accTitle:{name:NNe.accTitle},axes:{name:NNe.axes,defaultValue:[]},curves:{name:NNe.curves,defaultValue:[]},options:{name:NNe.options,defaultValue:[]},title:{name:NNe.title}},superTypes:[]},Section:{name:DNe.$type,properties:{classSelector:{name:DNe.classSelector},name:{name:DNe.name}},superTypes:[vNe.$type]},Service:{name:MNe.$type,properties:{icon:{name:MNe.icon},iconText:{name:MNe.iconText},id:{name:MNe.id},in:{name:MNe.in},title:{name:MNe.title}},superTypes:[]},Size:{name:ONe.$type,properties:{height:{name:ONe.height},width:{name:ONe.width}},superTypes:[]},Statement:{name:PNe.$type,properties:{},superTypes:[]},TreeNode:{name:FNe.$type,properties:{indent:{name:FNe.indent},name:{name:FNe.name}},superTypes:[]},TreeView:{name:zNe.$type,properties:{accDescr:{name:zNe.accDescr},accTitle:{name:zNe.accTitle},nodes:{name:zNe.nodes,defaultValue:[]},title:{name:zNe.title}},superTypes:[]},Treemap:{name:BNe.$type,properties:{accDescr:{name:BNe.accDescr},accTitle:{name:BNe.accTitle},title:{name:BNe.title},TreemapRows:{name:BNe.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:$Ne.$type,properties:{indent:{name:$Ne.indent},item:{name:$Ne.item}},superTypes:[]},Wardley:{name:qNe.$type,properties:{accDescr:{name:qNe.accDescr},accelerators:{name:qNe.accelerators,defaultValue:[]},accTitle:{name:qNe.accTitle},anchors:{name:qNe.anchors,defaultValue:[]},annotation:{name:qNe.annotation,defaultValue:[]},annotations:{name:qNe.annotations,defaultValue:[]},components:{name:qNe.components,defaultValue:[]},deaccelerators:{name:qNe.deaccelerators,defaultValue:[]},evolution:{name:qNe.evolution},evolves:{name:qNe.evolves,defaultValue:[]},links:{name:qNe.links,defaultValue:[]},notes:{name:qNe.notes,defaultValue:[]},pipelines:{name:qNe.pipelines,defaultValue:[]},size:{name:qNe.size},title:{name:qNe.title}},superTypes:[]}}}static{yt(this,"MermaidAstReflection")}},WNe=new jNe,GNe=yt(()=>UNe=UNe??qTe(`{"$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"),YNe=yt(()=>VNe=VNe??qTe('{"$type":"Grammar","isDeclared":true,"name":"EventModeling","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","entry":true,"name":"EventModel","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"eventmodeling"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"frames","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"dataEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"noteEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"gwtEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntityType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rmo"},{"$type":"Keyword","value":"readmodel"},{"$type":"Keyword","value":"ui"},{"$type":"Keyword","value":"cmd"},{"$type":"Keyword","value":"command"},{"$type":"Keyword","value":"evt"},{"$type":"Keyword","value":"event"},{"$type":"Keyword","value":"pcr"},{"$type":"Keyword","value":"processor"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"json"},{"$type":"Keyword","value":"jsobj"},{"$type":"Keyword","value":"figma"},{"$type":"Keyword","value":"salt"},{"$type":"Keyword","value":"uri"},{"$type":"Keyword","value":"md"},{"$type":"Keyword","value":"html"},{"$type":"Keyword","value":"text"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataInline","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataInlineValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataBlock","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataBlockValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"QualifiedName","dataType":"string","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"."},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmTimeFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"tf"},{"$type":"Keyword","value":"timeframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmResetFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rf"},{"$type":"Keyword","value":"resetframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmFrame","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"entity"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"data"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmNoteEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"note"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwt","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"gwt"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"given"},{"$type":"Assignment","feature":"givenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"},{"$type":"Group","elements":[{"$type":"Keyword","value":"when"},{"$type":"Assignment","feature":"whenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}],"cardinality":"?"},{"$type":"Keyword","value":"then"},{"$type":"Assignment","feature":"thenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwtStatement","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@9"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_EID","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_FI","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"EM_ID","definition":{"$type":"RegexToken","regex":"/[_a-zA-Z][\\\\w_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_FID","definition":{"$type":"RegexToken","regex":"/\\\\d{1,3}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_INLINE","definition":{"$type":"RegexToken","regex":"/\\\\{(.*)\\\\}|\\"(.*)\\"|\'(.*)\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_BLOCK","definition":{"$type":"RegexToken","regex":"/\\\\{[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?\\\\}(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EM_WS","definition":{"$type":"RegexToken","regex":"/\\\\s+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SL_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\/[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"imports":[],"types":[]}'),"EventModelingGrammar"),XNe=yt(()=>HNe=HNe??qTe(`{"$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"),ZNe=yt(()=>KNe=KNe??qTe(`{"$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"),JNe=yt(()=>QNe=QNe??qTe(`{"$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"),tDe=yt(()=>eDe=eDe??qTe(`{"$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"),iDe=yt(()=>rDe=rDe??qTe(`{"$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"),aDe=yt(()=>nDe=nDe??qTe(`{"$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"),oDe=yt(()=>sDe=sDe??qTe(`{"$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"),cDe=yt(()=>lDe=lDe??qTe(`{"$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"),bDe={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(vDe={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(yDe={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(mDe={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(fDe={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(gDe={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(pDe={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(dDe={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(uDe={languageId:"eventmodeling",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(hDe={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"}),mode:"production"},xDe={AstReflection:yt(()=>new jNe,"AstReflection")},TDe={Grammar:yt(()=>GNe(),"Grammar"),LanguageMetaData:yt(()=>hDe,"LanguageMetaData"),parser:{}},kDe={Grammar:yt(()=>YNe(),"Grammar"),LanguageMetaData:yt(()=>uDe,"LanguageMetaData"),parser:{}},wDe={Grammar:yt(()=>XNe(),"Grammar"),LanguageMetaData:yt(()=>dDe,"LanguageMetaData"),parser:{}},CDe={Grammar:yt(()=>ZNe(),"Grammar"),LanguageMetaData:yt(()=>pDe,"LanguageMetaData"),parser:{}},SDe={Grammar:yt(()=>JNe(),"Grammar"),LanguageMetaData:yt(()=>gDe,"LanguageMetaData"),parser:{}},EDe={Grammar:yt(()=>tDe(),"Grammar"),LanguageMetaData:yt(()=>fDe,"LanguageMetaData"),parser:{}},_De={Grammar:yt(()=>iDe(),"Grammar"),LanguageMetaData:yt(()=>mDe,"LanguageMetaData"),parser:{}},ADe={Grammar:yt(()=>aDe(),"Grammar"),LanguageMetaData:yt(()=>yDe,"LanguageMetaData"),parser:{}},RDe={Grammar:yt(()=>oDe(),"Grammar"),LanguageMetaData:yt(()=>vDe,"LanguageMetaData"),parser:{}},LDe={Grammar:yt(()=>cDe(),"Grammar"),LanguageMetaData:yt(()=>bDe,"LanguageMetaData"),parser:{}},IDe={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},NDe=class extends e9e{static{mt(this,"AbstractMermaidValueConverter")}static{yt(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=IDe[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}},DDe=class extends NDe{static{mt(this,"CommonValueConverter")}static{yt(this,"CommonValueConverter")}runCustomConverter(e,t,r){}},MDe=class extends JLe{static{mt(this,"AbstractMermaidTokenBuilder")}static{yt(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 MDe{static{mt(this,"CommonTokenBuilder")}static{yt(this,"CommonTokenBuilder")}}});function PDe(e=wIe){var e=OTe(MTe(e),xDe),t=OTe(DTe({shared:e}),_De,$De);return e.ServiceRegistry.register(t),{shared:e,Radar:t}}var BDe,$De,FDe=r(()=>{ODe(),BDe=class extends MDe{static{mt(this,"RadarTokenBuilder")}static{yt(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},$De={parser:{TokenBuilder:yt(()=>new BDe,"TokenBuilder"),ValueConverter:yt(()=>new DDe,"ValueConverter")}},mt(PDe,"createRadarServices"),yt(PDe,"createRadarServices")});function zDe(e){var t,r=e.validation.TreemapValidator;(e=e.validation.ValidationRegistry)&&(t={Treemap:r.checkSingleRoot.bind(r)},e.register(t,r))}function qDe(e=wIe){var e=OTe(MTe(e),xDe),t=OTe(DTe({shared:e}),ADe,VDe);return e.ServiceRegistry.register(t),zDe(t),{shared:e,Treemap:t}}var jDe,WDe,UDe,GDe,VDe,YDe=r(()=>{ODe(),jDe=class extends MDe{static{mt(this,"TreemapTokenBuilder")}static{yt(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},WDe=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,UDe=class extends NDe{static{mt(this,"TreemapValueConverter")}static{yt(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=WDe.exec(t))?{$type:"ClassDefStatement",className:e[1],styleText:e[2]||void 0}:void 0:void 0}},mt(zDe,"registerValidationChecks"),yt(zDe,"registerValidationChecks"),GDe=class{static{mt(this,"TreemapValidator")}static{yt(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"}))}},VDe={parser:{TokenBuilder:yt(()=>new jDe,"TokenBuilder"),ValueConverter:yt(()=>new UDe,"ValueConverter")},validation:{TreemapValidator:yt(()=>new GDe,"TreemapValidator")}},mt(qDe,"createTreemapServices"),yt(qDe,"createTreemapServices")});function HDe(e=wIe){var e=OTe(MTe(e),xDe),t=OTe(DTe({shared:e}),LDe,KDe);return e.ServiceRegistry.register(t),{shared:e,Wardley:t}}var XDe,KDe,ZDe=r(()=>{ODe(),XDe=class extends NDe{static{mt(this,"WardleyValueConverter")}static{yt(this,"WardleyValueConverter")}runCustomConverter(e,t,r){if("LINK_LABEL"===e.name.toUpperCase())return t.substring(1).trim()}},KDe={parser:{ValueConverter:yt(()=>new XDe,"ValueConverter")}},mt(HDe,"createWardleyServices"),yt(HDe,"createWardleyServices")});function QDe(e=wIe){var e=OTe(MTe(e),xDe),t=OTe(DTe({shared:e}),wDe,eMe);return e.ServiceRegistry.register(t),{shared:e,GitGraph:t}}var JDe,eMe,tMe=r(()=>{ODe(),JDe=class extends MDe{static{mt(this,"GitGraphTokenBuilder")}static{yt(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},eMe={parser:{TokenBuilder:yt(()=>new JDe,"TokenBuilder"),ValueConverter:yt(()=>new DDe,"ValueConverter")}},mt(QDe,"createGitGraphServices"),yt(QDe,"createGitGraphServices")});function rMe(e=wIe){var e=OTe(MTe(e),xDe),t=OTe(DTe({shared:e}),CDe,nMe);return e.ServiceRegistry.register(t),{shared:e,Info:t}}var iMe,nMe,aMe=r(()=>{ODe(),iMe=class extends MDe{static{mt(this,"InfoTokenBuilder")}static{yt(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},nMe={parser:{TokenBuilder:yt(()=>new iMe,"TokenBuilder"),ValueConverter:yt(()=>new DDe,"ValueConverter")}},mt(rMe,"createInfoServices"),yt(rMe,"createInfoServices")});function sMe(e=wIe){var e=OTe(MTe(e),xDe),t=OTe(DTe({shared:e}),SDe,lMe);return e.ServiceRegistry.register(t),{shared:e,Packet:t}}var oMe,lMe,cMe=r(()=>{ODe(),oMe=class extends MDe{static{mt(this,"PacketTokenBuilder")}static{yt(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},lMe={parser:{TokenBuilder:yt(()=>new oMe,"TokenBuilder"),ValueConverter:yt(()=>new DDe,"ValueConverter")}},mt(sMe,"createPacketServices"),yt(sMe,"createPacketServices")});function hMe(e=wIe){var e=OTe(MTe(e),xDe),t=OTe(DTe({shared:e}),EDe,pMe);return e.ServiceRegistry.register(t),{shared:e,Pie:t}}var uMe,dMe,pMe,gMe=r(()=>{ODe(),uMe=class extends MDe{static{mt(this,"PieTokenBuilder")}static{yt(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},dMe=class extends NDe{static{mt(this,"PieValueConverter")}static{yt(this,"PieValueConverter")}runCustomConverter(e,t,r){if("PIE_SECTION_LABEL"===e.name)return t.replace(/"/g,"").trim()}},pMe={parser:{TokenBuilder:yt(()=>new uMe,"TokenBuilder"),ValueConverter:yt(()=>new dMe,"ValueConverter")}},mt(hMe,"createPieServices"),yt(hMe,"createPieServices")});function fMe(e=wIe){var e=OTe(MTe(e),xDe),t=OTe(DTe({shared:e}),RDe,vMe);return e.ServiceRegistry.register(t),{shared:e,TreeView:t}}var mMe,yMe,vMe,bMe=r(()=>{ODe(),mMe=class extends NDe{static{mt(this,"TreeViewValueConverter")}static{yt(this,"TreeViewValueConverter")}runCustomConverter(e,t,r){return"INDENTATION"===e.name?t?.length||0:"STRING2"===e.name?t.substring(1,t.length-1):void 0}},yMe=class extends MDe{static{mt(this,"TreeViewTokenBuilder")}static{yt(this,"TreeViewTokenBuilder")}constructor(){super(["treeView-beta"])}},vMe={parser:{TokenBuilder:yt(()=>new yMe,"TokenBuilder"),ValueConverter:yt(()=>new mMe,"ValueConverter")}},mt(fMe,"createTreeViewServices"),yt(fMe,"createTreeViewServices")});function xMe(e=wIe){var e=OTe(MTe(e),xDe),t=OTe(DTe({shared:e}),TDe,wMe);return e.ServiceRegistry.register(t),{shared:e,Architecture:t}}var TMe,kMe,wMe,CMe=r(()=>{ODe(),TMe=class extends MDe{static{mt(this,"ArchitectureTokenBuilder")}static{yt(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},kMe=class extends NDe{static{mt(this,"ArchitectureValueConverter")}static{yt(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()}}},wMe={parser:{TokenBuilder:yt(()=>new TMe,"TokenBuilder"),ValueConverter:yt(()=>new kMe,"ValueConverter")}},mt(xMe,"createArchitectureServices"),yt(xMe,"createArchitectureServices")});function SMe(e){var t,r=e.validation.EventModelingValidator;(e=e.validation.ValidationRegistry)&&(t={EmTimeFrame:r.checkSourceFrameTypes.bind(r),EmResetFrame:r.checkSourceFrameTypes.bind(r)},e.register(t,r))}function EMe(e=wIe){var e=OTe(MTe(e),xDe),t=OTe(DTe({shared:e}),kDe,MMe);return e.ServiceRegistry.register(t),SMe(t),{shared:e,EventModel:t}}var _Me,AMe,RMe,LMe,IMe,NMe,DMe,MMe,OMe=r(()=>{ODe(),_Me=class extends MDe{static{mt(this,"EventModelingTokenBuilder")}static{yt(this,"EventModelingTokenBuilder")}constructor(){super(["eventmodeling"])}},AMe=new Set(["cmd","command"]),RMe=new Set(["evt","event"]),LMe=new Set(["rmo","readmodel"]),IMe=new Set(["pcr","processor"]),NMe=new Set(["ui"]),mt(SMe,"registerValidationChecks"),yt(SMe,"registerValidationChecks"),DMe=class{static{mt(this,"EventModelingValidator")}static{yt(this,"EventModelingValidator")}checkSourceFrameTypes(e,t){0!==e.sourceFrames.length&&(AMe.has(e.modelEntityType)?this.validateSources(e,new Set([...NMe,...IMe]),"command","ui or processor",t):RMe.has(e.modelEntityType)?this.validateSources(e,AMe,"event","command",t):LMe.has(e.modelEntityType)?this.validateSources(e,RMe,"read model","event",t):IMe.has(e.modelEntityType)?this.validateSources(e,LMe,"processor","read model",t):NMe.has(e.modelEntityType)&&this.validateSources(e,LMe,"ui","read model",t))}validateSources(e,t,r,i,n){for(var a of e.sourceFrames)void 0===(a=a.ref)||t.has(a.modelEntityType)||n("error",`A ${r} can only receive input from a ${i}, not from '${a.modelEntityType}'.`,{node:e,property:"sourceFrames"})}},MMe={parser:{TokenBuilder:yt(()=>new _Me,"TokenBuilder"),ValueConverter:yt(()=>new DDe,"ValueConverter")},validation:{EventModelingValidator:yt(()=>new DMe,"EventModelingValidator")}},mt(EMe,"createEventModelingServices"),yt(EMe,"createEventModelingServices")}),PMe={},BMe=(Vat(PMe,{InfoModule:()=>nMe,createInfoServices:()=>rMe}),r(()=>{aMe(),ODe()})),$Me={},FMe=(Vat($Me,{PacketModule:()=>lMe,createPacketServices:()=>sMe}),r(()=>{cMe(),ODe()})),zMe={},qMe=(Vat(zMe,{PieModule:()=>pMe,createPieServices:()=>hMe}),r(()=>{gMe(),ODe()})),jMe={},WMe=(Vat(jMe,{TreeViewModule:()=>vMe,createTreeViewServices:()=>fMe}),r(()=>{bMe(),ODe()})),UMe={},GMe=(Vat(UMe,{ArchitectureModule:()=>wMe,createArchitectureServices:()=>xMe}),r(()=>{CMe(),ODe()})),VMe={},YMe=(Vat(VMe,{GitGraphModule:()=>eMe,createGitGraphServices:()=>QDe}),r(()=>{tMe(),ODe()})),HMe={},XMe=(Vat(HMe,{EventModelingModule:()=>MMe,createEventModelingServices:()=>EMe}),r(()=>{OMe(),ODe()})),KMe={},ZMe=(Vat(KMe,{RadarModule:()=>$De,createRadarServices:()=>PDe}),r(()=>{FDe(),ODe()})),QMe={},JMe=(Vat(QMe,{TreemapModule:()=>VDe,createTreemapServices:()=>qDe}),r(()=>{YDe(),ODe()})),eOe={},tOe=(Vat(eOe,{WardleyModule:()=>KDe,createWardleyServices:()=>HDe}),r(()=>{ZDe(),ODe()}));async function rOe(e,t){var r=nOe[e];if(!r)throw new Error("Unknown diagram type: "+e);if(iOe[e]||await r(),0<(r=iOe[e].parse(t)).lexerErrors.length||0<r.parserErrors.length)throw new aOe(r);return r.value}var iOe,nOe,aOe,sOe=r(()=>{FDe(),YDe(),ZDe(),tMe(),aMe(),cMe(),gMe(),bMe(),CMe(),OMe(),ODe(),iOe={},nOe={info:yt(async()=>{var e=(e=(await Promise.resolve().then(()=>(BMe(),PMe))).createInfoServices)().Info.parser.LangiumParser;iOe.info=e},"info"),packet:yt(async()=>{var e=(e=(await Promise.resolve().then(()=>(FMe(),$Me))).createPacketServices)().Packet.parser.LangiumParser;iOe.packet=e},"packet"),pie:yt(async()=>{var e=(e=(await Promise.resolve().then(()=>(qMe(),zMe))).createPieServices)().Pie.parser.LangiumParser;iOe.pie=e},"pie"),treeView:yt(async()=>{var e=(e=(await Promise.resolve().then(()=>(WMe(),jMe))).createTreeViewServices)().TreeView.parser.LangiumParser;iOe.treeView=e},"treeView"),architecture:yt(async()=>{var e=(e=(await Promise.resolve().then(()=>(GMe(),UMe))).createArchitectureServices)().Architecture.parser.LangiumParser;iOe.architecture=e},"architecture"),gitGraph:yt(async()=>{var e=(e=(await Promise.resolve().then(()=>(YMe(),VMe))).createGitGraphServices)().GitGraph.parser.LangiumParser;iOe.gitGraph=e},"gitGraph"),eventmodeling:yt(async()=>{var e=(e=(await Promise.resolve().then(()=>(XMe(),HMe))).createEventModelingServices)().EventModel.parser.LangiumParser;iOe.eventmodeling=e},"eventmodeling"),radar:yt(async()=>{var e=(e=(await Promise.resolve().then(()=>(ZMe(),KMe))).createRadarServices)().Radar.parser.LangiumParser;iOe.radar=e},"radar"),treemap:yt(async()=>{var e=(e=(await Promise.resolve().then(()=>(JMe(),QMe))).createTreemapServices)().Treemap.parser.LangiumParser;iOe.treemap=e},"treemap"),wardley:yt(async()=>{var e=(e=(await Promise.resolve().then(()=>(tOe(),eOe))).createWardleyServices)().Wardley.parser.LangiumParser;iOe.wardley=e},"wardley")},mt(rOe,"parse"),yt(rOe,"parse"),aOe=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{yt(this,"MermaidParseError")}}});function oOe(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}var lOe,cOe,hOe=r(()=>{mt(oOe,"populateCommonDb")}),uOe=r(()=>{lOe={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}}),dOe=r(()=>{cOe=class{constructor(e){this.init=e,this.records=this.init()}static{mt(this,"ImperativeState")}reset(){this.records=this.init()}}});function pOe(){return SC({length:7})}function gOe(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 fOe(e,t,r){-1===(t=e.indexOf(t))?e.push(r):e.splice(t,1,r)}function mOe(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 v.records.branches)v.records.branches.get(i)===t.id&&n.push(i);if(P.debug(n.join(" ")),t.parents&&2==t.parents.length&&t.parents[0]&&t.parents[1]){var a=v.records.commits.get(t.parents[0]);fOe(e,t,a),t.parents[1]&&e.push(v.records.commits.get(t.parents[1]))}else{if(0==t.parents.length)return;t.parents[0]&&(a=v.records.commits.get(t.parents[0]),fOe(e,t,a))}mOe(e=gOe(e,e=>e.id))}var yOe,vOe,v,bOe,xOe,TOe,kOe,wOe,COe,SOe,EOe,_Oe,AOe,ROe,LOe,IOe,NOe,DOe,MOe,OOe,POe,BOe,$Oe,FOe,zOe,qOe,jOe,WOe,UOe,GOe,VOe,YOe,HOe,XOe,KOe,ZOe,QOe,JOe,ePe,tPe,rPe,iPe,nPe,aPe,sPe,oPe,lPe,cPe,hPe,uPe,dPe,pPe,gPe,fPe,mPe,yPe,vPe,bPe,xPe,TPe,kPe,wPe,CPe,SPe,EPe,_Pe,APe,RPe,LPe,IPe,NPe,DPe,MPe,OPe=r(()=>{e(),zC(),wi(),th(),Wu(),uOe(),dOe(),Ti(),yOe=ir.gitGraph,vOe=mt(()=>lC({...yOe,...vr().gitGraph}),"getConfig"),v=new cOe(()=>{var e=(t=vOe()).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(pOe,"getID"),mt(gOe,"uniqBy"),bOe=mt(function(e){v.records.direction=e},"setDirection"),xOe=mt(function(e){P.debug("options str",e),e=e?.trim()||"{}";try{v.records.options=JSON.parse(e)}catch(e){P.error("error while parsing gitGraph options",e.message)}},"setOptions"),TOe=mt(function(){return v.records.options},"getOptions"),kOe=mt(function(e){let t=e.msg,r=e.id,i=e.type,n=e.tags,a=(P.info("commit",t,r,i,n),P.debug("Entering commit:",t,r,i,n),vOe());r=I.sanitizeText(r,a),t=I.sanitizeText(t,a),n=n?.map(e=>I.sanitizeText(e,a)),e={id:r||v.records.seq+"-"+pOe(),message:t,seq:v.records.seq++,type:i??lOe.NORMAL,tags:n??[],parents:null==v.records.head?[]:[v.records.head.id],branch:v.records.currBranch},v.records.head=e,P.info("main branch",a.mainBranchName),v.records.commits.has(e.id)&&P.warn(`Commit ID ${e.id} already exists`),v.records.commits.set(e.id,e),v.records.branches.set(v.records.currBranch,e.id),P.debug("in pushCommit "+e.id)},"commit"),wOe=mt(function(e){var t=e.name,e=e.order,t=I.sanitizeText(t,vOe());if(v.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}")`);v.records.branches.set(t,null!=v.records.head?v.records.head.id:null),v.records.branchConfig.set(t,{name:t,order:e}),EOe(t),P.debug("in createBranch")},"branch"),COe=mt(e=>{var t=e.branch,r=e.id,i=e.type,n=e.tags,a=vOe(),t=I.sanitizeText(t,a),r=r&&I.sanitizeText(r,a),e=v.records.branches.get(v.records.currBranch),a=v.records.branches.get(t),e=e?v.records.commits.get(e):void 0,s=a?v.records.commits.get(a):void 0;if(e&&s&&e.branch===t)throw new Error(`Cannot merge branch '${t}' into itself.`);if(v.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 (${v.records.currBranch})has no commits`)).hash={text:"merge "+t,token:"merge "+t,expected:["commit"]},o;if(!v.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&&v.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||v.records.seq+"-"+pOe(),message:`merged branch ${t} into `+v.records.currBranch,seq:v.records.seq++,parents:null==v.records.head?[]:[v.records.head.id,s],branch:v.records.currBranch,type:lOe.MERGE,customType:i,customId:!!r,tags:n??[]};v.records.head=o,v.records.commits.set(o.id,o),v.records.branches.set(v.records.currBranch,o.id),P.debug(v.records.branches),P.debug("in mergeBranch")},"merge"),SOe=mt(function(e){let t=e.id,r=e.targetId,i=e.tags,n=e.parent,a=(P.debug("Entering cherryPick:",t,r,i),vOe());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||!v.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=v.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===lOe.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||!v.records.commits.has(r)){if(s===v.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=v.records.branches.get(v.records.currBranch))||!s)throw(o=new Error(`Incorrect usage of "cherry-pick". Current branch (${v.records.currBranch})has no commits`)).hash={text:`cherryPick ${t} `+r,token:`cherryPick ${t} `+r,expected:["cherry-pick abc"]},o;var o=v.records.commits.get(s);if(void 0===o||!o)throw(s=new Error(`Incorrect usage of "cherry-pick". Current branch (${v.records.currBranch})has no commits`)).hash={text:`cherryPick ${t} `+r,token:`cherryPick ${t} `+r,expected:["cherry-pick abc"]},s;o={id:v.records.seq+"-"+pOe(),message:`cherry-picked ${e?.message} into `+v.records.currBranch,seq:v.records.seq++,parents:null==v.records.head?[]:[v.records.head.id,e.id],branch:v.records.currBranch,type:lOe.CHERRY_PICK,tags:i?i.filter(Boolean):["cherry-pick:"+e.id+(e.type===lOe.MERGE?"|parent:"+n:"")]},v.records.head=o,v.records.commits.set(o.id,o),v.records.branches.set(v.records.currBranch,o.id),P.debug(v.records.branches),P.debug("in cherryPick")}},"cherryPick"),EOe=mt(function(e){var t;if(e=I.sanitizeText(e,vOe()),!v.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;v.records.currBranch=e,t=v.records.branches.get(v.records.currBranch),v.records.head=void 0!==t&&t?v.records.commits.get(t)??null:null},"checkout"),mt(fOe,"upsert"),mt(mOe,"prettyPrintCommitHistory"),_Oe=mt(function(){P.debug(v.records.commits),mOe([NOe()[0]])},"prettyPrint"),AOe=mt(function(){v.reset(),Ph()},"clear"),ROe=mt(function(){return[...v.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"),LOe=mt(function(){return v.records.branches},"getBranches"),IOe=mt(function(){return v.records.commits},"getCommits"),NOe=mt(function(){var e=[...v.records.commits.values()];return e.forEach(function(e){P.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},"getCommitsArray"),DOe=mt(function(){return v.records.currBranch},"getCurrentBranch"),MOe=mt(function(){return v.records.direction},"getDirection"),OOe=mt(function(){return v.records.head},"getHead"),POe={commitType:lOe,getConfig:vOe,setDirection:bOe,setOptions:xOe,getOptions:TOe,commit:kOe,branch:wOe,merge:COe,cherryPick:SOe,checkout:EOe,prettyPrint:_Oe,clear:AOe,getBranchesAsObjArray:ROe,getBranches:LOe,getCommits:IOe,getCommitsArray:NOe,getCurrentBranch:DOe,getDirection:MOe,getHead:OOe,setAccTitle:Bh,getAccTitle:$h,getAccDescription:zh,setAccDescription:Fh,setDiagramTitle:qh,getDiagramTitle:jh}}),PPe=r(()=>{sOe(),e(),hOe(),OPe(),uOe(),BOe=mt((e,t)=>{oOe(e,t),e.dir&&t.setDirection(e.dir);for(var r of e.statements)$Oe(r,t)},"populate"),$Oe=mt((e,t)=>{var r={Commit:mt(e=>t.commit(FOe(e)),"Commit"),Branch:mt(e=>t.branch(zOe(e)),"Branch"),Merge:mt(e=>t.merge(qOe(e)),"Merge"),Checkout:mt(e=>t.checkout(jOe(e)),"Checkout"),CherryPicking:mt(e=>t.cherryPick(WOe(e)),"CherryPicking")}[e.$type];r?r(e):P.error("Unknown statement type: "+e.$type)},"parseStatement"),FOe=mt(e=>({id:e.id,msg:e.message??"",type:void 0!==e.type?lOe[e.type]:lOe.NORMAL,tags:e.tags??void 0}),"parseCommit"),zOe=mt(e=>({name:e.name,order:e.order??0}),"parseBranch"),qOe=mt(e=>({branch:e.branch,id:e.id??"",type:void 0!==e.type?lOe[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),jOe=mt(e=>e.branch,"parseCheckout"),WOe=mt(e=>({id:e.id,targetId:"",tags:0===e.tags?.length?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),UOe={parse:mt(async e=>{e=await rOe("gitGraph",e),P.debug(e),BOe(e,POe)},"parse")}}),BPe=r(()=>{bk(),Uu(),e(),zC(),uOe(),GOe=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),VOe=new Set(["redux-color","redux-dark-color"]),YOe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),HOe=mt((e,t,r=!1)=>r&&0<e?(e-1)%(t-1)+1:e%t,"calcColorIndex"),XOe=new Map,KOe=new Map,ZOe=new Map,QOe=[],JOe=0,ePe="LR",tPe=mt(()=>{XOe.clear(),KOe.clear(),ZOe.clear(),JOe=0,QOe=[],ePe="LR"},"clear"),rPe=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"),iPe=mt(e=>{let r,i,n;return n="BT"===ePe?(i=mt((e,t)=>e<=t,"comparisonFunc"),1/0):(i=mt((e,t)=>t<=e,"comparisonFunc"),0),e.forEach(e=>{var t="TB"===ePe||"BT"==ePe?KOe.get(e)?.y:KOe.get(e)?.x;void 0!==t&&i(t,n)&&(r=e,n=t)}),r},"findClosestParent"),nPe=mt(e=>{let r="",i=1/0;return e.forEach(e=>{var t=KOe.get(e).y;t<=i&&(r=e,i=t)}),r||void 0},"findClosestParentBT"),aPe=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=oPe(t),a=Math.max(n,a)):r.push(t),lPe(t,n)}),n=a,r.forEach(e=>{cPe(e,n,t)}),e.forEach(e=>{var t,r;(e=i.get(e))?.parents.length&&(t=nPe(e.parents),(n=KOe.get(t).y-40)<=a&&(a=n),t=XOe.get(e.branch).pos,r=n-10,KOe.set(e.id,{x:t,y:r}))})},"setParallelBTPos"),sPe=mt(e=>{var t=iPe(e.parents.filter(e=>null!==e));if(!t)throw new Error("Closest parent not found for commit "+e.id);if(void 0===(t=KOe.get(t)?.y))throw new Error("Closest parent position not found for commit "+e.id);return t},"findClosestParentPos"),oPe=mt(e=>sPe(e)+40,"calculateCommitPosition"),lPe=mt((e,t)=>{var r=XOe.get(e.branch);if(r)return r=r.pos,KOe.set(e.id,{x:r,y:t+=10}),{x:r,y:t};throw new Error("Branch not found for commit "+e.id)},"setCommitPosition"),cPe=mt((e,t,r)=>{var i=XOe.get(e.branch);if(!i)throw new Error("Branch not found for commit "+e.id);i=i.pos,KOe.set(e.id,{x:i,y:t+r})},"setRootPosition"),hPe=mt((e,t,r,i,n,a)=>{var s=B().theme,o=GOe.has(s??""),l=VOe.has(s??""),s=YOe.has(s??"");a===lOe.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${HOe(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${HOe(n,8,l)} ${i}-inner`)):a===lOe.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`+HOe(n,8,l)),a===lOe.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`+HOe(n,8,l))),a===lOe.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`+HOe(n,8,l))))},"drawCommitBullet"),uPe=mt((e,t,r,i,n)=>{var a,s;t.type!==lOe.CHERRY_PICK&&(t.customId&&t.type===lOe.MERGE||t.type!==lOe.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"===ePe||"BT"===ePe?(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"===ePe||"BT"===ePe?(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"),dPe=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 c=n.insert("polygon"),h=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:h,rect:c,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"!==ePe&&"BT"!==ePe||(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"),pPe=mt(e=>{switch(e.customType??e.type){case lOe.NORMAL:return"commit-normal";case lOe.REVERSE:return"commit-reverse";case lOe.HIGHLIGHT:return"commit-highlight";case lOe.MERGE:return"commit-merge";case lOe.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),gPe=mt((e,t,r,i)=>{var n,a={x:0,y:0};return 0<e.parents.length?(n=iPe(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"),fPe=mt((e,t,r)=>{var r="BT"===ePe&&r?t:t+10,t=XOe.get(e.branch)?.pos,i="TB"===ePe||"BT"===ePe?XOe.get(e.branch)?.pos:r;if(void 0===i||void 0===t)throw new Error("Position were undefined for commit "+e.id);return e=GOe.has(B().theme??""),{x:i,y:"TB"===ePe||"BT"===ePe?r:t+(e?7:-2),posWithOffset:r}},"getCommitPosition"),mPe=mt((e,a,s,o)=>{let l=e.append("g").attr("class","commit-bullets"),c=e.append("g").attr("class","commit-labels"),h="TB"===ePe||"BT"===ePe?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"===ePe&&(u&&aPe(i,a,h),i=i.reverse()),i.forEach(e=>{var t=a.get(e);if(!t)throw new Error("Commit not found for key "+e);u&&(h=gPe(t,ePe,h,KOe));var r,i,n,e=fPe(t,h,u);s&&(r=pPe(t),i=t.customType??t.type,n=XOe.get(t.branch)?.index??0,hPe(l,t,e,r,n,i),uPe(c,t,e,h,o),dPe(c,t,e,h)),"TB"===ePe||"BT"===ePe?KOe.set(t.id,{x:e.x,y:e.posWithOffset}):KOe.set(t.id,{x:e.posWithOffset,y:e.y}),(h="BT"===ePe&&u?h+40:h+40+10)>JOe&&(JOe=h)})},"drawCommits"),yPe=mt((t,r,e,i,n)=>{let a=(("TB"===ePe||"BT"===ePe?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"),vPe=mt((e,t,r=0)=>{let i=e+Math.abs(e-t)/2,n;return 5<r?i:QOe.every(e=>10<=Math.abs(e-i))?(QOe.push(i),i):(n=Math.abs(e-t),vPe(e,t-n/5,r+1))},"findLane"),bPe=mt((e,t,r,i)=>{var n,a=B().theme,a=VOe.has(a??""),s=KOe.get(t.id),o=KOe.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=yPe(t,r,s,o,i),c="",h="",u=0,d=0,p=XOe.get(r.branch)?.index;r.type===lOe.MERGE&&t.id!==r.parents[0]&&(p=XOe.get(t.branch)?.index);let g;if(l?(c="A 10 10, 0, 0, 0,",h="A 10 10, 0, 0, 1,",u=10,d=10,i=s.y<o.y?vPe(s.y,o.y):vPe(o.y,s.y),n=s.x<o.x?vPe(s.x,o.x):vPe(o.x,s.x),g="TB"===ePe?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=XOe.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):"BT"===ePe?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=XOe.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):s.y<o.y?`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:(p=XOe.get(t.branch)?.index,`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)):(c="A 20 20, 0, 0, 0,",h="A 20 20, 0, 0, 1,",u=20,d=20,"TB"===ePe?(s.x<o.x&&(g=r.type===lOe.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&&(c="A 20 20, 0, 0, 0,",h="A 20 20, 0, 0, 1,",u=20,d=20,g=r.type===lOe.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)):"BT"===ePe?(s.x<o.x&&(g=r.type===lOe.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&&(c="A 20 20, 0, 0, 0,",h="A 20 20, 0, 0, 1,",u=20,d=20,g=r.type===lOe.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)):(s.y<o.y&&(g=r.type===lOe.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=r.type===lOe.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=`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"+HOe(p,8,a))},"drawArrow"),xPe=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=>{bPe(i,r.get(e),t,r)})})},"drawArrows"),TPe=mt((e,t,c,h)=>{let{look:u,theme:r,themeVariables:i}=B(),{dropShadow:d,THEME_COLOR_LIMIT:p}=i,g=GOe.has(r??""),f=VOe.has(r??""),m=e.append("g");t.forEach((e,t)=>{var t=HOe(t,g?p:8,f),r=XOe.get(e.name)?.pos;if(void 0===r)throw new Error("Position not found for branch "+e.name);var i="TB"===ePe||"BT"===ePe?r:g?r+6+1:r-2,n=((n=m.append("line")).attr("x1",0),n.attr("y1",i),n.attr("x2",JOe),n.attr("y2",i),n.attr("class","branch branch"+t),"TB"===ePe?(n.attr("y1",30),n.attr("x1",r),n.attr("y2",JOe),n.attr("x2",r)):"BT"===ePe&&(n.attr("y1",JOe),n.attr("x1",r),n.attr("y2",30),n.attr("x2",r)),QOe.push(i),e.name),e=rPe(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(#${h}-drop-shadow)`:d):"").attr("rx",s).attr("ry",s).attr("x",-e.width-4-(!0===c.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===c.rotateCommitLabel?30:0)+o/2)+", "+(i-e.height/2-2)+")"),"TB"===ePe?(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"===ePe?(n.attr("x",r-e.width/2-10).attr("y",JOe),a.attr("transform","translate("+(r-e.width/2-5)+", "+JOe+")"),g&&(n.attr("transform",`translate(${-o/2-3}, ${10+l})`),a.attr("transform","translate("+(r-e.width/2-5)+", "+(JOe+2*l+4)+")"))):n.attr("transform","translate(-19, "+(i-12-l/2)+")")})},"drawBranches"),kPe=mt(function(e,t,r,i,n){return XOe.set(e,{pos:t,index:r}),t+(50+(n?40:0)+("TB"===ePe||"BT"===ePe?i.width/2:0))},"setBranchPosition"),wPe=mt(function(u,d,p,g){if(tPe(),P.debug("in gitgraph renderer",u+`
|
||
`,"id:",d,p),(u=g.db).getConfig){let e=u.getConfig(),s=e.rotateCommitLabel??!1,o=(ZOe=u.getCommits(),p=u.getBranchesAsObjArray(),ePe=u.getDirection(),Q(`[id="${d}"]`)),{look:t,theme:r,themeVariables:i}=B(),{useGradient:n,gradientStart:a,gradientStop:l,filterColor:c}=i,h=(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&&GOe.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",c),0);p.forEach((e,t)=>{var r=rPe(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());h=kPe(e.name,h,t,r,s),a.remove(),n.remove(),i.remove()}),mPe(o,ZOe,!1,e),e.showBranches&&TPe(o,p,e,d),xPe(o,ZOe),mPe(o,ZOe,!0,e),PC.insertTitle(o,"gitTitleText",e.titleTopMargin??0,u.getDiagramTitle()),Hh(void 0,o,e.diagramPadding,e.useMaxWidth)}else P.error("getConfig method is not available on db")},"draw"),CPe={draw:wPe}}),$Pe=r(()=>{wi(),SPe=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),EPe=new Set(["redux-color","redux-dark-color"]),_Pe=new Set(["neo","neo-dark"]),APe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),RPe=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),LPe=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"),IPe=mt(r=>{var i,n,{theme:a,themeVariables:e}=vr(),s=e.borderColorArray,o=SPe.has(a);if(_Pe.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}; }
|
||
`+LPe(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(EPe.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: ${APe.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"),NPe=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"),DPe=mt(e=>{var t=vr().theme,r=RPe.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?IPe:NPe)(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: ${SPe.has(t)?e.strokeWidth:8};
|
||
stroke-linecap: round;
|
||
fill: none
|
||
}
|
||
.gitTitleText {
|
||
text-anchor: middle;
|
||
font-size: 18px;
|
||
fill: ${e.textColor};
|
||
}
|
||
`},"getStyles"),MPe=DPe}),FPe={};Vat(FPe,{diagram:()=>zPe});var zPe,qPe,jPe,WPe=r(()=>{PPe(),OPe(),BPe(),$Pe(),zPe={parser:UOe,db:POe,renderer:CPe,styles:MPe}}),UPe=r(()=>{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],c=[1,32],h=[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],b=[1,16],x=[1,19],T=[1,20],k=[1,21],w=[1,22],C=[1,23],S=[1,25],E=[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:c,19:18,20:h,21:u,22:d,23:p,24:g,25:f,26:m,27:y,28:v,29:b,30:x,31:T,33:k,35:w,36:C,37:24,38:S,40:E},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:c,19:18,20:h,21:u,22:d,23:p,24:g,25:f,26:m,27:y,28:v,29:b,30:x,31:T,33:k,35:w,36:C,37:24,38:S,40:E},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="",c=0,h=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 b,x,T,k,w,C,S,E={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===b||"u"<typeof b)&&(b=v()),o[T]&&o[T][b]))||!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 "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,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: "+b);switch(k[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],E.$=a[a.length-C],E._$={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&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return S;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(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);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"),(qPe=new((e.prototype=i).Parser=e)).parser=qPe,jPe=qPe}),GPe=qat((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()}),VPe=qat((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}],c=mt(function(e){return(e=g[e])&&(e.indexOf?e:e.s.concat(e.f))},"u"),h=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=h(e,!1)}],a:[i,function(e){this.afternoon=h(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=c("months");if((t=(c("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=c("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,h=(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=h.length,r=0;r<u;r+=1){var i=h[r],a=(s=d[i])&&s[0],s=s&&s[1];h[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,c=h[a];"string"==typeof c?s+=c.length:(l=c.regex,c=c.parser,o=e.slice(s),l=l.exec(o)[0],c.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,c=n.minutes,h=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,b=l||0,x=c||0,T=h||0,k=u||0;return d?new Date(Date.UTC(m,y,f,b,x,T,k+60*d.offset*1e3)):r?new Date(Date.UTC(m,y,f,b,x,T,k)):(v=new Date(m,y,f,b,x,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 c=n.length,h=1;h<=c;h+=1){i[1]=n[h-1];var u=d.apply(this,i);if(u.isValid()){this.$d=u.$d,this.$L=u.$L,this.init();break}h===c&&(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()}),YPe=qat((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 HPe(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 XPe,KPe,ZPe,QPe,JPe,eBe,tBe,rBe,iBe,nBe,aBe,sBe,oBe,lBe,cBe,hBe,uBe,dBe,pBe,gBe,fBe,mBe,yBe,vBe,bBe,xBe,TBe,kBe,wBe,CBe,SBe,EBe,_Be,ABe,RBe,LBe,IBe,NBe,DBe,MBe,OBe,PBe,BBe,$Be,FBe,zBe,qBe,jBe,WBe,UBe,GBe,VBe,YBe,HBe,XBe,KBe,ZBe,QBe,JBe,e$e,t$e,r$e,i$e,n$e,a$e,s$e,o$e,l$e,c$e,h$e,u$e,d$e,p$e,g$e,f$e,m$e,y$e,v$e,b$e,x$e,T$e,k$e,w$e,C$e=r(()=>{XPe=j(Tk(),1),KPe=j(Ir(),1),yBe=j(GPe(),1),vBe=j(VPe(),1),bBe=j(YPe(),1),e(),Uu(),zC(),Wu(),KPe.default.extend(yBe.default),KPe.default.extend(vBe.default),KPe.default.extend(bBe.default),ZPe={friday:5,saturday:6},tBe=JPe=QPe="",rBe=[],iBe=[],nBe=new Map,aBe=[],sBe=[],cBe=["active","done","crit","milestone","vert"],uBe=lBe=oBe="",pBe=dBe=!(hBe=[]),gBe="sunday",fBe="saturday",mBe=0,yBe=mt(function(){aBe=[],sBe=[],hBe=[],r$e=[],eBe=t$e=e$e=void(KBe=0),tBe=lBe=JPe=QPe=oBe="",rBe=[],pBe=dBe=!(iBe=[]),mBe=0,nBe=new Map,uBe="",Ph(),gBe="sunday",fBe="saturday"},"clear"),vBe=mt(function(e){uBe=e},"setDiagramId"),bBe=mt(function(e){JPe=e},"setAxisFormat"),xBe=mt(function(){return JPe},"getAxisFormat"),TBe=mt(function(e){eBe=e},"setTickInterval"),kBe=mt(function(){return eBe},"getTickInterval"),wBe=mt(function(e){tBe=e},"setTodayMarker"),CBe=mt(function(){return tBe},"getTodayMarker"),SBe=mt(function(e){QPe=e},"setDateFormat"),EBe=mt(function(){dBe=!0},"enableInclusiveEndDates"),_Be=mt(function(){return dBe},"endDatesAreInclusive"),ABe=mt(function(){pBe=!0},"enableTopAxis"),RBe=mt(function(){return pBe},"topAxisEnabled"),LBe=mt(function(e){lBe=e},"setDisplayMode"),IBe=mt(function(){return lBe},"getDisplayMode"),NBe=mt(function(){return QPe},"getDateFormat"),DBe=mt(function(e){rBe=e.toLowerCase().split(/[\s,]+/)},"setIncludes"),MBe=mt(function(){return rBe},"getIncludes"),OBe=mt(function(e){iBe=e.toLowerCase().split(/[\s,]+/)},"setExcludes"),PBe=mt(function(){return iBe},"getExcludes"),BBe=mt(function(){return nBe},"getLinks"),$Be=mt(function(e){oBe=e,aBe.push(e)},"addSection"),FBe=mt(function(){return aBe},"getSections"),zBe=mt(function(){let e=o$e(),t=0;for(;!e&&t<10;)e=o$e(),t++;return sBe=r$e},"getTasks"),qBe=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()!==ZPe[fBe]&&e.isoWeekday()!==ZPe[fBe]+1)&&!r.includes(e.format("dddd").toLowerCase()))||r.includes(t)||r.includes(n))},"isInvalidDate"),jBe=mt(function(e){gBe=e},"setWeekday"),WBe=mt(function(){return gBe},"getWeekday"),UBe=mt(function(e){fBe=e},"setWeekend"),GBe=mt(function(t,r,i,n){if(i.length&&!t.manualEndTime){let e;e=(e=t.startTime instanceof Date?(0,KPe.default)(t.startTime):(0,KPe.default)(t.startTime,r,!0)).add(1,"d");var a=t.endTime instanceof Date?(0,KPe.default)(t.endTime):(0,KPe.default)(t.endTime,r,!0),[r,i]=VBe(e,a,r,i,n);t.endTime=r.toDate(),t.renderEndTime=i}},"checkTaskDates"),VBe=mt(function(e,t,r,i,n){let a=!1,s=null,o=t.add(1e4,"d");for(;e<=t;){if(a||(s=t.toDate()),(a=qBe(e,r,i,n))&&o<(t=t.add(1,"d")))throw new Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");e=e.add(1,"d")}return[t,s]},"fixTaskDates"),YBe=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=a$e(n))&&(!e||n.endTime>e.endTime)&&(e=n);return e?e.endTime:((i=new Date).setHours(0,0,0,0),i)}if((i=(0,KPe.default)(r,t.trim(),!0)).isValid())return i.toDate();if(P.debug("Invalid date:"+r),P.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"),HBe=mt(function(e){return null!==(e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim()))?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),XBe=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=a$e(a))&&(!e||a.startTime<e.startTime)&&(e=a);return e?e.startTime:((n=new Date).setHours(0,0,0,0),n)}let s=(0,KPe.default)(r,t.trim(),!0);if(s.isValid())return(s=i?s.add(1,"d"):s).toDate();let o=(0,KPe.default)(e),[l,c]=HBe(r);return Number.isNaN(l)||(n=o.add(l,c)).isValid()&&(o=n),o.toDate()},"getEndDate"),KBe=0,ZBe=mt(function(e){return void 0===e?"task"+(KBe+=1):e},"parseId"),QBe=mt(function(e,t){var r=(":"===t.substr(0,1)?t.substr(1,t.length):t).split(","),i={};HPe(r,i,cBe);for(let e=0;e<r.length;e++)r[e]=r[e].trim();let n="";switch(r.length){case 1:i.id=ZBe(),i.startTime=e.endTime,n=r[0];break;case 2:i.id=ZBe(),i.startTime=YBe(void 0,QPe,r[0]),n=r[1];break;case 3:i.id=ZBe(r[0]),i.startTime=YBe(void 0,QPe,r[1]),n=r[2]}return n&&(i.endTime=XBe(i.startTime,QPe,n,dBe),i.manualEndTime=(0,KPe.default)(n,"YYYY-MM-DD",!0).isValid(),GBe(i,QPe,iBe,rBe)),i},"compileData"),JBe=mt(function(e,t){var r=(":"===t.substr(0,1)?t.substr(1,t.length):t).split(","),i={};HPe(r,i,cBe);for(let e=0;e<r.length;e++)r[e]=r[e].trim();switch(r.length){case 1:i.id=ZBe(),i.startTime={type:"prevTaskEnd",id:e},i.endTime={data:r[0]};break;case 2:i.id=ZBe(),i.startTime={type:"getStartDate",startData:r[0]},i.endTime={data:r[1]};break;case 3:i.id=ZBe(r[0]),i.startTime={type:"getStartDate",startData:r[1]},i.endTime={data:r[2]}}return i},"parseData"),r$e=[],i$e={},n$e=mt(function(e,t){e={section:oBe,type:oBe,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:t},task:e,classes:[]},t=JBe(t$e,t),e.raw.startTime=t.startTime,e.raw.endTime=t.endTime,e.id=t.id,e.prevTaskId=t$e,e.active=t.active,e.done=t.done,e.crit=t.crit,e.milestone=t.milestone,e.vert=t.vert,e.order=mBe,mBe++,t=r$e.push(e),i$e[t$e=e.id]=t-1},"addTask"),a$e=mt(function(e){return r$e[i$e[e]]},"findTaskById"),s$e=mt(function(e,t){e={section:oBe,type:oBe,description:e,task:e,classes:[]},t=QBe(e$e,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,e$e=e,sBe.push(e)},"addTaskOrg"),o$e=mt(function(){let e=mt(function(e){var t=r$e[e];switch(r$e[e].raw.startTime.type){case"prevTaskEnd":var r=a$e(t.prevTaskId);t.startTime=r.endTime;break;case"getStartDate":(r=YBe(void 0,QPe,r$e[e].raw.startTime.startData))&&(r$e[e].startTime=r)}return r$e[e].startTime&&(r$e[e].endTime=XBe(r$e[e].startTime,QPe,r$e[e].raw.endTime.data,dBe),r$e[e].endTime)&&(r$e[e].processed=!0,r$e[e].manualEndTime=(0,KPe.default)(r$e[e].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),GBe(r$e[e],QPe,iBe,rBe)),r$e[e].processed},"compileTask"),t=!0;for(var[r,i]of r$e.entries())e(r),t=t&&i.processed;return t},"compileTasks"),l$e=mt(function(e,t){let r=t;"loose"!==B().securityLevel&&(r=(0,XPe.sanitizeUrl)(t)),e.split(",").forEach(function(e){void 0!==a$e(e)&&(u$e(e,()=>{window.open(r,"_self")}),nBe.set(e,r))}),c$e(e,"clickable")},"setLink"),c$e=mt(function(e,t){e.split(",").forEach(function(e){void 0!==(e=a$e(e))&&e.classes.push(t)})},"setClass"),h$e=mt(function(e,t,i){if("loose"===B().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!==a$e(e)&&u$e(e,()=>{PC.runFunc(t,...r)})}},"setClickFun"),u$e=mt(function(t,r){hBe.push(function(){var e=uBe?uBe+"-"+t:t;null!==(e=document.querySelector(`[id="${e}"]`))&&e.addEventListener("click",function(){r()})},function(){var e=uBe?uBe+"-"+t:t;null!==(e=document.querySelector(`[id="${e}-text"]`))&&e.addEventListener("click",function(){r()})})},"pushFun"),d$e=mt(function(e,t,r){e.split(",").forEach(function(e){h$e(e,t,r)}),c$e(e,"clickable")},"setClickEvent"),p$e=mt(function(t){hBe.forEach(function(e){e(t)})},"bindFunctions"),g$e={getConfig:mt(()=>B().gantt,"getConfig"),clear:yBe,setDateFormat:SBe,getDateFormat:NBe,enableInclusiveEndDates:EBe,endDatesAreInclusive:_Be,enableTopAxis:ABe,topAxisEnabled:RBe,setAxisFormat:bBe,getAxisFormat:xBe,setTickInterval:TBe,getTickInterval:kBe,setTodayMarker:wBe,getTodayMarker:CBe,setAccTitle:Bh,getAccTitle:$h,setDiagramTitle:qh,getDiagramTitle:jh,setDiagramId:vBe,setDisplayMode:LBe,getDisplayMode:IBe,setAccDescription:Fh,getAccDescription:zh,addSection:$Be,getSections:FBe,getTasks:zBe,addTask:n$e,findTaskById:a$e,addTaskOrg:s$e,setIncludes:DBe,getIncludes:MBe,setExcludes:OBe,getExcludes:PBe,setClickEvent:d$e,setLink:l$e,getLinks:BBe,bindFunctions:p$e,parseDuration:HBe,isInvalidDate:qBe,setWeekday:jBe,getWeekday:WBe,setWeekend:UBe},mt(HPe,"getTaskTags")}),S$e=qat((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"),c=mt(function(e,t,r){return new p(e,r,t.$l)},"f"),h=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[h(e)]},e.get=function(e){var t=this.$ms;return"milliseconds"===(e=h(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[h(t)]:(l(e)?e:c(e,this)).$ms,c(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 c(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?c(t*o[h(e)],this):("number"==typeof t?(this.$ms=t,this.parseFromMilliseconds()):"object"==typeof t?(Object.keys(t).forEach(function(e){i.$d[h(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 c(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()}),E$e=r(()=>{f$e=j(Ir(),1),m$e=j(S$e(),1),e(),bk(),th(),Uu(),Ch(),f$e.default.extend(m$e.default),m$e=mt(function(){P.debug("Something is calling, setConf, remove the call")},"setConf"),y$e={monday:Ix,tuesday:Nx,wednesday:Dx,thursday:Mx,friday:Ox,saturday:Px,sunday:Lx},v$e=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"),x$e=mt(function(e,d,t,g){let f=B().gantt,r=(g.db.setDiagramId(d),B().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===(b$e=a.parentElement.offsetWidth)&&(b$e=1200),void 0!==f.useWidth&&(b$e=f.useWidth),g.db.getTasks()),u=[];for(var o of l)u.push(o.type);u=R(u);let c={},h=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=v$e(y[m],e)+1;e+=v,h+=v*(f.barHeight+f.barGap),c[m]=v}}else{h+=l.length*(f.barHeight+f.barGap);for(let t of u)c[t]=l.filter(e=>e.type===t).length}a.setAttribute("viewBox","0 0 "+b$e+" "+h);let b=n.select(`[id="${d}"]`),x=MT().domain([xd(l,function(e){return e.startTime}),vd(l,function(e){return e.endTime})]).rangeRound([0,b$e-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;sx().domain([0,u.length]).range(["#00B9FA","#F95002"]).interpolate(U1),C(n,a,s,0,r,e,g.db.getExcludes(),g.db.getIncludes()),E(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,c,t,h){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));b.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 h-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=b.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?x(e.startTime)+n+.5*(x(e.endTime)-x(e.startTime))-.5*c:x(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?c:e.vert?.08*c:x(e.renderEndTime||e.endTime)-x(e.startTime)}).attr("height",function(e){return e.vert?l.length*(f.barHeight+f.barGap)+2*f.barHeight:c}).attr("transform-origin",function(e,t){return t=e.order,(x(e.startTime)+n+.5*(x(e.endTime)-x(e.startTime))).toString()+"px "+(t*r+i+.5*c).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=x(e.startTime),r=x(e.renderEndTime||e.endTime);return e.milestone&&(t+=.5*(x(e.endTime)-x(e.startTime))-.5*c,r=t+c),e.vert?x(e.startTime)+n:(e=this.getBBox().width)>r-t?r+e+1.5*f.leftPadding>h?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",c).attr("class",function(e){let t=x(e.startTime),r=x(e.endTime),i=(e.milestone&&(r=t+c),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>h?n+" taskTextOutsideLeft taskTextOutside"+a+" "+l:n+" taskTextOutsideRight taskTextOutside"+a+" "+l+" width-"+i:n+" taskText taskText"+a+" "+l+" width-"+i}),"sandbox"===B().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,c,t,h,u){if(0!==h.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,f$e.default)(a).diff((0,f$e.default)(n),"year"))P.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,f$e.default)(n);for(;i.valueOf()<=a;)g.db.isInvalidDate(i,e,h,u)?r?r.end=i:r={start:i,end:i}:r&&(t.push(r),r=null),i=i.add(1,"d");b.append("g").selectAll("rect").data(t).enter().append("rect").attr("id",e=>d+"-exclude-"+e.start.format("YYYY-MM-DD")).attr("x",e=>x(e.start.startOf("day"))+l).attr("y",f.gridLineStartPadding).attr("width",e=>x(e.end.endOf("day"))-x(e.start.startOf("day"))).attr("height",c-o-f.gridLineStartPadding).attr("transform-origin",function(e,t){return(x(e.start)+l+.5*(x(e.end)-x(e.start))).toString()+"px "+(t*s+.5*c).toString()+"px"}).attr("class","exclude-range")}}}function S(e,t,r,i){return r<=0||t<e||(t-=e,(e=f$e.default.duration({[i??"day"]:r}).asMilliseconds())<=0)?1/0:Math.ceil(t/e)}function E(e,t,r,i){var n=g.db.getDateFormat(),n=g.db.getAxisFormat()||("D"===n?"%d":f.axisFormat??"%Y-%m-%d"),a=Md(x).tickSize(-i+t+f.gridLineStartPadding).tickFormat(AT(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)P.warn(`Invalid tick interval value: "${s[1]}". Skipping custom tick interval.`);else{var l=s[2],c=g.db.getWeekday()||f.weekday;if(1e4<(d=S((d=x.domain())[0],d[1],o,l)))P.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(px.every(o));break;case"second":a.ticks(gx.every(o));break;case"minute":a.ticks(fx.every(o));break;case"hour":a.ticks(yx.every(o));break;case"day":a.ticks(bx.every(o));break;case"week":a.ticks(y$e[c].every(o));break;case"month":a.ticks(Ux.every(o))}}}if(b.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 h=Dd(x).tickSize(-i+t+f.gridLineStartPadding).tickFormat(AT(n));if(null!==s){var u=parseInt(s[1],10);if(isNaN(u)||u<=0)P.warn(`Invalid tick interval value: "${s[1]}". Skipping custom tick interval.`);else{var d=s[2],p=g.db.getWeekday()||f.weekday;if(S((l=x.domain())[0],l[1],u,d)<=1e4)switch(d){case"millisecond":h.ticks(px.every(u));break;case"second":h.ticks(gx.every(u));break;case"minute":h.ticks(fx.every(u));break;case"hour":h.ticks(yx.every(u));break;case"day":h.ticks(bx.every(u));break;case"week":h.ticks(y$e[p].every(u));break;case"month":h.ticks(Ux.every(u))}}}b.append("g").attr("class","grid").attr("transform","translate("+e+", "+t+")").call(h).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(c).map(e=>[e,c[e]]);b.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=b.append("g").attr("class","today"),n=new Date,(a=a.append("line")).attr("x1",x(n)+e).attr("x2",x(n)+e).attr("y1",f.titleTopMargin).attr("y2",i-f.titleTopMargin).attr("class","today"),""!==s)&&a.attr("style",s.replace(/,/g,";"))}function R(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,b$e,h),yh(b,h,b$e,f.useMaxWidth),b.append("text").text(g.db.getDiagramTitle()).attr("x",b$e/2).attr("y",f.titleTopMargin).attr("class","titleText"),mt(k,"makeGantt"),mt(w,"drawRects"),mt(C,"drawExcludeDays"),mt(S,"getEstimatedTickCount"),mt(E,"makeGrid"),mt(_,"vertLabels"),mt(A,"drawToday"),mt(R,"checkUnique")},"draw"),T$e={setConf:m$e,draw:x$e}}),_$e=r(()=>{k$e=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"),w$e=k$e}),A$e={};Vat(A$e,{diagram:()=>R$e});var R$e,L$e,I$e,N$e,D$e,M$e,O$e,P$e,B$e=r(()=>{UPe(),C$e(),E$e(),_$e(),R$e={parser:jPe,db:g$e,renderer:T$e,styles:w$e}}),$$e=r(()=>{sOe(),e(),L$e={parse:mt(async e=>{e=await rOe("info",e),P.debug(e)},"parse")}}),F$e=r(()=>{I$e={version:"11.15.0"},N$e=mt(()=>I$e.version,"getVersion"),D$e={getVersion:N$e}}),z$e=r(()=>{bk(),Uu(),M$e=mt(e=>{let t=B().securityLevel,r=Q("body"),i;return"sandbox"===t&&(i=Q("#i"+e).node()?.contentDocument??document,r=Q(i.body)),r.select("#"+e)},"selectSvgElement")}),q$e=r(()=>{e(),z$e(),Ch(),O$e=mt((e,t,r)=>{P.debug(`rendering info diagram
|
||
`+e),e=M$e(t),yh(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"),P$e={draw:O$e}}),j$e={};Vat(j$e,{diagram:()=>W$e});var W$e,U$e,G$e,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=r(()=>{$$e(),F$e(),q$e(),W$e={parser:L$e,db:D$e,renderer:P$e}}),cFe=r(()=>{e(),Wu(),Ti(),H$e=ir.pie,U$e={sections:new Map,showData:!1,config:H$e},G$e=U$e.sections,V$e=U$e.showData,Y$e=structuredClone(H$e),H$e=mt(()=>structuredClone(Y$e),"getConfig"),X$e=mt(()=>{G$e=new Map,V$e=U$e.showData,Ph()},"clear"),K$e=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.`);G$e.has(e)||(G$e.set(e,t),P.debug(`added new section: ${e}, with value: `+t))},"addSection"),Z$e=mt(()=>G$e,"getSections"),Q$e=mt(e=>{V$e=e},"setShowData"),J$e=mt(()=>V$e,"getShowData"),eFe={getConfig:H$e,clear:X$e,setDiagramTitle:qh,getDiagramTitle:jh,setAccTitle:Bh,getAccTitle:$h,setAccDescription:Fh,getAccDescription:zh,addSection:K$e,getSections:Z$e,setShowData:Q$e,getShowData:J$e}}),hFe=r(()=>{sOe(),e(),hOe(),cFe(),tFe=mt((e,t)=>{oOe(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),rFe={parse:mt(async e=>{e=await rOe("pie",e),P.debug(e),tFe(e,eFe)},"parse")}}),uFe=r(()=>{iFe=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"),nFe=iFe}),dFe=r(()=>{bk(),Uu(),e(),z$e(),Ch(),zC(),aFe=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 R5().value(e=>e.value).sort(null)(r)},"createPieArcs"),sFe=mt((e,t,r,i)=>{P.debug(`rendering pie chart
|
||
`+e);let n=i.db,a=B(),s=lC(n.getConfig(),a.pie),o=M$e(t),l=o.append("g");l.attr("transform","translate(225,225)");var e=a.themeVariables,[i]=OC(e.pieOuterStrokeWidth);i??=2;let c=s.textPosition,h=Math.min(450,450)/2-40,u=p5().innerRadius(0).outerRadius(h),d=p5().innerRadius(h*c).outerRadius(h*c),p=(l.append("circle").attr("cx",0).attr("cy",0).attr("r",h+i/2).attr("class","pieOuterCircle"),n.getSections()),g=aFe(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=$b(f).domain([...p.keys()]),b=(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")),x=[...p.entries()].map(([e,t])=>({label:e,value:t})),T=l.selectAll(".legend").data(x).enter().append("g").attr("class","legend").attr("transform",(e,t)=>"translate(216,"+(22*t-22*x.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=b.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`),yh(o,450,t,s.useMaxWidth)},"draw"),oFe={draw:sFe}}),pFe={};Vat(pFe,{diagram:()=>gFe});var gFe,fFe,mFe,yFe,vFe,bFe=r(()=>{hFe(),cFe(),uFe(),dFe(),gFe={parser:rFe,db:eFe,renderer:oFe,styles:nFe}}),xFe=r(()=>{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,3],r=[1,4],i=[1,5],n=[1,6],a=[1,7],B=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],$=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],s=[55,56,57],F=[2,36],o=[1,37],l=[1,36],c=[1,38],h=[1,35],u=[1,43],d=[1,41],p=[1,45],z=[1,14],q=[1,23],j=[1,18],W=[1,19],U=[1,20],G=[1,21],V=[1,22],Y=[1,24],H=[1,25],X=[1,26],K=[1,27],Z=[1,28],Q=[1,29],g=[1,32],f=[1,33],m=[1,34],y=[1,39],v=[1,40],b=[1,42],x=[1,44],T=[1,63],k=[1,62],w=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],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],ce=[1,76],he=[1,77],C=[4,5,6,7,8,9,10,11,12,13,14,15,18],S=[1,91],E=[1,92],_=[1,93],A=[1,100],R=[1,94],L=[1,97],I=[1,95],N=[1,96],D=[1,98],M=[1,99],ue=[1,103],de=[10,55,56,57],O=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],t={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],[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:t,26:1,27:2,28:r,55:i,56:n,57:a},{1:[3]},{18:t,26:8,27:2,28:r,55:i,56:n,57:a},{18:t,26:9,27:2,28:r,55:i,56:n,57:a},e(B,[2,33],{29:10}),e($,[2,61]),e($,[2,62]),e($,[2,63]),{1:[2,30]},{1:[2,31]},e(s,F,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:o,5:l,10:c,12:h,13:u,14:d,15:p,18:z,25:q,35:j,37:W,39:U,41:G,42:V,48:Y,50:H,51:X,52:K,53:Z,54:Q,60:g,61:f,63:m,64:y,65:v,66:b,67:x}),e(B,[2,34]),{27:46,55:i,56:n,57:a},e(s,[2,37]),e(s,F,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:o,5:l,10:c,12:h,13:u,14:d,15:p,18:z,25:q,35:j,37:W,39:U,41:G,42:V,48:Y,50:H,51:X,52:K,53:Z,54:Q,60:g,61:f,63:m,64:y,65:v,66:b,67:x}),e(s,[2,39]),e(s,[2,40]),e(s,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},e(s,[2,45]),e(s,[2,46]),{18:[1,51]},{4:o,5:l,10:c,12:h,13:u,14:d,15:p,43:52,58:31,60:g,61:f,63:m,64:y,65:v,66:b,67:x},{4:o,5:l,10:c,12:h,13:u,14:d,15:p,43:53,58:31,60:g,61:f,63:m,64:y,65:v,66:b,67:x},{4:o,5:l,10:c,12:h,13:u,14:d,15:p,43:54,58:31,60:g,61:f,63:m,64:y,65:v,66:b,67:x},{4:o,5:l,10:c,12:h,13:u,14:d,15:p,43:55,58:31,60:g,61:f,63:m,64:y,65:v,66:b,67:x},{4:o,5:l,10:c,12:h,13:u,14:d,15:p,43:56,58:31,60:g,61:f,63:m,64:y,65:v,66:b,67:x},{4:o,5:l,10:c,12:h,13:u,14:d,15:p,43:57,58:31,60:g,61:f,63:m,64:y,65:v,66:b,67:x},{4:o,5:l,8:T,10:c,12:h,13:u,14:d,15:p,18:k,44:[1,58],47:[1,59],58:61,59:60,63:m,64:y,65:v,66:b,67:x},e(w,[2,64]),e(w,[2,66]),e(w,[2,67]),e(w,[2,70]),e(w,[2,71]),e(w,[2,72]),e(w,[2,73]),e(w,[2,74]),e(w,[2,75]),e(w,[2,76]),e(w,[2,77]),e(w,[2,78]),e(w,[2,79]),e(w,[2,80]),e(w,[2,81]),e(B,[2,35]),e(s,[2,38]),e(s,[2,42]),e(s,[2,43]),e(s,[2,44]),{3:65,4:J,5:ee,6:te,7:re,8:ie,9:ne,10:ae,11:se,12:oe,13:le,14:ce,15:he,21:64},e(s,[2,53],{59:60,58:61,4:o,5:l,8:T,10:c,12:h,13:u,14:d,15:p,18:k,49:[1,78],63:m,64:y,65:v,66:b,67:x}),e(s,[2,56],{59:60,58:61,4:o,5:l,8:T,10:c,12:h,13:u,14:d,15:p,18:k,49:[1,79],63:m,64:y,65:v,66:b,67:x}),e(s,[2,57],{59:60,58:61,4:o,5:l,8:T,10:c,12:h,13:u,14:d,15:p,18:k,63:m,64:y,65:v,66:b,67:x}),e(s,[2,58],{59:60,58:61,4:o,5:l,8:T,10:c,12:h,13:u,14:d,15:p,18:k,63:m,64:y,65:v,66:b,67:x}),e(s,[2,59],{59:60,58:61,4:o,5:l,8:T,10:c,12:h,13:u,14:d,15:p,18:k,63:m,64:y,65:v,66:b,67:x}),e(s,[2,60],{59:60,58:61,4:o,5:l,8:T,10:c,12:h,13:u,14:d,15:p,18:k,63:m,64:y,65:v,66:b,67:x}),{45:[1,80]},{44:[1,81]},e(w,[2,65]),e(w,[2,82]),e(w,[2,83]),e(w,[2,84]),{3:83,4:J,5:ee,6:te,7:re,8:ie,9:ne,10:ae,11:se,12:oe,13:le,14:ce,15:he,18:[1,82]},e(C,[2,23]),e(C,[2,1]),e(C,[2,2]),e(C,[2,3]),e(C,[2,4]),e(C,[2,5]),e(C,[2,6]),e(C,[2,7]),e(C,[2,8]),e(C,[2,9]),e(C,[2,10]),e(C,[2,11]),e(C,[2,12]),e(s,[2,52],{58:31,43:84,4:o,5:l,10:c,12:h,13:u,14:d,15:p,60:g,61:f,63:m,64:y,65:v,66:b,67:x}),e(s,[2,55],{58:31,43:85,4:o,5:l,10:c,12:h,13:u,14:d,15:p,60:g,61:f,63:m,64:y,65:v,66:b,67:x}),{46:[1,86]},{45:[1,87]},{4:S,5:E,6:_,8:A,11:R,13:L,16:90,17:I,18:N,19:D,20:M,22:89,23:88},e(C,[2,24]),e(s,[2,51],{59:60,58:61,4:o,5:l,8:T,10:c,12:h,13:u,14:d,15:p,18:k,63:m,64:y,65:v,66:b,67:x}),e(s,[2,54],{59:60,58:61,4:o,5:l,8:T,10:c,12:h,13:u,14:d,15:p,18:k,63:m,64:y,65:v,66:b,67:x}),e(s,[2,47],{22:89,16:90,23:101,4:S,5:E,6:_,8:A,11:R,13:L,17:I,18:N,19:D,20:M}),{46:[1,102]},e(s,[2,29],{10:ue}),e(de,[2,27],{16:104,4:S,5:E,6:_,8:A,11:R,13:L,17:I,18:N,19:D,20:M}),e(O,[2,25]),e(O,[2,13]),e(O,[2,14]),e(O,[2,15]),e(O,[2,16]),e(O,[2,17]),e(O,[2,18]),e(O,[2,19]),e(O,[2,20]),e(O,[2,21]),e(O,[2,22]),e(s,[2,49],{10:ue}),e(s,[2,48],{22:89,16:90,23:105,4:S,5:E,6:_,8:A,11:R,13:L,17:I,18:N,19:D,20:M}),{4:S,5:E,6:_,8:A,11:R,13:L,16:90,17:I,18:N,19:D,20:M,22:106},e(O,[2,26]),e(s,[2,50],{10:ue}),e(de,[2,28],{16:104,4:S,5:E,6:_,8:A,11:R,13:L,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="",c=0,h=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 b,x,T,k,w,C,S,E={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===b||"u"<typeof b)&&(b=v()),o[T]&&o[T][b]))||!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 "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,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: "+b);switch(k[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],E.$=a[a.length-C],E._$={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&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return S;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(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);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:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 15;case 37:return 11;case 38:return 64;case 39:return 10;case 40:case 41:return 65;case 42:return 14;case 43:return 13;case 44:return 67;case 45:return 66;case 46:return 12;case 47:return 8;case 48:return 5;case 49:return 18;case 50:return 56;case 51:return 63;case 52:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?:[^\x00-\x7F]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};t.lexer=r,mt(P,"Parser"),(fFe=new((P.prototype=t).Parser=P)).parser=fFe,mFe=fFe}),TFe=r(()=>{bk(),Ti(),e(),hi(),yFe=Ot(),vFe=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:ir.quadrantChart?.chartWidth||500,chartWidth:ir.quadrantChart?.chartHeight||500,titlePadding:ir.quadrantChart?.titlePadding||10,titleFontSize:ir.quadrantChart?.titleFontSize||20,quadrantPadding:ir.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:ir.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:ir.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:ir.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:ir.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:ir.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:ir.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:ir.quadrantChart?.pointTextPadding||5,pointLabelFontSize:ir.quadrantChart?.pointLabelFontSize||12,pointRadius:ir.quadrantChart?.pointRadius||5,xAxisPosition:ir.quadrantChart?.xAxisPosition||"top",yAxisPosition:ir.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:ir.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:ir.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:yFe.quadrant1Fill,quadrant2Fill:yFe.quadrant2Fill,quadrant3Fill:yFe.quadrant3Fill,quadrant4Fill:yFe.quadrant4Fill,quadrant1TextFill:yFe.quadrant1TextFill,quadrant2TextFill:yFe.quadrant2TextFill,quadrant3TextFill:yFe.quadrant3TextFill,quadrant4TextFill:yFe.quadrant4TextFill,quadrantPointFill:yFe.quadrantPointFill,quadrantPointTextFill:yFe.quadrantPointTextFill,quadrantXAxisTextFill:yFe.quadrantXAxisTextFill,quadrantYAxisTextFill:yFe.quadrantYAxisTextFill,quadrantTitleFill:yFe.quadrantTitleFill,quadrantInternalBorderStrokeFill:yFe.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:yFe.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,P.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){P.trace("setConfig called with: ",e),this.config={...this.config,...e}}setThemeConfig(e){P.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:c}=i,h=!!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+(h?o/2:0),y:"top"===e?this.config.xAxisLabelPadding+n.top:this.config.xAxisLabelPadding+l+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:h?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&t&&d.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:s+o+(h?o/2:0),y:"top"===e?this.config.xAxisLabelPadding+n.top:this.config.xAxisLabelPadding+l+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:h?"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+c+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+c+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=sx().domain([0,1]).range([i,a+i]),o=sx().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 kFe(e){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(e)}function wFe(e){return!/^\d+$/.test(e)}function CFe(e){return!/^\d+px$/.test(e)}var SFe,EFe=r(()=>{SFe=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(kFe,"validateHexCode"),mt(wFe,"validateNumber"),mt(CFe,"validateSizeInPixels")});function _Fe(e){return Rc(e.trim(),jFe)}function AFe(e){WFe.setData({quadrant1Text:_Fe(e.text)})}function RFe(e){WFe.setData({quadrant2Text:_Fe(e.text)})}function LFe(e){WFe.setData({quadrant3Text:_Fe(e.text)})}function IFe(e){WFe.setData({quadrant4Text:_Fe(e.text)})}function NFe(e){WFe.setData({xAxisLeftText:_Fe(e.text)})}function DFe(e){WFe.setData({xAxisRightText:_Fe(e.text)})}function MFe(e){WFe.setData({yAxisTopText:_Fe(e.text)})}function OFe(e){WFe.setData({yAxisBottomText:_Fe(e.text)})}function PFe(e){var t,r={};for(t of e){var[i,n]=t.trim().split(/\s*:\s*/);if("radius"===i){if(wFe(n))throw new SFe(i,n,"number");r.radius=parseInt(n)}else if("color"===i){if(kFe(n))throw new SFe(i,n,"hex code");r.color=n}else if("stroke-color"===i){if(kFe(n))throw new SFe(i,n,"hex code");r.strokeColor=n}else{if("stroke-width"!==i)throw new Error(`style named ${i} is not supported.`);if(CFe(n))throw new SFe(i,n,"number of pixels (eg. 10px)");r.strokeWidth=n}}return r}function BFe(e,t,r,i,n){n=PFe(n),WFe.addPoints([{x:r,y:i,text:_Fe(e.text),className:t,...n}])}function $Fe(e,t){WFe.addClass(e,PFe(t))}function FFe(e){WFe.setConfig({chartWidth:e})}function zFe(e){WFe.setConfig({chartHeight:e})}function qFe(){var{themeVariables:e,quadrantChart:t}=B();return t&&WFe.setConfig(t),WFe.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}),WFe.setData({titleText:jh()}),WFe.build()}var jFe,WFe,UFe,GFe,VFe,YFe,HFe=r(()=>{Uu(),th(),Wu(),TFe(),EFe(),jFe=B(),mt(_Fe,"textSanitizer"),WFe=new vFe,mt(AFe,"setQuadrant1Text"),mt(RFe,"setQuadrant2Text"),mt(LFe,"setQuadrant3Text"),mt(IFe,"setQuadrant4Text"),mt(NFe,"setXAxisLeftText"),mt(DFe,"setXAxisRightText"),mt(MFe,"setYAxisTopText"),mt(OFe,"setYAxisBottomText"),mt(PFe,"parseStyles"),mt(BFe,"addPoint"),mt($Fe,"addClass"),mt(FFe,"setWidth"),mt(zFe,"setHeight"),mt(qFe,"getQuadrantData"),UFe=mt(function(){WFe.clear(),Ph()},"clear"),GFe={setWidth:FFe,setHeight:zFe,setQuadrant1Text:AFe,setQuadrant2Text:RFe,setQuadrant3Text:LFe,setQuadrant4Text:IFe,setXAxisLeftText:NFe,setXAxisRightText:DFe,setYAxisTopText:MFe,setYAxisBottomText:OFe,parseStyles:PFe,addPoint:BFe,addClass:$Fe,getQuadrantData:qFe,clear:UFe,setAccTitle:Bh,getAccTitle:$h,setDiagramTitle:qh,getDiagramTitle:jh,getAccDescription:zh,setAccDescription:Fh}}),XFe=r(()=>{bk(),Uu(),e(),Ch(),VFe=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=B();P.debug(`Rendering quadrant chart
|
||
`+e);let l=o.securityLevel,c;"sandbox"===l&&(c=Q("#i"+t));var t=(e=Q("sandbox"===l?c.nodes()[0].contentDocument.body:"body").select(`[id="${t}"]`)).append("g").attr("class","main"),h=o.quadrantChart?.chartWidth??500,u=o.quadrantChart?.chartHeight??500,o=(yh(e,u,h,o.quadrantChart?.useMaxWidth??!0),e.attr("viewBox","0 0 "+h+" "+u),i.db.setHeight(u),i.db.setWidth(h),i.db.getQuadrantData()),e=t.append("g").attr("class","quadrants"),u=t.append("g").attr("class","border"),h=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=h.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"),YFe={draw:VFe}}),KFe={};Vat(KFe,{diagram:()=>ZFe});var ZFe,QFe,JFe,eze=r(()=>{xFe(),HFe(),XFe(),ZFe={parser:mFe,db:GFe,renderer:YFe,styles:mt(()=>"","styles")}}),tze=r(()=>{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],c=[1,25],h=[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],b=[1,36],x=[1,37],T=[1,43],k=[1,42],w=[1,47],C=[1,50],S=[1,10,12,14,16,18,19,21,23,34,35,36],E=[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:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:b,50:x},{11:39,13:38,24:T,27:k,29:40,30:41,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:b,50:x},{11:45,15:44,27:w,33:46,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:b,50:x},{11:49,17:48,24:C,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:b,50:x},{11:52,17:51,24:C,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:b,50:x},{20:[1,53]},{22:[1,54]},t(S,[2,18]),{1:[2,2]},t(S,[2,8]),t(S,[2,9]),t(E,[2,37],{40:55,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:b,50:x}),t(E,[2,38]),t(E,[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(S,[2,10]),t(S,[2,22],{30:41,29:56,24:T,27:k}),t(S,[2,24]),t(S,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:b,50:x},t(S,[2,11]),t(S,[2,30],{33:60,27:w}),t(S,[2,32]),{31:[1,61]},t(S,[2,12]),{17:62,24:C},{25:63,27:A},t(S,[2,14]),{17:65,24:C},t(S,[2,16]),t(S,[2,17]),t(_,[2,41]),t(S,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(S,[2,31]),{27:[1,69]},t(S,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(S,[2,15]),t(S,[2,26]),t(S,[2,27]),{11:59,32:72,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:b,50:x},t(S,[2,33]),t(S,[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="",c=0,h=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 b,x,T,k,w,C,S,E={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===b||"u"<typeof b)&&(b=v()),o[T]&&o[T][b]))||!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 "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,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: "+b);switch(k[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],E.$=a[a.length-C],E._$={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&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return S;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(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);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"),(QFe=new((e.prototype=i).Parser=e)).parser=QFe,JFe=QFe});function rze(e){return"bar"===e.type}function ize(e){return"band"===e.type}function nze(e){return"linear"===e.type}var aze,sze,oze,lze,cze=r(()=>{mt(rze,"isBarPlot"),mt(ize,"isBandAxisData"),mt(nze,"isLinearAxisData")}),hze=r(()=>{F7(),aze=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=D7(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}}}),uze=r(()=>{sze=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():[]}}}),dze=r(()=>{bk(),e(),uze(),oze=class extends sze{static{mt(this,"BandAxis")}constructor(e,t,r,i,n){super(e,i,n,t),this.categories=r,this.scale=qb().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=qb().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),P.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}}}),pze=r(()=>{bk(),uze(),lze=class extends sze{static{mt(this,"LinearAxis")}constructor(e,t,r,i,n){super(e,i,n,t),this.domain=r,this.scale=sx().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){var e=[...this.domain];"left"===this.axisPosition&&e.reverse(),this.scale=sx().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}}});function gze(e,t,r,i){return i=new aze(i),ize(e)?new oze(t,r,e.categories,e.title,i):new lze(t,r,[e.min,e.max],e.title,i)}var fze=r(()=>{cze(),hze(),dze(),pze(),mt(gze,"getAxis")});function mze(e,t,r,i){return i=new aze(i),new yze(i,e,t,r)}var yze,vze,bze,xze=r(()=>{hze(),yze=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(mze,"getChartTitleComponent")}),Tze=r(()=>{bk(),vze=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?w5().y(e=>e[0]).x(e=>e[1]):w5().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}]}]:[]}}}),kze=r(()=>{bze=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 wze(e,t,r){return new Cze(e,t,r)}var Cze,Sze,Eze,_ze=r(()=>{Tze(),kze(),Cze=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 vze(t,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);r.push(...i.getDrawableElement());break;case"bar":i=new bze(t,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e),r.push(...i.getDrawableElement())}return r}},mt(wze,"getPlotComponent")}),Aze=r(()=>{fze(),xze(),_ze(),cze(),Sze=class{constructor(e,t,r,i){this.chartConfig=e,this.chartData=t,this.componentStore={title:mze(e,t,r,i),plot:wze(e,t,r),xAxis:gze(t.xAxis,e.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},i),yAxis:gze(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=>rze(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=>rze(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}}}),Rze=r(()=>{Aze(),Eze=class{static{mt(this,"XYChartBuilder")}static build(e,t,r,i){return new Sze(e,t,r,i).getDrawableElement()}}});function Lze(){var e=Ot(),t=vr();return lC(e.xyChart,t.themeVariables.xyChart)}function Ize(){var e=vr();return lC(ir.xyChart,e.xyChart)}function Nze(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function Dze(e){var t=vr();return Rc(e.trim(),t)}function Mze(e){Zze=e}function Oze(e){Qze.chartOrientation="horizontal"===e?"horizontal":"vertical"}function Pze(e){eqe.xAxis.title=Dze(e.text)}function Bze(e,t){eqe.xAxis={type:"linear",title:eqe.xAxis.title,min:e,max:t},rqe=!0}function $ze(e){eqe.xAxis={type:"band",title:eqe.xAxis.title,categories:e.map(e=>Dze(e.text))},rqe=!0}function Fze(e){eqe.yAxis.title=Dze(e.text)}function zze(e,t){eqe.yAxis={type:"linear",title:eqe.yAxis.title,min:e,max:t},iqe=!0}function qze(e){var t=Math.min(...e),e=Math.max(...e),r=nze(eqe.yAxis)?eqe.yAxis.min:1/0,i=nze(eqe.yAxis)?eqe.yAxis.max:-1/0;eqe.yAxis={type:"linear",title:eqe.yAxis.title,min:Math.min(r,t),max:Math.max(i,e)}}function jze(r){let e=[],t;if(0!==r.length&&(rqe||(i=nze(eqe.xAxis)?eqe.xAxis.min:1/0,t=nze(eqe.xAxis)?eqe.xAxis.max:-1/0,Bze(Math.min(i,1),Math.max(t,r.length))),iqe||qze(r),ize(eqe.xAxis)&&(e=eqe.xAxis.categories.map((e,t)=>[e,r[t]])),nze(eqe.xAxis))){var i=eqe.xAxis.min,n=eqe.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 Wze(e){return tqe[0===e?0:e%tqe.length]}function Uze(e,t){t=jze(t),eqe.plots.push({type:"line",strokeFill:Wze(Kze),strokeWidth:2,data:t}),Kze++}function Gze(e,t){t=jze(t),eqe.plots.push({type:"bar",fill:Wze(Kze),data:t}),Kze++}function Vze(){if(0===eqe.plots.length)throw Error("No Plot to render, please provide a plot with some data");return eqe.title=jh(),Eze.build(Qze,eqe,Jze,Zze)}function Yze(){return Jze}function Hze(){return Qze}function Xze(){return eqe}var Kze,Zze,Qze,Jze,eqe,tqe,rqe,iqe,nqe,aqe,sqe,oqe,lqe=r(()=>{wi(),Ti(),hi(),zC(),th(),Wu(),Rze(),cze(),Kze=0,Qze=Ize(),Jze=Lze(),eqe=Nze(),tqe=Jze.plotColorPalette.split(",").map(e=>e.trim()),iqe=rqe=!1,mt(Lze,"getChartDefaultThemeConfig"),mt(Ize,"getChartDefaultConfig"),mt(Nze,"getChartDefaultData"),mt(Dze,"textSanitizer"),mt(Mze,"setTmpSVGG"),mt(Oze,"setOrientation"),mt(Pze,"setXAxisTitle"),mt(Bze,"setXAxisRangeData"),mt($ze,"setXAxisBand"),mt(Fze,"setYAxisTitle"),mt(zze,"setYAxisRangeData"),mt(qze,"setYAxisRangeFromPlotData"),mt(jze,"transformDataWithoutCategory"),mt(Wze,"getPlotColorFromPalette"),mt(Uze,"setLineData"),mt(Gze,"setBarData"),mt(Vze,"getDrawableElem"),mt(Yze,"getChartThemeConfig"),mt(Hze,"getChartConfig"),mt(Xze,"getXYChartData"),nqe=mt(function(){Ph(),Kze=0,Qze=Ize(),eqe=Nze(),Jze=Lze(),tqe=Jze.plotColorPalette.split(",").map(e=>e.trim()),iqe=rqe=!1},"clear"),aqe={getDrawableElem:Vze,clear:nqe,setAccTitle:Bh,getAccTitle:$h,setDiagramTitle:qh,getDiagramTitle:jh,getAccDescription:zh,setAccDescription:Fh,setOrientation:Oze,setXAxisTitle:Pze,setXAxisRangeData:Bze,setXAxisBand:$ze,setYAxisTitle:Fze,setYAxisRangeData:zze,setLineData:Uze,setBarData:Gze,setTmpSVGG:Mze,getChartThemeConfig:Yze,getChartConfig:Hze,getXYChartData:Xze}}),cqe=r(()=>{e(),z$e(),Ch(),sqe=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 c(e){return"left"===e?"start":"right"===e?"end":"middle"}function h(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}mt(l,"getDominantBaseLine"),mt(c,"getTextAnchor"),mt(h,"getTextTransformation"),P.debug(`Rendering xychart chart
|
||
`+e);let u=M$e(t),d=u.append("g").attr("class","main"),p=d.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background"),g=(yh(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 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 t=e.data,r=.7*t.height;for(;!i(e,r)&&0<r;)--r;return r}),b=Math.floor(Math.min(...b)),x=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",x).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",b+"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,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{data:t,label:r}=e,i=t.width/(.7*r.length);for(;!n(e,i,10)&&0<i;)--i;return i}),b=Math.floor(Math.min(...x)),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",b+"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=>c(e.horizontalPos)).attr("transform",e=>h(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"),oqe={draw:sqe}}),hqe={};Vat(hqe,{diagram:()=>uqe});var uqe,dqe,pqe,gqe,fqe,mqe,yqe,vqe=r(()=>{tze(),lqe(),cqe(),uqe={parser:JFe,db:aqe,renderer:oqe}}),bqe=r(()=>{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,3],r=[1,4],i=[1,5],n=[1,6],B=[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],c=[1,28],h=[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],b=[1,32],x=[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],S=[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],j=[1,72],W=[1,73],U=[1,74],G=[1,75],V=[1,76],E=[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],R=[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],L=[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(B,[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:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,89:T,90:k},e(B,[2,4]),e(B,[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:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,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:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,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:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,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:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,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:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,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:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,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:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,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:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,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:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,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(S,[2,29]),e(S,[2,30]),e(S,[2,31]),e(S,[2,32]),e(S,[2,33]),e(S,[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:j,68:W,69:U,70:G,71:V},{62:77,65:z,66:q,67:j,68:W,69:U,70:G,71:V},{30:78,33:62,75:C,89:T,90:k},{73:79,75:E,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:E,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:E,80:Y,81:H,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te}),e(R,[2,67]),e(R,[2,69]),e(R,[2,70]),e(R,[2,71]),e(R,[2,72]),e(R,[2,73]),e(R,[2,74]),e(R,[2,75]),e(R,[2,76]),e(R,[2,77]),e(R,[2,78]),e(w,[2,57],{76:ie}),e(w,[2,58],{76:_}),{5:L,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:E,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(R,[2,68]),e(w,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:L,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:E,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:L,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:L,28:159,31:I,34:N,36:D,38:M,40:O},{5:L,28:160,31:I,34:N,36:D,38:M,40:O},{5:L,28:161,31:I,34:N,36:D,38:M,40:O},{5:L,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="",c=0,h=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 b,x,T,k,w,C,S,E={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===b||"u"<typeof b)&&(b=v()),o[T]&&o[T][b]))||!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 "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,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: "+b);switch(k[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],E.$=a[a.length-C],E._$={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&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return S;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(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0},"parse")},B={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=B,mt(P,"Parser"),(dqe=new((P.prototype=t).Parser=P)).parser=dqe,pqe=dqe}),xqe=r(()=>{Uu(),e(),Wu(),gqe=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=Bh,this.getAccTitle=$h,this.setAccDescription=Fh,this.getAccDescription=zh,this.setDiagramTitle=qh,this.getDiagramTitle=jh,this.getConfig=mt(()=>B().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"]}),P.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,Ph()}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=B(),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:`<<${r.type}>>`,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()}}}}),Tqe=r(()=>{wi(),fqe=mt(t=>{var{themeVariables:e,look:r}=vr(),{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"),mqe=mt(e=>{var{look:t,themeVariables:r}=vr(),r=r.requirementEdgeLabelBackground;return`
|
||
${fqe(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"),yqe=mqe}),kqe={};Vat(kqe,{draw:()=>wqe});var wqe,Cqe=r(()=>{Uu(),e(),fI(),Jue(),ede(),zC(),wqe=mt(async function(e,t,r,i){P.info("REF0:"),P.info("Drawing requirement diagram (unified)",t);var{securityLevel:n,state:a,layout:s,look:o}=B(),l=i.db.getData(),n=tI(t,n);l.type=i.type,l.layoutAlgorithm=Bue(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 Pue(l,n),PC.insertTitle(n,"requirementDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),$ue(n,8,"requirementDiagram",a?.useMaxWidth??!0)},"draw")}),Sqe={};Vat(Sqe,{diagram:()=>Eqe});var Eqe,_qe,Aqe,Rqe,Lqe,Iqe,Nqe,Dqe,Mqe,Oqe,Pqe,Bqe,$qe,Fqe,zqe,qqe,jqe,Wqe,Uqe,Gqe,Vqe,Yqe,Hqe,Xqe,Kqe,Zqe,Qqe,Jqe,eje,tje,rje,ije,nje,aje,sje,oje,lje,cje,hje,uje,dje,pje,gje,fje,mje,yje,vje,bje,xje,Tje,kje,wje,Cje,Sje,Eje,_je,Aje=r(()=>{bqe(),xqe(),Tqe(),Cqe(),Eqe={parser:pqe,get db(){return new gqe},renderer:kqe,styles:yqe}}),Rje=r(()=>{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,2],B=[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],c=[1,18],h=[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],b=[1,33],x=[1,34],T=[1,35],k=[1,36],w=[1,37],C=[1,38],S=[1,39],E=[1,40],_=[1,42],A=[1,43],R=[1,44],L=[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],j=[1,82],W=[1,83],U=[1,84],G=[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],ce=[1,103],he=[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:B,6:$},{1:[3]},{3:5,4:t,5:B,6:$},{3:6,4:t,5:B,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:c,23:41,24:h,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:b,42:x,44:T,45:k,47:w,51:C,53:S,54:E,56:_,61:A,62:R,63:L,64:I,73:N},e(D,[2,5]),{9:48,13:13,14:s,15:o,18:16,19:l,22:c,23:41,24:h,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:b,42:x,44:T,45:k,47:w,51:C,53:S,54:E,56:_,61:A,62:R,63:L,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:S,54:E},{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:j,81:W,82:U,83:G,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:ce,102:he,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:j,81:W,82:U,83:G,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:ce,102:he,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:S,54:E},{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:c,23:41,24:h,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:b,42:x,44:T,45:k,47:w,51:C,53:S,54:E,56:_,61:A,62:R,63:L,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:c,23:41,24:h,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:b,42:x,44:T,45:k,47:w,51:C,53:S,54:E,56:_,61:A,62:R,63:L,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:c,23:41,24:h,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:b,42:x,44:T,45:k,47:w,51:C,53:S,54:E,56:_,61:A,62:R,63:L,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:c,23:41,24:h,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:b,42:x,44:T,45:k,47:w,50:[1,165],51:C,53:S,54:E,56:_,61:A,62:R,63:L,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:c,23:41,24:h,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:b,42:x,44:T,45:k,47:w,49:[1,167],51:C,53:S,54:E,56:_,61:A,62:R,63:L,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:c,23:41,24:h,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:b,42:x,44:T,45:k,47:w,48:[1,170],51:C,53:S,54:E,56:_,61:A,62:R,63:L,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:c,23:41,24:h,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:b,42:x,44:T,45:k,47:w,51:C,53:S,54:E,56:_,61:A,62:R,63:L,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:S,54:E},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="",c=0,h=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 b,x,T,k,w,C,S,E={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===b||"u"<typeof b)&&(b=v()),o[T]&&o[T][b]))||!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 "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,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: "+b);switch(k[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],E.$=a[a.length-C],E._$={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&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return S;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(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0},"parse")},B={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]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}};t.lexer=B,mt(P,"Parser"),(_qe=new((P.prototype=t).Parser=P)).parser=_qe,Aqe=_qe}),Lje=r(()=>{Uu(),k_(),e(),dOe(),th(),Wu(),Rqe={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},Lqe={FILLED:0,OPEN:1},Iqe={LEFTOF:0,RIGHTOF:1,OVER:2},Nqe={ACTOR:"actor",BOUNDARY:"boundary",COLLECTIONS:"collections",CONTROL:"control",DATABASE:"database",ENTITY:"entity",PARTICIPANT:"participant",QUEUE:"queue"},Dqe=class{constructor(){this.state=new cOe(()=>({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=Bh,this.setAccDescription=Fh,this.setDiagramTitle=qh,this.getAccTitle=$h,this.getAccDescription=zh,this.getDiagramTitle=jh,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(B().wrap),this.LINETYPE=Rqe,this.ARROWTYPE=Lqe,this.PLACEMENT=Iqe}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=T_(o,{schema:x_})),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:B().sequence?.wrap??!1}clear(){this.state.reset(),Ph()}parseMessage(e){var e=e.trim(),{wrap:e,cleanedText:t}=this.extractWrap(e),t={text:t,wrap:e};return P.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?Rc(e,B()):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=Rc(r.text,B());e=(e=e.replace(/=/g,"=")).replace(/&/g,"&");var i=JSON.parse(e);this.insertLinks(t,i)}catch(e){P.error("error while parsing actor link text",e)}}addALink(a,s){a=this.getActor(a);try{let e={},t=Rc(s.text,B()),r=t.indexOf("@"),i=(t=(t=t.replace(/=/g,"=")).replace(/&/g,"&")).slice(0,r-1).trim(),n=t.slice(r+1).trim();e[i]=n,this.insertLinks(a,e)}catch(e){P.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=Rc(t.text,B()),i=JSON.parse(r);this.insertProperties(e,i)}catch(e){P.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){P.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":Bh(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 B().sequence}}}),Ije=r(()=>{Uu(),Mqe=mt(e=>{var t=e.dropShadow??"none",r=B().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;
|
||
}
|
||
|
||
.sectionTitle, .sectionTitle > tspan {
|
||
fill: ${e.loopTextColor};
|
||
stroke: none;
|
||
}
|
||
|
||
.loopLine {
|
||
stroke-width: 2px;
|
||
stroke-dasharray: 2, 2;
|
||
stroke: ${e.labelBoxBorderColor};
|
||
fill: ${e.labelBoxBorderColor};
|
||
}
|
||
|
||
.note {
|
||
//stroke: #decc93;
|
||
stroke: ${e.noteBorderColor};
|
||
fill: ${e.noteBkgColor};
|
||
}
|
||
|
||
.noteText, .noteText > tspan {
|
||
fill: ${e.noteTextColor};
|
||
stroke: none;
|
||
${e.noteFontWeight?`font-weight: ${e.noteFontWeight};`:""}
|
||
}
|
||
|
||
.activation0 {
|
||
fill: ${e.activationBkgColor};
|
||
stroke: ${e.activationBorderColor};
|
||
}
|
||
|
||
.activation1 {
|
||
fill: ${e.activationBkgColor};
|
||
stroke: ${e.activationBorderColor};
|
||
}
|
||
|
||
.activation2 {
|
||
fill: ${e.activationBkgColor};
|
||
stroke: ${e.activationBorderColor};
|
||
}
|
||
|
||
.actorPopupMenu {
|
||
position: absolute;
|
||
}
|
||
|
||
.actorPopupMenuPanel {
|
||
position: absolute;
|
||
fill: ${e.actorBkg};
|
||
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
||
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
|
||
}
|
||
.actor-man circle, line {
|
||
fill: ${e.actorBkg};
|
||
stroke-width: 2px;
|
||
}
|
||
|
||
g rect.rect {
|
||
filter: ${t};
|
||
stroke: ${e.nodeBorder};
|
||
}
|
||
`},"getStyles"),Oqe=Mqe}),Nje=r(()=>{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:c,actorFontWeight:h}=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",h).style("font-family",c);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 c(e,t,r,i,n,a,s,o){var{actorFontSize:o,actorFontFamily:l,actorFontWeight:c}=o,[h,u]=OC(o),d=e.split(I.lineBreakRegex);for(let e=0;e<d.length;e++){var p=e*h-h*(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",c).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),c(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 Gc(e,vr());(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 Yc(e,vr())),c(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])}Pqe=j(Tk(),1),wi(),zC(),th(),kk(),Bqe=36,$qe="actor-top",Fqe="actor-bottom",zqe="actor-box",qqe="actor-man",jqe=new Set(["redux-color","redux-dark-color"]),Wqe=mt(function(e,t){return e=G3(e,t),"neo"===vr().look&&e.attr("data-look","neo"),e},"drawRect"),Uqe=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),""),c=(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",c),e.attr("height",o.height),e.attr("rx",o.rx),e.attr("ry",o.ry),null!=a){var h,u=20;for(h in a){var d=l.append("a"),p=(0,Pqe.sanitizeUrl)(a[h]);d.attr("xlink:href",p),d.attr("target","_blank"),kje(i)(h,d,o.x+10,o.height+u,c,20,{class:"actor"},i),u+=30}}return e.attr("height",u),{height:o.height+u,width:c}},"drawPopup"),Gqe=mt(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Vqe=mt(async function(i,n,a=null){var s=i.append("foreignObject"),o=await Yc(n.text,vr()),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"),Yqe=mt(function(e,t){let r=0,i=0,n=t.text.split(I.lineBreakRegex),[a,s]=OC(t.fontSize),o=[],l=0,c=mt(()=>t.y,"yfunc");if(void 0!==t.valign&&void 0!==t.textMargin&&0<t.textMargin)switch(t.valign){case"top":case"start":c=mt(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":c=mt(()=>Math.round(t.y+(r+i+t.textMargin)/2),"yfunc");break;case"bottom":case"end":c=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[h,u]of n.entries()){void 0!==t.textMargin&&0===t.textMargin&&void 0!==a&&(l=h*a),(h=e.append("text")).attr("x",t.x),h.attr("y",c()),void 0!==t.anchor&&h.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),void 0!==t.fontFamily&&h.style("font-family",t.fontFamily),void 0!==s&&h.style("font-size",s),void 0!==t.fontWeight&&h.style("font-weight",t.fontWeight),void 0!==t.fill&&h.attr("fill",t.fill),void 0!==t.class&&h.attr("class",t.class),void 0!==t.dy?h.attr("dy",t.dy):0!==l&&h.attr("dy",l);var d,u=u||dC;(t.tspan?((d=h.append("tspan")).attr("x",t.x),void 0!==t.fill&&d.attr("fill",t.fill),d):h).text(u),void 0!==t.valign&&void 0!==t.textMargin&&0<t.textMargin&&(i+=(h._groups||h)[0][0].getBBox().height,r=i),o.push(h)}return o},"drawText"),Hqe=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,Yqe(e,t),i},"drawLabel"),Xqe=-1,Kqe=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"),Zqe=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:c,themeVariables:h}=r,{bkgColorArray:h,borderColorArray:u}=h,d=e=e.append("g").lower(),o=(i||(Xqe++,Object.keys(t.links||{}).length&&!r.forceMenus&&d.attr("onclick",Gqe(`actor${Xqe}_popup`)).attr("cursor","pointer"),d.append("line").attr("id","actor"+Xqe).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=Xqe,null!=t.links&&d.attr("id","root-"+Xqe),"neo"===l&&d.attr("data-look","neo")),K3()),s="actor",e=(t.properties?.class?s=t.properties.class:o.fill="#eaeaea",s+=i?" "+Fqe:" "+$qe,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),Wqe(d,o)),a=n.get(t.name)??0;jqe.has(c)&&(e.style("stroke",u[a%u.length]),e.style("fill",h[a%u.length])),"neo"===l&&e.attr("filter","url(#drop-shadow)"),t.rectData=o,t.properties?.icon&&("@"===(s=t.properties.icon.trim()).charAt(0)?X3(d,o.x+o.width-20,o.y+10,s.substr(1)):H3(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)),Tje(r,Uc(t.description))(t.description,d,o.x,o.y,o.width,o.height,{class:"actor "+zqe},r);let p=t.height;return e.node&&(n=e.node().getBBox(),t.height=n.height,p=n.height),p},"drawActorTypeParticipant"),Qqe=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:c,themeVariables:h}=r,{bkgColorArray:h,borderColorArray:u}=h,d=e=e.append("g").lower(),o=(i||(Xqe++,Object.keys(t.links||{}).length&&!r.forceMenus&&d.attr("onclick",Gqe(`actor${Xqe}_popup`)).attr("cursor","pointer"),d.append("line").attr("id","actor"+Xqe).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=Xqe,null!=t.links&&d.attr("id","root-"+Xqe),"neo"===l&&d.attr("data-look","neo")),K3()),s="actor",e=(t.properties?.class?s=t.properties.class:o.fill="#eaeaea",s+=i?" "+Fqe:" "+$qe,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=Wqe(d,o),s=Wqe(d,e),e=(t.rectData=o,"neo"===l&&d.attr("filter","url(#drop-shadow)"),n.get(t.name)??0);jqe.has(c)&&(a.style("stroke",u[e%u.length]),a.style("fill",h[e%u.length]),s.style("stroke",u[e%u.length]),s.style("fill",h[e%u.length])),t.properties?.icon&&("@"===(l=t.properties.icon.trim()).charAt(0)?X3(d,o.x+o.width-20,o.y+10,l.substr(1)):H3(d,o.x+o.width-20,o.y+10,l)),Tje(r,Uc(t.description))(t.description,d,o.x-6,o.y+6,o.width,o.height,{class:"actor "+zqe},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"),Jqe=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:c,themeVariables:h}=r,{bkgColorArray:u,borderColorArray:d}=h,p=e.append("g").lower(),g=p,f=(i||(Xqe++,Object.keys(t.links||{}).length&&!r.forceMenus&&g.attr("onclick",Gqe(`actor${Xqe}_popup`)).attr("cursor","pointer"),g.append("line").attr("id","actor"+Xqe).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=Xqe,null!=t.links&&g.attr("id","root-"+Xqe),"neo"===l&&g.attr("data-look","neo")),K3()),m="actor";t.properties?.class?m=t.properties.class:f.fill="#eaeaea",m+=i?" "+Fqe:" "+$qe,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"),b=g.append("g"),x=`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
|
||
`,x=(v.append("path").attr("d",x),b.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})`),b.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);jqe.has(c)&&(v.style("stroke",d[x%d.length]),v.style("fill",u[x%d.length]),b.style("stroke",d[x%d.length]),b.style("fill",u[x%d.length])),t.properties?.icon&&(e=t.properties.icon.trim(),y=f.x+f.width-20,n=f.y+10,"@"===e.charAt(0)?X3(g,y,n,e.substr(1)):H3(g,y,n,e)),Tje(r,Uc(t.description))(t.description,g,f.x,f.y,f.width,f.height,{class:"actor "+zqe},r);let T=t.height,k=v.select("path:last-child");return k.node()&&(b=k.node().getBBox(),t.height=b.height,T=b.height),i||(g.attr("data-et","participant"),g.attr("data-type","queue"),g.attr("data-id",t.name)),T},"drawActorTypeQueue"),eje=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:c,theme:h,themeVariables:u}=r,{bkgColorArray:u,borderColorArray:d,actorBorder:p,actorBkg:g}=u,f=e.append("g").lower(),m=(i||(Xqe++,f.append("line").attr("id","actor"+Xqe).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=Xqe),e.append("g")),y=qqe;return m.attr("class",y+=i?" "+Fqe:" "+$qe),m.attr("name",t.name),(f=K3()).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"===c?"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,jqe.has(h)?(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),Tje(r,Uc(t.description))(t.description,m,f.x,f.y+22+(i?5:12),f.width,f.height,{class:"actor "+qqe},r),i||(m.attr("data-et","participant"),m.attr("data-type","control"),m.attr("data-id",t.name)),t.height},"drawActorTypeControl"),tje=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:c,themeVariables:h}=r,{bkgColorArray:h,borderColorArray:u}=h,d=e.append("g").lower(),p=e.append("g"),g="actor";return p.attr("class",g+=i?" "+Fqe:" "+$qe),p.attr("name",t.name),(e=K3()).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,jqe.has(c)&&(p.style("stroke",u[g%u.length]),p.style("fill",h[g%u.length])),a=p.node().getBBox(),t.height=a.height+(r?.sequence?.labelBoxHeight??0),i||(Xqe++,d.append("line").attr("id","actor"+Xqe).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=Xqe),Tje(r,Uc(t.description))(t.description,p,e.x,e.y+(i?15:30),e.width,e.height,{class:"actor "+qqe},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"),rje=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:c,look:h}=r,{bkgColorArray:u,borderColorArray:d,actorBorder:p}=c,g=e.append("g").lower(),f=g,m=(i||(Xqe++,Object.keys(t.links||{}).length&&!r.forceMenus&&f.attr("onclick",Gqe(`actor${Xqe}_popup`)).attr("cursor","pointer"),f.append("line").attr("id","actor"+Xqe).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=Xqe,null!=t.links&&f.attr("id","root-"+Xqe),"neo"===h&&f.attr("data-look","neo")),K3()),y="actor";t.properties?.class?y=t.properties.class:m.fill="#eaeaea",y+=i?" "+Fqe:" "+$qe,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,b=(T=e/2)/(2.5+e/50),x=f.append("g"),T=(x.attr("class",y),`
|
||
M ${m.x},${m.y+b}
|
||
a ${T},${b} 0 0 0 ${e},0
|
||
a ${T},${b} 0 0 0 -${e},0
|
||
l 0,${v-2*b}
|
||
a ${T},${b} 0 0 0 ${e},0
|
||
l 0,-${v-2*b}
|
||
`),v=(x.append("path").attr("d",T),"neo"===h&&x.attr("filter","url(#drop-shadow)"),n.get(t.name)??0);return jqe.has(l)?(x.style("stroke",d[v%d.length]),x.style("fill",u[v%d.length])):x.style("stroke",p),x.attr("transform",`translate(${e}, ${b})`),t.rectData=m,Tje(r,Uc(t.description))(t.description,f,m.x,m.y+35,m.width,m.height,{class:"actor "+zqe},r),(T=x.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"),ije=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:c,theme:h,themeVariables:u}=r,{bkgColorArray:u,borderColorArray:d,actorBorder:p}=u,e=(i||(Xqe++,l.append("line").attr("id","actor"+Xqe).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=Xqe),e.append("g")),g=qqe;return e.attr("class",g+=i?" "+Fqe:" "+$qe),e.attr("name",t.name),(l=K3()).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"+Xqe).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"+Xqe).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"===c&&e.attr("filter","url(#drop-shadow)"),o=n.get(t.name)??0,jqe.has(h)?(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),Tje(r,Uc(t.description))(t.description,e,l.x,l.y+15,l.width,l.height,{class:"actor "+qqe},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"),nje=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:c,themeVariables:h}=r,{bkgColorArray:h,borderColorArray:u,actorBorder:d}=h,p=e.append("g").lower(),g=(i||(Xqe++,p.append("line").attr("id","actor"+Xqe).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=Xqe),e.append("g")),f=qqe;return g.attr("class",f+=i?" "+Fqe:" "+$qe),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"+Xqe).attr("x1",s).attr("y1",o+25*p).attr("x2",s).attr("y2",o+45*p),g.append("line").attr("id","actor-man-arms"+Xqe).attr("x1",s-Bqe/2*p).attr("y1",o+33*p).attr("x2",s+Bqe/2*p).attr("y2",o+33*p),g.append("line").attr("x1",s-Bqe/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+(Bqe/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=K3()).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,jqe.has(c)?(g.style("stroke",u[s%u.length]),g.style("fill",h[s%u.length])):g.style("stroke",d),Tje(r,Uc(t.description))(t.description,g,a.x,o+35*p-("neo"===l?10:0),a.width,a.height,{class:"actor "+qqe},r),t.height},"drawActorTypeActor"),aje=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 nje(e,t,r,i,o);case"participant":return Zqe(e,t,r,i,o);case"boundary":return ije(e,t,r,i,o);case"control":return eje(e,t,r,i,n,o);case"entity":return tje(e,t,r,i,o);case"database":return rje(e,t,r,i,o);case"collections":return Qqe(e,t,r,i,o);case"queue":return Jqe(e,t,r,i,o)}},"drawActor"),sje=mt(function(e,t,r){e=e.append("g"),hje(e,t),t.name&&Tje(r)(t.name,e,t.x,t.y+r.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},r),e.lower()},"drawBox"),oje=mt(function(e){return e.append("g")},"anchorElement"),lje=mt(function(e,t,r,i,n,a,s){var{theme:i,themeVariables:o}=i,{bkgColorArray:o,borderColorArray:l,mainBkg:c}=o,h=K3(),u=t.anchored,d=t.actor,n=(h.x=t.startx,h.y=t.starty,h.class="activation"+n%3,h.width=t.stopx-t.startx,h.height=r-t.starty,Wqe(u,h)),r=(s??new Map([...a.db.getActors().values()].map((e,t)=>[e.name,t]))).get(d)??0;jqe.has(i)&&(n.style("stroke",l[r%l.length]),n.style("fill",o[r%l.length]??c))},"drawActivation"),cje=mt(async function(e,t,r,i,n){let{boxMargin:a,boxTextMargin:s,labelBoxHeight:o,labelBoxWidth:l,messageFontFamily:c,messageFontSize:h,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")}),Z3());g.text=r,g.x=t.startx,g.y=t.starty,g.fontFamily=c,g.fontSize=h,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",Hqe(d,g),(g=bje()).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=c,g.fontSize=h,g.fontWeight=u,g.wrap=!0;var f=Uc(g.text)?await Vqe(d,g,t):Yqe(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="sectionTitle",g.anchor="middle",g.valign="middle",g.tspan=!1,g.fontFamily=c,g.fontSize=h,g.fontWeight=u,g.wrap=t.wrap,Uc(g.text)?(t.starty=t.sections[m].y,await Vqe(d,g,t)):Yqe(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"),hje=mt(function(e,t){V3(e,t)},"drawBackgroundRect"),uje=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"),dje=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"),pje=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"),gje=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"),fje=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"),mje=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"),yje=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"),vje=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"),bje=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"),xje=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(c,"byTspan"),mt(n,"byFo"),mt(a,"byKatex"),mt(f,"_setTextAttrs"),Tje=function(e,t=!1){return t?a:"fo"===e.textPlacement?n:"old"===e.textPlacement?i:c},mt(t,"byText"),mt(l,"byTspan"),mt(r,"byFo"),mt(g,"_setTextAttrs"),kje=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:l},wje=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"),Cje=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"),Sje=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"),Eje=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"),_je={drawRect:Wqe,drawText:Yqe,drawLabel:Hqe,drawActor:aje,drawBox:sje,drawPopup:Uqe,anchorElement:oje,drawActivation:lje,drawLoop:cje,drawBackgroundRect:hje,insertArrowHead:gje,insertArrowFilledHead:fje,insertSequenceNumber:mje,insertArrowCrossHead:yje,insertDatabaseIcon:uje,insertComputerIcon:dje,insertClockIcon:pje,getTextObj:bje,getNoteRect:xje,fixLifeLineHeights:Kqe,sanitizeUrl:Pqe.sanitizeUrl,insertDropShadow:vje,insertSolidTopArrowHead:wje,insertSolidBottomArrowHead:Cje,insertStickTopArrowHead:Sje,insertStickBottomArrowHead:Eje}});async function Dje(e,t){q.bumpVerticalPos(10);var{startx:r,stopx:i,message:n}=t,a=I.splitBreaks(n).length,s=Uc(n),n=s?await Gc(n,B()):PC.calculateTextDimensions(n,zje($));s||(s=n.height/a,t.height+=s,q.bumpVerticalPos(s));let o,l=n.height-10,c=n.width;return r===i?(o=q.getVerticalPos()+l,$.rightAngles||(l+=$.boxMargin,o=q.getVerticalPos()+l),l+=30,a=I.getMax(c/2,$.width/2),q.insert(r-a,q.getVerticalPos()-10+l,i+a,q.getVerticalPos()+30+l)):(l+=$.boxMargin,o=q.getVerticalPos()+l,q.insert(r,o-10,i,o)),q.bumpVerticalPos(l),t.height+=l,t.stopy=t.starty+t.height,q.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),o}function Mje(e,t,r,i,n){q.bumpVerticalPos(r);let a=i;t.id&&t.message&&e[t.id]&&(r=e[t.id].width,e=zje($),t.message=PC.wrapLabel(`[${t.message}]`,r-2*$.wrapPadding,e),t.width=r,t.wrap=!0,r=PC.calculateTextDimensions(t.message,e),e=I.getMax(r.height,$.labelBoxHeight),a=i+e,P.debug(e+" - "+t.message)),n(t),q.bumpVerticalPos(a)}function Oje(r,i,e,t,n,a,s){function o(e,t){e.x<n.get(r.from).x?(q.insert(i.stopx-t,i.starty,i.startx,i.stopy+e.height/2+$.noteMargin),i.stopx=i.stopx+t):(q.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?(q.insert(i.startx-t,i.starty,i.stopx,i.stopy+e.height/2+$.noteMargin),i.startx=i.startx+t):(q.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 c=[Nqe.ACTOR,Nqe.CONTROL,Nqe.ENTITY,Nqe.DATABASE];a.get(r.to)==t?(o(a=n.get(r.to),c.includes(a.type)?Bqe/2+3:a.width/2+3),a.starty=e-a.height/2,q.bumpVerticalPos(a.height/2)):s.get(r.from)==t?(a=n.get(r.from),$.mirrorActors&&l(a,c.includes(a.type)?Bqe/2:a.width/2),a.stopy=e-a.height/2,q.bumpVerticalPos(a.height/2)):s.get(r.to)==t&&(a=n.get(r.to),$.mirrorActors&&o(a,c.includes(a.type)?Bqe/2+3:a.width/2+3),a.stopy=e-a.height/2,q.bumpVerticalPos(a.height/2))}async function Pje(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?qje:zje)($),l=i.wrap?PC.wrapLabel(i.message,$.width-2*$.wrapPadding,o):i.message,l=(Uc(l)?await Gc(i.message,B()):PC.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 P.debug("maxMessageWidthPerActor:",n),n}async function Bje(i,e,t){let r=0;for(var n of i.keys()){(n=i.get(n)).wrap&&(n.description=PC.wrapLabel(n.description,$.width-2*$.wrapPadding,jje($)));var a=Uc(n.description)?await Gc(n.description,B()):PC.calculateTextDimensions(n.description,jje($));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 c=0;return t.forEach(e=>{var t,r=zje($),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=PC.wrapLabel(e.name,t-2*$.wrapPadding,r)),PC.calculateTextDimensions(e.name,r)),r=(c=I.getMax(r.height,c),I.getMax(t,r.width+2*$.wrapPadding));e.margin=$.boxTextMargin,t<r&&(e.margin+=(r-t)/2)}),t.forEach(e=>e.textMaxHeight=c),I.getMax(r,$.height)}var $,q,$je,Fje,zje,qje,jje,Wje,Uje,Gje,Vje,Yje,Hje,Xje,Kje,Zje,Qje,Jje,eWe,tWe,rWe,iWe,nWe,aWe,sWe=r(()=>{bk(),Nje(),e(),th(),th(),kk(),Uu(),Lr(),zC(),Ch(),Lje(),$={},q={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,Yje(B())},"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(q.data,"startx",i-t*$.boxMargin,Math.min),o.updateVal(q.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(q.data,"starty",n-t*$.boxMargin,Math.min),o.updateVal(q.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(q.data,"startx",n,Math.min),this.updateVal(q.data,"starty",r,Math.min),this.updateVal(q.data,"stopx",e,Math.max),this.updateVal(q.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=Hje(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:_je.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:q.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")},$je=mt(async function(e,t,r){q.bumpVerticalPos($.boxMargin),t.height=$.boxMargin,t.starty=q.getVerticalPos();var i=K3(),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),_je.drawRect(e,i)),e=((n=Z3()).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",Uc(n.text)?await Vqe(e,n):Yqe(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,q.bumpVerticalPos(n+2*$.noteMargin),t.stopy=t.starty+n+2*$.noteMargin,t.stopx=t.startx+i.width,q.insert(t.startx,t.starty,t.stopx,t.stopy),q.models.addNote(t)},"drawNote"),Fje=mt(function(e,t,r,i,n,a,s){let o=i.db.getActors(),l=o.get(t.from),c=o.get(t.to),h=r.sequenceVisible,u=l.x+l.width/2,d=c.x+c.width/2,p=u<=d,g=tWe(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:b,CENTRAL_CONNECTION_DUAL:x}=i.db.LINETYPE;if(h)switch(t.centralConnection){case v:g&&(d+=m(p,!0));break;case b:g||(u+=m(p,!1));break;case x:g?d+=m(p,!0):u+=m(p,!1)}switch(t.centralConnection){case v:y(d);break;case b:y(u);break;case x:y(u),y(d)}},"drawCentralConnection"),zje=mt(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),qje=mt(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),jje=mt(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont"),mt(Dje,"boundMessage"),Wje=mt(async function(h,u,d,p,g,f){var{startx:m,stopx:y,starty:e,message:t,type:v,sequenceIndex:b,sequenceVisible:r}=u,i=PC.calculateTextDimensions(t,zje($)),n=Z3();n.x=Math.min(m,y),n.y=e+10,n.width=Math.abs(y-m),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,Uc(n.text)?await Vqe(h,n,{startx:m,stopx:y,starty:d}):Yqe(h,n);let a=i.width,x,T=(m===y?(e=r||$.showSequenceNumbers,t=tWe(g,p),n=rWe(g,p),i=m+(e&&(t||n)?10:0),x=$.rightAngles?h.append("path").attr("d",`M ${i},${d} H ${m+I.getMax($.width/2,a/2)} V ${d+25} H `+m):h.append("path").attr("d","M "+i+","+d+" C "+(i+60)+","+(d-10)+" "+(m+60)+","+(d+30)+" "+m+","+(d+20))):((x=h.append("line")).attr("x1",m),x.attr("y1",d),x.attr("x2",y),x.attr("y2",d)),Jje(g,p)&&Fje(h,g,u,p,m,y,d),v===p.db.LINETYPE.DOTTED||v===p.db.LINETYPE.DOTTED_CROSS||v===p.db.LINETYPE.DOTTED_POINT||v===p.db.LINETYPE.DOTTED_OPEN||v===p.db.LINETYPE.BIDIRECTIONAL_DOTTED||v===p.db.LINETYPE.SOLID_TOP_DOTTED||v===p.db.LINETYPE.SOLID_BOTTOM_DOTTED||v===p.db.LINETYPE.STICK_TOP_DOTTED||v===p.db.LINETYPE.STICK_BOTTOM_DOTTED||v===p.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||v===p.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||v===p.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||v===p.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(x.style("stroke-dasharray","3, 3"),x.attr("class","messageLine1")):x.attr("class","messageLine0"),x.attr("data-et","message"),x.attr("data-id","i"+u.id),x.attr("data-from",u.from),x.attr("data-to",u.to),"");if($.arrowMarkerAbsolute&&(T=Oc(!0)),x.attr("stroke-width",2),x.attr("stroke","none"),x.style("fill","none"),v!==p.db.LINETYPE.SOLID_TOP&&v!==p.db.LINETYPE.SOLID_TOP_DOTTED||x.attr("marker-end","url("+T+"#"+f+"-solidTopArrowHead)"),v!==p.db.LINETYPE.SOLID_BOTTOM&&v!==p.db.LINETYPE.SOLID_BOTTOM_DOTTED||x.attr("marker-end","url("+T+"#"+f+"-solidBottomArrowHead)"),v!==p.db.LINETYPE.STICK_TOP&&v!==p.db.LINETYPE.STICK_TOP_DOTTED||x.attr("marker-end","url("+T+"#"+f+"-stickTopArrowHead)"),v!==p.db.LINETYPE.STICK_BOTTOM&&v!==p.db.LINETYPE.STICK_BOTTOM_DOTTED||x.attr("marker-end","url("+T+"#"+f+"-stickBottomArrowHead)"),v!==p.db.LINETYPE.SOLID_ARROW_TOP_REVERSE&&v!==p.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||x.attr("marker-start","url("+T+"#"+f+"-solidBottomArrowHead)"),v!==p.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE&&v!==p.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||x.attr("marker-start","url("+T+"#"+f+"-solidTopArrowHead)"),v!==p.db.LINETYPE.STICK_ARROW_TOP_REVERSE&&v!==p.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||x.attr("marker-start","url("+T+"#"+f+"-stickBottomArrowHead)"),v!==p.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE&&v!==p.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED||x.attr("marker-start","url("+T+"#"+f+"-stickTopArrowHead)"),v!==p.db.LINETYPE.SOLID&&v!==p.db.LINETYPE.DOTTED||x.attr("marker-end","url("+T+"#"+f+"-arrowhead)"),v!==p.db.LINETYPE.BIDIRECTIONAL_SOLID&&v!==p.db.LINETYPE.BIDIRECTIONAL_DOTTED||(x.attr("marker-start","url("+T+"#"+f+"-arrowhead)"),x.attr("marker-end","url("+T+"#"+f+"-arrowhead)")),v!==p.db.LINETYPE.SOLID_POINT&&v!==p.db.LINETYPE.DOTTED_POINT||x.attr("marker-end","url("+T+"#"+f+"-filled-head)"),v!==p.db.LINETYPE.SOLID_CROSS&&v!==p.db.LINETYPE.DOTTED_CROSS||x.attr("marker-end","url("+T+"#"+f+"-crosshead)"),r||$.showSequenceNumbers){let e=v===p.db.LINETYPE.BIDIRECTIONAL_SOLID||v===p.db.LINETYPE.BIDIRECTIONAL_DOTTED,t=v===p.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||v===p.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||v===p.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||v===p.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||v===p.db.LINETYPE.STICK_ARROW_TOP_REVERSE||v===p.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||v===p.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||v===p.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r=Jje(g,p),i=m,n=y,a=void(e?(m<y?i=m+12:(i=m-6+(r?-5:0),i+=g?.centralConnection===p.db.LINETYPE.CENTRAL_CONNECTION_DUAL||g?.centralConnection===p.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),x.attr("x1",i)):t?(m<y?n=y-12:(n=y-6,i+=g?.centralConnection===p.db.LINETYPE.CENTRAL_CONNECTION_DUAL||g?.centralConnection===p.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),n+=r?15:0,x.attr("x2",n),x.attr("x1",i)):x.attr("x1",m+6)),s=m===y,o=m<=y,l=(a=s?u.fromBounds+1:t?o?u.toBounds-1:u.fromBounds+1:o?u.fromBounds+1:u.toBounds-1,"12px"),c=b.toString().length;5<c?l="7px":3<c&&(l="9px"),h.append("line").attr("x1",a).attr("y1",d).attr("x2",a).attr("y2",d).attr("stroke-width",0).attr("marker-start","url("+T+"#"+f+"-sequencenumber)"),h.append("text").attr("x",a).attr("y",d+4).attr("font-family","sans-serif").attr("font-size",l).attr("text-anchor","middle").attr("class","sequenceNumber").text(b)}},"drawMessage"),Uje=mt(function(e,t,r,i,n,a,s){let o=0,l=0,c,h=0;for(var u of i){var d=(u=t.get(u)).box;c&&c!=d&&(s||q.models.addBox(c),l+=$.boxMargin+c.margin),d&&d!=c&&(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,h=I.getMax(h,u.height),r.get(u.name)&&(l+=u.width/2),u.x=o+l,u.starty=q.getVerticalPos(),q.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,c=u.box,q.models.addActor(u)}c&&!s&&q.models.addBox(c),q.bumpVerticalPos(h)},"addActorRenderingData"),Gje=mt(async function(t,r,i,e,n,a,s){if(e){let e=0;q.bumpVerticalPos(2*$.boxMargin);for(var o of i)(o=r.get(o)).stopy||(o.stopy=q.getVerticalPos()),o=await _je.drawActor(t,o,$,!0,n,a,s),e=I.getMax(e,o);q.bumpVerticalPos(e+$.boxMargin)}else for(var l of i)l=r.get(l),await _je.drawActor(t,l,$,!1,n,a,s)},"drawActors"),Vje=mt(function(e,t,r,i){let n=0,a=0;for(var s of r){var s=t.get(s),o=Zje(s);(o=_je.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"),Yje=mt(function(e){Ee($,e),e.fontFamily&&($.actorFontFamily=$.noteFontFamily=$.messageFontFamily=e.fontFamily),e.fontSize&&($.actorFontSize=$.noteFontSize=$.messageFontSize=e.fontSize),e.fontWeight&&($.actorFontWeight=$.noteFontWeight=$.messageFontWeight=e.fontWeight)},"setConf"),Hje=mt(function(t){return q.activations.filter(function(e){return e.actor===t})},"actorActivations"),Xje=mt(function(e,t){return t=t.get(e),[(e=Hje(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(Mje,"adjustLoopHeightForWrap"),mt(Oje,"adjustCreatedDestroyedData"),Kje=mt(async function(i,e,O,n){var{securityLevel:t,sequence:r,look:a}=B();$=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;q.init(),P.debug(n.db);let l="sandbox"===t?r.select(`[id="${e}"]`):Q(`[id="${e}"]`),c=n.db.getActors(),h=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 Pje(c,g,n);if($.height=await Bje(c,v,d),_je.insertComputerIcon(l,e),_je.insertDatabaseIcon(l,e),_je.insertClockIcon(l,e),m&&(q.bumpVerticalPos($.boxMargin),y)&&q.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 b=new Map(p.map((e,t)=>[c.get(e)?.name??e,t]));Uje(l,c,h,p,0,g,!1);var x,T,k,w=await nWe(g,c,v,n);function C(e,t){var r=q.endActivation(e);r.starty+18>t&&(r.starty=t-6,t+=12),_je.drawActivation(l,r,t,$,Hje(e.from).length,n,b),q.insert(r.startx,t-10,r.stopx,t)}_je.insertArrowHead(l,e),_je.insertArrowCrossHead(l,e),_je.insertArrowFilledHead(l,e),_je.insertSequenceNumber(l,e),_je.insertSolidTopArrowHead(l,e),_je.insertSolidBottomArrowHead(l,e),_je.insertStickTopArrowHead(l,e),_je.insertStickBottomArrowHead(l,e),"neo"===a&&_je.insertDropShadow(l,$),mt(C,"activeEnd");let S=1,E=1,_=[],A=[],R=0;for(x of g){let e,t,r;switch(x.type){case n.db.LINETYPE.NOTE:q.resetVerticalPos(),t=x.noteModel,await $je(l,t,x.id);break;case n.db.LINETYPE.ACTIVE_START:case n.db.LINETYPE.CENTRAL_CONNECTION:case n.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:q.newActivation(x,l,c);break;case n.db.LINETYPE.ACTIVE_END:C(x,q.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:Mje(w,x,$.boxMargin,$.boxMargin+$.boxTextMargin,e=>q.newLoop(e));break;case n.db.LINETYPE.LOOP_END:e=q.endLoop(),await _je.drawLoop(l,e,"loop",$,x),q.bumpVerticalPos(e.stopy-q.getVerticalPos()),q.models.addLoop(e);break;case n.db.LINETYPE.RECT_START:Mje(w,x,$.boxMargin,$.boxMargin,e=>q.newLoop(void 0,e.message));break;case n.db.LINETYPE.RECT_END:e=q.endLoop(),A.push(e),q.models.addLoop(e),q.bumpVerticalPos(e.stopy-q.getVerticalPos());break;case n.db.LINETYPE.OPT_START:Mje(w,x,$.boxMargin,$.boxMargin+$.boxTextMargin,e=>q.newLoop(e));break;case n.db.LINETYPE.OPT_END:e=q.endLoop(),await _je.drawLoop(l,e,"opt",$,x),q.bumpVerticalPos(e.stopy-q.getVerticalPos()),q.models.addLoop(e);break;case n.db.LINETYPE.ALT_START:Mje(w,x,$.boxMargin,$.boxMargin+$.boxTextMargin,e=>q.newLoop(e));break;case n.db.LINETYPE.ALT_ELSE:Mje(w,x,$.boxMargin+$.boxTextMargin,$.boxMargin,e=>q.addSectionToLoop(e));break;case n.db.LINETYPE.ALT_END:e=q.endLoop(),await _je.drawLoop(l,e,"alt",$,x),q.bumpVerticalPos(e.stopy-q.getVerticalPos()),q.models.addLoop(e);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:Mje(w,x,$.boxMargin,$.boxMargin+$.boxTextMargin,e=>q.newLoop(e)),q.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:Mje(w,x,$.boxMargin+$.boxTextMargin,$.boxMargin,e=>q.addSectionToLoop(e));break;case n.db.LINETYPE.PAR_END:e=q.endLoop(),await _je.drawLoop(l,e,"par",$,x),q.bumpVerticalPos(e.stopy-q.getVerticalPos()),q.models.addLoop(e);break;case n.db.LINETYPE.AUTONUMBER:S=x.message.start||S,E=x.message.step||E,x.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:Mje(w,x,$.boxMargin,$.boxMargin+$.boxTextMargin,e=>q.newLoop(e));break;case n.db.LINETYPE.CRITICAL_OPTION:Mje(w,x,$.boxMargin+$.boxTextMargin,$.boxMargin,e=>q.addSectionToLoop(e));break;case n.db.LINETYPE.CRITICAL_END:e=q.endLoop(),await _je.drawLoop(l,e,"critical",$,x),q.bumpVerticalPos(e.stopy-q.getVerticalPos()),q.models.addLoop(e);break;case n.db.LINETYPE.BREAK_START:Mje(w,x,$.boxMargin,$.boxMargin+$.boxTextMargin,e=>q.newLoop(e));break;case n.db.LINETYPE.BREAK_END:e=q.endLoop(),await _je.drawLoop(l,e,"break",$,x),q.bumpVerticalPos(e.stopy-q.getVerticalPos()),q.models.addLoop(e);break;default:try{(r=x.msgModel).starty=q.getVerticalPos(),r.sequenceIndex=S,r.sequenceVisible=n.db.showSequenceNumbers(),r.id=x.id,r.from=x.from,r.to=x.to;var L=await Dje(l,r);Oje(x,r,L,R,c,h,u),_.push({messageModel:r,lineStartY:L,msg:x}),q.models.addMessage(r)}catch(i){P.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(x.type)&&(S=Math.round(100*(S+E))/100),R++}P.debug("createdActors",h),P.debug("destroyedActors",u),await Gje(l,c,p,!1,e,n,b);for(T of _)await Wje(l,T.messageModel,T.lineStartY,n,T.msg,e);$.mirrorActors&&await Gje(l,c,p,!0,e,n,b),A.forEach(e=>_je.drawBackgroundRect(l,e)),Kqe(l,c,p,$);for(k of q.models.boxes){k.height=q.getVerticalPos()-k.y,q.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)",_je.drawBox(l,k,$)}m&&q.bumpVerticalPos($.boxMargin),t=Vje(l,c,p,o),void 0===(r=q.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),yh(l,D,o,$.useMaxWidth),t=f?40:0,a=c.size&&"neo"===a?30:0,l.attr("viewBox",r.startx-$.diagramMarginX+" -"+($.diagramMarginY+t)+" "+o+" "+(D+t+a)),P.debug("models:",q.models)},"draw"),mt(Pje,"getMaxMessageWidthPerActor"),Zje=mt(function(e){let t=0,r=jje($);for(var i in e.links)i=PC.calculateTextDimensions(i,r).width+2*$.wrapPadding+2*$.boxMargin,t<i&&(t=i);return t},"getRequiredPopupWidth"),mt(Bje,"calculateActorMargins"),Qje=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=Uc(e.message)?await Gc(e.message,B()):PC.calculateTextDimensions(s?PC.wrapLabel(e.message,$.width,qje($)):e.message,qje($)),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=PC.calculateTextDimensions(s?PC.wrapLabel(e.message,I.getMax($.width,i.width),qje($)):e.message,qje($)),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=PC.wrapLabel(e.message,l.width-2*$.wrapPadding,qje($))),P.debug(`NM:[${l.startx},${l.stopx},${l.starty},${l.stopy}:${l.width},${l.height}=${e.message}]`),l},"buildNoteModel"),Jje=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"),eWe=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"),tWe=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"),rWe=mt(function(e,t){var{BIDIRECTIONAL_SOLID:t,BIDIRECTIONAL_DOTTED:r}=t.db.LINETYPE;return[t,r].includes(e.type)},"isBidirectionalArrowType"),iWe=mt(function(e,t,r){var i=B().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]=Xje(e.from,t),[s,o]=Xje(e.to,t),l=n<=s,c=l?a:n,h=l?s:o;return"neo"===i&&(e.type!==r.db.LINETYPE.SOLID_OPEN&&(h+=l?-3:3),e.type===r.db.LINETYPE.BIDIRECTIONAL_SOLID||e.type===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(c+=l?3:-3),c+=eWe(e,r,l),t=2<Math.abs(s-o),i=mt(e=>l?-e:e,"adjustValue"),e.from===e.to?h=c:(e.activate&&!t&&(h+=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)||(h+=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)&&(c-=i(3))),t=[n,a,s,o],r=Math.abs(c-h),e.wrap&&e.message&&(e.message=PC.wrapLabel(e.message,I.getMax(r+2*$.wrapPadding,$.width),zje($))),i=PC.calculateTextDimensions(e.message,zje($)),{width:I.getMax(e.wrap?0:i.width+2*$.wrapPadding,r+2*$.wrapPadding,$.width),height:0,startx:c,stopx:h,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"),nWe=mt(async function(e,i,t,n){let a={},s=[],o,l,c;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 h=i.get(r.from||r.to.actor),u=Hje(r.from||r.to.actor).length,u={startx:h=h.x+h.width/2+(u-1)*$.activationWidth/2,stopx:h+$.activationWidth,actor:r.from,enabled:!0};q.activations.push(u);break;case n.db.LINETYPE.ACTIVE_END:h=q.activations.map(e=>e.actor).lastIndexOf(r.from),q.activations.splice(h,1).splice(0,1)}void 0!==r.placement?(l=await Qje(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})):(c=iWe(r,i,n),(r.msgModel=c).startx&&c.stopx&&0<s.length&&s.forEach(e=>{var t;o=e,c.startx===c.stopx?(e=i.get(r.from),t=i.get(r.to),o.from=I.getMin(e.x-c.width/2,e.x-e.width/2,o.from),o.to=I.getMax(t.x+c.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(c.startx,o.from),o.to=I.getMax(c.stopx,o.to),o.width=I.getMax(o.width,c.width)-$.labelBoxWidth)}))}return q.activations=[],P.debug("Loop type widths:",a),a},"calculateLoopBounds"),aWe={bounds:q,drawActors:Gje,drawActorsPopup:Vje,setConf:Yje,draw:Kje}}),oWe={};Vat(oWe,{diagram:()=>lWe});var lWe,cWe,hWe,uWe,dWe,pWe,gWe,fWe,mWe,yWe,vWe,bWe,xWe,TWe,kWe,wWe=r(()=>{Rje(),Lje(),Ije(),Uu(),sWe(),lWe={parser:Aqe,get db(){return new Dqe},renderer:aWe,styles:Oqe,init:mt(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,Gh({sequence:{wrap:e.wrap}}))},"init")}}),CWe=r(()=>{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],P=[1,19],B=[1,20],i=[1,41],$=[1,26],n=[1,42],F=[1,24],z=[1,25],a=[1,32],s=[1,33],q=[1,34],o=[1,45],j=[1,35],W=[1,36],U=[1,37],G=[1,38],V=[1,27],Y=[1,28],H=[1,29],X=[1,30],K=[1,31],l=[1,44],c=[1,46],h=[1,43],u=[1,47],Z=[1,9],d=[1,8,9],p=[1,58],g=[1,59],f=[1,60],m=[1,61],y=[1,62],Q=[1,63],J=[1,64],v=[1,8,9,41],ee=[1,77],b=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],x=[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],T=[13,60,86,100,102,103],k=[13,60,73,74,86,100,102,103],te=[13,60,68,69,70,71,72,86,100,102,103],w=[1,103],C=[1,121],S=[1,117],E=[1,113],_=[1,119],A=[1,114],R=[1,115],L=[1,116],I=[1,118],N=[1,120],re=[22,50,60,61,82,86,87,88,89,90],ie=[1,128],D=[12,39],ne=[1,8,9,39,41,44,46],M=[1,8,9,22],ae=[1,153],se=[1,8,9,61],O=[1,8,9,22,50,60,61,82,86,87,88,89,90],x={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],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction: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]),i.popNamespace();break;case 35:i.addClassesToNamespace(a[o-4],a[o-1][0],a[o-1][1]),i.popNamespace();break;case 36:this.$=i.addNamespace(a[o]);break;case 37:this.$=i.addNamespace(a[o-1],a[o]);break;case 38:this.$=[[a[o]],[]];break;case 39:this.$=[[a[o-1]],[]];break;case 40:a[o][0].unshift(a[o-2]),this.$=a[o];break;case 41:this.$=[[],[a[o]]];break;case 42:this.$=[[],[a[o-1]]];break;case 43:a[o][1].unshift(a[o-2]),this.$=a[o];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=a[o];break;case 48:i.setCssClass(a[o-2],a[o]);break;case 49:i.addMembers(a[o-3],a[o-1]);break;case 51:i.setCssClass(a[o-5],a[o-3]),i.addMembers(a[o-5],a[o-1]);break;case 52:i.addAnnotation(a[o-3],a[o-1]);break;case 53:i.addAnnotation(a[o-6],a[o-4]),i.addMembers(a[o-6],a[o-1]);break;case 54:i.addAnnotation(a[o-5],a[o-3]);break;case 55:this.$=a[o],i.addClass(a[o]);break;case 56:this.$=a[o-1],i.addClass(a[o-1]),i.setClassLabel(a[o-1],a[o]);break;case 60:i.addAnnotation(a[o],a[o-2]);break;case 61:case 74:this.$=[a[o]];break;case 62:a[o].push(a[o-1]),this.$=a[o];break;case 63:break;case 64:i.addMember(a[o-1],i.cleanupLabel(a[o]));break;case 65:case 66:break;case 67:this.$={id1:a[o-2],id2:a[o],relation:a[o-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:a[o-3],id2:a[o],relation:a[o-1],relationTitle1:a[o-2],relationTitle2:"none"};break;case 69:this.$={id1:a[o-3],id2:a[o],relation:a[o-2],relationTitle1:"none",relationTitle2:a[o-1]};break;case 70:this.$={id1:a[o-4],id2:a[o],relation:a[o-2],relationTitle1:a[o-3],relationTitle2:a[o-1]};break;case 71:this.$=i.addNote(a[o],a[o-1]);break;case 72:this.$=i.addNote(a[o]);break;case 73:this.$=a[o-2],i.defineClass(a[o-1],a[o]);break;case 75:this.$=a[o-2].concat([a[o]]);break;case 76:i.setDirection("TB");break;case 77:i.setDirection("BT");break;case 78:i.setDirection("RL");break;case 79:i.setDirection("LR");break;case 80:this.$={type1:a[o-2],type2:a[o],lineType:a[o-1]};break;case 81:this.$={type1:"none",type2:a[o],lineType:a[o-1]};break;case 82:this.$={type1:a[o-1],type2:"none",lineType:a[o]};break;case 83:this.$={type1:"none",type2:"none",lineType:a[o]};break;case 84:this.$=i.relationType.AGGREGATION;break;case 85:this.$=i.relationType.EXTENSION;break;case 86:this.$=i.relationType.COMPOSITION;break;case 87:this.$=i.relationType.DEPENDENCY;break;case 88:this.$=i.relationType.LOLLIPOP;break;case 89:this.$=i.lineType.LINE;break;case 90:this.$=i.lineType.DOTTED_LINE;break;case 91:case 97:this.$=a[o-2],i.setClickEvent(a[o-1],a[o]);break;case 92:case 98:this.$=a[o-3],i.setClickEvent(a[o-2],a[o-1]),i.setTooltip(a[o-2],a[o]);break;case 93:this.$=a[o-2],i.setLink(a[o-1],a[o]);break;case 94:this.$=a[o-3],i.setLink(a[o-2],a[o-1],a[o]);break;case 95:this.$=a[o-3],i.setLink(a[o-2],a[o-1]),i.setTooltip(a[o-2],a[o]);break;case 96:this.$=a[o-4],i.setLink(a[o-3],a[o-2],a[o]),i.setTooltip(a[o-3],a[o-1]);break;case 99:this.$=a[o-3],i.setClickEvent(a[o-2],a[o-1],a[o]);break;case 100:this.$=a[o-4],i.setClickEvent(a[o-3],a[o-2],a[o-1]),i.setTooltip(a[o-3],a[o]);break;case 101:this.$=a[o-3],i.setLink(a[o-2],a[o]);break;case 102:this.$=a[o-4],i.setLink(a[o-3],a[o-1],a[o]);break;case 103:this.$=a[o-4],i.setLink(a[o-3],a[o-1]),i.setTooltip(a[o-3],a[o]);break;case 104:this.$=a[o-5],i.setLink(a[o-4],a[o-2],a[o]),i.setTooltip(a[o-4],a[o-1]);break;case 105:this.$=a[o-2],i.setCssStyle(a[o-1],a[o]);break;case 106:i.setCssClass(a[o-1],a[o]);break;case 107:this.$=[a[o]];break;case 108:a[o-2].push(a[o]),this.$=a[o-2];break;case 110: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:P,37:B,38:22,42:i,43:23,46:$,48:n,51:F,52:z,54:a,56:s,57:q,60:o,62:j,63:W,64:U,65:G,75:V,76:Y,78:H,82:X,83:K,86:l,100:c,102:h,103:u},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(Z,[2,5],{8:[1,48]}),{8:[1,49]},t(d,[2,19],{22:[1,50]}),t(d,[2,21]),t(d,[2,22]),t(d,[2,23]),t(d,[2,24]),t(d,[2,25]),t(d,[2,26]),t(d,[2,27]),t(d,[2,28]),t(d,[2,29]),t(d,[2,30]),{34:[1,51]},{36:[1,52]},t(d,[2,33]),t(d,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:p,69:g,70:f,71:m,72:y,73:Q,74:J}),{39:[1,65]},t(v,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(d,[2,65]),t(d,[2,66]),{16:69,60:o,86:l,100:c,102:h},{16:39,17:40,19:70,60:o,86:l,100:c,102:h,103:u},{16:39,17:40,19:71,60:o,86:l,100:c,102:h,103:u},{16:39,17:40,19:72,60:o,86:l,100:c,102:h,103:u},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:o,86:l,100:c,102:h,103:u},{13:ee,55:76},{58:78,60:[1,79]},t(d,[2,76]),t(d,[2,77]),t(d,[2,78]),t(d,[2,79]),t(b,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:o,86:l,100:c,102:h,103:u}),t(b,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:o,86:l,100:c,102:h,103:u},{16:39,17:40,19:87,60:o,86:l,100:c,102:h,103:u},t(x,[2,133]),t(x,[2,134]),t(x,[2,135]),t(x,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(Z,[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:P,37:B,42:i,46:$,48:n,51:F,52:z,54:a,56:s,57:q,60:o,62:j,63:W,64:U,65:G,75:V,76:Y,78:H,82:X,83:K,86:l,100:c,102:h,103:u}),{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:P,37:B,38:22,42:i,43:23,46:$,48:n,51:F,52:z,54:a,56:s,57:q,60:o,62:j,63:W,64:U,65:G,75:V,76:Y,78:H,82:X,83:K,86:l,100:c,102:h,103:u},t(d,[2,20]),t(d,[2,31]),t(d,[2,32]),{13:[1,91],16:39,17:40,19:90,60:o,86:l,100:c,102:h,103:u},{53:92,66:56,67:57,68:p,69:g,70:f,71:m,72:y,73:Q,74:J},t(d,[2,64]),{67:93,73:Q,74:J},t(T,[2,83],{66:94,68:p,69:g,70:f,71:m,72:y}),t(k,[2,84]),t(k,[2,85]),t(k,[2,86]),t(k,[2,87]),t(k,[2,88]),t(te,[2,89]),t(te,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:i,43:23,48:n,54:a,56:s},{16:100,60:o,86:l,100:c,102:h},{41:[1,102],45:101,51:w},{16:104,60:o,86:l,100:c,102:h},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:C,50:S,59:110,60:E,82:_,84:111,85:112,86:A,87:R,88:L,89:I,90:N},{60:[1,122]},{13:ee,55:123},t(v,[2,72]),t(v,[2,138]),{22:C,50:S,59:124,60:E,61:[1,125],82:_,84:111,85:112,86:A,87:R,88:L,89:I,90:N},t(re,[2,74]),{16:39,17:40,19:126,60:o,86:l,100:c,102:h,103:u},t(b,[2,16]),t(b,[2,17]),t(b,[2,18]),{11:127,12:ie,39:[2,36]},t(D,[2,9],{16:85,17:86,15:130,18:[1,129],60:o,86:l,100:c,102:h,103:u}),t(D,[2,10]),t(ne,[2,55],{11:131,12:ie}),t(Z,[2,7]),{9:[1,132]},t(M,[2,67]),{16:39,17:40,19:133,60:o,86:l,100:c,102:h,103:u},{13:[1,135],16:39,17:40,19:134,60:o,86:l,100:c,102:h,103:u},t(T,[2,82],{66:136,68:p,69:g,70:f,71:m,72:y}),t(T,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:i,43:23,48:n,54:a,56:s},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(v,[2,48],{39:[1,142]}),{41:[1,143]},t(v,[2,50]),{41:[2,61],45:144,51:w},{47:[1,145]},{16:39,17:40,19:146,60:o,86:l,100:c,102:h,103:u},t(d,[2,91],{13:[1,147]}),t(d,[2,93],{13:[1,149],77:[1,148]}),t(d,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(d,[2,105],{61:ae}),t(se,[2,107],{85:154,22:C,50:S,60:E,82:_,86:A,87:R,88:L,89:I,90:N}),t(O,[2,109]),t(O,[2,111]),t(O,[2,112]),t(O,[2,113]),t(O,[2,114]),t(O,[2,115]),t(O,[2,116]),t(O,[2,117]),t(O,[2,118]),t(O,[2,119]),t(d,[2,106]),t(v,[2,71]),t(d,[2,73],{61:ae}),{60:[1,155]},t(b,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:o,86:l,100:c,102:h,103:u},t(D,[2,12]),t(ne,[2,56]),{1:[2,4]},t(M,[2,69]),t(M,[2,68]),{16:39,17:40,19:158,60:o,86:l,100:c,102:h,103:u},t(T,[2,80]),t(v,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:i,43:23,48:n,54:a,56:s},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:i,43:23,48:n,54:a,56:s},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:i,43:23,48:n,54:a,56:s},{45:163,51:w},t(v,[2,49]),{41:[2,62]},t(v,[2,52],{39:[1,164]}),t(d,[2,60]),t(d,[2,92]),t(d,[2,94]),t(d,[2,95],{77:[1,165]}),t(d,[2,98]),t(d,[2,99],{13:[1,166]}),t(d,[2,101],{13:[1,168],77:[1,167]}),{22:C,50:S,60:E,82:_,84:169,85:112,86:A,87:R,88:L,89:I,90:N},t(O,[2,110]),t(re,[2,75]),{14:[1,170]},t(D,[2,11]),t(M,[2,70]),t(v,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:w},t(d,[2,96]),t(d,[2,100]),t(d,[2,102]),t(d,[2,103],{77:[1,174]}),t(se,[2,108],{85:154,22:C,50:S,60:E,82:_,86:A,87:R,88:L,89:I,90:N}),t(ne,[2,8]),t(v,[2,51]),{41:[1,175]},t(v,[2,54]),t(d,[2,104]),t(v,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError: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="",c=0,h=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 b,x,T,k,w,C,S,E={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===b||"u"<typeof b)&&(b=v()),o[T]&&o[T][b]))||!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 "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,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: "+b);switch(k[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],E.$=a[a.length-C],E._$={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&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return S;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(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);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:this.popState(),this.less(0);break;case 34:return this.popState(),41;case 35:return"EOF_IN_STRUCT";case 36:return 8;case 37:break;case 38:return"EDGE_STATE";case 39:return this.begin("class"),48;case 40:return this.popState(),8;case 41:break;case 42:return this.popState(),this.popState(),41;case 43:return this.begin("class-body"),39;case 44:return this.popState(),41;case 45:return"EOF_IN_STRUCT";case 46:return"EDGE_STATE";case 47:return"OPEN_IN_STRUCT";case 48:break;case 49:return"MEMBER";case 50:return 83;case 51:return 75;case 52:return 76;case 53:return 78;case 54:return 54;case 55:return 56;case 56:return 46;case 57:return 47;case 58:return 81;case 59:this.popState();break;case 60:return"GENERICTYPE";case 61:this.begin("generic");break;case 62:this.popState();break;case 63:return"BQUOTE_STR";case 64:this.begin("bqstring");break;case 65:case 66:case 67:case 68:return 77;case 69:case 70:return 69;case 71:case 72:return 71;case 73:return 70;case 74:return 68;case 75:return 72;case 76:return 73;case 77:return 74;case 78:return 22;case 79:return 44;case 80:return 100;case 81:return 18;case 82:return"PLUS";case 83:return 87;case 84:return 61;case 85:case 86:return 89;case 87:return 90;case 88:case 89:return"EQUALS";case 90:return 60;case 91:return 12;case 92:return 14;case 93:return"PUNCTUATION";case 94:return 86;case 95:return 102;case 96:case 97:return 50;case 98:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,29,34,35,36,37,38,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},namespace:{rules:[26,29,30,31,32,33,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},"class-body":{rules:[26,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},class:{rules:[26,40,41,42,43,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr:{rules:[9,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_title:{rules:[7,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_args:{rules:[22,23,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_name:{rules:[19,20,21,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},href:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},struct:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},generic:{rules:[26,50,51,52,53,54,55,56,57,58,59,60,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},bqstring:{rules:[26,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},string:{rules:[24,25,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98],inclusive:!0}}};x.lexer=r,mt(e,"Parser"),(cWe=new((e.prototype=x).Parser=e)).parser=cWe,hWe=cWe}),SWe=r(()=>{Uu(),th(),uWe=["#","+","~","-",""],dWe=class{static{mt(this,"ClassMember")}constructor(e,t){this.memberType=t,this.visibility="",this.classifier="",this.text="",t=Rc(e,B()),this.parseMember(t)}getDisplayDetails(){let e=this.visibility+$c(this.id);"method"===this.memberType&&(e+=`(${$c(this.parameters.trim())})`,this.returnType)&&(e+=" : "+$c(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():"",uWe.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),uWe.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:"")+$c(this.id)+("method"===this.memberType?`(${$c(this.parameters)})`+(this.returnType?" : "+$c(this.returnType):""):"");this.text=n.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}}}),EWe=r(()=>{bk(),e(),Uu(),th(),zC(),Wu(),kk(),SWe(),An(),pWe="classId-",gWe=0,fWe=mt(e=>I.sanitizeText(e,B()),"sanitizeText"),mWe=class c{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=new Map,this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=mt(e=>{let i=Q3();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(_n.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=Bh,this.getAccTitle=$h,this.setAccDescription=Fh,this.getAccDescription=zh,this.setDiagramTitle=qh,this.getDiagramTitle=jh,this.getConfig=mt(()=>B().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.popNamespace=this.popNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{mt(this,"ClassDB")}splitClassNameAndType(e){let t=I.sanitizeText(e,B()),r="",i=t;return 0<t.indexOf("~")&&(e=t.split("~"),i=fWe(e[0]),r=fWe(e[1])),{className:i,type:r}}setClassLabel(e,t){e=I.sanitizeText(e,B()),t=t&&fWe(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,B()),{className:e,type:t}=this.splitClassNameAndType(e);this.classes.has(e)||(e=I.sanitizeText(e,B()),this.classes.set(e,{id:e,type:t,label:e,text:e+(t?`<${t}>`:""),shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:pWe+e+"-"+gWe}),gWe++)}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,B());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.namespaceStack=[],this.diagramId="",this.direction="TB",Ph()}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){P.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(),B()),e.relationTitle2=I.sanitizeText(e.relationTitle2.trim(),B()),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(fWe(t.substring(2,t.length-2))):0<t.indexOf(")")?e.methods.push(new dWe(t,"method")):t&&e.members.push(new dWe(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)),fWe(e.trim())}setCssClass(e,r){e.split(",").forEach(e=>{let t=e;/\d/.exec(e[0])&&(t=pWe+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=fWe(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=B();e.split(",").forEach(e=>{let t=e;/\d/.exec(e[0])&&(t=pWe+t),(e=this.classes.get(t))&&(e.link=PC.formatUrl(r,n),"sandbox"===n.securityLevel?e.linkTarget="_top":e.linkTarget="string"==typeof i?fWe(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,B()),"loose"===B().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",()=>{PC.runFunc(i,...r)},!1)})}}}bindFunctions(t){this.functions.forEach(e=>{e(t)})}escapeHtml(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}getDirection(){return this.direction}setDirection(e){this.direction=e}static resolveQualifiedId(e,t){return(t=t.at(-1))?t+"."+e:e}static getAncestorIds(e){var t=e.split("."),r=new Array(t.length);r[0]=t[0];for(let e=1;e<t.length;e++)r[e]=r[e-1]+"."+t[e];return r}createNamespaceNode(e,t,r,i=!1){return{id:e,label:t,classes:new Map,notes:new Map,children:new Map,domId:pWe+e+"-"+this.namespaceCounter++,parent:r,explicit:i}}linkParentChild(e,t){var r=this.namespaces.get(e),i=this.namespaces.get(t);r&&i&&(r.children.has(t)||r.children.set(t,i),i.parent??=e)}addNamespace(e,t){var r,e=c.resolveQualifiedId(e,this.namespaceStack);if(this.namespaceStack.push(e),this.namespaces.has(e))(r=this.namespaces.get(e)).explicit=!0,t&&(r.label=t);else{var i=e.split("."),n=c.getAncestorIds(e);for(let e=0;e<n.length;e++){var a=n[e],s=0<e?n[e-1]:void 0,o=e===n.length-1,l=o&&t?t:i[e];this.namespaces.has(a)?o&&(this.namespaces.get(a).explicit=!0):this.namespaces.set(a,this.createNamespaceNode(a,l,s,o)),s&&this.linkParentChild(s,a)}}return e}popNamespace(){this.namespaceStack.pop()}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}resolveExplicitAncestor(e){let t=e;for(;t;){var r=this.namespaces.get(t);if(!r)return;if(r.explicit)return t;t=r.parent}}getData(){var e,t,r,i,n,a,s=[],o=[],l=B(),c=l.class?.hierarchicalNamespaces??!0;for(e of this.namespaces.values())(c||e.explicit)&&(t={id:e.id,label:c?e.label:e.id,isGroup:!0,padding:l.class.padding??16,shape:"rect",cssStyles:[],look:l.look,parentId:c?e.parent:void 0},s.push(t));for(r of this.classes.values()){var h=c?r.parent:this.resolveExplicitAncestor(r.parent),h={...r,type:void 0,isGroup:!1,parentId:h,look:l.look};s.push(h)}for(i of this.notes.values()){var u=c?i.parent:this.resolveExplicitAncestor(i.parent),u={id:i.id,label:i.text,isGroup:!1,shape:"note",padding:l.class.padding??6,cssStyles:["text-align: left","white-space: nowrap","fill: "+l.themeVariables.noteBkgColor,"stroke: "+l.themeVariables.noteBorderColor],look:l.look,parentId:u,labelType:"markdown"};s.push(u),(u=this.classes.get(i.class)?.id)&&(u={id:"edgeNote"+i.index,start:i.id,end:u,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:l.look},o.push(u))}for(n of this.interfaces){var d={id:n.id,label:n.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:l.look};s.push(d)}let p=0;for(a of this.relations){p++;var g={id:FC(a.id1,a.id2,{prefix:"id",counter:p}),start:a.id1,end:a.id2,type:"normal",label:a.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(a.relation.type1),arrowTypeEnd:this.getArrowMarker(a.relation.type2),startLabelRight:"none"===a.relationTitle1?"":a.relationTitle1,endLabelLeft:"none"===a.relationTitle2?"":a.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:a.style||"",pattern:1==a.relation.lineType?"dashed":"solid",look:l.look,labelType:"markdown"};o.push(g)}return{nodes:s,edges:o,other:{},config:l,direction:this.getDirection()}}}}),_We=r(()=>{nde(),yWe=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;
|
||
}
|
||
${Hue()}
|
||
`,"getStyles"),vWe=yWe}),AWe=r(()=>{Uu(),e(),fI(),Jue(),ede(),zC(),bWe=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"),xWe=mt(function(e,t){return t.db.getClasses()},"getClasses"),TWe=mt(async function(e,t,r,i){P.info("REF0:"),P.info("Drawing class diagram (v3)",t);var{securityLevel:n,state:a,layout:s}=B(),o=(i.db.setDiagramId(t),i.db.getData()),n=tI(t,n);o.type=i.type,o.layoutAlgorithm=Bue(s),o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["aggregation","extension","composition","dependency","lollipop"],o.diagramId=t,await Pue(o,n),PC.insertTitle(n,"classDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),$ue(n,8,"classDiagram",a?.useMaxWidth??!0)},"draw"),kWe={getClasses:xWe,draw:TWe,getDir:bWe}}),RWe={};Vat(RWe,{diagram:()=>LWe});var LWe,IWe=r(()=>{CWe(),EWe(),_We(),AWe(),LWe={parser:hWe,get db(){return new mWe},renderer:kWe,styles:vWe,init:mt(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),NWe={};Vat(NWe,{diagram:()=>DWe});var DWe,MWe,OWe,PWe,BWe,$We,FWe,zWe,qWe,jWe,WWe,UWe,GWe,VWe,YWe,HWe,XWe,KWe,ZWe,QWe,JWe,eUe,tUe,rUe,iUe,nUe,aUe,sUe,oUe,lUe,cUe,hUe,uUe,dUe,pUe,gUe,fUe=r(()=>{CWe(),EWe(),_We(),AWe(),DWe={parser:hWe,get db(){return new mWe},renderer:kWe,styles:vWe,init:mt(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),mUe=r(()=>{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],c=[1,17],h=[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],b=[1,27],x=[1,28],T=[1,29],k=[1,30],w=[1,31],C=[1,32],S=[1,35],E=[1,36],_=[1,37],A=[1,38],R=[1,34],L=[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:(c=a[o-1]).description=i.trimColon(a[o]),this.$=c;break;case 14:this.$={stmt:"relation",state1:a[o-2],state2:a[o]};break;case 15:c=i.trimColon(a[o]),this.$={stmt:"relation",state1:a[o-3],state2:a[o-1],description:c};break;case 19:this.$={stmt:"state",id:a[o-3],type:"default",description:"",doc:a[o-1]};break;case 20:var l,c=a[o],h=a[o-2].trim();a[o].match(":")&&(c=(l=a[o].split(":"))[0],h=[h,l[1]]),this.$={stmt:"state",id:c,type:"default",description:h};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:c,19:h,22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:b,37:x,38:T,41:k,45:w,48:C,51:S,52:E,53:_,54:A,57:R},t(L,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:b,37:x,38:T,41:k,45:w,48:C,51:S,52:E,53:_,54:A,57:R},t(L,[2,7]),t(L,[2,8]),t(L,[2,9]),t(L,[2,10]),t(L,[2,11]),t(L,[2,12],{14:[1,40],15:[1,41]}),t(L,[2,16]),{18:[1,42]},t(L,[2,18],{20:[1,43]}),{23:[1,44]},t(L,[2,22]),t(L,[2,23]),t(L,[2,24]),t(L,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(L,[2,28]),{34:[1,49]},{36:[1,50]},t(L,[2,31]),{13:51,24:d,57:R},{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(L,[2,38]),t(L,[2,39]),t(L,[2,40]),t(L,[2,41]),t(L,[2,6]),t(L,[2,13]),{13:58,24:d,57:R},t(L,[2,17]),t(N,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(L,[2,29]),t(L,[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(L,[2,14],{14:[1,71]}),{4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,72],22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:b,37:x,38:T,41:k,45:w,48:C,51:S,52:E,53:_,54:A,57:R},t(L,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(L,[2,34]),t(L,[2,35]),t(L,[2,36]),t(L,[2,37]),t(I,[2,46]),t(I,[2,47]),t(L,[2,15]),t(L,[2,19]),t(N,a,{7:78}),t(L,[2,26]),t(L,[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:c,19:h,21:[1,81],22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:b,37:x,38:T,41:k,45:w,48:C,51:S,52:E,53:_,54:A,57:R},t(L,[2,32]),t(L,[2,33]),t(L,[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="",c=0,h=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 b,x,T,k,w,C,S,E={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===b||"u"<typeof b)&&(b=v()),o[T]&&o[T][b]))||!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 "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,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: "+b);switch(k[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],E.$=a[a.length-C],E._$={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&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return S;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(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);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(r,i,e,t){function n(){var e,t=i.yytext.indexOf("%%");return 0!==t&&(0<t&&(e=i.yytext.slice(0,t),(t=i.yytext.slice(t))&&r.lexer.unput(t),i.yytext=e),!0)}switch(mt(n,"processId"),e){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:case 10:case 11:case 12:break;case 13:return this.pushState("SCALE"),17;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;case 17:return this.popState(),"acc_title_value";case 18:return this.begin("acc_descr"),35;case 19:return this.popState(),"acc_descr_value";case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 25:return this.popState(),this.pushState("CLASSDEFID"),42;case 26:return this.popState(),43;case 27:return this.pushState("CLASS"),48;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;case 29:return this.popState(),50;case 30:return this.pushState("STYLE"),45;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 32:return this.popState(),47;case 33:return this.pushState("SCALE"),17;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),25;case 38:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),26;case 39:return this.popState(),i.yytext=i.yytext.slice(0,-10).trim(),27;case 40:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),25;case 41:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),26;case 42:return this.popState(),i.yytext=i.yytext.slice(0,-10).trim(),27;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";case 49:return n()?(this.popState(),"ID"):void 0;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:return 19;case 53:this.popState();break;case 54:return this.popState(),this.pushState("struct"),20;case 55:return this.popState(),21;case 56:break;case 57:return this.begin("NOTE"),29;case 58:return this.popState(),this.pushState("NOTE_ID"),59;case 59:return this.popState(),this.pushState("NOTE_ID"),60;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 62:break;case 63:return"NOTE_TEXT";case 64:return n()?(this.popState(),"ID"):void 0;case 65:return n()?(this.popState(),this.pushState("NOTE_TEXT"),24):void 0;case 66:return this.popState(),i.yytext=i.yytext.substr(2).trim(),31;case 67:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),31;case 68:case 69:return 6;case 70:return 16;case 71:return 57;case 72:return n()?24:void 0;case 73:return i.yytext=i.yytext.trim(),14;case 74:return 15;case 75:return 28;case 76:return 58;case 77:return 5;case 78:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<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,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,55,56,57,71,72,73,74,75,76],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,54,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};r.lexer=i,mt(e,"Parser"),(MWe=new((e.prototype=r).Parser=e)).parser=MWe,OWe=MWe}),yUe=r(()=>{BWe="root",$We="relation",FWe="classDef",zWe="style",qWe="applyClass",jWe="default",UWe="fill:none",GWe="fill: #333",VWe="markdown",YWe="normal",HWe="rect",XWe="rectWithTitle",KWe="stateStart",ZWe="stateEnd",QWe=WWe="divider",JWe="roundedWithTitle",tUe="noteGroup",iUe=(rUe="statediagram")+"-state",aUe=(nUe="transition")+" note-edge",sUe=rUe+"-note",oUe=rUe+"-cluster",lUe=rUe+"-cluster-alt",uUe=PWe="state",pUe=(dUe="----")+(hUe=eUe="note"),gUe=""+dUe+(cUe="parent")});function vUe(e="",t=0,r="",i=dUe){return i=null!==r&&0<r.length?""+i+r:"",uUe+`-${e}${i}-`+t}function bUe(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 xUe(e){return e?.classes?.join(" ")??""}function TUe(e){return e?.styles??[]}var kUe,wUe,CUe,SUe,EUe,_Ue,AUe,RUe,LUe,IUe,NUe,DUe,MUe,OUe,PUe,BUe,$Ue,FUe,zUe,qUe,jUe,WUe,UUe,GUe,VUe,YUe,HUe,XUe,KUe,ZUe,QUe,JUe,eGe,tGe,rGe,iGe,nGe,aGe=r(()=>{Uu(),e(),th(),yUe(),kUe=new Map,wUe=0,mt(vUe,"stateDomId"),CUe=mt((r,e,i,n,a,s,o,l)=>{P.trace("items",e),e.forEach(e=>{switch(e.stmt){case PWe:case jWe:EUe(r,e,i,n,a,s,o,l);break;case $We:EUe(r,e.state1,i,n,a,s,o,l),EUe(r,e.state2,i,n,a,s,o,l);var t={id:"edge"+wUe,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:"neo"===o?"arrow_barb_neo":"arrow_barb",style:UWe,labelStyle:"",label:I.sanitizeText(e.description??"",B()),arrowheadStyle:GWe,labelpos:"c",labelType:VWe,thickness:YWe,classes:nUe,look:o};a.push(t),wUe++}})},"setupDoc"),SUe=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(bUe,"insertOrUpdateNode"),mt(xUe,"getClassesFromDbInfo"),mt(TUe,"getStylesFromDbInfo"),EUe=mt((r,i,e,n,a,t,s,o)=>{var l=i.id,c=e.get(l),h=xUe(c),u=TUe(c),d=B();if(P.info("dataFetcher parsedItem",i,c,u),"root"!==l){let e=HWe;if(!0===i.start?e=KWe:!1===i.start&&(e=ZWe),i.type!==jWe&&(e=i.type),kUe.get(l)||kUe.set(l,{id:l,shape:e,description:I.sanitizeText(l,d),cssClasses:h+" "+iUe,cssStyles:u}),c=kUe.get(l),i.description&&(Array.isArray(c.description)?(c.shape=XWe,c.description.push(i.description)):c.description?.length&&0<c.description.length?(c.shape=XWe,c.description===l?c.description=[i.description]:c.description=[c.description,i.description]):(c.shape=HWe,c.description=i.description),c.description=I.sanitizeTextOrArray(c.description,d)),1===c.description?.length&&c.shape===XWe&&("group"===c.type?c.shape=JWe:c.shape=HWe),!c.type&&i.doc&&(P.info("Setting cluster for XCX",l,SUe(i)),c.type="group",c.isGroup=!0,c.dir=SUe(i),c.shape=i.type===WWe?QWe:JWe,c.cssClasses=c.cssClasses+` ${oUe} `+(t?lUe:"")),(h={labelStyle:"",shape:c.shape,label:c.description,cssClasses:c.cssClasses,cssCompiledStyles:[],cssStyles:c.cssStyles,id:l,dir:c.dir,domId:vUe(l,wUe),type:c.type,isGroup:"group"===c.type,padding:8,rx:10,ry:10,look:s,labelType:"markdown"}).shape===QWe&&(h.label=""),r&&"root"!==r.id&&(P.trace("Setting node ",l," to be child of its parent ",r.id),h.parentId=r.id),h.centerLabel=!0,i.note){u={labelStyle:"",shape:eUe,label:i.note.text,labelType:"markdown",cssClasses:sUe,cssStyles:[],cssCompiledStyles:[],id:l+pUe+"-"+wUe,domId:vUe(l,wUe,hUe),type:c.type,isGroup:"group"===c.type,padding:d.flowchart?.padding,look:s,position:i.note.position},r=l+gUe,d={labelStyle:"",shape:tUe,label:i.note.text,cssClasses:c.cssClasses,cssStyles:[],id:l+gUe,domId:vUe(l,wUe,cUe),type:"group",isGroup:!0,padding:16,look:s,position:i.note.position},wUe++,u.parentId=d.id=r,bUe(n,d,o),bUe(n,u,o),bUe(n,h,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:UWe,labelStyle:"",classes:aUe,arrowheadStyle:GWe,labelpos:"c",labelType:VWe,thickness:YWe,look:s})}else bUe(n,h,o)}i.doc&&(P.trace("Adding nodes children "),CUe(i,i.doc,e,n,a,!t,s,o))},"dataFetcher"),_Ue=mt(()=>{kUe.clear(),wUe=0},"reset")}),sGe=r(()=>{Uu(),e(),fI(),Jue(),ede(),zC(),yUe(),AUe=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"),RUe=mt(function(e,t){return t.db.getClasses()},"getClasses"),LUe=mt(async function(e,t,r,i){P.info("REF0:"),P.info("Drawing state diagram (v2)",t);var{securityLevel:n,state:a,layout:s}=B();i.db.extract(i.db.getRootDocV2());let o=i.db.getData(),l=tI(t,n);o.type=i.type,o.layoutAlgorithm=s,o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,"neo"===B().look?o.markers=["barbNeo"]:o.markers=["barb"],o.diagramId=t,await Pue(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),P.info("🔗 Wrapped node in <a> tag for:",s,a.url)):P.warn("⚠️ Node has no parent, cannot wrap:",s):P.warn("⚠️ Could not find node matching text:",s)}else P.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(e))})}catch(e){P.error("❌ Error injecting clickable links:",e)}PC.insertTitle(l,"statediagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),$ue(l,8,rUe,a?.useMaxWidth??!0)},"draw"),IUe={getClasses:RUe,draw:LUe,getDir:AUe}}),oGe=r(()=>{Uu(),e(),zC(),th(),Wu(),aGe(),sGe(),yUe(),NUe={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},DUe=mt(()=>new Map,"newClassesList"),MUe=mt(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),OUe=mt(e=>JSON.parse(JSON.stringify(e)),"clone"),PUe=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=DUe(),this.documents={root:MUe()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=$h,this.setAccTitle=Bh,this.getAccDescription=zh,this.setAccDescription=Fh,this.setDiagramTitle=qh,this.getDiagramTitle=jh,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 PWe:this.addState(t.id.trim(),t.type,t.doc,t.description,t.note);break;case $We:this.addRelation(t.state1,t.state2,t.description);break;case FWe:this.addStyleClass(t.id.trim(),t.classes);break;case zWe:this.handleStyleDef(t);break;case qWe:this.setCssClass(t.id.trim(),t.styleClass);break;case"click":this.addLink(t.id,t.url,t.tooltip)}var r,e=this.getStates(),i=B();_Ue(),EUe(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){P.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===$We)this.docTranslator(r,i.state1,!0),this.docTranslator(r,i.state2,!1);else if(i.stmt===PWe&&(i.id===NUe.START_NODE?(i.id=r.id+(e?"_start":"_end"),i.start=e):i.id=i.id.trim()),(i.stmt===BWe||i.stmt===PWe)&&i.doc){let e=[],t=[];for(var n of i.doc){var a;n.type===WWe?((a=OUe(n)).doc=OUe(t),e.push(a),t=[]):t.push(n)}0<e.length&&0<t.length&&(r={stmt:PWe,id:CC(),type:"divider",doc:OUe(t)},e.push(OUe(r)),i.doc=e),i.doc.forEach(e=>this.docTranslator(i,e,!0))}}getRootDocV2(){return this.docTranslator({id:BWe,stmt:BWe},{id:BWe,stmt:BWe,doc:this.rootDoc},!0),{id:BWe,doc:this.rootDoc}}addState(e,t=jWe,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 P.info("Adding state ",l,i),this.currentDocument.states.set(l,{stmt:PWe,id:l,descriptions:[],type:t,doc:r,note:n,classes:[],styles:[],textStyles:[]});if(i&&(P.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,B())}a&&(P.info("Setting state classes",l,a),(Array.isArray(a)?a:[a]).forEach(e=>this.setCssClass(l,e.trim()))),s&&(P.info("Setting state styles",l,s),(Array.isArray(s)?s:[s]).forEach(e=>this.setStyle(l,e.trim()))),o&&(P.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:MUe()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=DUe(),e||(this.links=new Map,Ph())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){P.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,t,r){this.links.set(e,{url:t,tooltip:r}),P.warn("Adding link",e,t,r)}getLinks(){return this.links}startIdIfNeeded(e=""){return e===NUe.START_NODE?(this.startEndCount++,""+NUe.START_TYPE+this.startEndCount):e}startTypeIfNeeded(e="",t=jWe){return e===NUe.START_NODE?NUe.START_TYPE:t}endIdIfNeeded(e=""){return e===NUe.END_NODE?(this.startEndCount++,""+NUe.END_TYPE+this.startEndCount):e}endTypeIfNeeded(e="",t=jWe){return e===NUe.END_NODE?NUe.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,B())})}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,B()):void 0}))}addDescription(e,t){e=this.currentDocument.states.get(e),t=t.startsWith(":")?t.replace(":","").trim():t,e?.descriptions?.push(I.sanitizeText(t,B()))}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(NUe.STYLECLASS_SEP).forEach(e=>{var t=e.replace(/([^;]*);/,"$1").trim();RegExp(NUe.COLOR_KEYWORD).exec(e)&&(e=t.replace(NUe.FILL_KEYWORD,NUe.BG_FILL).replace(NUe.COLOR_KEYWORD,NUe.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=B();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:AUe(this.getRootDocV2())}}getConfig(){return B().state}}}),lGe=r(()=>{BUe=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"),$Ue=BUe}),cGe=r(()=>{bk(),oGe(),zC(),th(),Uu(),e(),FUe=mt(e=>e.append("circle").attr("class","start-state").attr("r",B().state.sizeUnit).attr("cx",B().state.padding+B().state.sizeUnit).attr("cy",B().state.padding+B().state.sizeUnit),"drawStartState"),zUe=mt(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",B().state.textHeight).attr("class","divider").attr("x2",2*B().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),qUe=mt((e,t)=>{var r=(t=e.append("text").attr("x",2*B().state.padding).attr("y",B().state.textHeight+2*B().state.padding).attr("font-size",B().state.fontSize).attr("class","state-title").text(t.id)).node().getBBox();return e.insert("rect",":first-child").attr("x",B().state.padding).attr("y",B().state.padding).attr("width",r.width+2*B().state.padding).attr("height",r.height+2*B().state.padding).attr("rx",B().state.radius),t},"drawSimpleState"),jUe=mt((e,t)=>{let r=mt(function(e,t,r){e=e.append("tspan").attr("x",2*B().state.padding).text(t),r||e.attr("dy",B().state.textHeight)},"addTspan"),i=e.append("text").attr("x",2*B().state.padding).attr("y",B().state.textHeight+1.3*B().state.padding).attr("font-size",B().state.fontSize).attr("class","state-title").text(t.descriptions[0]).node().getBBox(),n=i.height,a=e.append("text").attr("x",B().state.padding).attr("y",n+.4*B().state.padding+B().state.dividerMargin+B().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",B().state.padding).attr("y1",B().state.padding+n+B().state.dividerMargin/2).attr("y2",B().state.padding+n+B().state.dividerMargin/2).attr("class","descr-divider"),l=a.node().getBBox(),c=Math.max(l.width,i.width);return t.attr("x2",c+3*B().state.padding),e.insert("rect",":first-child").attr("x",B().state.padding).attr("y",B().state.padding).attr("width",c+2*B().state.padding).attr("height",l.height+n+2*B().state.padding).attr("rx",B().state.radius),e},"drawDescrState"),WUe=mt((e,t,r)=>{let i=B().state.padding,n=2*B().state.padding,a=e.node().getBBox(),s=a.width,o=a.x,l=e.append("text").attr("x",0).attr("y",B().state.titleShift).attr("font-size",B().state.fontSize).attr("class","state-title").text(t.id),c=l.node().getBBox().width+n,h=Math.max(c,s);h===s&&(h+=n);let u,d=e.node().getBBox();return t.doc,u=o-i,s<c&&(u=(s-h)/2+i),Math.abs(o-d.x)<i&&s<c&&(u=o-(c-s)/2),t=1-B().state.textHeight,e.insert("rect",":first-child").attr("x",u).attr("y",t).attr("class",r?"alt-composit":"composit").attr("width",h).attr("height",d.height+B().state.textHeight+B().state.titleShift+1).attr("rx","0"),l.attr("x",u+i),c<=s&&l.attr("x",o+(h-n)/2-c/2+i),e.insert("rect",":first-child").attr("x",u).attr("y",B().state.titleShift-B().state.textHeight-B().state.padding).attr("width",h).attr("height",3*B().state.textHeight).attr("rx",B().state.radius),e.insert("rect",":first-child").attr("x",u).attr("y",B().state.titleShift-B().state.textHeight-B().state.padding).attr("width",h).attr("height",d.height+3+2*B().state.textHeight).attr("rx",B().state.radius),e},"addTitleAndBox"),UUe=mt(e=>(e.append("circle").attr("class","end-state-outer").attr("r",B().state.sizeUnit+B().state.miniPadding).attr("cx",B().state.padding+B().state.sizeUnit+B().state.miniPadding).attr("cy",B().state.padding+B().state.sizeUnit+B().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",B().state.sizeUnit).attr("cx",B().state.padding+B().state.sizeUnit+2).attr("cy",B().state.padding+B().state.sizeUnit+2)),"drawEndState"),GUe=mt((e,t)=>{let r=B().state.forkWidth,i=B().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",B().state.padding).attr("y",B().state.padding)},"drawForkJoinState"),VUe=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*B().state.noteMargin;for(var c of o){var h;0<(c=c.trim()).length&&((h=a.append("tspan")).text(c),0===l&&(c=h.node().getBBox(),l+=c.height),n+=l,h.attr("x",t+B().state.noteMargin),h.attr("y",r+n+1.25*B().state.noteMargin))}return{textWidth:a.node().getBBox().width,textHeight:n}},"_drawLongText"),YUe=mt((e,t)=>{t.attr("class","state-note");var r=t.append("rect").attr("x",0).attr("y",B().state.padding),t=t.append("g"),{textWidth:e,textHeight:t}=VUe(e,0,0,t);return r.attr("height",t+2*B().state.noteMargin),r.attr("width",e+2*B().state.noteMargin),r},"drawNote"),HUe=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&&FUe(e),"end"===t.type&&UUe(e),"fork"!==t.type&&"join"!==t.type||GUe(e,t),"note"===t.type&&YUe(t.note.text,e),"divider"===t.type&&zUe(e),"default"===t.type&&0===t.descriptions.length&&qUe(e,t),"default"===t.type&&0<t.descriptions.length&&jUe(e,t),e.node().getBBox());return r.width=i.width+2*B().state.padding,r.height=i.height+2*B().state.padding,r},"drawState"),XUe=0,KUe=mt(function(c,h,u){var d=mt(function(e){switch(e){case PUe.relationType.AGGREGATION:return"aggregation";case PUe.relationType.EXTENSION:return"extension";case PUe.relationType.COMPOSITION:return"composition";case PUe.relationType.DEPENDENCY:return"dependency"}},"getRelationType");h.points=h.points.filter(e=>!Number.isNaN(e.y));let e=h.points,t=w5().x(function(e){return e.x}).y(function(e){return e.y}).curve(F5),r=c.append("path").attr("d",t(e)).attr("id","edge"+XUe).attr("class","transition"),i="";if(B().state.arrowMarkerAbsolute&&(i=Oc(!0)),r.attr("marker-end","url("+i+"#"+d(PUe.relationType.DEPENDENCY)+"End)"),void 0!==u.title){let t=c.append("g").attr("class","stateLabel"),{x:r,y:i}=PC.calcLabelPosition(h.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),P.info(g.x,r,i+a),0===a&&(a=p.node().getBBox().height,P.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-B().state.padding/2).attr("y",i-e/2-B().state.padding/2-3.5).attr("width",o+B().state.padding).attr("height",e+B().state.padding),P.info(d)}XUe++},"drawEdge")}),hGe=r(()=>{bk(),bZ(),sH(),e(),th(),cGe(),Uu(),Ch(),QUe={},JUe=mt(function(){},"setConf"),eGe=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"),tGe=mt(function(e,t,r,i){ZUe=B().state;let n=B().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=(P.debug("Rendering diagram "+e),s.select(`[id='${t}']`)),l=(eGe(e),i.db.getRootDoc()),t=e.append("g").attr("id",t+"-root"),l=(iGe(l,t,void 0,!1,s,o,i),ZUe.padding),s=(t=e.node().getBBox()).width+2*l;yh(e,o=t.height+2*l,1.75*s,ZUe.useMaxWidth),e.attr("viewBox",`${t.x-ZUe.padding} ${t.y-ZUe.padding} `+s+" "+o)},"draw"),rGe=mt(e=>e?e.length*ZUe.fontSizeFactor:1,"getLabelWidth"),iGe=mt((e,t,r,i,n,a,s)=>{let o=new nH({compound:!0,multigraph:!0}),l,c=!0;for(l=0;l<e.length;l++)if("relation"===e[l].stmt){c=!1;break}r?o.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:c?1:ZUe.edgeLengthFactor,nodeSep:c?1:50,isMultiGraph:!0}):o.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:c?1:ZUe.edgeLengthFactor,nodeSep:c?1:50,ranker:"tight-tree",isMultiGraph:!0}),o.setDefaultEdgeLabel(function(){return{}});var h,u=s.db.getStates(),d=s.db.getRelations();for(h of Object.keys(u)){var p,g,f=u[h];r&&(f.parentId=r);let e;f.doc?(g=t.append("g").attr("id",f.id).attr("class","stateGroup"),e=iGe(f.doc,g,f.id,!i,n,a,s),g=(g=WUe(g,f,i)).node().getBBox(),e.width=g.width,e.height=g.height+ZUe.padding/2,QUe[f.id]={y:ZUe.compositTitleSize}):e=HUe(t,f,o),f.note?(g={descriptions:[],id:f.id+"-note",note:f.note,type:"note"},p=HUe(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)}P.debug("Count=",o.nodeCount(),o);let m=0,y=(d.forEach(function(e){m++,P.debug("Setting edge",e),o.setEdge(e.id1,e.id2,{relation:e,width:rGe(e.title),height:ZUe.labelHeight*I.getRows(e.title).length,labelpos:"c"},"id"+m)}),VK(o),P.debug("Graph after layout",o.nodes()),t.node());o.nodes().forEach(function(e){void 0!==e&&void 0!==o.node(e)?(P.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+(QUe[e]?QUe[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)})):P.debug("No Node "+e+": "+JSON.stringify(o.node(e)))}),y.getBBox(),o.edges().forEach(function(e){void 0!==e&&void 0!==o.edge(e)&&(P.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(o.edge(e))),KUe(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*ZUe.padding,v.height=d.height+2*ZUe.padding,P.debug("Doc rendered",v,o),v},"renderDoc"),nGe={setConf:JUe,draw:tGe}}),uGe={};Vat(uGe,{diagram:()=>dGe});var dGe,pGe=r(()=>{mUe(),oGe(),lGe(),hGe(),dGe={parser:OWe,get db(){return new PUe(1)},renderer:nGe,styles:$Ue,init:mt(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),gGe={};Vat(gGe,{diagram:()=>fGe});var fGe,mGe,yGe,vGe,bGe,xGe,TGe,kGe,wGe,CGe,SGe,EGe,_Ge,AGe,RGe,LGe,IGe,NGe,DGe,MGe,OGe,PGe,BGe,$Ge,FGe,zGe,qGe,jGe,WGe,UGe,GGe,VGe=r(()=>{mUe(),oGe(),lGe(),sGe(),fGe={parser:OWe,get db(){return new PUe(2)},renderer:IUe,styles:$Ue,init:mt(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),YGe=r(()=>{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="",c=0,h=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 b,x,T,k,w,C,S,E={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===b||"u"<typeof b)&&(b=v()),o[T]&&o[T][b]))||!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 "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,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: "+b);switch(k[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],E.$=a[a.length-C],E._$={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&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return S;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(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);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"),(mGe=new((e.prototype=i).Parser=e)).parser=mGe,yGe=mGe}),HGe=r(()=>{Uu(),Wu(),vGe="",bGe=[],xGe=[],TGe=[],kGe=mt(function(){bGe.length=0,xGe.length=0,vGe="",TGe.length=0,Ph()},"clear"),wGe=mt(function(e){vGe=e,bGe.push(e)},"addSection"),CGe=mt(function(){return bGe},"getSections"),SGe=mt(function(){let e=RGe(),t=0;for(;!e&&t<100;)e=RGe(),t++;return xGe.push(...TGe),xGe},"getTasks"),EGe=mt(function(){let t=[];return xGe.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()},"updateActors"),_Ge=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:vGe,type:vGe,people:t,task:e,score:i},TGe.push(t)},"addTask"),AGe=mt(function(e){e={section:vGe,type:vGe,description:e,task:e,classes:[]},xGe.push(e)},"addTaskOrg"),RGe=mt(function(){let e=mt(function(e){return TGe[e].processed},"compileTask"),t=!0;for(var[r,i]of TGe.entries())e(r),t=t&&i.processed;return t},"compileTasks"),LGe=mt(function(){return EGe()},"getActors"),IGe={getConfig:mt(()=>B().journey,"getConfig"),clear:kGe,setDiagramTitle:qh,getDiagramTitle:jh,setAccTitle:Bh,getAccTitle:$h,setAccDescription:Fh,getAccDescription:zh,addSection:wGe,getSections:CGe,getTasks:SGe,addTask:_Ge,addTaskOrg:AGe,getActors:LGe}}),XGe=r(()=>{nde(),NGe=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:""};
|
||
}
|
||
${Hue()}
|
||
`,"getStyles"),DGe=NGe}),KGe=r(()=>{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 c(e,t,r,i,n,a,s,o,l){var{taskFontSize:c,taskFontFamily:h}=o,u=e.split(/<br\s*\/?>/gi);for(let e=0;e<u.length;e++){var d=e*c-c*(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",c).style("font-family",h);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),c(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])}bk(),kk(),MGe=mt(function(e,t){return G3(e,t)},"drawRect"),OGe=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=p5().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=p5().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"),PGe=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"),BGe=mt(function(e,t){return Y3(e,t)},"drawText"),$Ge=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,BGe(e,t)},"drawLabel"),FGe=mt(function(e,t,r){var e=e.append("g"),i=K3();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,MGe(e,i),WGe(r)(t.text,e,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),zGe=-1,qGe=mt(function(e,r,t,i){let n=r.x+t.width/2,a=e.append("g"),s=(zGe++,a.append("line").attr("id",i+"-task"+zGe).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"),OGe(a,{cx:n,cy:300+30*(5-r.score),score:r.score}),(e=K3()).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,MGe(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};PGe(a,t),s+=10}),WGe(t)(r.task,a,e.x,e.y,e.width,e.height,{class:"task"},t,r.colour)},"drawTask"),jGe=mt(function(e,t){V3(e,t)},"drawBackgroundRect"),mt(t,"byText"),mt(c,"byTspan"),mt(r,"byFo"),mt(g,"_setTextAttrs"),WGe=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:c},UGe=mt(function(e,t){zGe=-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"),GGe={drawRect:MGe,drawCircle:PGe,drawSection:FGe,drawText:BGe,drawLabel:$Ge,drawTask:qGe,drawBackgroundRect:jGe,initGraphics:UGe}});function ZGe(s){let i=B().journey,o=i.maxLabelWidth,l=(eVe=0,60);Object.keys(JGe).forEach(t=>{var e=JGe[t].color,e={cx:20,cy:l,r:7,fill:e,stroke:"#000",pos:JGe[t].position};GGe.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=GGe.drawText(s,t).node().getBoundingClientRect().width,eVe<e&&e>i.leftMargin-e&&(eVe=e)}),l+=Math.max(20,20*a.length)})}var QGe,JGe,eVe,tVe,rVe,iVe,nVe,aVe,sVe,oVe,lVe,cVe=r(()=>{bk(),KGe(),Uu(),Ch(),QGe=mt(function(t){Object.keys(t).forEach(function(e){tVe[e]=t[e]})},"setConf"),JGe={},eVe=0,mt(ZGe,"drawActorLegend"),tVe=B().journey,rVe=0,iVe=mt(function(e,t,r,i){let n=B(),a=n.journey.titleColor,s=n.journey.titleFontSize,o=n.journey.titleFontFamily,l=n.securityLevel,c;"sandbox"===l&&(c=Q("#i"+t));var h,u=Q("sandbox"===l?c.nodes()[0].contentDocument.body:"body"),u=(nVe.init(),u.select("#"+t)),d=(GGe.initGraphics(u,t),i.db.getTasks()),p=i.db.getDiagramTitle(),i=i.db.getActors();for(h in JGe)delete JGe[h];let g=0;i.forEach(e=>{JGe[e]={color:tVe.actorColours[g%tVe.actorColours.length],position:g},g++}),ZGe(u),rVe=tVe.leftMargin+eVe,nVe.insert(0,0,rVe,50*Object.keys(JGe).length),oVe(u,d,0,t);var i=nVe.getBounds(),d=(p&&u.append("text").text(p).attr("x",rVe).attr("font-size",s).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",o),i.stopy-i.starty+2*tVe.diagramMarginY),f=rVe+i.stopx+2*tVe.diagramMarginX,t=(yh(u,d,f,tVe.useMaxWidth),u.append("line").attr("x1",rVe).attr("y1",4*tVe.height).attr("x2",f-rVe-4).attr("y2",4*tVe.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"),nVe={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=B().journey,l=this,c=0;function e(r){return mt(function(e){c++;var t=l.sequenceItems.length-c+1;l.updateVal(e,"starty",n-t*o.boxMargin,Math.min),l.updateVal(e,"stopy",s+t*o.boxMargin,Math.max),l.updateVal(nVe.data,"startx",i-t*o.boxMargin,Math.min),l.updateVal(nVe.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(nVe.data,"starty",n-t*o.boxMargin,Math.min),l.updateVal(nVe.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(nVe.data,"startx",n,Math.min),this.updateVal(nVe.data,"starty",r,Math.min),this.updateVal(nVe.data,"stopx",e,Math.max),this.updateVal(nVe.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")},aVe=tVe.sectionFills,sVe=tVe.sectionColours,oVe=mt(function(e,i,t,r){let n=B().journey,a="",s=2*n.height+n.diagramMarginY,o=t+s,l=0,c="#CCC",h="black",u=0;for(var[d,p]of i.entries()){if(a!==p.section){c=aVe[l%aVe.length],u=l%aVe.length,h=sVe[l%sVe.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+rVe,y:50,text:p.section,fill:c,num:u,colour:h,taskCount:t};GGe.drawSection(e,g,n),a=p.section,l++}g=p.people.reduce((e,t)=>(JGe[t]&&(e[t]=JGe[t]),e),{}),p.x=d*n.taskMargin+d*n.width+rVe,p.y=o,p.width=n.diagramMarginX,p.height=n.diagramMarginY,p.colour=h,p.fill=c,p.num=u,p.actors=g,GGe.drawTask(e,p,n,r),nVe.insert(p.x,p.y,p.x+p.width+n.taskMargin,450)}},"drawTasks"),lVe={setConf:QGe,draw:iVe}}),hVe={};Vat(hVe,{diagram:()=>uVe});var uVe,dVe,pVe,gVe=r(()=>{YGe(),HGe(),XGe(),cVe(),uVe={parser:yGe,db:IGe,renderer:lVe,styles:DGe,init:mt(e=>{lVe.setConf(e.journey),IGe.clear()},"init")}}),fVe=r(()=>{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],c=[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:c},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:c},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="",c=0,h=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 b,x,T,k,w,C,S,E={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===b||"u"<typeof b)&&(b=v()),o[T]&&o[T][b]))||!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 "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,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: "+b);switch(k[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],E.$=a[a.length-C],E._$={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&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return S;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(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);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"),(dVe=new((e.prototype=i).Parser=e)).parser=dVe,pVe=dVe}),mVe={};Vat(mVe,{addEvent:()=>IVe,addSection:()=>_Ve,addTask:()=>LVe,addTaskOrg:()=>NVe,clear:()=>CVe,default:()=>MVe,getCommonDb:()=>wVe,getDirection:()=>EVe,getSections:()=>AVe,getTasks:()=>RVe,setDirection:()=>SVe});var yVe,vVe,bVe,xVe,TVe,kVe,wVe,CVe,SVe,EVe,_Ve,AVe,RVe,LVe,IVe,NVe,DVe,MVe,OVe=r(()=>{Wu(),yVe="",vVe=0,bVe="LR",xVe=[],TVe=[],kVe=[],wVe=mt(()=>Ih,"getCommonDb"),CVe=mt(function(){xVe.length=0,TVe.length=0,yVe="",kVe.length=0,bVe="LR",Ph()},"clear"),SVe=mt(function(e){bVe=e},"setDirection"),EVe=mt(function(){return bVe},"getDirection"),_Ve=mt(function(e){yVe=e,xVe.push(e)},"addSection"),AVe=mt(function(){return xVe},"getSections"),RVe=mt(function(){let e=DVe(),t=0;for(;!e&&t<100;)e=DVe(),t++;return TVe.push(...kVe),TVe},"getTasks"),LVe=mt(function(e,t,r){e={id:vVe++,section:yVe,type:yVe,task:e,score:t||0,events:r?[r]:[]},kVe.push(e)},"addTask"),IVe=mt(function(e){kVe.find(e=>e.id===vVe-1).events.push(e)},"addEvent"),NVe=mt(function(e){e={section:yVe,type:yVe,description:e,task:e,classes:[]},TVe.push(e)},"addTaskOrg"),DVe=mt(function(){let e=mt(function(e){return kVe[e].processed},"compileTask"),t=!0;for(var[r,i]of kVe.entries())e(r),t=t&&i.processed;return t},"compileTasks"),MVe={clear:CVe,getCommonDb:wVe,getDirection:EVe,setDirection:SVe,addSection:_Ve,getSections:AVe,getTasks:RVe,addTask:LVe,addTaskOrg:NVe,addEvent:IVe}});function PVe(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 BVe,$Ve,FVe,zVe,qVe,jVe,WVe,UVe,GVe,VVe,YVe,HVe,XVe,KVe,ZVe,QVe,JVe,eYe,tYe,rYe,iYe,nYe,aYe,sYe,oYe,lYe,cYe,hYe,uYe,dYe,pYe=r(()=>{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 c(e,t,r,i,n,a,s,o,l){var{taskFontSize:c,taskFontFamily:h}=o,u=e.split(/<br\s*\/?>/gi);for(let e=0;e<u.length;e++){var d=e*c-c*(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",c).style("font-family",h);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),c(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])}bk(),BVe=0,$Ve=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"),FVe=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=p5().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=p5().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"),zVe=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"),qVe=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"),jVe=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,qVe(e,t)},"drawLabel"),WVe=mt(function(e,t,r){var e=e.append("g"),i=HVe();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,$Ve(e,i),XVe(r)(t.text,e,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),UVe=-1,GVe=mt(function(e,t,r,i){var n=t.x+r.width/2,e=e.append("g");UVe++,e.append("line").attr("id",i+"-task"+UVe).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"),FVe(e,{cx:n,cy:300+30*(5-t.score),score:t.score}),(i=HVe()).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,$Ve(e,i),XVe(r)(t.task,e,i.x,i.y,i.width,i.height,{class:"task"},r,t.colour)},"drawTask"),VVe=mt(function(e,t){$Ve(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),YVe=mt(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),HVe=mt(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),mt(t,"byText"),mt(c,"byTspan"),mt(r,"byFo"),mt(g,"_setTextAttrs"),XVe=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:c},KVe=mt(function(e,t){BVe=0,UVe=-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(PVe,"wrap"),ZVe=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,c=e.append("g"),h=(t.section=r,c.attr("class",(t.class?t.class+" ":"")+"timeline-node section-"+r),c.append("g")),u=c.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(PVe,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})`),JVe(h,t,r,n,i),"neo"===o&&(c.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()&&((h=p.select("defs")).empty()?p.append("defs"):h).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"),QVe=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(PVe,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"),JVe=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-"+BVe++).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"),eYe={drawRect:$Ve,drawCircle:zVe,drawSection:WVe,drawText:qVe,drawLabel:jVe,drawTask:GVe,drawBackgroundRect:VVe,getTextObj:YVe,getNoteRect:HVe,initGraphics:KVe,drawNode:ZVe,getVirtualNodeHeight:QVe}}),gYe=r(()=>{bk(),pYe(),e(),Uu(),Ch(),tYe=mt(function(e,n,t,r){let a=B(),{look:i,theme:s,themeVariables:o}=a,{useGradient:l,gradientStart:c,gradientStop:h}=o,u=a.timeline?.leftMargin??50,d=(P.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();P.debug("task",f),eYe.initGraphics(g,n);var y,v,r=r.db.getSections();P.debug("sections",r);let b=0,x=0,T,k=50+u,w=50,C=0,S=!0,E=(r.forEach(function(e){e={number:C,descr:e,section:C,width:150,padding:20,maxHeight:b},e=eYe.getVirtualNodeHeight(g,e,a),P.debug("sectionHeight before draw",e),b=Math.max(b,e+20)}),0),_=0;P.debug("tasks.length",f.length);for([y,v]of f.entries()){var A,R={number:y,descr:v,section:v.section,width:150,padding:20,maxHeight:x},R=eYe.getVirtualNodeHeight(g,R,a);P.debug("taskHeight before draw",R),x=Math.max(x,R+20),E=Math.max(E,v.events.length);let e=0;for(A of v.events){var L={descr:A,section:v.section,number:v.section,width:150,padding:20,maxHeight:50};e+=eYe.getVirtualNodeHeight(g,L,a)}0<v.events.length&&(e+=10*(v.events.length-1)),_=Math.max(_,e)}P.debug("maxSectionHeight before draw",b),P.debug("maxTaskHeight before draw",x),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:b},i=(P.debug("sectionNode",r),g.append("g")),r=eYe.drawNode(i,r,C,a,n);P.debug("sectionNode output",r),i.attr("transform",`translate(${k}, 50)`),w+=b+50,0<e.length&&rYe(g,e,C,k,w,x,a,E,_,b,!1,n),k+=200*Math.max(e.length,1),w=50,C++}):(S=!1,rYe(g,f,C,k,w,x,a,E,_,b,!0,n)),r=g.node().getBBox(),P.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=S?b+x+150:x+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",c).attr("stop-opacity",1),r.append("stop").attr("offset","100%").attr("stop-color",h).attr("stop-opacity",1)),vh(void 0,g,a.timeline?.padding??50,a.timeline?.useMaxWidth??!1)},"draw"),rYe=mt(function(e,t,r,i,n,a,s,o,l,c,h,u){for(var d of t){var p={descr:d.task,section:r,number:r,width:150,padding:20,maxHeight:a},g=(P.debug("taskNode",p),e.append("g").attr("class","taskWrapper")),p=eYe.drawNode(g,p,r,s,u).height;P.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,iYe(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,h&&!s.timeline?.disableMulticolor&&r++}},"drawTasks"),iYe=mt(function(e,t,r,i,n,a,s){let o=0,l=n;n+=100;for(var c of t){var c={descr:c,section:r,number:r,width:150,padding:20,maxHeight:50},h=(P.debug("eventNode",c),e.append("g").attr("class","eventWrapper")),c=eYe.drawNode(h,c,r,a,s,!0).height;o+=c,h.attr("transform",`translate(${i}, ${n})`),n=n+10+c}return n=l,o},"drawEvents"),nYe={setConf:mt(()=>{},"setConf"),draw:tYe}}),fYe=r(()=>{pYe(),e(),Uu(),Ch(),z$e(),zC(),aYe=mt(function(e,t,r,i){let a=B(),n=a.timeline?.leftMargin??50,s=(P.debug("timeline",i.db),M$e(t)),o=(s.append("g"),i.db.getTasks()),l=i.db.getCommonDb().getDiagramTitle();P.debug("task",o),eYe.initGraphics(s);var c,h,t=i.db.getSections();P.debug("sections",t);let u=0,d=0,p=50+n,g=50,f=g,m=p,y=m+230,v=0,b=t&&0<t.length,x=b?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=eYe.getVirtualNodeHeight(s,e,a),P.debug("sectionHeight before draw",e),u=Math.max(u,e)}),0);P.debug("tasks.length",o.length);for([c,h]of o.entries()){var w,C={number:c,descr:h,section:h.section,width:200,padding:5,maxHeight:d},C=eYe.getVirtualNodeHeight(s,C,a);P.debug("taskHeight before draw",C),d=Math.max(d,C);let e=0;for(w of h.events){var S={descr:w,section:h.section,number:h.section,width:300,padding:5,maxHeight:50};e+=eYe.getVirtualNodeHeight(s,S,a)}0<h.events.length&&(e+=10*(h.events.length-1)),k=Math.max(k,e)+0}P.debug("maxSectionHeight before draw",u),P.debug("maxTaskHeight before draw",d);let E=Math.max(d,k)+30,_=(b?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=(P.debug("sectionNode",r),s.append("g")),r=eYe.drawNode(i,r,v,a),n=(P.debug("sectionNode output",r),x-230),i=(i.attr("transform",`translate(${n}, ${g})`),g+r.height+20),n=(0<e.length&&sYe(s,e,v,x,i,d,a,E,!1),e.length),i=r.height+20+E*Math.max(n,1)-(0<n?60:0);g+=i,v++}):sYe(s,o,v,x,g,d,a,E,!0),s.node()?.getBBox());if(!_)throw new Error("bbox not found");if(P.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");P.debug("bounds after title",_)}var[i]=OC(a.fontSize),t=2*(i??16),i=.5*(i??16)+20,A=s.append("g").attr("class","lineWrapper");A.append("line").attr("x1",x).attr("y1",f-t).attr("x2",x).attr("y2",_.y+_.height+i).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),A.lower(),vh(void 0,s,a.timeline?.padding??50,a.timeline?.useMaxWidth??!1)},"draw"),sYe=mt(function(e,t,r,i,n,a,s,o,l){for(var c of t){var h={descr:c.task,section:r,number:r,width:200,padding:5,maxHeight:a},u=(P.debug("taskNode",h),e.append("g").attr("class","taskWrapper")),d=(h=eYe.drawNode(u,h,r,s)).height,h=(P.debug("taskHeight after draw",d),i-20-h.width);u.attr("transform",`translate(${h}, ${n})`),a=Math.max(a,d),c.events&&0<c.events.length&&(u=n,oYe(e,c.events,r,i,i+50,u,s)),n+=o,l&&!s.timeline?.disableMulticolor&&r++}},"drawTasks"),oYe=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},c=(P.debug("eventNode",l),e.append("g").attr("class","eventWrapper")),l=eYe.drawNode(c,l,r,s).height,c=(c.attr("transform",`translate(${n}, ${o})`),e.append("g").attr("class","lineWrapper")),h=o+l/2;c.append("line").attr("x1",i).attr("y1",h).attr("x2",n).attr("y2",h).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"),lYe={setConf:mt(()=>{},"setConf"),draw:aYe}}),mYe=r(()=>{ai(),wi(),cYe=mt(t=>{let e=vr().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,c=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: ${c};
|
||
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"),hYe=mt(t=>{let r="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t["lineColor"+e]=t["lineColor"+e]||t["cScaleInv"+e],pt(t["lineColor"+e])?t["lineColor"+e]=R(t["lineColor"+e],20):t["lineColor"+e]=L(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"),uYe=mt(t=>{let e=vr().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?cYe:hYe)(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"),dYe=uYe}),yYe={};Vat(yYe,{diagram:()=>bYe});var vYe,bYe,xYe,TYe,kYe=r(()=>{fVe(),OVe(),gYe(),fYe(),mYe(),vYe={setConf:mt(()=>{},"setConf"),draw:mt((e,t,r,i)=>("TD"===(i?.db?.getDirection?.()??"LR")?lYe:nYe).draw(e,t,r,i),"draw")},bYe={db:mVe,renderer:vYe,parser:pVe,styles:dYe}}),wYe=r(()=>{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],c=[6,7,8],h=[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(c,[2,3]),{1:[2,2]},t(c,[2,4]),t(c,[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:h,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:h,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="",c=0,h=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 b,x,T,k,w,C,S,E={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===b||"u"<typeof b)&&(b=v()),o[T]&&o[T][b]))||!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 "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,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: "+b);switch(k[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],E.$=a[a.length-C],E._$={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&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return S;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(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0},"parse")},c={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=c,mt(e,"Parser"),(xYe=new((e.prototype=r).Parser=e)).parser=xYe,TYe=xYe});function CYe(e,t=0){return(SYe[e[t+0]]+SYe[e[t+1]]+SYe[e[t+2]]+SYe[e[t+3]]+"-"+SYe[e[t+4]]+SYe[e[t+5]]+"-"+SYe[e[t+6]]+SYe[e[t+7]]+"-"+SYe[e[t+8]]+SYe[e[t+9]]+"-"+SYe[e[t+10]]+SYe[e[t+11]]+SYe[e[t+12]]+SYe[e[t+13]]+SYe[e[t+14]]+SYe[e[t+15]]).toLowerCase()}var SYe,EYe=r(()=>{SYe=[];for(let e=0;e<256;++e)SYe.push((e+256).toString(16).slice(1));mt(CYe,"unsafeStringify")});function _Ye(){return crypto.getRandomValues(AYe)}var AYe,RYe=r(()=>{AYe=new Uint8Array(16),mt(_Ye,"rng")});function LYe(e,t,r){return t||e||!crypto.randomUUID?IYe(e,t,r):crypto.randomUUID()}function IYe(e,t,r){var i=(e=e||{}).random??e.rng?.()??_Ye();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 CYe(i)}var NYe,DYe,MYe,OYe,PYe,BYe,$Ye,FYe,zYe,qYe,jYe=r(()=>{RYe(),EYe(),mt(LYe,"v4"),mt(IYe,"_v4"),NYe=LYe}),WYe=r(()=>{jYe()}),UYe=r(()=>{F7(),zC(),DYe=12}),GYe=r(()=>{Uu(),WYe(),th(),e(),Ti(),wi(),UYe(),MYe={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},OYe=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=MYe,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){P.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),B()),s=a.mindmap?.padding??ir.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:Rc(t,a),level:e,descr:Rc(r,a),type:i,children:[],width:a.mindmap?.maxNodeWidth??ir.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(P.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=B(),r=this.nodes[this.nodes.length-1],e.icon&&(r.icon=Rc(e.icon,t)),e.class)&&(r.class=Rc(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%(DYe-1):t,this.assignSections(i,r)}flattenNodes(e,t){let r=B(),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 MYe.CIRCLE:return"mindmapCircle";case MYe.RECT:return"rect";case MYe.ROUNDED_RECT:return"rounded";case MYe.CLOUD:return"cloud";case MYe.BANG:return"bang";case MYe.HEXAGON:return"hexagon";case MYe.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=B();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=B(),r=t;if(void 0===Er().layout&&(r.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:r};P.debug("getData: mindmapRoot",e,t),this.assignSections(e);var i,n=[],a=(this.flattenNodes(e,t=[]),this.generateEdges(e,n),P.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-"+NYe()}}getLogger(){return P}}}),VYe=r(()=>{e(),fI(),Jue(),ede(),Ti(),wi(),PYe=mt(async(e,t,r,i)=>{P.debug(`Rendering mindmap diagram
|
||
`+e);var n=(e=i.db).getData(),a=tI(t,n.config.securityLevel);n.type=i.type,n.layoutAlgorithm=Bue(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 Pue(n,a),i=vr().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)),$ue(a,n.config.mindmap?.padding??ir.mindmap.padding,"mindmapDiagram",n.config.mindmap?.useMaxWidth??ir.mindmap.useMaxWidth))},"draw"),BYe={draw:PYe}}),YYe=r(()=>{ai(),$Ye=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],pt(t["lineColor"+e])?t["lineColor"+e]=R(t["lineColor"+e],20):t["lineColor"+e]=L(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"),FYe=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"),zYe=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;
|
||
}
|
||
${$Ye(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?FYe(e.THEME_COLOR_LIMIT,r,e.mainBkg):""}
|
||
`},"getStyles"),qYe=zYe}),HYe={};Vat(HYe,{diagram:()=>XYe});var XYe,KYe,ZYe,QYe,JYe,eHe,tHe,rHe,iHe,nHe,aHe,sHe,oHe,lHe,cHe,hHe,uHe,dHe,pHe,gHe,fHe,mHe,yHe,vHe,bHe,xHe=r(()=>{wYe(),GYe(),VYe(),YYe(),XYe={get db(){return new OYe},renderer:BYe,parser:TYe,styles:qYe}}),THe=r(()=>{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],c=[6,7,8],h=[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],b=[1,6,7,11,13,16,17,20,23],x=[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(c,[2,3]),{1:[2,2]},t(c,[2,4]),t(c,[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:h,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:h,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(b,[2,8]),t(b,[2,9]),t(b,[2,10]),t(p,[2,16],{15:37,24:g}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:x}),t(f,[2,31]),{21:[1,39]},{22:[1,40]},t(m,[2,13],{7:y,11:v}),t(b,[2,11]),t(b,[2,12]),t(p,[2,15],{24:x}),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="",c=0,h=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 b,x,T,k,w,C,S,E={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===b||"u"<typeof b)&&(b=v()),o[T]&&o[T][b]))||!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 "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,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: "+b);switch(k[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],E.$=a[a.length-C],E._$={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&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return S;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(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0},"parse")},c={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=c,mt(e,"Parser"),(KYe=new((e.prototype=r).Parser=e)).parser=KYe,ZYe=KYe}),kHe=r(()=>{Uu(),th(),e(),Ti(),k_(),QYe=[],JYe=[],eHe=0,tHe={},rHe=mt(()=>{QYe=[],JYe=[],eHe=0,tHe={}},"clear"),iHe=mt(e=>{if(0===QYe.length)return null;let t=QYe[0].level,r=null;for(let e=QYe.length-1;0<=e;e--)if(QYe[e].level===t&&(r=r||QYe[e]),QYe[e].level<t)throw new Error('Items without section detected, found section ("'+QYe[e].label+'")');return e===r?.level?null:r},"getSection"),nHe=mt(function(){return JYe},"getSections"),aHe=mt(function(){var e=[],r=nHe(),i=B();for(let t of r){var n,a={id:t.id,label:Rc(t.label??"",i),labelType:"markdown",isGroup:!0,ticket:t.ticket,shape:"kanbanSection",level:t.level,look:i.look};e.push(a);for(n of QYe.filter(e=>e.parentId===t.id)){var s={id:n.id,parentId:t.id,label:Rc(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:B()}},"getData"),sHe=mt((e,t,r,i,n)=>{let a=B(),s=a.mindmap?.padding??ir.mindmap.padding;switch(i){case oHe.ROUNDED_RECT:case oHe.RECT:case oHe.HEXAGON:s*=2}if(i={id:Rc(t,a)||"kbn"+eHe++,level:e,label:Rc(r,a),width:a.mindmap?.maxNodeWidth??ir.mindmap.maxNodeWidth,padding:s,isGroup:!1},void 0!==n){if(n=n.includes(`
|
||
`)?n+`
|
||
`:`{
|
||
`+n+`
|
||
}`,(t=T_(n,{schema:x_})).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=iHe(e))?i.parentId=r.id||"kbn"+eHe++:JYe.push(i),QYe.push(i)},"addNode"),oHe={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},lHe=mt((e,t)=>{switch(P.debug("In get type",e,t),e){case"[":return oHe.RECT;case"(":return")"===t?oHe.ROUNDED_RECT:oHe.CLOUD;case"((":return oHe.CIRCLE;case")":return oHe.CLOUD;case"))":return oHe.BANG;case"{{":return oHe.HEXAGON;default:return oHe.DEFAULT}},"getType"),cHe=mt((e,t)=>{tHe[e]=t},"setElementForId"),hHe=mt(e=>{var t,r;e&&(t=B(),r=QYe[QYe.length-1],e.icon&&(r.icon=Rc(e.icon,t)),e.class)&&(r.cssClasses=Rc(e.class,t))},"decorateNode"),uHe=mt(e=>{switch(e){case oHe.DEFAULT:return"no-border";case oHe.RECT:return"rect";case oHe.ROUNDED_RECT:return"rounded-rect";case oHe.CIRCLE:return"circle";case oHe.CLOUD:return"cloud";case oHe.BANG:return"bang";case oHe.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),dHe=mt(()=>P,"getLogger"),pHe=mt(e=>tHe[e],"getElementById"),gHe={clear:rHe,addNode:sHe,getSections:nHe,getData:aHe,nodeType:oHe,getType:lHe,setElementForId:cHe,decorateNode:hHe,type2Str:uHe,getLogger:dHe,getElementById:pHe}}),wHe=r(()=>{Uu(),e(),z$e(),Ch(),Ti(),yI(),MN(),fHe=mt(async(e,t,r,i)=>{P.debug(`Rendering kanban diagram
|
||
`+e);var n,a=i.db.getData(),s=B(),e=(s.htmlLabels=!1,M$e(t));for(n of a.nodes)n.domId=t+"-"+n.id;var o,l=e.append("g"),c=(l.attr("class","sections"),e.append("g"));c.attr("class","items");let h=a.nodes.filter(e=>e.isGroup),u=0,d=[],p=25;for(o of h){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 hI(l,o));p=Math.max(p,g?.labelBBox?.height),d.push(g)}let f=0;for(let n of h){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 kN(c,m,{config:s})).node().getBBox();m.y=r+v.height/2,await EN(m),r=m.y+v.height/2+5}var y=y.cluster.select("rect"),b=Math.max(r-t+30,50)+(p-25);y.attr("height",b)}vh(void 0,e,s.mindmap?.padding??ir.kanban.padding,s.mindmap?.useMaxWidth??ir.kanban.useMaxWidth)},"draw"),mHe={draw:fHe}}),CHe=r(()=>{ai(),nde(),yHe=mt(r=>{let t="";for(let e=0;e<r.THEME_COLOR_LIMIT;e++)r["lineColor"+e]=r["lineColor"+e]||r["cScaleInv"+e],pt(r["lineColor"+e])?r["lineColor"+e]=R(r["lineColor"+e],20):r["lineColor"+e]=L(r["lineColor"+e],20);var i=mt((e,t)=>(r.darkMode?L:R)(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"),vHe=mt(e=>`
|
||
.edge {
|
||
stroke-width: 3;
|
||
}
|
||
${yHe(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;
|
||
}
|
||
${Hue()}
|
||
`,"getStyles"),bHe=vHe}),SHe={};Vat(SHe,{diagram:()=>EHe});var EHe,_He,AHe,RHe,LHe,IHe,NHe,DHe,MHe,OHe,PHe,BHe,$He,FHe,zHe,qHe=r(()=>{THe(),kHe(),wHe(),CHe(),EHe={db:gHe,renderer:mHe,parser:ZYe,styles:bHe}}),jHe=r(()=>{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('""','"')),c=i.findOrCreateNode(a[o-2].trim().replaceAll('""','"')),h=parseFloat(a[o].trim());i.addLink(l,c,h);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="",c=0,h=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 b,x,T,k,w,C,S,E={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===b||"u"<typeof b)&&(b=v()),o[T]&&o[T][b]))||!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 "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,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: "+b);switch(k[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],E.$=a[a.length-C],E._$={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&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return S;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(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);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"),(_He=new((e.prototype=n).Parser=e)).parser=_He,AHe=_He}),WHe=r(()=>{Uu(),th(),Wu(),RHe=[],LHe=[],IHe=new Map,NHe=mt(()=>{RHe=[],LHe=[],IHe=new Map,Ph()},"clear"),DHe=class{constructor(e,t,r=0){this.source=e,this.target=t,this.value=r}static{mt(this,"SankeyLink")}},MHe=mt((e,t,r)=>{RHe.push(new DHe(e,t,r))},"addLink"),OHe=class{constructor(e){this.ID=e}static{mt(this,"SankeyNode")}},PHe=mt(e=>{e=I.sanitizeText(e,B());let t=IHe.get(e);return void 0===t&&(t=new OHe(e),IHe.set(e,t),LHe.push(t)),t},"findOrCreateNode"),BHe=mt(()=>LHe,"getNodes"),$He=mt(()=>RHe,"getLinks"),FHe=mt(()=>({nodes:LHe.map(e=>({id:e.ID})),links:RHe.map(e=>({source:e.source.ID,target:e.target.ID,value:e.value}))}),"getGraph"),zHe={nodesMap:IHe,getConfig:mt(()=>B().sankey,"getConfig"),getNodes:BHe,getLinks:$He,getGraph:FHe,addLink:MHe,findOrCreateNode:PHe,getAccTitle:$h,setAccTitle:Bh,getAccDescription:zh,setAccDescription:Fh,getDiagramTitle:jh,setDiagramTitle:qh,clear:NHe}});function UHe(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 GHe=r(()=>{mt(UHe,"max")});function VHe(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 YHe=r(()=>{mt(VHe,"min")});function HHe(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 XHe=r(()=>{mt(HHe,"sum")}),KHe=r(()=>{GHe(),YHe(),XHe()});function ZHe(e){return e.target.depth}function QHe(e){return e.depth}function JHe(e,t){return t-1-e.height}function eXe(e,t){return e.sourceLinks.length?e.depth:t-1}function tXe(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?VHe(e.sourceLinks,ZHe)-1:0}var rXe=r(()=>{KHe(),mt(ZHe,"targetDepth"),mt(QHe,"left"),mt(JHe,"right"),mt(eXe,"justify"),mt(tXe,"center")});function iXe(e){return function(){return e}}var nXe=r(()=>{mt(iXe,"constant")});function aXe(e,t){return oXe(e.source,t.source)||e.index-t.index}function sXe(e,t){return oXe(e.target,t.target)||e.index-t.index}function oXe(e,t){return e.y0-t.y0}function lXe(e){return e.value}function cXe(e){return e.index}function hXe(e){return e.nodes}function uXe(e){return e.links}function dXe(e,t){if(e=e.get(t))return e;throw new Error("missing: "+t)}function pXe({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 gXe(){let o=0,l=0,c=1,h=1,u=24,n=8,d,p=cXe,g=eXe,f,m,t=hXe,r=uXe,a=6;function i(){var e={nodes:t.apply(null,arguments),links:r.apply(null,arguments)};return s(e),y(e),v(e),b(e),k(e),pXe(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=dXe(s,e)),"object"!=typeof t&&(t=a.target=dXe(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(HHe(t.sourceLinks,lXe),HHe(t.targetLinks,lXe)):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 b({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 x({nodes:e}){var t,r=UHe(e,e=>e.depth)+1,i=(c-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=VHe(e,e=>(h-l-(e.length-1)*d)/HHe(e,lXe));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=(h-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)}R(r)}}function k(e){var t=x(e);d=Math.min(n,(h-l)/(UHe(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:c}of a.targetLinks)c*=a.layer-l.layer,e+=L(l,a)*c,t+=c;0<t&&(s=(e/t-a.y0)*i,a.y0+=s,a.y1+=s,A(a))}void 0===f&&o.sort(oXe),S(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:c}of a.sourceLinks)c*=l.layer-a.layer,e+=I(a,l)*c,t+=c;0<t&&(s=(e/t-a.y0)*i,a.y0+=s,a.y1+=s,A(a))}void 0===f&&o.sort(oXe),S(o,n)}}function S(e,t){var r=e.length>>1,i=e[r];_(e,i.y0-d,r-1,t),E(e,i.y1+d,1+r,t),_(e,h,e.length-1,t),E(e,l,0,t)}function E(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(sXe);for(var{target:{targetLinks:i}}of e)i.sort(aXe)}}function R(e){if(void 0===m)for(var{sourceLinks:t,targetLinks:r}of e)t.sort(sXe),r.sort(aXe)}function L(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 pXe(e),e},i.nodeId=function(e){return arguments.length?(p="function"==typeof e?e:iXe(e),i):p},i.nodeAlign=function(e){return arguments.length?(g="function"==typeof e?e:iXe(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:iXe(e),i):t},i.links=function(e){return arguments.length?(r="function"==typeof e?e:iXe(e),i):r},i.linkSort=function(e){return arguments.length?(m=e,i):m},i.size=function(e){return arguments.length?(o=l=0,c=+e[0],h=+e[1],i):[c-o,h-l]},i.extent=function(e){return arguments.length?(o=+e[0][0],c=+e[1][0],l=+e[0][1],h=+e[1][1],i):[[o,l],[c,h]]},i.iterations=function(e){return arguments.length?(a=+e,i):a},mt(s,"computeNodeLinks"),mt(y,"computeNodeValues"),mt(v,"computeNodeDepths"),mt(b,"computeNodeHeights"),mt(x,"computeNodeLayers"),mt(T,"initializeNodeBreadths"),mt(k,"computeNodeBreadths"),mt(w,"relaxLeftToRight"),mt(C,"relaxRightToLeft"),mt(S,"resolveCollisions"),mt(E,"resolveCollisionsTopToBottom"),mt(_,"resolveCollisionsBottomToTop"),mt(A,"reorderNodeLinks"),mt(R,"reorderLinks"),mt(L,"targetTop"),mt(I,"sourceTop"),i}var fXe=r(()=>{KHe(),rXe(),nXe(),mt(aXe,"ascendingSourceBreadth"),mt(sXe,"ascendingTargetBreadth"),mt(oXe,"ascendingBreadth"),mt(lXe,"value"),mt(cXe,"defaultId"),mt(hXe,"defaultNodes"),mt(uXe,"defaultLinks"),mt(dXe,"find"),mt(pXe,"computeLinkBreadths"),mt(gXe,"Sankey")});function mXe(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function yXe(){return new mXe}var vXe,bXe,xXe,TXe,kXe=r(()=>{vXe=Math.PI,xXe=(bXe=2*vXe)-1e-6,mt(mXe,"Path"),mt(yXe,"path"),mXe.prototype=yXe.prototype={constructor:mXe,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,c=(r=+r)-(e=+e),h=(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*c-h*u)&&n?(s=c*c+h*h,i=(r-=o)*r+(o=i-l)*o,l=Math.sqrt(s),a=Math.sqrt(p),p=(s=n*Math.tan((vXe-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*c)+","+(this._y1=t+i*h)):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,c=t+o,h=1^a,a=a?i-n:n-i;if(r<0)throw new Error("negative radius: "+r);null===this._x1?this._+="M"+l+","+c:(1e-6<Math.abs(this._x1-l)||1e-6<Math.abs(this._y1-c))&&(this._+="L"+l+","+c),r&&(xXe<(a=a<0?a%bXe+bXe:a)?this._+="A"+r+","+r+",0,1,"+h+","+(e-s)+","+(t-o)+"A"+r+","+r+",0,1,"+h+","+(this._x1=l)+","+(this._y1=c):1e-6<a&&(this._+="A"+r+","+r+",0,"+ +(vXe<=a)+","+h+","+(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")},TXe=yXe}),wXe=r(()=>{kXe()});function CXe(e){return mt(function(){return e},"constant")}var SXe=r(()=>{mt(CXe,"default")});function EXe(e){return e[0]}function _Xe(e){return e[1]}var AXe,RXe=r(()=>{mt(EXe,"x"),mt(_Xe,"y")}),LXe=r(()=>{AXe=Array.prototype.slice});function IXe(e){return e.source}function NXe(e){return e.target}function DXe(n){var a=IXe,s=NXe,o=EXe,l=_Xe,c=null;function t(){var e,t=AXe.call(arguments),r=a.apply(this,t),i=s.apply(this,t);if(c=c||(e=TXe()),n(c,+o.apply(this,(t[0]=r,t)),+l.apply(this,t),+o.apply(this,(t[0]=i,t)),+l.apply(this,t)),e)return c=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:CXe(+e),t):o},t.y=function(e){return arguments.length?(l="function"==typeof e?e:CXe(+e),t):l},t.context=function(e){return arguments.length?(c=e??null,t):c},t}function MXe(e,t,r,i,n){e.moveTo(t,r),e.bezierCurveTo(t=(t+i)/2,r,t,n,i,n)}function OXe(){return DXe(MXe)}var PXe=r(()=>{wXe(),LXe(),SXe(),RXe(),mt(IXe,"linkSource"),mt(NXe,"linkTarget"),mt(DXe,"link"),mt(MXe,"curveHorizontal"),mt(OXe,"linkHorizontal")}),BXe=r(()=>{PXe()});function $Xe(e){return[e.source.x1,e.y0]}function FXe(e){return[e.target.x0,e.y1]}function zXe(){return OXe().source($Xe).target(FXe)}var qXe,jXe,WXe,UXe,GXe,VXe,YXe,HXe,XXe=r(()=>{BXe(),mt($Xe,"horizontalSource"),mt(FXe,"horizontalTarget"),mt(zXe,"default")}),KXe=r(()=>{fXe(),rXe(),XXe()}),ZXe=r(()=>{qXe=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+")"}}}),QXe=r(()=>{Uu(),bk(),KXe(),Ch(),ZXe(),jXe={left:QHe,right:JHe,center:tXe,justify:eXe},WXe=mt(e=>{let t=0,r=0;for(var i of e){var n=i.value??0;n>t&&(t=n,r=i.layer??0)}return r},"findCentralNodeLayer"),UXe=mt(function(e,t,r,i){let{securityLevel:n,sankey:a}=B(),s=Vh.sankey,o,l=("sandbox"===n&&(o=Q("#i"+t)),Q("sandbox"===n?o.nodes()[0].contentDocument.body:"body")),c="sandbox"===n?l.select(`[id="${t}"]`):Q(`[id="${t}"]`),h=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=a?.nodeWidth??s.nodeWidth??10,v=a?.nodePadding??s.nodePadding??12,b=a?.labelStyle??s.labelStyle??"legacy",x=a?.nodeColors??{},T=i.db.getGraph(),k=jXe[p],w=(gXe().nodeId(e=>e.id).nodeWidth(y).nodePadding(v+(m?15:0)).nodeAlign(k).extent([[0,0],[h,u]])(T),WXe(T.nodes)),C=$b($T),S=mt(e=>x[e]??C(e),"getNodeColor"),E=(c.append("g").attr("class","nodes").selectAll(".node").data(T.nodes).join("g").attr("class","node").attr("id",e=>(e.uid=qXe.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=>S(e.id)),mt(({id:e,value:t})=>m?e+`
|
||
`+g+Math.round(100*t)/100+f:e,"getText")),_=mt(e=>"outlined"===b?(e.layer??0)<w?{x:e.x0-6,anchor:"end"}:{x:e.x1+6,anchor:"start"}:e.x0<h/2?{x:e.x1+6,anchor:"start"}:{x:e.x0-6,anchor:"end"},"getLabelPosition"),A=c.append("g").attr("class","node-labels").attr("font-size",14),R=mt(e=>A.selectAll(e?"."+e:"text").data(T.nodes).join("text").attr("class",e??null).attr("x",e=>_(e).x).attr("y",e=>(e.y1+e.y0)/2).attr("dy",`${m?"0":"0.35"}em`).attr("text-anchor",e=>_(e).anchor).text(E),"appendLabel");"outlined"===b?(R("sankey-label-bg"),R("sankey-label-fg")):R();var t=c.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(T.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),L=a?.linkColor??"gradient";"gradient"===L&&((i=t.append("linearGradient").attr("id",e=>(e.uid=qXe.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=>S(e.source.id)),i.append("stop").attr("offset","100%").attr("stop-color",e=>S(e.target.id)));let I;switch(L){case"gradient":I=mt(e=>e.uid,"coloring");break;case"source":I=mt(e=>S(e.source.id),"coloring");break;case"target":I=mt(e=>S(e.target.id),"coloring");break;default:I=L}t.append("path").attr("d",zXe()).attr("stroke",I).attr("stroke-width",e=>Math.max(1,e.width)),vh(void 0,c,0,d)},"draw"),GXe={draw:UXe}}),JXe=r(()=>{VXe=mt(e=>e.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
|
||
`).trim(),"prepareTextForParsing")}),eKe=r(()=>{YXe=mt(e=>`.label {
|
||
font-family: ${e.fontFamily};
|
||
}
|
||
|
||
.node-labels {
|
||
font-family: ${e.fontFamily};
|
||
}
|
||
|
||
/* Outlined label style - background stroke for better readability */
|
||
.sankey-label-bg {
|
||
stroke: ${e.mainBkg||e.background||"#fff"};
|
||
stroke-width: 4px;
|
||
stroke-linejoin: round;
|
||
paint-order: stroke;
|
||
}
|
||
|
||
/* Foreground label text */
|
||
.sankey-label-fg {
|
||
fill: ${e.textColor};
|
||
}
|
||
|
||
/* Node styling */
|
||
.node rect {
|
||
shape-rendering: crispEdges;
|
||
}
|
||
|
||
/* Link styling */
|
||
.link {
|
||
fill: none;
|
||
stroke-opacity: 0.5;
|
||
mix-blend-mode: multiply;
|
||
}
|
||
`,"getStyles"),HXe=YXe}),tKe={};Vat(tKe,{diagram:()=>iKe});var rKe,iKe,nKe,aKe,sKe,oKe,lKe,cKe,hKe,uKe,dKe,pKe,gKe=r(()=>{jHe(),WHe(),QXe(),JXe(),eKe(),rKe=AHe.parse.bind(AHe),AHe.parse=e=>rKe(VXe(e)),iKe={styles:HXe,parser:AHe,db:zHe,renderer:GXe}}),fKe=r(()=>{wi(),Ti(),zC(),Wu(),nKe=ir.packet,aKe=class{constructor(){this.packet=[],this.setAccTitle=Bh,this.getAccTitle=$h,this.setDiagramTitle=qh,this.getDiagramTitle=jh,this.getAccDescription=zh,this.setAccDescription=Fh}static{mt(this,"PacketDB")}getConfig(){var e=lC({...nKe,...vr().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){0<e.length&&this.packet.push(e)}clear(){Ph(),this.packet=[]}}}),mKe=r(()=>{sOe(),e(),hOe(),fKe(),sKe=mt((e,t)=>{oOe(e,t);let r=-1,i=[],n=1,a=t.getConfig().bitsPerRow;for(var{start:s,end:o,bits:l,label:c}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,P.debug(`Packet block ${s} - ${r} with label `+c);i.length<=a+1&&t.getPacket().length<1e4;){var[h,u]=oKe({start:s,end:o,bits:l,label:c},n,a);if(i.push(h),h.end+1===n*a&&(t.pushWord(i),i=[],n++),!u)break;({start:s,end:o,bits:l,label:c}=u)}}t.pushWord(i)},"populate"),oKe=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"),lKe={parser:{yy:void 0},parse:mt(async e=>{var e=await rOe("packet",e),t=lKe.parser?.yy;if(!(t instanceof aKe))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.");P.debug(e),sKe(e,t)},"parse")}}),yKe=r(()=>{z$e(),Ch(),cKe=mt((e,t,r,i)=>{var n,a,s=(i=i.db).getConfig(),{rowHeight:o,paddingY:l,bitWidth:c,bitsPerRow:h}=s,u=i.getPacket(),i=i.getDiagramTitle(),o=(l=o+l)*(u.length+1)-(i?0:o),c=c*h+2,d=M$e(t);d.attr("viewBox",`0 0 ${c} `+o),yh(d,o,c,s.useMaxWidth);for([n,a]of u.entries())hKe(d,a,n,s);d.append("text").text(i).attr("x",c/2).attr("y",o-l/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),hKe=mt((e,t,r,{rowHeight:i,paddingX:n,paddingY:a,bitWidth:s,bitsPerRow:o,showBits:l})=>{var c,h=e.append("g"),u=r*(i+a)+a;for(c of t){var d,p,g=c.start%o*s+1,f=(c.end-c.start+1)*s-n;h.append("rect").attr("x",g).attr("y",u).attr("width",f).attr("height",i).attr("class","packetBlock"),h.append("text").attr("x",g+f/2).attr("y",u+i/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(c.label),l&&(d=c.end===c.start,p=u-2,h.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(c.start),d||h.append("text").attr("x",g+f).attr("y",p).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(c.end))}},"drawWord"),uKe={draw:cKe}}),vKe=r(()=>{zC(),dKe={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},pKe=mt(({packet:e}={})=>`
|
||
.packetByte {
|
||
font-size: ${(e=lC(dKe,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")}),bKe={};Vat(bKe,{diagram:()=>xKe});var xKe,TKe,kKe,wKe,CKe,SKe,EKe,_Ke,AKe,RKe,LKe,IKe,NKe,DKe,MKe,OKe,PKe,BKe=r(()=>{fKe(),mKe(),yKe(),vKe(),xKe={parser:lKe,get db(){return new aKe},renderer:uKe,styles:pKe}}),$Ke=r(()=>{wi(),Ti(),zC(),Wu(),kKe={axes:[],curves:[],options:TKe={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"}},wKe=structuredClone(kKe),CKe=ir.radar,SKe=mt(()=>lC({...CKe,...vr().radar}),"getConfig"),EKe=mt(()=>wKe.axes,"getAxes"),_Ke=mt(()=>wKe.curves,"getCurves"),AKe=mt(()=>wKe.options,"getOptions"),RKe=mt(e=>{wKe.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},"setAxes"),LKe=mt(e=>{wKe.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:IKe(e.entries)}))},"setCurves"),IKe=mt(r=>{if(null==r[0].axis)return r.map(e=>e.value);var e=EKe();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"),NKe=mt(e=>{e=e.reduce((e,t)=>(e[t.name]=t,e),{}),wKe.options={showLegend:e.showLegend?.value??TKe.showLegend,ticks:e.ticks?.value??TKe.ticks,max:e.max?.value??TKe.max,min:e.min?.value??TKe.min,graticule:e.graticule?.value??TKe.graticule}},"setOptions"),DKe=mt(()=>{Ph(),wKe=structuredClone(kKe)},"clear"),MKe={getAxes:EKe,getCurves:_Ke,getOptions:AKe,setAxes:RKe,setCurves:LKe,setOptions:NKe,getConfig:SKe,clear:DKe,setAccTitle:Bh,getAccTitle:$h,setDiagramTitle:qh,getDiagramTitle:jh,getAccDescription:zh,setAccDescription:Fh}}),FKe=r(()=>{sOe(),e(),hOe(),$Ke(),OKe=mt(e=>{oOe(e,MKe);var{axes:e,curves:t,options:r}=e;MKe.setAxes(e),MKe.setCurves(t),MKe.setOptions(r)},"populate"),PKe={parse:mt(async e=>{e=await rOe("radar",e),P.debug(e),OKe(e)},"parse")}});function zKe(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=qKe(e,i,n,l))*Math.cos(t),y:e*Math.sin(t)})),"circle"===a?r.append("path").attr("d",jKe(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 qKe(e,t,r,i){return i*(Math.min(Math.max(e,t),r)-t)/(r-t)}function jKe(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],c=s.x+(o.x-a.x)*r,a=s.y+(o.y-a.y)*r,h=o.x-(l.x-s.x)*r;n+=` C${c},${a} ${h},${o.y-(l.y-s.y)*r} ${o.x},`+o.y}return n+" Z"}function WKe(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 UKe,GKe,VKe,YKe,HKe,XKe,KKe,ZKe,QKe=r(()=>{z$e(),Ch(),UKe=mt((e,t,r,i)=>{var n=(i=i.db).getAxes(),a=i.getCurves(),s=i.getOptions(),o=i.getConfig(),i=i.getDiagramTitle(),t=M$e(t),t=GKe(t,o),l=s.max??Math.max(...a.map(e=>Math.max(...e.entries))),c=s.min,h=Math.min(o.width,o.height)/2;VKe(t,n,h,s.ticks,s.graticule),YKe(t,n,h,o),zKe(t,n,a,c,l,s.graticule,o),WKe(t,a,s.showLegend,o),t.append("text").attr("class","radarTitle").text(i).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),GKe=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 yh(e,i,r,t.useMaxWidth??!0),e.attr("viewBox",`0 0 ${r} `+i),e.append("g").attr("transform",`translate(${n}, ${a})`)},"drawFrame"),VKe=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"),YKe=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(zKe,"drawCurves"),mt(qKe,"relativeRadius"),mt(jKe,"closedRoundCurve"),mt(WKe,"drawLegend"),HKe={draw:UKe}}),JKe=r(()=>{zC(),hi(),wi(),XKe=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"),KKe=mt(e=>{var t=lC(Ot(),vr().themeVariables);return{themeVariables:t,radarOptions:lC(t.radar,e)}},"buildRadarStyleOptions"),ZKe=mt(({radar:e}={})=>{var{themeVariables:e,radarOptions:t}=KKe(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;
|
||
}
|
||
${XKe(e,t)}
|
||
`},"styles")}),eZe={};Vat(eZe,{diagram:()=>tZe});var tZe,rZe,iZe,nZe=r(()=>{$Ke(),FKe(),QKe(),JKe(),tZe={parser:PKe,db:MKe,renderer:HKe,styles:ZKe}}),aZe=r(()=>{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],c=[1,18],h=[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],h={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]),c=i.generateId();this.$={id:c,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);var c=i.edgeStrToEdgeData(a[o-1].edgeTypeStr),l=i.edgeStrToEdgeStartData(a[o-1].edgeTypeStr),h=i.edgeStrToThickness(a[o-1].edgeTypeStr),u=i.edgeStrToPattern(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",thickness:h,pattern:u,directions:a[o].directions,arrowTypeEnd:c,arrowTypeStart:l},{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]),h=i.generateId(),this.$={id:h,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:c},{8:[1,20]},t(h,[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:c}),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:c},{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(h,[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:c},{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="",c=0,h=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 b,x,T,k,w,C,S,E={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===b||"u"<typeof b)&&(b=v()),o[T]&&o[T][b]))||!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 "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,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: "+b);switch(k[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],E.$=a[a.length-C],E._$={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&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return S;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(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);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}}};h.lexer=r,mt(e,"Parser"),(rZe=new((e.prototype=h).Parser=e)).parser=rZe,iZe=rZe});function sZe(e){switch(P.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return P.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 oZe(e){return"=="!==(P.debug("typeStr2Type",e),e)?"normal":"thick"}function lZe(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function cZe(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}function hZe(e){return e.includes("==")?"thick":"normal"}function uZe(e){return e.includes(".-")?"dotted":"solid"}var dZe,pZe,gZe,fZe,mZe,yZe,vZe,bZe,xZe,TZe,kZe,wZe,CZe,SZe,EZe,_Ze,AZe,RZe,LZe,IZe,NZe,DZe,MZe,OZe,PZe,BZe,$Ze,FZe,zZe,qZe,jZe,WZe,UZe,GZe,VZe,YZe,HZe,XZe,KZe,ZZe,QZe,JZe,eQe,tQe=r(()=>{Kw(),wi(),Uu(),e(),th(),Wu(),dZe=new Map,pZe=[],gZe=new Map,fZe=B(),mZe=new Map,yZe="",vZe=mt(e=>I.sanitizeText(e,fZe),"sanitizeText"),bZe=mt(function(e,t=""){let r=mZe.get(e);r||(r={id:e,styles:[],textStyles:[]},mZe.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"),xZe=mt(function(e,t=""){e=dZe.get(e),null!=t&&(e.styles=t.split(","))},"addStyle2Node"),TZe=mt(function(e,r){e.split(",").forEach(function(e){let t=dZe.get(e);void 0===t&&(e=e.trim(),t={id:e,type:"na",children:[]},dZe.set(e,t)),t.classes||(t.classes=[]),t.classes.push(r)})},"setCssClass"),kZe=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&&P.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width `+n),r.label&&(r.label=vZe(r.label)),"classDef"===r.type)bZe(r.id,r.css);else if("applyClass"===r.type)TZe(r.id,r?.styleClass??"");else if("applyStyles"===r.type)r?.stylesStr&&xZe(r.id,r?.stylesStr);else if("column-setting"===r.type)t.columns=r.columns??-1;else if("edge"===r.type){var a=(gZe.get(r.id)??0)+1;gZe.set(r.id,a),r.id=a+"-"+r.id,pZe.push(r)}else if(r.label||("composite"===r.type?r.label="":r.label=r.id),void 0===(a=dZe.get(r.id))?dZe.set(r.id,r):("na"!==r.type&&(a.type=r.type),r.label!==r.id&&(a.label=r.label)),r.children&&kZe(r.children,r),"space"===r.type){var s=r.width??1;for(let e=0;e<s;e++){var o=Nw(r);o.id=o.id+"-"+e,dZe.set(o.id,o),i.push(o)}}else void 0===a&&i.push(r);t.children=i},"populateBlockDatabase"),wZe=[],CZe={id:"root",type:"composite",children:[],columns:-1},SZe=mt(()=>{P.debug("Clear called"),Ph(),CZe={id:"root",type:"composite",children:[],columns:-1},dZe=new Map([["root",CZe]]),wZe=[],mZe=new Map,pZe=[],gZe=new Map,yZe=""},"clear"),mt(sZe,"typeStr2Type"),mt(oZe,"edgeTypeStr2Type"),mt(lZe,"edgeStrToEdgeData"),mt(cZe,"edgeStrToEdgeStartData"),mt(hZe,"edgeStrToThickness"),mt(uZe,"edgeStrToPattern"),EZe=0,_Ze=mt(()=>(EZe++,"id-"+Math.random().toString(36).substr(2,12)+"-"+EZe),"generateId"),AZe=mt(e=>{CZe.children=e,kZe(e,CZe),wZe=CZe.children},"setHierarchy"),RZe=mt(e=>(e=dZe.get(e))?e.columns||(e.children?e.children.length:-1):-1,"getColumns"),LZe=mt(()=>[...dZe.values()],"getBlocksFlat"),IZe=mt(()=>wZe||[],"getBlocks"),NZe=mt(()=>pZe,"getEdges"),DZe=mt(e=>dZe.get(e),"getBlock"),MZe=mt(e=>{dZe.set(e.id,e)},"setBlock"),OZe=mt(e=>{yZe=e},"setDiagramId"),PZe=mt(()=>yZe,"getDiagramId"),$Ze=mt(()=>P,"getLogger"),BZe=mt(function(){return mZe},"getClasses"),$Ze={getConfig:mt(()=>vr().block,"getConfig"),typeStr2Type:sZe,edgeTypeStr2Type:oZe,edgeStrToEdgeData:lZe,edgeStrToEdgeStartData:cZe,edgeStrToThickness:hZe,edgeStrToPattern:uZe,getLogger:$Ze,getBlocksFlat:LZe,getBlocks:IZe,getEdges:NZe,setHierarchy:AZe,getBlock:DZe,setBlock:MZe,getColumns:RZe,getClasses:BZe,clear:SZe,generateId:_Ze,setDiagramId:OZe,getDiagramId:PZe},FZe=$Ze}),rQe=r(()=>{ai(),nde(),zZe=mt((e,t)=>{var r=(n=ot)(e,"r"),i=n(e,"g"),n=n(e,"b");return at(r,i,n,t)},"fade"),qZe=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: ${zZe(e.mainBkg,.5)};
|
||
fill: ${zZe(e.clusterBkg,.5)};
|
||
stroke: ${zZe(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};
|
||
}
|
||
${Hue()}
|
||
`,"getStyles"),jZe=qZe}),iQe=r(()=>{e(),WZe=mt((t,e,r,i)=>{e.forEach(e=>{JZe[e](t,r,i)})},"insertMarkers"),UZe=mt((e,t,r)=>{P.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"),VZe=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"),YZe=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"),HZe=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"),XZe=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"),KZe=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"),ZZe=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"),QZe=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"),JZe={extension:UZe,composition:GZe,aggregation:VZe,dependency:YZe,lollipop:HZe,point:XZe,circle:KZe,cross:ZZe,barb:QZe},eQe=WZe});function nQe(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 aQe(s,o,l=0,c=0){if(P.debug("setBlockSizes abc95 (start)",s.id,s?.size?.x,"block width =",s?.size,"siblingWidth",l),s?.size?.width||(s.size={width:l,height:c,x:0,y:0}),0<s.children?.length){for(var h of s.children)aQe(h,o);var u,d,p,g,f=hQe(s),m=f.width;P.debug("setBlockSizes abc95 maxWidth of",s.id,":s children is ",m,u=f.height);for(d of s.children)d.size&&(P.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)+cQe*((d.widthInColumns??1)-1),d.size.height=u,d.size.x=0,d.size.y=0,P.debug(`abc95 updating size of ${s.id} children child:${d.id} maxWidth:${m} maxHeight:`+u));for(p of s.children)aQe(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+cQe)+cQe,a=i*(u+cQe)+cQe;if(n<l){P.debug(`Detected to small sibling: abc95 ${s.id} siblingWidth ${l} siblingHeight ${c} width `+n),n=l,a=c;var y,v=(l-r*cQe-cQe)/r,b=(c-i*cQe-cQe)/i;P.debug("Size indata abc88",s.id,"childWidth",v,"maxWidth",m),P.debug("Size indata abc88",s.id,"childHeight",b,"maxHeight",u),P.debug("Size indata abc88 xSize",r,"padding",cQe);for(y of s.children)y.size&&(y.size.width=v,y.size.height=b,y.size.x=0,y.size.y=0)}if(P.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 x,T=(n-f*cQe-cQe)/f;P.debug("abc95 (growing to fit) width",s.id,n,s.size?.width,T);for(x of s.children)x.size&&(x.size.width=T)}s.size={width:n,height:a,x:0,y:0}}P.debug("setBlockSizes abc94 (done)",s.id,s?.size?.x,s?.size?.width,s?.size?.y,s?.size?.height)}function sQe(n,a){P.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(P.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)*cQe,o=(P.debug("widthOfChildren 88",e,"posX"),new Map);{let t=0;for(var l of n.children)if(l.size){var c=nQe(s,t).py,h=o.get(c)??0;l.size.height>h&&o.set(c,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)+cQe}let t=0,r=(P.debug("abc91 block?.size?.x",n.id,n?.size?.x),n?.size?.x?n?.size?.x+(-n?.size?.width/2||0):-cQe),i=0;for(u of n.children){var g=n;if(u.size){var f,{width:m,height:y}=u.size,{px:v,py:b}=nQe(s,t);b!=i&&(i=b,r=n?.size?.x?n?.size?.x+(-n?.size?.width/2||0):-cQe,P.debug("New row in layout for block",n.id," and child ",u.id,i)),P.debug(`abc89 layout blocks (child) id: ${u.id} Pos: ${t} (px, py) ${v},${b} (${g?.size?.x},${g?.size?.y}) parent: ${g.id} width: `+m+cQe),g.size&&(v=m/2,u.size.x=r+cQe+v,P.debug(`abc91 layout blocks (calc) px, pyid:${u.id} startingPos=X${r} new startingPosX${u.size.x} ${v} padding=${cQe} 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(b)??0,b=o.get(b)??y,u.size.y=g.size.y-g.size.height/2+f+b/2+cQe,P.debug(`abc88 layout blocks (calc) px, pyid:${u.id}startingPosX${r}${cQe}${v}=>x:${u.size.x}y:${u.size.y}${u.widthInColumns}(width * (child?.w || 1)) / 2`+m*(u?.widthInColumns??1)/2)),u.children&&sQe(u,a);let e=u?.widthInColumns??1;0<s&&(e=Math.min(e,s-t%s)),t+=e,P.debug("abc88 columnsPos",u,t)}}}P.debug(`layout blocks (<==layoutBlocks) ${n.id} x: ${n?.size?.x} y: ${n?.size?.y} width: `+n?.size?.width)}function oQe(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 c of e.children)({minX:t,minY:r,maxX:i,maxY:n}=oQe(c,{minX:t,minY:r,maxX:i,maxY:n}));return{minX:t,minY:r,maxX:i,maxY:n}}function lQe(e){var t,r,i=e.getBlock("root");if(i)return aQe(i,e,0,0),sQe(i,e),P.debug("getBlocks",JSON.stringify(i,null,2)),{minX:e,minY:i,maxX:t,maxY:r}=oQe(i),{x:e,y:i,width:t-e,height:r-i}}var cQe,hQe,uQe,dQe,pQe,gQe,fQe,mQe=r(()=>{e(),Uu(),cQe=B()?.block?.padding??8,mt(nQe,"calculateBlockPosition"),hQe=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};P.debug("getMaxChildSize abc95 child:",i.id,"width:",n,"height:",a,"x:",s,"y:",o,i.type),"space"!==i.type&&((s=n/(i.widthInColumns??1))>t&&(t=s),a>r)&&(r=a)}return{width:t,height:r}},"getMaxChildSize"),mt(aQe,"setBlockSizes"),mt(sQe,"layoutBlocks"),mt(oQe,"findBounds"),mt(lQe,"layout")}),yQe=r(()=>{wi(),Uu(),F7(),uQe=mt(async(e,t,r,i=!1,n=!1)=>{let a=t||"";"object"==typeof a&&(a=a[0]);var t=B(),s=_r(t);return $7(e,a,{style:r,isTitle:i,useHtmlLabels:s,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},t)},"createLabel"),dQe=uQe}),vQe=r(()=>{e(),pQe=mt((e,t,r,i,n)=>{t.arrowTypeStart&&fQe(e,"start",t.arrowTypeStart,r,i,n),t.arrowTypeEnd&&fQe(e,"end",t.arrowTypeEnd,r,i,n)},"addEdgeMarkers"),gQe={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},fQe=mt((e,t,r,i,n,a)=>{var s=gQe[r];s?e.attr("marker-"+t,`url(${i}#${n}_${a}-${s}${"start"===t?"Start":"End"})`):P.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function bQe(e,t){_r(B())&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}var xQe,TQe,kQe,wQe,CQe,SQe,EQe,_Qe,AQe,RQe,LQe=r(()=>{e(),yQe(),F7(),vI(),bk(),Uu(),wi(),zC(),th(),AI(),mI(),vQe(),xQe={},TQe={},kQe=mt(async(t,r)=>{var i=B(),n=_r(i),a=t.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label"),e="markdown"===r.labelType,e=await $7(t,r.label,{style:r.labelStyle,useHtmlLabels:n,addSvgBackground:e,isNode:!1,markdown:e,width:e?void 0:Number.POSITIVE_INFINITY},i);s.node().appendChild(e);let o=e.getBBox(),l=o;n?(i=e.children[0],h=Q(e),o=i.getBoundingClientRect(),l=o,h.attr("width",o.width),h.attr("height",o.height)):(i=Q(e).select("text").node())&&"function"==typeof i.getBBox&&(l=i.getBBox()),s.attr("transform",dI(l,n)),xQe[r.id]=a,r.width=o.width,r.height=o.height;let c;if(r.startLabelLeft){var h=t.insert("g").attr("class","edgeTerminals"),i=h.insert("g").attr("class","inner"),s=await dQe(i,r.startLabelLeft,r.labelStyle);let e=(c=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",dI(e,n)),TQe[r.id]||(TQe[r.id]={}),TQe[r.id].startLeft=h,bQe(c,r.startLabelLeft)}if(r.startLabelRight){s=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),i=await dQe(s,r.startLabelRight,r.labelStyle);let e=(c=i).getBBox();n&&(h=i.children[0],i=Q(i),e=h.getBoundingClientRect(),i.attr("width",e.width),i.attr("height",e.height)),s.attr("transform",dI(e,n)),TQe[r.id]||(TQe[r.id]={}),TQe[r.id].startRight=a,bQe(c,r.startLabelRight)}if(r.endLabelLeft){i=(h=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),s=await dQe(h,r.endLabelLeft,r.labelStyle);let e=(c=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",dI(e,n)),TQe[r.id]||(TQe[r.id]={}),TQe[r.id].endLeft=h,bQe(c,r.endLabelLeft)}if(r.endLabelRight){s=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),i=await dQe(a,r.endLabelRight,r.labelStyle);let e=(c=i).getBBox();n&&(h=i.children[0],t=Q(i),e=h.getBoundingClientRect(),t.attr("width",e.width),t.attr("height",e.height)),s.attr("transform",dI(e,n)),TQe[r.id]||(TQe[r.id]={}),TQe[r.id].endRight=a,bQe(c,r.endLabelRight)}return e},"insertEdgeLabel"),mt(bQe,"setTerminalWidth"),wQe=mt((i,n)=>{P.debug("Moving label abc88 ",i.id,i.label,xQe[i.id],n);var a,s=n.updatedPath||n.originalPath,o=B(),o=rI(o).subGraphTitleTotalMargin;if(i.label){let e=xQe[i.id],t=i.x,r=i.y;s&&(a=PC.calcLabelPosition(s),P.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=TQe[i.id].startLeft,t=i.x,r=i.y;s&&(n=PC.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=TQe[i.id].startRight,t=i.x,r=i.y;s&&(a=PC.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=TQe[i.id].endLeft,t=i.x,r=i.y;s&&(o=PC.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=TQe[i.id].endRight,t=i.x,r=i.y;s&&(n=PC.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_right",s),t=n.x,r=n.y),e.attr("transform",`translate(${t}, ${r})`)}},"positionEdgeLabel"),CQe=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"),SQe=mt((e,i,n)=>{P.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,c=Math.abs(i.y-n.y),h=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=h*e/c,u={x:n.x<i.x?n.x+o:n.x-h+o,y:n.y<i.y?n.y+c-e:n.y-c+e},0===o&&(u.x=i.x,u.y=i.y),0===h&&(u.x=i.x),0===c&&(u.y=i.y),P.debug(`abc89 topp/bott calc, Q ${c}, q ${e}, R ${h}, r `+o,u),u;{let e=c*(o=n.x<i.x?i.x-s-a:a-s-i.x)/h,t=n.x<i.x?n.x+h-o:n.x-h+o,r=n.y<i.y?n.y+e:n.y-e;return P.debug(`sides calc abc89, Q ${c}, q ${e}, R ${h}, r `+o,{_x:t,_y:r}),0===o&&(t=i.x,r=i.y),0===h&&(t=i.x),0===c&&(r=i.y),{x:t,y:r}}},"intersection"),EQe=mt((e,i)=>{P.debug("abc88 cutPathAtIntersect",e,i);let n=[],a=e[0],s=!1;return e.forEach(e=>{if(CQe(i,e)||s)a=e,s||n.push(e);else{let t=SQe(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"),_Qe=mt(function(e,t,r,i,n,a,s){let o=r.points,l=(P.debug("abc88 InsertEdge: edge=",r,"e=",t),!1),c=a.node(t.v),h=a.node(t.w),u=(h?.intersect&&c?.intersect&&((o=o.slice(1,r.points.length-1)).unshift(c.intersect(o[0])),o.push(h.intersect(o[o.length-1]))),r.toCluster&&(P.debug("to cluster abc88",i[r.toCluster]),o=EQe(r.points,i[r.toCluster].node),l=!0),r.fromCluster&&(P.debug("from cluster abc88",i[r.fromCluster]),o=EQe(o.reverse(),i[r.fromCluster].node).reverse(),l=!0),o.filter(e=>!Number.isNaN(e.y))),d=F5,{x:p,y:g}=(!r.curve||"graph"!==n&&"flowchart"!==n||(d=r.curve),wI(r)),f=w5().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(B().flowchart.arrowMarkerAbsolute||B().state.arrowMarkerAbsolute)&&(v=Oc(!0)),pQe(y,r,v,s,n),a={},l&&(a.updatedPath=o),a.originalPath=r.points,a},"insertEdge")}),IQe=r(()=>{AQe=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"),RQe=mt((e,t,r,i)=>{var e=AQe(e),n=t.height+2*r.padding,a=n/2,i=i??t.width+2*a+r.padding,t=r.padding/2;return e.has("right")&&e.has("left")&&e.has("up")&&e.has("down")?[{x:0,y:0},{x:a,y:0},{x:i/2,y:2*t},{x:i-a,y:0},{x:i,y:0},{x:i,y:-n/3},{x:i+2*t,y:-n/2},{x:i,y:-2*n/3},{x:i,y:-n},{x:i-a,y:-n},{x:i/2,y:-n-2*t},{x:a,y:-n},{x:0,y:-n},{x:0,y:-2*n/3},{x:-2*t,y:-n/2},{x:0,y:-n/3}]:e.has("right")&&e.has("left")&&e.has("up")?[{x:a,y:0},{x:i-a,y:0},{x:i,y:-n/2},{x:i-a,y:-n},{x:a,y:-n},{x:0,y:-n/2}]:e.has("right")&&e.has("left")&&e.has("down")?[{x:0,y:0},{x:a,y:-n},{x:i-a,y:-n},{x:i,y:0}]:e.has("right")&&e.has("up")&&e.has("down")?[{x:0,y:0},{x:i,y:-a},{x:i,y:a-n},{x:0,y:-n}]:e.has("left")&&e.has("up")&&e.has("down")?[{x:i,y:0},{x:0,y:-a},{x:0,y:a-n},{x:i,y:-n}]:e.has("right")&&e.has("left")?[{x:a,y:0},{x:a,y:-t},{x:i-a,y:-t},{x:i-a,y:0},{x:i,y:-n/2},{x:i-a,y:-n},{x:i-a,y:t-n},{x:a,y:t-n},{x:a,y:-n},{x:0,y:-n/2}]:e.has("up")&&e.has("down")?[{x:i/2,y:0},{x:0,y:-t},{x:a,y:-t},{x:a,y:t-n},{x:0,y:t-n},{x:i/2,y:-n},{x:i,y:t-n},{x:i-a,y:t-n},{x:i-a,y:-t},{x:i,y:-t}]:e.has("right")&&e.has("up")?[{x:0,y:0},{x:i,y:-a},{x:0,y:-n}]:e.has("right")&&e.has("down")?[{x:0,y:0},{x:i,y:0},{x:0,y:-n}]:e.has("left")&&e.has("up")?[{x:i,y:0},{x:0,y:-a},{x:i,y:-n}]:e.has("left")&&e.has("down")?[{x:i,y:0},{x:0,y:0},{x:i,y:-n}]:e.has("right")?[{x:a,y:-t},{x:a,y:-t},{x:i-a,y:-t},{x:i-a,y:0},{x:i,y:-n/2},{x:i-a,y:-n},{x:i-a,y:t-n},{x:a,y:t-n},{x:a,y:t-n}]:e.has("left")?[{x:a,y:0},{x:a,y:-t},{x:i-a,y:-t},{x:i-a,y:t-n},{x:a,y:t-n},{x:a,y:-n},{x:0,y:-n/2}]:e.has("up")?[{x:a,y:-t},{x:a,y:t-n},{x:0,y:t-n},{x:i/2,y:-n},{x:i,y:t-n},{x:i-a,y:t-n},{x:i-a,y:-t}]:e.has("down")?[{x:i/2,y:0},{x:0,y:-t},{x:a,y:-t},{x:a,y:t-n},{x:i-a,y:t-n},{x:i-a,y:-t},{x:i,y:-t}]:[{x:0,y:0}]},"getArrowPoints")});function NQe(e,t){return e.intersect(t)}var DQe,MQe=r(()=>{mt(NQe,"intersectNode"),DQe=NQe});function OQe(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 PQe,BQe=r(()=>{mt(OQe,"intersectEllipse"),PQe=OQe});function $Qe(e,t,r){return PQe(e,t,t,r)}var FQe,zQe=r(()=>{BQe(),mt($Qe,"intersectCircle"),FQe=$Qe});function qQe(e,t,r,i){var n,a,s,o,l=t.y-e.y,c=e.x-t.x,h=t.x*e.y-e.x*t.y,u=l*r.x+c*r.y+h,d=l*i.x+c*i.y+h;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*c)))return e=Math.abs(o/2),{x:(r=c*s-a*h)<0?(r-e)/o:(r+e)/o,y:(r=n*h-l*s)<0?(r-e)/o:(r+e)/o}}function jQe(e,t){return 0<e*t}var WQe,UQe=r(()=>{mt(qQe,"intersectLine"),mt(jQe,"sameSign"),WQe=qQe});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,c=n-e.height/2-o,h=0;h<t.length;h++){var u=t[h],d=t[h<t.length-1?h+1:0];(u=WQe(e,i,{x:l+u.x,y:c+u.y},{x:l+d.x,y:c+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 VQe,YQe,HQe,XQe,KQe=r(()=>{UQe(),mt(VQe=GQe,"intersectPolygon")}),ZQe=r(()=>{YQe=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"),HQe=YQe}),QQe=r(()=>{MQe(),zQe(),BQe(),KQe(),ZQe(),XQe={node:DQe,circle:FQe,ellipse:PQe,polygon:VQe,rect:HQe}});function JQe(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 eJe,tJe,rJe,iJe,nJe=r(()=>{yQe(),F7(),Uu(),wi(),bk(),th(),zC(),q7(),eJe=mt(async(e,t,r,i)=>{var n=B(),a=t.useHtmlLabels||_r(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 c,h=(c="markdown"===t.labelType?$7(o,Rc($C(l),n),{useHtmlLabels:a,width:t.width||n.flowchart.wrappingWidth,classes:"markdown-node-label"},n):await dQe(o,Rc($C(l),n),t.labelStyle,!1,i)).getBBox(),u=t.padding/2;return _r(n)&&(r=c.children[0],e=Q(c),await z7(r,l),h=r.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)),a?o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):o.attr("transform","translate(0, "+-h.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:s,bbox:h,halfPadding:u,label:o}},"labelHelper"),tJe=mt((e,t)=>{t=t.node().getBBox(),e.width=t.width,e.height=t.height},"updateNodeBounds"),mt(JQe,"insertPolygonShape")}),aJe=r(()=>{nJe(),e(),Uu(),wi(),QQe(),rJe=mt(async(e,t)=>{t.useHtmlLabels||_r(B())||(t.centerLabel=!0);var{shapeSvg:e,bbox:r,halfPadding:i}=await eJe(e,t,"node "+t.classes,!0),n=(P.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),tJe(t,n),t.intersect=function(e){return XQe.rect(t,e)},e},"note"),iJe=rJe});function sJe(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")?(P.debug("add top border"),a):s)(r),(t.includes("r")?(P.debug("add right border"),a):s)(i),(t.includes("b")?(P.debug("add bottom border"),a):s)(r),(t.includes("l")?(P.debug("add left border"),a):s)(i),e.attr("stroke-dasharray",n.join(" "))}var oJe,lJe,cJe,hJe,uJe,dJe,pJe,gJe,fJe,mJe,yJe,vJe,bJe,xJe,TJe,kJe,wJe,CJe,SJe,EJe,_Je,AJe,RJe,LJe,IJe,NJe,DJe,MJe,OJe,PJe=r(()=>{bk(),Uu(),wi(),e(),IQe(),yQe(),QQe(),aJe(),nJe(),oJe=mt(e=>e?" "+e:"","formatClass"),lJe=mt((e,t)=>`${t||"node default"}${oJe(e.classes)} `+oJe(e.class),"getClassesFromNode"),cJe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await eJe(e,t,lJe(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 P.info("Question main (Circle)"),(e=JQe(r,s,s,o)).attr("style",t.style),tJe(t,e),t.intersect=function(e){return P.warn("Intersect called"),XQe.polygon(t,o,e)},r},"question"),hJe=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 XQe.circle(t,14,e)},e),"choice"),uJe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await eJe(e,t,lJe(t,void 0),!0),n=t.positioned?t.height:i.height+t.padding,a=n/4,s=t.positioned?t.width: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=JQe(r,s,n,o);return l.attr("style",t.style),tJe(t,l),t.intersect=function(e){return XQe.polygon(t,o,e)},r},"hexagon"),dJe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await eJe(e,t,void 0,!0),n=i.height+2*t.padding,a=n/2,s=i.width+2*a+t.padding,o=t.positioned&&1<(t.widthInColumns??1)&&t.width>s?t.width:s,l=RQe(t.directions,i,t,o),c=JQe(r,o,n,l);return c.attr("style",t.style),tJe(t,c),t.intersect=function(e){return XQe.polygon(t,l,e)},r},"block_arrow"),pJe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await eJe(e,t,lJe(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 JQe(r,n,a,s).attr("style",t.style),t.width=n+a,t.height=a,t.intersect=function(e){return XQe.polygon(t,s,e)},r},"rect_left_inv_arrow"),gJe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await eJe(e,t,lJe(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=JQe(r,n,a,s);return o.attr("style",t.style),tJe(t,o),t.intersect=function(e){return XQe.polygon(t,s,e)},r},"lean_right"),fJe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await eJe(e,t,lJe(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=JQe(r,n,a,s);return o.attr("style",t.style),tJe(t,o),t.intersect=function(e){return XQe.polygon(t,s,e)},r},"lean_left"),mJe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await eJe(e,t,lJe(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=JQe(r,n,a,s);return o.attr("style",t.style),tJe(t,o),t.intersect=function(e){return XQe.polygon(t,s,e)},r},"trapezoid"),yJe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await eJe(e,t,lJe(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=JQe(r,n,a,s);return o.attr("style",t.style),tJe(t,o),t.intersect=function(e){return XQe.polygon(t,s,e)},r},"inv_trapezoid"),vJe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await eJe(e,t,lJe(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=JQe(r,n,a,s);return o.attr("style",t.style),tJe(t,o),t.intersect=function(e){return XQe.polygon(t,s,e)},r},"rect_right_inv_arrow"),bJe=mt(async(e,n)=>{let{shapeSvg:t,bbox:r}=await eJe(e,n,lJe(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,c=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 tJe(n,c),n.intersect=function(t){var r=XQe.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"),xJe=mt(async(e,t)=>{var{shapeSvg:e,bbox:r,halfPadding:i}=await eJe(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&&(sJe(n,t.props.borders,a,s),i.delete("borders")),i.forEach(e=>{P.warn("Unknown node property "+e)})),tJe(t,n),t.intersect=function(e){return XQe.rect(t,e)},e},"rect"),TJe=mt(async(e,t)=>{var{shapeSvg:e,bbox:r,halfPadding:i}=await eJe(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&&(sJe(n,t.props.borders,a,s),i.delete("borders")),i.forEach(e=>{P.warn("Unknown node property "+e)})),tJe(t,n),t.intersect=function(e){return XQe.rect(t,e)},e},"composite"),kJe=mt(async(e,t)=>{var r,e=(await eJe(e,t,"label",!0)).shapeSvg,i=(P.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&&(sJe(i,t.props.borders,0,0),r.delete("borders")),r.forEach(e=>{P.warn("Unknown node property "+e)})),tJe(t,i),t.intersect=function(e){return XQe.rect(t,e)},e},"labelRect"),mt(sJe,"applyNodePropertyBorders"),wJe=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,c=(l="object"==typeof o?o[0]:o,P.info("Label text abc79",l,o,"object"==typeof o),await dQe(s,l,t.labelStyle,!0,!0)),h={width:0,height:0};_r(B())&&(e=c.children[0],d=Q(c),h=e.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)),P.info("Text 2",o);var u,e=o.slice(1,o.length),d=c.getBBox(),e=await dQe(s,e.join?e.join("<br/>"):e,t.labelStyle,!0,!0),p=(_r(B())&&(p=e.children[0],u=Q(e),h=p.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)),t.padding/2);return Q(e).attr("transform","translate( "+(h.width>d.width?0:(d.width-h.width)/2)+", "+(d.height+p+5)+")"),Q(c).attr("transform","translate( "+(h.width<d.width?0:-(d.width-h.width)/2)+", 0)"),h=s.node().getBBox(),s.attr("transform","translate("+-h.width/2+", "+(-h.height/2-p+3)+")"),n.attr("class","outer title-state").attr("x",-h.width/2-p).attr("y",-h.height/2-p).attr("width",h.width+t.padding).attr("height",h.height+t.padding),a.attr("class","divider").attr("x1",-h.width/2-p).attr("x2",h.width/2+p).attr("y1",-h.height/2-p+d.height+p).attr("y2",-h.height/2-p+d.height+p),tJe(t,n),t.intersect=function(e){return XQe.rect(t,e)},i},"rectWithTitle"),CJe=mt(async(e,t)=>{var{shapeSvg:e,bbox:r}=await eJe(e,t,lJe(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 tJe(t,r),t.intersect=function(e){return XQe.rect(t,e)},e},"stadium"),SJe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await eJe(e,t,lJe(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),P.info("Circle main"),tJe(t,a),t.intersect=function(e){return P.info("Circle intersect",t,i.width/2+n,e),XQe.circle(t,i.width/2+n,e)},r},"circle"),EJe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await eJe(e,t,lJe(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),P.info("DoubleCircle main"),tJe(t,s),t.intersect=function(e){return P.info("DoubleCircle intersect",t,i.width/2+n+5,e),XQe.circle(t,i.width/2+n+5,e)},r},"doublecircle"),_Je=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await eJe(e,t,lJe(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=JQe(r,n,a,s);return o.attr("style",t.style),tJe(t,o),t.intersect=function(e){return XQe.polygon(t,s,e)},r},"subroutine"),AJe=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),tJe(t,r),t.intersect=function(e){return XQe.circle(t,7,e)},e},"start"),RJe=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"),tJe(t,e),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(e){return XQe.rect(t,e)},i},"forkJoin"),LJe=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),tJe(t,i),t.intersect=function(e){return XQe.circle(t,7,e)},e},"end"),IJe=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,c=4,h=i.insert("g").attr("class","label"),u=0,d=s.classData.annotations?.[0],p=s.classData.annotations[0]?"«"+s.classData.annotations[0]+"»":"",g=await dQe(h,p,s.labelStyle,!0,!0),f=g.getBBox(),m=(_r(B())&&(e=g.children[0],y=Q(g),f=e.getBoundingClientRect(),y.attr("width",f.width),y.attr("height",f.height)),s.classData.annotations[0]&&(c+=f.height+4,l+=f.width),s.classData.label);var y;void 0!==s.classData.type&&""!==s.classData.type&&(_r(B())?m+="<"+s.classData.type+">":m+="<"+s.classData.type+">"),Q(e=await dQe(h,m,s.labelStyle,!0,!0)).attr("class","classTitle");let v=e.getBBox(),b=(_r(B())&&(y=e.children[0],T=Q(e),v=y.getBoundingClientRect(),T.attr("width",v.width),T.attr("height",v.height)),c+=v.height+4,v.width>l&&(l=v.width),[]),x=(s.classData.members.forEach(async e=>{let t=e.getDisplayDetails(),r=t.displayText,i=(_r(B())&&(r=r.replace(/</g,"<").replace(/>/g,">")),await dQe(h,r,t.cssStyle||s.labelStyle,!0,!0)),n=i.getBBox(),a;_r(B())&&(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),c+=n.height+4,b.push(i)}),c+=8,[]);s.classData.methods.forEach(async e=>{let t=e.getDisplayDetails(),r=t.displayText,i=(_r(B())&&(r=r.replace(/</g,"<").replace(/>/g,">")),await dQe(h,r,t.cssStyle||s.labelStyle,!0,!0)),n=i.getBBox(),a;_r(B())&&(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),c+=n.height+4,x.push(i)}),c+=8,d&&(y=(l-f.width)/2,Q(g).attr("transform","translate( "+(-1*l/2+y)+", "+-1*c/2+")"),u=f.height+4);var T=(l-v.width)/2;return Q(e).attr("transform","translate( "+(-1*l/2+T)+", "+(-1*c/2+u)+")"),u+=v.height+4,a.attr("class","divider").attr("x1",-l/2-t).attr("x2",l/2+t).attr("y1",-c/2-t+8+u).attr("y2",-c/2-t+8+u),u+=8,b.forEach(e=>{Q(e).attr("transform","translate( "+-l/2+", "+(-1*c/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",-c/2-t+8+u).attr("y2",-c/2-t+8+u),u+=8,x.forEach(e=>{Q(e).attr("transform","translate( "+-l/2+", "+(-1*c/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",-c/2-t).attr("width",l+s.padding).attr("height",c+s.padding),tJe(s,n),s.intersect=function(e){return XQe.rect(s,e)},i},"class_box"),NJe={rhombus:cJe,composite:TJe,question:cJe,rect:xJe,labelRect:kJe,rectWithTitle:wJe,choice:hJe,circle:SJe,doublecircle:EJe,stadium:CJe,hexagon:uJe,block_arrow:dJe,rect_left_inv_arrow:pJe,lean_right:gJe,lean_left:fJe,trapezoid:mJe,inv_trapezoid:yJe,rect_right_inv_arrow:vJe,cylinder:bJe,start:AJe,end:LJe,note:iJe,subroutine:_Je,fork:RJe,join:RJe,class_box:IJe},DJe={},MJe=mt(async(t,r,i)=>{let n,a;if(r.link){let e;"sandbox"===B().securityLevel?e="_top":r.linkTarget&&(e=r.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",r.link).attr("target",e),a=await NJe[r.shape](n,r,i)}else a=await NJe[r.shape](t,r,i),n=a;return r.tooltip&&a.attr("title",r.tooltip),r.class&&a.attr("class","node default "+r.class),DJe[r.id]=n,r.haveCallback&&DJe[r.id].attr("class",DJe[r.id].attr("class")+" clickable"),n},"insertNode"),OJe=mt(e=>{var t=DJe[e.id],r=(P.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 BJe(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=iC(i?.styles??[]),l=i.label,c=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:c.width,height:c.height,x:c.x,y:c.y,positioned:r,intersect:void 0,type:i.type,padding:o??vr()?.block?.padding??0,widthInColumns:i.widthInColumns??1}}async function $Je(e,t,r){var i;"group"!==(t=BJe(t,r,!1)).type&&(i=vr(),i=(e=await MJe(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 FJe(e,t,r){var i=BJe(t,r,!0);"space"!==r.getBlock(i.id).type&&(r=vr(),await MJe(e,i,{config:r}),t.intersect=i?.intersect,OJe(i))}async function zJe(e,t,r,i){for(var n of t)await i(e,n,r),n.children&&await zJe(e,n.children,r,i)}async function qJe(e,t,r){await zJe(e,t,r,$Je)}async function jJe(e,t,r){await zJe(e,t,r,FJe)}async function WJe(e,t,r,i,n){var a,s,o,l,c,h=new nH({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,c=("thick"===s.thickness?"edge-thickness-thick":"edge-thickness-normal")+` ${"dotted"===s.pattern?"edge-pattern-dotted":"edge-pattern-solid"} flowchart-link LS-a1 LE-b1`,_Qe(e,{v:s.start,w:s.end,name:l},{...s,id:l,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:o,classes:c},void 0,"block",h,n),s.label)&&(await kQe(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:o,classes:c}),wQe({...s,x:o[1].x,y:o[1].y},{originalPath:o}))}var UJe,GJe,VJe,YJe=r(()=>{sH(),wi(),LQe(),PJe(),zC(),mt(BJe,"getNodeFromBlock"),mt($Je,"calculateBlockSize"),mt(FJe,"insertBlockPositioned"),mt(zJe,"performOperations"),mt(qJe,"calculateBlockSizes"),mt(jJe,"insertBlocks"),mt(WJe,"insertEdges")}),HJe=r(()=>{bk(),wi(),iQe(),e(),Ch(),mQe(),YJe(),UJe=mt(function(e,t){return t.db.getClasses()},"getClasses"),GJe=mt(async function(e,t,r,i){var{securityLevel:n,block:a}=vr(),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=(eQe(n,["point","circle","cross"],i.type,t),s.getBlocks()),i=s.getBlocksFlat(),c=s.getEdges(),h=n.insert("g").attr("class","block"),u=(await qJe(h,l,s),lQe(s));await jJe(h,l,s),await WJe(h,c,i,s,t),u&&(l=u,h=Math.max(1,Math.round(l.width/l.height*.125)),c=l.height+h+10,i=l.width+10,s=a.useMaxWidth,yh(n,c,i,!!s),P.debug("Here Bounds",u,l),n.attr("viewBox",`${l.x-5} ${l.y-5} ${l.width+10} `+(l.height+10)))},"draw"),VJe={draw:GJe,getClasses:UJe}}),XJe={};Vat(XJe,{diagram:()=>KJe});var KJe,ZJe,QJe,JJe,eet,tet,ret,iet,net,aet,set,oet,cet,het,uet,det,pet,get,fet,met=r(()=>{aZe(),tQe(),rQe(),HJe(),KJe={parser:iZe,db:FZe,renderer:VJe,styles:jZe}}),yet=r(()=>{wi(),Ti(),Wu(),zC(),dOe(),ZJe=new cOe(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",children:[]}]})),QJe=mt(()=>{ZJe.reset(),Ph()},"clear"),JJe=mt(()=>ZJe.records.stack[0],"getRoot"),eet=mt(()=>ZJe.records.cnt,"getCount"),tet=ir.treeView,ret=mt(()=>lC(tet,vr().treeView),"getConfig"),iet=mt((e,t)=>{for(;e<=ZJe.records.stack[ZJe.records.stack.length-1].level;)ZJe.records.stack.pop();t={id:ZJe.records.cnt++,level:e,name:t,children:[]},ZJe.records.stack[ZJe.records.stack.length-1].children.push(t),ZJe.records.stack.push(t)},"addNode"),net={clear:QJe,addNode:iet,getRoot:JJe,getCount:eet,getConfig:ret,getAccTitle:$h,getAccDescription:zh,getDiagramTitle:jh,setAccDescription:Fh,setAccTitle:Bh,setDiagramTitle:qh}}),vet=r(()=>{e(),hOe(),yet(),sOe(),aet=mt(e=>{oOe(e,net),e.nodes.map(e=>net.addNode(e.indent?parseInt(e.indent):0,e.name))},"populate"),set={parse:mt(async e=>{e=await rOe("treeView",e),P.debug(e),aet(e)},"parse")}}),bet=r(()=>{e(),z$e(),Ch(),oet=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"),cet=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"),het=mt((s,e,o)=>{let a=0,l=0,c=mt((e,t,r,i)=>{var i=i*(r.rowIndent+r.paddingX),{height:t,width:n}=(oet(i,a,t,e,r),t.BBox);cet(e,i-r.rowIndent,a+t/2,i,a+t/2,r.lineThickness),l=Math.max(l,i+n),a+=t},"drawNode"),h=mt((e,t=0)=>{c(s,e,o,t),e.children.forEach(e=>{h(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,cet(s,i+o.paddingX,n+a,i+o.paddingX,e+r/2+o.lineThickness/2,o.lineThickness))},"processNode");return h(e),{totalHeight:a,totalWidth:l}},"drawTree"),uet=mt((e,t,r,i)=>{P.debug(`Rendering treeView diagram
|
||
`+e);var i=(e=i.db).getRoot(),e=e.getConfig(),{totalHeight:n,totalWidth:i}=((n=(t=M$e(t)).append("g")).attr("class","tree-view"),het(n,i,e));t.attr("viewBox",`-${e.lineThickness/2} 0 ${i} `+n),yh(t,n,i,e.useMaxWidth)},"draw"),det={draw:uet}}),xet=r(()=>{zC(),pet={labelFontSize:"16px",labelColor:"black",lineColor:"black"},get=mt(({treeView:e})=>{var{labelFontSize:e,labelColor:t,lineColor:r}=lC(pet,e);return`
|
||
.treeView-node-label {
|
||
font-size: ${e};
|
||
fill: ${t};
|
||
}
|
||
.treeView-node-line {
|
||
stroke: ${r};
|
||
}
|
||
`},"styles"),fet=get}),Tet={};Vat(Tet,{diagram:()=>ket});var ket,wet,Cet,Eet,_et,Aet,Ret,Let,Iet,Net,Det,Met,Oet,Pet,Bet,$et,Fet,zet,qet,jet,Wet,Uet,Get,Vet,Yet,Het,Xet,Ket,Zet,Qet,Jet,ett=r(()=>{vet(),yet(),bet(),xet(),ket={db:net,renderer:det,parser:set,styles:fet}}),ttt=r(()=>{wet={L:"left",R:"right",T:"top",B:"bottom"},Cet={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")},Eet={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")},_et=mt(function(e){return Ret(e)?"L"===e?"R":"L":"T"===e?"B":"T"},"getOppositeArchitectureDirection"),Aet=mt(function(e){return"L"===e||"R"===e||"T"===e||"B"===e},"isArchitectureDirection"),Ret=mt(function(e){return"L"===e||"R"===e},"isArchitectureDirectionX"),Let=mt(function(e){return"T"===e||"B"===e},"isArchitectureDirectionY"),Iet=mt(function(e,t){var r=Ret(e)&&Let(t),e=Let(e)&&Ret(t);return r||e},"isArchitectureDirectionXY"),Net=mt(function(e){var t=e[0],e=e[1],r=Ret(t)&&Let(e),t=Let(t)&&Ret(e);return r||t},"isArchitecturePairXY"),Det=mt(function(e){return"LL"!==e&&"RR"!==e&&"TT"!==e&&"BB"!==e},"isValidArchitectureDirectionPair"),Met=mt(function(e,t){return Det(e=""+e+t)?e:void 0},"getArchitectureDirectionPair"),Oet=mt(function([e,t],r){var i=r[0],r=r[1];return Ret(i)?Let(r)?[e+("L"===i?-1:1),t+("T"===r?1:-1)]:[e+("L"===i?-1:1),t]:Ret(r)?[e+("L"===r?1:-1),t+("T"===i?1:-1)]:[e,t+("T"===i?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Pet=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"),Bet=mt(function(e,t){return Iet(e,t)?"bend":Ret(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),$et=mt(function(e){return"service"===e.type},"isArchitectureService"),Fet=mt(function(e){return"junction"===e.type},"isArchitectureJunction"),zet=mt(e=>e.data(),"edgeData"),qet=mt(e=>e.data(),"nodeData")}),rtt=r(()=>{wi(),Ti(),zC(),Wu(),ttt(),jet=ir.architecture,Wet=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Bh,this.getAccTitle=$h,this.setDiagramTitle=qh,this.getDiagramTitle=jh,this.getAccDescription=zh,this.setAccDescription=Fh,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="",Ph()}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($et)}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(Fet)}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(!Aet(r))throw new Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got `+String(r));if(!Aet(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 c=this.nodes[e].in,h=this.nodes[t].in;if(s&&c&&h&&c==h)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&&c&&h&&c==h)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=Bet(t.lhsDir,t.rhsDir))&&(s[i]??={},s[i][n]=r,s[n]??={},s[n][i]=r),t.lhsId===a?(n=Met(t.lhsDir,t.rhsDir))&&(e[n]=t.rhsId):(i=Met(t.rhsDir,t.lhsDir))&&(e[i]=t.lhsId),e},{}),e),{}),r=Object.keys(o)[0],l={[r]:1},c=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 c[t];let e=o[t],[r,i]=n[t];Object.entries(e).forEach(([e,t])=>{l[t]||(n[t]=Oet([r,i],e),a.push(t))})}}return n},"BFS"),t=[e(r)];for(;0<Object.keys(c).length;)t.push(e(Object.keys(c)[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 lC({...jet,...vr().architecture})}getConfigField(e){return this.getConfig()[e]}}}),itt=r(()=>{sOe(),e(),hOe(),rtt(),Uet=mt((e,t)=>{oOe(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"),Get={parser:{yy:void 0},parse:mt(async e=>{var e=await rOe("architecture",e),t=(P.debug(e),Get.parser?.yy);if(!(t instanceof Wet))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.");Uet(e,t)},"parse")}}),ntt=r(()=>{Vet=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"),Yet=Vet}),att=qat((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),c=r(5);function h(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(h,"LNode"),h.prototype=Object.create(n.prototype),n)h[i]=n[i];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(e){this.rect.width=e},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(e){this.rect.height=e},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},h.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},h.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},h.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},h.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},h.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},h.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},h.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},h.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},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==a.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.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)},h.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},h.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))},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.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 c(t,r),r=e.inverseTransformPoint(t);this.setLocation(r.x,r.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},e.exports=h},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),c=r(12),h=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 c(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,c=0;c<l;c++){var h=o[c];e&&null!=h.child&&h.updateBounds(),(t=h.getLeft())<i&&(i=t),n<(t=h.getRight())&&(n=t),(t=h.getTop())<a&&(a=t),s<(t=h.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 h,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 c,h=r(1);function i(e){c=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 c){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 h){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 h=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(),c=e.getRight(),h=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(),b=t.getBottom(),x=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]=b,!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]=c,r[1]=n,r[2]=f,r[3]=s)}else{var e=e.height/e.width,t=t.height/t.width,S=(s-n)/(a-i),E=void 0,_=void 0,A=void 0;if(-e==S?(a<i?(r[0]=h,r[1]=u):(r[0]=c,r[1]=l),w=!0):e==S&&(a<i?(r[0]=o,r[1]=l):(r[0]=d,r[1]=u),w=!0),-t==S?(i<a?(r[2]=v,r[3]=b):(r[2]=y,r[3]=m),C=!0):t==S&&(i<a?(r[2]=f,r[3]=m):(r[2]=x,r[3]=b),C=!0),w&&C)return!1;if(c=a<i?s<n?(E=this.getCardinalDirection(e,S,4),this.getCardinalDirection(t,S,2)):(E=this.getCardinalDirection(-e,S,3),this.getCardinalDirection(-t,S,1)):s<n?(E=this.getCardinalDirection(-e,S,1),this.getCardinalDirection(-t,S,3)):(E=this.getCardinalDirection(e,S,2),this.getCardinalDirection(t,S,4)),!w)switch(E){case 1:_=l,r[0]=i+-g/S,r[1]=_;break;case 2:_=n+p*S,r[0]=d,r[1]=_;break;case 3:_=u,r[0]=i+g/S,r[1]=_;break;case 4:_=n+-p*S,r[0]=h,r[1]=_}if(!C)switch(c){case 1:A=m,r[2]=a+-k/S,r[3]=A;break;case 2:A=s+T*S,r[2]=x,r[3]=A;break;case 3:A=b,r[2]=a+k/S,r[3]=A;break;case 4:A=s+-T*S,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,c;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),c=(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 h((s*c-e*o)/i,(l*o-t*c)/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"),c=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 h(e){var t=this;n(this,h),this.length=0,this.head=null,this.tail=null,e?.forEach(function(e){return t.push(e)})}mt(h,"LinkedList"),a=h,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 c(e,this)},"remove")},{key:"pop",value:mt(function(){return c(this.tail,this).value},"pop")},{key:"popNode",value:mt(function(){return c(this.tail,this)},"popNode")},{key:"shift",value:mt(function(){return c(this.head,this).value},"shift")},{key:"shiftNode",value:mt(function(){return c(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=h},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),c=r(17),h=r(29);function u(e){h.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(h.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 c,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 c=s[0];s.splice(0,1),a.add(c);for(var h=c.getEdges(),n=0;n<h.length;n++){var u=h[n].getOtherEnd(c);if(o.get(c)!=u){if(a.has(u)){t=!1;break}s.push(u),o.set(u,c)}}}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=(c=t[s]).getNeighborsList().size;i.set(c,c.getNeighborsList().size),1==o&&r.push(c)}for(l=(l=[]).concat(r);!n;){[].concat(l);for(var l=[],s=0;s<t.length;s++){var c=t[s],h=t.indexOf(c);0<=h&&t.splice(h,1),c.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),c=r(8),h=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)?(c.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()):(c.getIntersection(a,s,l),r=l[2]-l[0],l[3]-l[1]),a=(r=Math.abs(r)<p.MIN_REPULSION_DIST?h.sign(r)*p.MIN_REPULSION_DIST:r)*r+(o=Math.abs(o)<p.MIN_REPULSION_DIST?h.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 c,h,u=a[s][o][l];e.getOwner()!=u.getOwner()||e==u||t.has(u)||n.has(u)||(c=Math.abs(e.getCenterX()-u.getCenterX())-(e.getWidth()/2+u.getWidth()/2),h=Math.abs(e.getCenterY()-u.getCenterY())-(e.getHeight()/2+u.getHeight()/2),c<=this.repulsionRange&&h<=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 c=0;c<r.length;c++){for(var h=0,u=0;u<r.length;u++)h+=r[c][u]*n[u];a[c]=h}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,P=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,P],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 B,$,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 j=a;j<this.m;j++)e[j][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 W=0,U=a;U<this.m;U++)W+=e[U][a]*e[U][s];for(var W=-W/e[a][a],G=a;G<this.m;G++)e[G][s]+=W*e[G][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],B=a+1<this.m,$=0!==r[a],B&&$){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<P;l++){for(var re=0;re<this.m;re++)this.U[re][l]=0;this.U[l][l]=1}for(var c=i-1;0<=c;c--)if(0!==this.s[c]){for(var ie=c+1;ie<P;ie++){for(var ne=0,ae=c;ae<this.m;ae++)ne+=this.U[ae][c]*this.U[ae][ie];for(var ne=-ne/this.U[c][c],se=c;se<this.m;se++)this.U[se][ie]+=ne*this.U[se][c]}for(var oe=c;oe<this.m;oe++)this.U[oe][c]=-this.U[oe][c];this.U[c][c]=1+this.U[c][c];for(var le=0;le<c-1;le++)this.U[le][c]=0}else{for(var ce=0;ce<this.m;ce++)this.U[ce][c]=0;this.U[c][c]=1}for(var he,h=this.n-1;0<=h;h--){if(he=0!==r[h],h<n&&he)for(var ue=h+1;ue<P;ue++){for(var de=0,pe=h+1;pe<this.n;pe++)de+=this.V[pe][h]*this.V[pe][ue];for(var de=-de/this.V[h+1][h],ge=h+1;ge<this.n;ge++)this.V[ge][ue]+=de*this.V[ge][h]}for(var fe=0;fe<this.n;fe++)this.V[fe][h]=0;this.V[h][h]=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 be=(p!==o?Math.abs(r[p]):0)+(p!==u+1?Math.abs(r[p-1]):0);if(Math.abs(this.s[p])<=ve+ye*be){this.s[p]=0;break}}p===u?d=3:p===o-1?d=1:(d=2,u=p)}switch(u++,d){case 1:var xe=r[o-2];r[o-2]=0;for(var g=o-2;u<=g;g--){var f=Ae.hypot(this.s[g],xe),Te=this.s[g]/f,ke=xe/f;this.s[g]=f,g!==u&&(xe=-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,Se=we/v;this.s[y]=v,we=-Se*r[y],r[y]=Ce*r[y];for(var b=0;b<this.m;b++)v=Ce*this.U[b][y]+Se*this.U[b][u-1],this.U[b][u-1]=-Se*this.U[b][y]+Ce*this.U[b][u-1],this.U[b][y]=v}break;case 3:var x=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]/x,k=this.s[o-2]/x,w=r[o-2]/x,Ee=this.s[u]/x,x=r[u]/x,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 S=(Ee+T)*(Ee-T)+C,E=Ee*x,_=u;_<o-1;_++){var A=Ae.hypot(S,E),R=S/A,L=E/A;_!==u&&(r[_-1]=A),S=R*this.s[_]+L*r[_],r[_]=R*r[_]-L*this.s[_],E=L*this.s[_+1],this.s[_+1]=R*this.s[_+1];for(var I=0;I<this.n;I++)A=R*this.V[I][_]+L*this.V[I][_+1],this.V[I][_+1]=-L*this.V[I][_]+R*this.V[I][_+1],this.V[I][_]=A;if(R=S/(A=Ae.hypot(S,E)),L=E/A,this.s[_]=A,S=R*r[_]+L*this.s[_+1],this.s[_+1]=-L*r[_]+R*this.s[_+1],E=L*r[_+1],r[_+1]=R*r[_+1],_<this.m-1)for(var N=0;N<this.m;N++)A=R*this.U[N][_]+L*this.U[N][_+1],this.U[N][_+1]=-L*this.U[N][_]+R*this.U[N][_+1],this.U[N][_]=A}r[o-2]=S;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 c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(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;c(this,h),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(c,"_classCallCheck"),mt(h,"NeedlemanWunsch"),i=h,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=h},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})}),stt=qat((r,i)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t(att()):"function"==typeof define&&define.amd?define(["layout-base"],t):"object"==typeof r?r.coseBase=t(att()):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),h=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,c=r(551).DimensionD,g=r(551).Layout,y=r(551).Integer,v=r(551).IGeometry,b=r(551).LGraph,x=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 h(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,c,h=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){h.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=h.has(e.left)?h.get(e.left):e.left,t=h.has(e.right)?h.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=h.has(e.left)?h.get(e.left):e.left,t=h.has(e.right)?h.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]))}),c=(l=mt(function(i,n){var a=[],s=[],o=new T,l=new Set,c=0;return i.forEach(function(e,t){if(!l.has(t)){for(a[c]=[],s[c]=!1,o.push(r=t),l.add(r),a[c].push(r);0!=o.length;){var r=o.shift();n.has(r)&&(s[c]=!0),i.get(r).forEach(function(e){l.has(e)||(o.push(e),l.add(e),a[c].push(e))})}c++}}),{components:a,isFixed:s}},"constructComponents"))(a,s.fixedNodesOnHorizontal),this.componentsOnHorizontal=c.components,this.fixedComponentsOnHorizontal=c.isFixed,c=l(o,s.fixedNodesOnVertical),this.componentsOnVertical=c.components,this.fixedComponentsOnVertical=c.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 c=this.componentsOnHorizontal[t];if(this.fixedComponentsOnHorizontal[t])for(i=0;i<c.length;i++)this.dummyToNodeForVerticalAlignment.has(c[i])?this.dummyToNodeForVerticalAlignment.get(c[i]).forEach(function(e){n.idToNodeMap.get(e).displacementX=0}):this.idToNodeMap.get(c[i]).displacementX=0;else{for(var h=0,u=0,i=0;i<c.length;i++)this.dummyToNodeForVerticalAlignment.has(c[i])?(h+=(p=this.dummyToNodeForVerticalAlignment.get(c[i])).length*this.idToNodeMap.get(p[0]).displacementX,u+=p.length):(h+=this.idToNodeMap.get(c[i]).displacementX,u++);for(var d=h/u,i=0;i<c.length;i++)this.dummyToNodeForVerticalAlignment.has(c[i])?this.dummyToNodeForVerticalAlignment.get(c[i]).forEach(function(e){n.idToNodeMap.get(e).displacementX=d}):this.idToNodeMap.get(c[i]).displacementX=d}}for(t=0;t<this.componentsOnVertical.length;t++)if(c=this.componentsOnVertical[t],this.fixedComponentsOnVertical[t])for(i=0;i<c.length;i++)this.dummyToNodeForHorizontalAlignment.has(c[i])?this.dummyToNodeForHorizontalAlignment.get(c[i]).forEach(function(e){n.idToNodeMap.get(e).displacementY=0}):this.idToNodeMap.get(c[i]).displacementY=0;else{for(var p,h=0,u=0,i=0;i<c.length;i++)this.dummyToNodeForHorizontalAlignment.has(c[i])?(h+=(p=this.dummyToNodeForHorizontalAlignment.get(c[i])).length*this.idToNodeMap.get(p[0]).displacementY,u+=p.length):(h+=this.idToNodeMap.get(c[i]).displacementY,u++);for(d=h/u,i=0;i<c.length;i++)this.dummyToNodeForHorizontalAlignment.has(c[i])?this.dummyToNodeForHorizontalAlignment.get(c[i]).forEach(function(e){n.idToNodeMap.get(e).displacementY=d}):this.idToNodeMap.get(c[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],c=g.findCenterOfTree(l);t.x=a,t.y=n,(s=k.radialLayout(l,c,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),b.calculateBounds(e)),n=new x;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),[]),c=(l=l.concat(e.getEdges())).length;null!=t&&c--;for(var h=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--,c--}for(var o=null!=t?(l.indexOf(d[0])+1)%u:0,g=Math.abs(i-r)/c,f=o;h!=c;f=++f%u){var m=l[f].getOtherEnd(e);m!=t&&(k.branchRadialLayout(m,e,m=(r+h*g)%360,(m+g)%360,n+a,a),h++)}},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,c={};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 c[a]&&(c[a]=[]),c[a]=c[a].concat(n)}Object.keys(c).forEach(function(e){if(1<c[e].length){var t="DummyCompound_"+e,r=(l.memberGroups[t]=c[e],c[e][0].getParent()),i=new h(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<c[e].length;s++){var o=c[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 c=e.rows[l];t=o;for(var h=0,u=0;u<c.length;u++){var d=c[u];d.rect.x=t,d.rect.y=r,t+=d.rect.width+e.horizontalPadding,d.rect.height>h&&(h=d.rect.height)}r+=h+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),c=o/a,c=Math.pow(i-n,2)+4*(e+n)*(c+i)*a,a=(n-i+Math.sqrt(c))/(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 c=0,h=0,u=0;u<e.length;u++)c+=(p=e[u]).getCenterX(),h+=p.getCenterY();for(s.centerX=c/e.length,s.centerY=h/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 c(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 c,h,u,d,p=y.MAX_VALUE,g=0;g<o.length;g++)o[g]<p?(p=o[g],c=1,h=g):o[g]==p&&c++;3==c&&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==c&&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==c&&0==p?d=Math.floor(4*Math.random()):h,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 Pe(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(Pe,"_toConsumableArray");var Be=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(),P=0,n=0;n<i.length;n++){var a=i[n];null==a.getChild()&&(k.set(a.id,P++),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=Be.DEFAULT_EDGE_LENGTH+r.get(e.left).getWidth()/2+r.get(e.right).getWidth()/2:e.gap=Be.DEFAULT_EDGE_LENGTH+r.get(e.top).getHeight()/2+r.get(e.bottom).getHeight()/2)});var s,B=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,b,h,x,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),h||("horizontal"==b?T.set(t,k.has(t)?w[k.get(t)]:x.get(t)):T.set(t,k.has(t)?C[k.get(t)]:x.get(t)))):T.set(t,Number.NEGATIVE_INFINITY),h&&s.set(t,new Set([t]))}),h&&t.forEach(function(e){var t,r,i=[];e.forEach(function(e){h.has(e)&&i.push(e)}),0<i.length?(t=0,i.forEach(function(e){"horizontal"==b?T.set(e,k.has(e)?w[k.get(e)]:x.get(e)):T.set(e,k.has(e)?C[k.get(e)]:x.get(e)),t+=T.get(e)}),t/=i.length,e.forEach(function(e){h.has(e)||T.set(e,t)})):(r=0,e.forEach(function(e){r+="horizontal"==b?k.has(e)?w[k.get(e)]:x.get(e):k.has(e)?C[k.get(e)]:x.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&&(h&&h.has(e.id)?(r="horizontal"==b?k.has(e.id)?w[k.get(e.id)]:x.get(e.id):k.has(e.id)?C[k.get(e.id)]:x.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),h&&s.set(e.id,n(s.get(i),s.get(e.id)))})},"_loop");0!=o.length;)r();return h&&(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 c=o.value;h.has(c)&&(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(Pe(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 c,h=e[Symbol.iterator]();!(s=(c=h.next()).done);s=!0){var u=c.value,d="horizontal"==b?k.has(u)?w[k.get(u)]:x.get(u):k.has(u)?C[k.get(u)]:x.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&&h.return&&h.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"),c=[],h=[],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))),Be.TRANSFORM_ON_CONSTRAINT_HANDLING){if(t.fixedNodeConstraint&&1<t.fixedNodeConstraint.length)t.fixedNodeConstraint.forEach(function(e,t){c[t]=[e.position.x,e.position.y],h[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,j=mt(function(e){var t=new Set,r=(q[e].forEach(function(e){t.add(e)}),new Set([].concat(Pe(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){c[y]=[i,C[k.get(e)]],h[y]=[w[k.get(e)],C[k.get(e)]],y++})},"_loop2"),W=0;W<q.length;W++)j(W);u=!0}if(t.alignmentConstraint.horizontal){for(var U=t.alignmentConstraint.horizontal,G=mt(function(e){var t=new Set,r=(U[e].forEach(function(e){t.add(e)}),new Set([].concat(Pe(t)).filter(function(e){return p.has(e)}))),i=0<r.size?w[k.get(r.values().next().value)]:o(t).y;U[e].forEach(function(e){c[y]=[w[k.get(e)],i],h[y]=[w[k.get(e)],C[k.get(e)]],y++})},"_loop3"),V=0;V<U.length;V++)G(V);u=!0}t.relativePlacementConstraint&&(d=!0)}else if(t.relativePlacementConstraint){for(var v,b,x,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,b=new Map,x=[],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,[]),x.push({left:t,right:e.id})):(b.has(t)?b.get(t).push(e):b.set(t,[e]),b.has(e.id)||b.set(e.id,[]),x.push({top:t,bottom:e.id}))})}),l(x),d=!1,Y=e(v,"horizontal"),H=e(b,"vertical"),m[K].forEach(function(e,t){h[t]=[w[k.get(e)],C[k.get(e)]],c[t]=[],Y.has(e)?c[t][0]=Y.get(e):c[t][0]=w[k.get(e)],H.has(e)?c[t][1]=H.get(e):c[t][1]=C[k.get(e)]}),u=!0)}if(u){for(var S=Fe.transpose(c),Z=Fe.transpose(h),E=0;E<S.length;E++)S[E]=Fe.multGamma(S[E]),Z[E]=Fe.multGamma(Z[E]);for(var f=Fe.multMat(S,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(Be.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=B(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(Pe(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(Pe(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 R=new Map,L=new Map,I=new Map,N=new Map,oe=new Map,le=new Map,ce=new Set,he=new Set;if(p.forEach(function(e){ce.add(e),he.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){R.set(e,"dummy"+t),I.get("dummy"+t).push(e),p.has(e)&&ce.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){L.set(e,"dummy"+t),N.get("dummy"+t).push(e),p.has(e)&&he.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=R.get(i)?R.get(i):i,r=R.get(e.id)?{id:R.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=L.get(i)?L.get(i):i,r=L.get(e.id)?{id:L.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 be,xe=g.keys()[Symbol.iterator]();!(ve=(be=xe.next()).done);ve=!0)ye(be.value)}catch(e){f=!0,u=e}finally{try{!ve&&xe.return&&xe.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=[],Se=(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",ce,oe,we)),Ee=e(M,"vertical",he,le,Ce),_e=mt(function(t){I.get(t)?I.get(t).forEach(function(e){w[k.get(e)]=Se.get(t)}):w[k.get(t)]=Se.get(t)},"_loop9"),Ae=!0,f=!1,u=void 0;try{for(var Re,Le=Se.keys()[Symbol.iterator]();!(Ae=(Re=Le.next()).done);Ae=!0)_e(Re.value)}catch(e){f=!0,u=e}finally{try{!Ae&&Le.return&&Le.return()}finally{if(f)throw u}}var Ie=mt(function(t){N.get(t)?N.get(t).forEach(function(e){C[k.get(e)]=Ee.get(t)}):C[k.get(t)]=Ee.get(t)},"_loop10"),Ne=!0,f=!1,u=void 0;try{for(var De,Me=Ee.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})}),ott=qat((r,i)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t(stt()):"function"==typeof define&&define.amd?define(["cose-base"],t):"object"==typeof r?r.cytoscapeFcose=t(stt()):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(S,"sliceIterator");var i=r(140).layoutBase.LinkedList;function S(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,c=new Set,h=[],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)),h.push(n),e.forEach(function(e){l.push(e),c.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())))||c.has(u[0])||u.union(u.descendants()).forEach(function(e){l.push(e),c.add(e),i.merge(e),o.has(e)&&h.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=h.length==o.length||g)||1<f)&&(d=h[0],p=d.connectedEdges().length,h.forEach(function(e){e.connectedEdges().length<p&&(p=e.connectedEdges().length,d=e)}),m.push(d.id()),(t=a.collection()).merge(h[0]),h.forEach(function(e){t.merge(e)}),h=[],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,c=void 0;try{for(var h,u=n.nodeIndexes[Symbol.iterator]();!(r=(h=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 S(e,2);throw new TypeError("Invalid attempt to destructure non-iterable instance")})(h.value),v=y[0],b=y[1],x=t.cy.getElementById(v);x&&(d=x.boundingBox(),p=n.xCoords[b]-d.w/2,g=n.xCoords[b]+d.w/2,f=n.yCoords[b]-d.h/2,m=n.yCoords[b]+d.h/2,p<a&&(a=p),s<g&&(s=g),f<o&&(o=f),l<m)&&(l=m)}}catch(e){i=!0,c=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw c}}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"),c=l.length,h=0;h<c;h++){var u,d=l[h];(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,b=r(140).CoSENode,x=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(c,e){var t=c.cy,r=(n=c.eles).nodes(),i=n.edges(),d=void 0,p=void 0,g=void 0,f={},h=(c.randomize&&(d=e.nodeIndexes,p=e.xCoords,g=e.yCoords),mt(function(e){return"function"==typeof e},"isFn")),m=mt(function(e,t){return h(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],c=null,h=void(0==l.intersection(y).length&&(c=l.children())),u=l.layoutDimensions({nodeDimensionsIncludeLabels:n.nodeDimensionsIncludeLabels});(h=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 b(i.graphManager,new x(o.topLeftX,o.topLeftY),new T(o.width,o.height))):t.add(new b(i.graphManager,new x(o.topLeftX,o.topLeftY),new T(parseFloat(u.w),parseFloat(u.h))))):t.add(new b(i.graphManager,new x(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 b(i.graphManager,new x(l.position("x")-u.w/2,l.position("y")-u.h/2),new T(parseFloat(u.w),parseFloat(u.h)))):t.add(new b(this.graphManager))).id=l.data("id"),h.nodeRepulsion=m(n.nodeRepulsion,l),h.paddingLeft=parseInt(l.css("padding")),h.paddingTop=parseInt(l.css("padding")),h.paddingRight=parseInt(l.css("padding")),h.paddingBottom=parseInt(l.css("padding")),n.nodeDimensionsIncludeLabels&&(h.labelWidth=l.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,h.labelHeight=l.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,h.labelPosVertical=l.css("text-valign"),h.labelPosHorizontal=l.css("text-halign")),f[l.data("id")]=h,isNaN(h.rect.x)&&(h.rect.x=0),isNaN(h.rect.y)&&(h.rect.y=0),null!=c&&0<c.length&&e(i.getGraphManager().add(i.newGraph(),h),c,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(c.idealEdgeLength,s),o.edgeElasticity=m(c.edgeElasticity,s),i+=o.idealLength,n++)}null!=c.idealEdgeLength&&(0<n?k.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=i/n:h(c.idealEdgeLength)?k.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=50:k.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=c.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!=c.nestingFactor&&(k.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.nestingFactor),null!=c.gravity&&(k.DEFAULT_GRAVITY_STRENGTH=u.DEFAULT_GRAVITY_STRENGTH=c.gravity),null!=c.numIter&&(k.MAX_ITERATIONS=u.MAX_ITERATIONS=c.numIter),null!=c.gravityRange&&(k.DEFAULT_GRAVITY_RANGE_FACTOR=u.DEFAULT_GRAVITY_RANGE_FACTOR=c.gravityRange),null!=c.gravityCompound&&(k.DEFAULT_COMPOUND_GRAVITY_STRENGTH=u.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.gravityCompound),null!=c.gravityRangeCompound&&(k.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.gravityRangeCompound),null!=c.initialEnergyOnIncremental&&(k.DEFAULT_COOLING_FACTOR_INCREMENTAL=u.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.initialEnergyOnIncremental),null!=c.tilingCompareBy&&(k.TILING_COMPARE_BY=c.tilingCompareBy),l.QUALITY="proof"==c.quality?2:0,k.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=c.nodeDimensionsIncludeLabels,k.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=!c.randomize,k.ANIMATE=u.ANIMATE=l.ANIMATE=c.animate,k.TILE=c.tile,k.TILING_PADDING_VERTICAL="function"==typeof c.tilingPaddingVertical?c.tilingPaddingVertical.call():c.tilingPaddingVertical,k.TILING_PADDING_HORIZONTAL="function"==typeof c.tilingPaddingHorizontal?c.tilingPaddingHorizontal.call():c.tilingPaddingHorizontal,k.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=!0,k.PURE_INCREMENTAL=!c.randomize,l.DEFAULT_UNIFORM_LEAF_NODE_SIZES=c.uniformNodeDimensions,"transformed"==c.step&&(k.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,k.ENFORCE_CONSTRAINTS=!1,k.APPLY_LAYOUT=!1),"enforced"==c.step&&(k.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,k.ENFORCE_CONSTRAINTS=!0,k.APPLY_LAYOUT=!1),"cose"==c.step&&(k.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,k.ENFORCE_CONSTRAINTS=!1,k.APPLY_LAYOUT=!0),"all"==c.step&&(c.randomize?k.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:k.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,k.ENFORCE_CONSTRAINTS=!0,k.APPLY_LAYOUT=!0),c.fixedNodeConstraint||c.alignmentConstraint||c.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,c),t(a,s,i),n(a,c),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),x=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(c,"Layout"),a=c,s=[{key:"run",value:mt(function(){var h=this.options,e=h.cy,t=h.eles,u=[],d=[],r=void 0,i=[],n=(!h.fixedNodeConstraint||Array.isArray(h.fixedNodeConstraint)&&0!=h.fixedNodeConstraint.length||(h.fixedNodeConstraint=void 0),!h.alignmentConstraint||(!h.alignmentConstraint.vertical||Array.isArray(h.alignmentConstraint.vertical)&&0!=h.alignmentConstraint.vertical.length||(h.alignmentConstraint.vertical=void 0),!h.alignmentConstraint.horizontal)||Array.isArray(h.alignmentConstraint.horizontal)&&0!=h.alignmentConstraint.horizontal.length||(h.alignmentConstraint.horizontal=void 0),!h.relativePlacementConstraint||Array.isArray(h.relativePlacementConstraint)&&0!=h.relativePlacementConstraint.length||(h.relativePlacementConstraint=void 0),void((h.fixedNodeConstraint||h.alignmentConstraint||h.relativePlacementConstraint)&&(h.tile=!1,h.packComponents=!1))),a=!1;if(e.layoutUtilities&&h.packComponents&&(n=(n=e.layoutUtilities("get"))||e.layoutUtilities(),a=!0),0<t.nodes().length)if(a){if(a=x.getTopMostNodes(h.eles.nodes()),(r=x.connectComponents(e,h.eles,a)).forEach(function(e){e=e.boundingBox(),i.push({x:e.x1+e.w/2,y:e.y1+e.h/2})}),h.randomize&&r.forEach(function(e){h.eles=e,u.push(T(h))}),"default"==h.quality||"proof"==h.quality){var s=e.collection();if(h.tile){var a=new Map,o=0,l={nodeIndexes:a,xCoords:[],yCoords:[]},c=[];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))}),c.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=c.length-1;0<=p;p--)r.splice(c[p],1),u.splice(c[p],1),i.splice(c[p],1)}}r.forEach(function(e,t){h.eles=e,d.push(k(h,u[t])),x.relocateComponent(i[t],d[t],h)})}else r.forEach(function(e,t){x.relocateComponent(i[t],u[t],h)});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,c=void 0;"draft"==h.quality&&(c=u[o].nodeIndexes),0<e.nodes().not(f).length&&(l={edges:[],nodes:[]},e.nodes().not(f).forEach(function(e){var t;"draft"==h.quality?e.isParent()?(t=x.calcBoundingBox(e,u[o].xCoords,u[o].yCoords,c),l.nodes.push({x:t.topLeftX,y:t.topLeftY,width:t.width,height:t.height})):(r=c.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"==h.quality?(t=c.get(s.id()),r=c.get(e.id()),i=[],n=[],s.isParent()?(a=x.calcBoundingBox(s,u[o].xCoords,u[o].yCoords,c),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=x.calcBoundingBox(e,u[o].xCoords,u[o].yCoords,c),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,h.randomize).shifts,"draft"==h.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=h.eles.boundingBox(),i.push({x:a.x1+a.w/2,y:a.y1+a.h/2}),h.randomize&&(n=T(h),u.push(n)),"default"==h.quality||"proof"==h.quality?(d.push(k(h,u[0])),x.relocateComponent(i[0],d[0],h)):x.relocateComponent(i[0],u[0],h);var b=mt(function(r,e){var t,i,n,a;return"default"==h.quality||"proof"==h.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])}),h.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"==h.quality||"proof"==h.quality||h.randomize?(a=x.calcParentsWithoutChildren(e,t),n=t.filter(function(e){return"none"==e.css("display")}),h.eles=t.not(n),t.nodes().not(":parent").not(n).layoutPositions(this,h,b),0<a.length&&a.forEach(function(e){e.position(b(e))})):console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")},"run")}],i(a.prototype,s),c);function c(e){n(this,c),this.options=o({},l,e)}e.exports=r},657:(e,t,r)=>{var q=r(548),j=r(140).layoutBase.Matrix,W=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=[],h=[],v=[],b=[],u=[],x=[],T=void 0,k=e.piTol,i=e.samplingType,w=e.nodeSeparation,d=void 0,P=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(h[i]==r){t=!0;break}t||(h[e]=r,e++)}},"randomSampleCR"),p=mt(function(e,t,r){for(var i,n=[],a=0,s=0,o=[],l=0,c=1,h=0;h<T;h++)o[h]=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);b[u][t]=o[u]*w}if(r){for(var g=0;g<T;g++)b[g][t]<v[g]&&(v[g]=b[g][t]);for(var f=0;f<T;f++)l<v[f]&&(l=v[f],c=f)}return c},"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(h[i]=t,i,e)}else{P();for(var n=0;n<d;n++)p(h[n],n,e,!1)}for(var a=0;a<T;a++)for(var s=0;s<d;s++)b[a][s]*=b[a][s];for(var o=0;o<d;o++)u[o]=[];for(var l=0;l<d;l++)for(var c=0;c<d;c++)u[l][c]=b[h[c]][l]},"allBFS"),B=mt(function(){for(var e=(r=W.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])))}x=j.multMat(j.multMat(r,n),j.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=j.normalize(r),i=j.normalize(i),o=1e-9,l=1e-9,c=void 0;;){for(var h=0;h<T;h++)n[h]=r[h];if(r=j.multGamma(j.multL(j.multGamma(n),b,x)),e=j.dotProduct(n,r),r=j.normalize(r),o=j.dotProduct(n,r),(c=Math.abs(o/l))<=1+k&&1<=c)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=j.minusOp(a,j.multCons(n,j.dotProduct(n,a))),i=j.multGamma(j.multL(j.multGamma(a),b,x)),t=j.dotProduct(a,i),i=j.normalize(i),o=j.dotProduct(a,i),(c=Math.abs(o/l))<=1+k&&1<=c)break;l=o}for(var p=0;p<T;p++)a[p]=i[p];g=j.multCons(n,Math.sqrt(Math.abs(e))),f=j.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 c=0,C=0;C<t.length;C++)t[C].isParent()||m.set(t[C].id(),c++);var S=!0,E=!1,_=void 0;try{for(var A,R=s.keys()[Symbol.iterator]();!(S=(A=R.next()).done);S=!0){var F=A.value;m.set(F,c++)}}catch(e){E=!0,_=e}finally{try{!S&&R.return&&R.return()}finally{if(E)throw _}}for(var L=0;L<m.size;L++)y[L]=[];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,E=!1,_=void 0;try{for(var N,D=s.keys()[Symbol.iterator]();!(I=(N=D.next()).done);I=!0)z(N.value)}catch(e){E=!0,_=e}finally{try{!I&&D.return&&D.return()}finally{if(E)throw _}}if(2<(T=m.size)){for(var d=T<e.sampleSize?T:e.sampleSize,M=0;M<T;M++)b[M]=[];for(var O=0;O<d;O++)x[O]=[];"draft"==e.quality||"all"==e.step?(l(i),B(),$()):m.forEach(function(e,t){g.push(n.getElementById(t).position("x")),f.push(n.getElementById(t).position("y"))})}else r=m.keys(),_=(E=n.getElementById(r.next().value)).position(),l=E.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})}),ltt=r(()=>{rh(),Het=mt(e=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${e}</g>`,"wrapIcon"),Xet={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:Het('<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:Het('<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:Het('<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:Het('<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:Het('<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:Hc,blank:{body:Het("")}}}}),ctt=r(()=>{Uu(),F7(),rh(),th(),ltt(),ttt(),zC(),Ket=mt(async function(T,e,k,w){let C=k.getConfigField("padding"),t=k.getConfigField("iconSize"),S=t/2,E=t/6,_=E/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:c}=zet(e),{x:h,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,b,x;n&&(Ret(r)?h+="L"===r?-m:m:u+="T"===r?-m:m+18),l&&(Ret(s)?g+="L"===s?-m:m:f+="T"===s?-m:m+18),n||"junction"!==k.getNode(t)?.type||(Ret(r)?h+="L"===r?S:-S:u+="T"===r?S:-S),l||"junction"!==k.getNode(a)?.type||(Ret(s)?g+="L"===s?S:-S:f+="T"===s?S:-S),e[0]._private.rscratch&&((e=T.insert("g")).insert("path").attr("d",`M ${h},${u} L ${d},${p} L${g},${f} `).attr("class","edge").attr("id",w+"-"+FC(t,a,{prefix:"L"})),i&&(x=Ret(r)?Eet[r](h,E):h-_,y=Let(r)?Eet[r](u,E):u-_,e.insert("polygon").attr("points",Cet[r](E)).attr("transform",`translate(${x},${y})`).attr("class","arrow")),o&&(x=Ret(s)?Eet[s](g,E):g-_,y=Let(s)?Eet[s](f,E):f-_,e.insert("polygon").attr("points",Cet[s](E)).attr("transform",`translate(${x},${y})`).attr("class","arrow")),c)&&(v=0,v="X"==(b=Iet(r,s)?"XY":Ret(r)?"X":"Y")?Math.abs(h-g):"Y"==b?Math.abs(u-f)/1.5:Math.abs(h-g)/2,x=e.append("g"),await $7(x,c,{useHtmlLabels:!1,width:v,classes:"architecture-service-label"},B()),x.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"==b?x.attr("transform","translate("+d+", "+p+")"):"Y"==b?x.attr("transform","translate("+d+", "+p+") rotate(-90)"):"XY"==b&&(y=Met(r,s))&&Net(y)&&(e=x.node().getBoundingClientRect(),[y,v]=Pet(y),x.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*y*v*45})`),b=x.node().getBoundingClientRect(),x.attr("transform",`
|
||
translate(${d}, ${p-e.height/2})
|
||
translate(${y*b.width/2}, ${v*b.height/2})
|
||
rotate(${-1*y*v*45}, 0, ${e.height/2})
|
||
`)))}))},"drawEdges"),Zet=mt(async function(c,e,h,u){let d=.75*h.getConfigField("padding"),p=h.getConfigField("fontSize"),g=h.getConfigField("iconSize")/2;await Promise.all(e.nodes().map(async i=>{var n=qet(i);if("group"===n.type){var{h:i,w:a,x1:s,y1:o}=i.boundingBox(),l=c.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=c.append("g"),t=s,r=o;n.icon&&((i=e.append("g")).html(`<g>${await eh(n.icon,{height:d,width:d,fallbackPrefix:Xet.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 $7(s,n.label,{useHtmlLabels:!1,width:a,classes:"architecture-service-label"},B()),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)+")")),h.setElementForId(n.id,l)}}))},"drawGroups"),Qet=mt(async function(e,t,r,i){var n,a=B();for(n of r){var s=t.append("g"),o=e.getConfigField("iconSize"),l=(n.title&&(l=s.append("g"),await $7(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:c,height:h}=(n.icon?l.html(`<g>${await eh(n.icon,{height:o,width:o,fallbackPrefix:Xet.prefix})}</g>`):n.iconText?(l.html(`<g>${await eh("blank",{height:o,width:o,fallbackPrefix:Xet.prefix})}</g>`),c=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(Rc(n.iconText,a)),h=parseInt(window.getComputedStyle(c.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16,c.attr("style",`-webkit-line-clamp: ${Math.floor((o-2)/h)};`)):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=c,n.height=h,e.setElementForId(n.id,s)}return 0},"drawServices"),Jet=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 htt(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 utt(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 dtt(r,e){e.nodes().map(e=>{var t=qet(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 ptt(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 gtt(e,h){e.forEach(e=>{var{lhsId:t,rhsId:r,lhsInto:i,lhsGroup:n,rhsInto:a,lhsDir:s,rhsDir:o,rhsGroup:l,title:c}=e,e=Iet(e.lhsDir,e.rhsDir)?"segments":"straight";h.add({group:"edges",data:{id:t+"-"+r,label:c,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 ftt(s,e,u){let t=mt((e,h)=>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,c]=a[e];u[s]?.[l]===h||"default"===s||"default"===l?(r[i]??=[],r[i]=[...r[i],...o,...c]):(r[i+"-"+n++]=o,r[i+"-"+n++]=c)}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 mtt(e,l){let c=[],h=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])=>[h(t),e])),s=[h([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=h([i[0]+t[0],i[1]+t[1]]),r=a[t];r&&!o[t]&&(s.push(t),c.push({[wet[e]]:r,[wet[_et(e)]]:n,gap:1.5*l.getConfigField("iconSize")}))})}}}}),c}function ytt(h,u,d,p,g,{spatialMaps:f,groupAlignments:m}){return new Promise(t=>{let e=Q("body").append("div").attr("id","cy").attr("style","display:none"),s=fue({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":g.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:g.getConfigField("padding")+"px"}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}}),r=(e.remove(),ptt(d,s),htt(h,s,g),utt(u,s,g),gtt(p,s),ftt(g,f,m)),i=mtt(f,g),n=g.getConfigField("iconSize"),a=g.getConfigField("idealEdgeLengthMultiplier")*n,o=.5*n,l=g.getConfigField("edgeElasticity"),c=s.layout({name:"fcose",quality:"proof",randomize:g.getConfigField("randomize"),nodeSeparation:g.getConfigField("nodeSeparation"),numIter:g.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(e){var[e,t]=e.connectedNodes();return(e=qet(e).parent)===qet(t).parent?a:o},edgeElasticity(e){var[e,t]=e.connectedNodes();return(e=qet(e).parent)===qet(t).parent?l:.001},alignmentConstraint:r,relativePlacementConstraint:i});c.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 c=(t-e)*(r-e)+(a-n)*(i-n);switch(!0){case 0<=c:c=1;break;case c<0:c=-1}return{distances:Math.abs(s)*l,weights:o*=c}}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=zet(t).sourceDir,[r,i]=Let(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(),c.run()}),c.run(),s.ready(e=>{P.info("Ready",e),t(s)})})}var vtt,btt,xtt=r(()=>{mue(),vtt=j(ott(),1),bk(),e(),rh(),z$e(),Ch(),ltt(),ttt(),ctt(),Zc([{name:Xet.prefix,icons:Xet}]),fue.use(vtt.default),mt(htt,"addServices"),mt(utt,"addJunctions"),mt(dtt,"positionNodes"),mt(ptt,"addGroups"),mt(gtt,"addEdges"),mt(ftt,"getAlignments"),mt(mtt,"getRelativeConstraints"),mt(ytt,"layoutArchitecture"),vtt=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(),c=M$e(t),h=c.append("g"),u=(h.attr("class","architecture-edges"),(d=c.append("g")).attr("class","architecture-services"),c.append("g")),d=(u.attr("class","architecture-groups"),await Qet(i,d,n,t),Jet(i,d,a,t),await ytt(n,a,s,o,i,l));await Ket(h,d,i,t),await Zet(u,d,i,t),dtt(i,d),vh(void 0,c,i.getConfigField("padding"),i.getConfigField("useMaxWidth"))},"draw"),btt={draw:vtt}}),Ttt={};Vat(Ttt,{diagram:()=>ktt});var ktt,wtt,Ctt,Stt,Ett,_tt=r(()=>{itt(),rtt(),ntt(),xtt(),ktt={parser:Get,get db(){return new Wet},renderer:btt,styles:Yet}}),Att=r(()=>{wtt="position frame",Ctt="frame positioned",Stt="position relation",Ett="relation positioned"});function Rtt(){art={}}function Ltt(){let i=ort,n=art.ast,a=srt;if(n)return n.frames.forEach((r,t)=>{var e=Ftt(r,n.dataEntities,a);i=Jtt(i,{$kind:wtt,index:t,frame:r,textProps:e}),Vtt(r)?(P.debug("source frame",r.sourceFrames),n.frames.filter(t=>r.sourceFrames.some(e=>e.$refText===t.name)).forEach(e=>{i=Jtt(i,{$kind:Stt,index:t,frame:r,sourceFrame:e})})):i=Jtt(i,{$kind:Stt,index:t,frame:r})}),i={...i,sortedSwimlanesArray:Wtt(i.swimlanes)};throw new Error("No data for EventModel")}function Itt(e){art.ast=e}function Ntt(){return srt}function Dtt(e){if(2===(e=e.split(".")).length)return e[0]}function Mtt(e){var t=e.split(".");return 2===t.length?t[1]:e}function Ott(e,t){if(t&&0!==t.length)return Object.values(e).find(e=>e.namespace===t)}function Ptt(e,t,r){return Math.max(t,...Object.keys(e).filter(e=>(e=Number.parseInt(e),t<e&&e<r)).map(e=>Number.parseInt(e)))+1}function Btt(e,t){var r=Dtt(e.entityIdentifier),i=Ott(t,r);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||srt.labelUiAutomation}:r?{index:Ptt(t,0,100),label:srt.labelUiAutomationPrefix+r}:{index:0,label:srt.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||srt.labelCommandReadModel}:r?{index:Ptt(t,100,200),label:srt.labelCommandReadModelPrefix+r}:{index:100,label:srt.labelCommandReadModel};default:return i?{index:i.index,label:i.namespace||srt.labelEvents}:r?{index:Ptt(t,200,300),label:srt.labelEventsPrefix+r}:{index:200,label:srt.labelEvents}}}function $tt(e){var t=vr().themeVariables;switch(e.modelEntityType){case"ui":return{fill:t.emUiFill??"white",stroke:t.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:t.emProcessorFill??"#edb3f6",stroke:t.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:t.emReadModelFill??"#d3f1a2",stroke:t.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:t.emCommandFill??"#bcd6fe",stroke:t.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:t.emEventFill??"#ffb778",stroke:t.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}function Ftt(t,e,r){let i=vr(),n=Rc(Mtt(t.entityIdentifier)??"",i),a,s={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"},o=`<b>${AC(n,r.textMaxWidth,s)}</b>`;return t.dataInlineValue&&(a=(a=(a=t.dataInlineValue).substring(a.indexOf("{")+1)).substring(0,a.lastIndexOf("}")-1),a=Rc(a,i),a=(a=AC(a,r.textMaxWidth,s)).replaceAll(" "," ")),t.dataReference&&(e=e.find(e=>e.name===t.dataReference?.$refText))&&(a=(a=(a=e.dataBlockValue).substring(a.indexOf(`{
|
||
`)+2)).substring(0,a.lastIndexOf("}")-1),a=Rc(a,i),a=(a=AC(a,r.textMaxWidth,s)).replaceAll(" "," "),a+="<br/>"),(e=void 0!==a)&&(o+=`<br/><br/><code style="text-align: left; display: block;max-width:${r.textMaxWidth}px">${a}</code>`),r={fontSize:s.fontSize,fontWeight:s.fontWeight,fontFamily:s.fontFamily},r=LC(o,r),e=e?r.width/3:r.width,e={content:o,width:e,height:r.height},P.debug(`[${t.name}] ${t.entityIdentifier} text`,e),e}function ztt(e,t){var r=$tt(t.frame),i={width:t.textProps.width+2*srt.boxTextPadding,height:t.textProps.height+2*srt.boxTextPadding};return[{$kind:Ctt,frame:t.frame,index:t.index,visual:r,dimension:i,textProps:t.textProps}]}function qtt(e,t,r){return void 0===t?srt.contentStartX:t.index===e.index&&e.r?e.r+srt.boxPadding:void 0===r?srt.contentStartX:r.r-srt.boxOverlap+srt.boxPadding}function jtt(e,t){return e=[...e.map(e=>e.r),t],Math.max(...e)}function Wtt(e){return Object.values(e).sort((e,t)=>e.index-t.index)}function Utt(e,t){var r=t,i=Btt(r.frame,e.swimlanes),n=i.index in e.swimlanes?e.swimlanes[i.index]:{index:i.index,label:i.label,r:0,y:i.index*srt.swimlaneMinHeight+srt.swimlaneGap,height:srt.swimlaneMinHeight,maxHeight:srt.swimlaneMinHeight},t=0<e.boxes.length?e.boxes[e.boxes.length-1]:void 0,a=void 0!==e.previousSwimlaneNumber?e.swimlanes[e.previousSwimlaneNumber]:void 0,s={width:Math.max(srt.boxMinWidth,Math.min(srt.boxMaxWidth,r.dimension.width))+2*srt.boxPadding,height:Math.max(srt.boxMinHeight,Math.min(srt.boxMaxHeight,r.dimension.height))+2*srt.boxPadding},t=(a=qtt(n,a,t))+s.width+srt.boxPadding,o=jtt(Object.values(e.swimlanes),t),a=(n.r=a+s.width,n.maxHeight=Math.max(n.maxHeight,s.height),n.height=Math.max(srt.swimlaneMinHeight,n.maxHeight)+2*srt.swimlanePadding,{x:a,y:srt.swimlanePadding+n.y,r:t,dimension:s,leftSibling:!1,swimlane:n,visual:r.visual,text:r.textProps.content,frame:r.frame,index:r.index}),l=Wtt((t={...e,boxes:[...e.boxes,a],swimlanes:{...e.swimlanes,[""+n.index]:n},previousSwimlaneNumber:i.index,previousFrame:r.frame,maxR:o}).swimlanes);0<l.length&&(l[0].y=0);for(let e=1;e<l.length;e++){var c=l[e],h=l[e-1];c.y=h.y+h.height+srt.swimlaneGap}return t}function Gtt(e,t){return 0===e&&0===t.sourceFrames.length}function Vtt(e){return null!=e.sourceFrames&&0<e.sourceFrames.length}function Ytt(e,t){if(null!=t)return e.find(e=>e.frame.name===t.name)}function Htt(t,r,i){if(!(i<0))for(let e=i;0<=e;e--){var n=t[e];if(n.swimlane.index!==r)return n}}function Xtt(e,t){if(VTe(t.frame)||Gtt(t.index,t.frame))return[];var r=Ytt(e.boxes,t.frame);if(void 0===r)throw new Error("Target box not found for frame "+t.frame.name);return void 0===(e=t.sourceFrame?Ytt(e.boxes,t.sourceFrame):Htt(e.boxes,r.swimlane.index,t.index-1))?[]:[{$kind:Ett,frame:t.frame,index:t.index,sourceBox:e,targetBox:r}]}function Ktt(e,t){return t={visual:{fill:"none",stroke:"#000"},source:{x:t.sourceBox.x,y:t.sourceBox.y},target:{x:t.targetBox.x,y:t.targetBox.y},sourceBox:t.sourceBox,targetBox:t.targetBox},{...e,relations:[...e.relations,t]}}function Ztt(e,t){var r=lrt[t.$kind];return null==r?[]:(r=r(e,t),P.debug("decided events",r),r)}function Qtt(e,t){var r=t.reduce((e,t)=>{var r=crt[t.$kind];return null==r?e:r(e,t)},e);return P.debug("evolve events",{state:e,newState:r,events:t}),r}function Jtt(e,t){return Qtt(e,Ztt(e,t))}var ert,trt,rrt,irt,nrt,art,srt,ort,lrt,crt,hrt,urt,drt=r(()=>{e(),zC(),zC(),wi(),Wu(),th(),Ti(),sOe(),Att(),ert=mt(function(e){P.debug("options str",e)},"setOptions"),trt=mt(function(){return{}},"getOptions"),rrt=mt(function(){Rtt(),Ph()},"clear"),mt(Rtt,"reset"),irt=ir.eventmodeling,nrt=mt(()=>lC({...irt,...vr().eventmodeling}),"getConfig"),art={},mt(Ltt,"getState"),mt(Itt,"setAst"),srt={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "},mt(Ntt,"getDiagramProps"),ort={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]},mt(Dtt,"extractNamespace"),mt(Mtt,"extractName"),mt(Ott,"findSwimlaneByNamespace"),mt(Ptt,"findNextAvailableIndex"),mt(Btt,"calculateSwimlaneProps"),mt($tt,"calculateEntityVisualProps"),mt(Ftt,"calculateTextProps"),mt(ztt,"decidePositionFrame"),mt(qtt,"calculateX"),mt(jtt,"calculateMaxRight"),mt(Wtt,"sortedSwimlanesArray"),mt(Utt,"evolveFramePositioned"),mt(Gtt,"isFirstFrame"),mt(Vtt,"hasSourceFrame"),mt(Ytt,"findBoxByFrame"),mt(Htt,"findBoxByLineIndex"),mt(Xtt,"decidePositionRelation"),mt(Ktt,"evolveRelationPositioned"),lrt={[wtt]:ztt,[Stt]:Xtt},crt={[Ctt]:Utt,[Ett]:Ktt},mt(Ztt,"decide"),mt(Qtt,"evolve"),mt(Jtt,"dispatch"),hrt={getConfig:nrt,setOptions:ert,getOptions:trt,clear:rrt,setAccTitle:Bh,getAccTitle:$h,getAccDescription:zh,setAccDescription:Fh,setDiagramTitle:qh,getDiagramTitle:jh,setAst:Itt,getDiagramProps:Ntt,getState:Ltt}}),prt=r(()=>{sOe(),e(),hOe(),drt(),urt={parse:mt(async e=>{e=await rOe("eventmodeling",e),P.debug(e),hrt.setAst(e),oOe(e,hrt)},"parse")}});function grt(i,n){return e=>{var t=e.swimlane.y+n.swimlanePadding,r=i.append("g").attr("class","em-box");r.append("rect").attr("x",e.x).attr("y",t).attr("rx","3").attr("width",e.dimension.width).attr("height",e.dimension.height).attr("stroke",e.visual.stroke).attr("fill",e.visual.fill),r.append("foreignObject").attr("x",e.x+n.boxPadding).attr("y",t+10).attr("width",e.dimension.width-2*n.boxPadding).attr("height",e.dimension.height-2*n.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(e.text)}}function frt(e,t){return t<e}function mrt(c,h,u,d){return e=>{let t=e.sourceBox.swimlane.y+h.swimlanePadding,r=e.targetBox.swimlane.y+h.swimlanePadding,i=r<t,n=e.sourceBox.x+2*e.sourceBox.dimension.width/3,a=e.targetBox.x+e.targetBox.dimension.width/3,s,o;P.debug(`rendering relation up=${i} for `,{sourceBox:e.sourceBox,targetBox:e.targetBox}),o=i?(s=t,r+e.targetBox.dimension.height):(s=t+e.sourceBox.dimension.height,r);var l=d.emRelationStroke??e.visual.stroke;c.append("path").attr("class","em-relation").attr("fill",e.visual.fill).attr("stroke",l).attr("stroke-width","1").attr("marker-end",`url(#${u})`).attr("d",`M${n} ${s} L${a} `+o)}}function yrt(n,a,s,o){return e=>{var t=n.append("g").attr("class","em-swimlane"),r=o.emSwimlaneBackgroundOdd??"rgb(250,250,250)",i=o.emSwimlaneBackgroundStroke??"rgb(240,240,240)";t.append("rect").attr("x",0).attr("y",e.y).attr("rx","3").attr("width",a+s.swimlanePadding).attr("height",e.height).attr("fill",r).attr("stroke",i),t.append("text").attr("font-weight",s.swimlaneTextFontWeight).attr("x",30).attr("y",e.y+30).text(e.label)}}var vrt,brt,xrt,Trt,krt,wrt=r(()=>{bk(),Uu(),e(),brt=B(),vrt=brt?.eventmodeling,mt(grt,"renderD3Box"),mt(frt,"dirUpwards"),mt(mrt,"renderD3Relation"),mt(yrt,"renderD3Swimlane"),brt=mt(function(e,t,r,i){if(P.debug("in eventmodeling renderer",e+`
|
||
`,"id:",t,r),!vrt)throw new Error("EventModeling config not found");var e=i.db,{themeVariables:r,eventmodeling:i}=B(),n=Q(`[id="${t}"]`),a=e.getDiagramProps(),e=e.getState(),t="em-arrowhead-"+t,s=r.emArrowhead??"#000000";e.sortedSwimlanesArray.forEach(yrt(n,e.maxR,a,r)),e.boxes.forEach(grt(n,a)),e.relations.forEach(mrt(n,a,t,r)),n.append("defs").append("marker").attr("id",t).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",s),Hh(void 0,n,i?.padding??30,i?.useMaxWidth)},"draw"),xrt={draw:brt}}),Crt=r(()=>{Trt=mt(e=>"","getStyles"),krt=Trt}),Srt={};Vat(Srt,{diagram:()=>Ert});var Ert,_rt,Art,Rrt,Lrt,Irt,Nrt,Drt,Mrt,Ort,Prt,Brt,$rt,Frt,zrt,qrt,jrt,Wrt,Urt,Grt,Vrt,Yrt,Hrt=r(()=>{prt(),drt(),wrt(),Crt(),Ert={parser:urt,db:hrt,renderer:xrt,styles:krt}}),Xrt=r(()=>{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],c=[1,19],h=[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:c},t(h,[2,18],{14:[1,21]}),t(h,[2,16]),t(h,[2,17]),{6:o,7:l,10:22,11:c},{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(h,[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="",c=0,h=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 b,x,T,k,w,C,S,E={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===b||"u"<typeof b)&&(b=v()),o[T]&&o[T][b]))||!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 "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,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: "+b);switch(k[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],E.$=a[a.length-C],E._$={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&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return S;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(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);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"),(_rt=new((e.prototype=r).Parser=e)).parser=_rt,Art=_rt}),Krt=r(()=>{Uu(),th(),Wu(),Rrt=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,Ph()}getRoot(){return this.root}addNode(t,r){if(r=I.sanitizeText(r,B()),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}],qh(r)}getAccTitle(){return $h()}setAccTitle(e){Bh(e)}getAccDescription(){return zh()}setAccDescription(e){Fh(e)}getDiagramTitle(){return jh()}setDiagramTitle(e){qh(e)}}}),Zrt=r(()=>{Uu(),z$e(),Ch(),zC(),IA(),Drt=82*Math.PI/180,Lrt=Math.cos(Drt),Irt=Math.sin(Drt),Nrt=mt((e,t,r)=>{var i=e.node().getBBox(),n=i.width+2*t,a=i.height+2*t;yh(e,a,n,r),e.attr("viewBox",`${i.x-t} ${i.y-t} ${n} `+a)},"applyPaddedViewBox"),Drt=mt((e,t,r,i)=>{if(i=i.db.getRoot()){var{look:h,handDrawnSeed:u,themeVariables:d}=a=B(),p=OC(a.fontSize)[0]??14,h="handDrawn"===h,g=i.children??[],n=a.ishikawa?.diagramPadding??20,a=a.ishikawa?.useMaxWidth??!1,s=M$e(t),f=s.append("g").attr("class","ishikawa"),m=(y=h?LA.svg(s.node()):void 0)?{roughSvg:y,seed:u??0,lineColor:d?.lineColor??"#333",fillColor:d?.mainBkg??"#fff"}:void 0,y="ishikawa-arrow-"+t;h||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,c=h?void 0:Urt(f,o,250,o,250,"ishikawa-spine");if(Ort(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=Mrt(e),i=Mrt(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),c&&c.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 b,x,T,k=f.append("g").attr("class","ishikawa-pair");for([b,x,T]of[[g[2*e],-1,a],[g[2*e+1],1,s]])b&&Frt(k,b,o,l,x,T,p,m);o=k.selectAll("text").nodes().reduce((e,t)=>Math.min(e,t.getBBox().x),1/0)}h?Urt(f,o,l,0,l,"ishikawa-spine",m):(c.attr("x1",o),d=`url(#${y})`,f.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",d))}else h&&Urt(f,o,250,o,250,"ishikawa-spine",m);Nrt(s,n,a)}},"draw"),Mrt=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"),Ort=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=jrt(t,qrt(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"),Prt=mt((e,s)=>{let o=[],l=[],c=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:qrt(i.text,15),parentIndex:t,childCount:a.length}),r%2==0?(l.push(n),a.length&&c(a,n,r+1)):(a.length&&c(a,n,r+1),l.push(n))}},"walk");return c(e,-1,2),{entries:o,yOrder:l}},"flattenTree"),Brt=mt((t,r,e,i,n,a,s)=>{if(t=t.append("g").attr("class","ishikawa-label-group"),r=jrt(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"),$rt=mt((l,c,h,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=c,a=h,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"),Frt=mt((s,e,t,r,i,n,o,l)=>{var a=e.children??[],n=n*(a.length?1:.2),c=Irt*n*i,h=r+c;if(Urt(s,t,r,n=t+-Lrt*n,h,"ishikawa-branch",l),l&&$rt(s,t,r,t-n,r-h,l),Brt(s,e.text,n,h,i,o,l),a.length){var u,d,{entries:e,yOrder:p}=Prt(a,i),g=e.length,f=new Array(g);for([u,d]of p.entries())f[d]=r+(u+1)/(g+1)*c;var m,y,v,b=new Map,x=(b.set(-1,{x0:t,y0:r,x1:n,y1:h,childCount:a.length,childrenDrawn:0}),-Lrt),T=Irt*i,k=i<0?"ishikawa-label up":"ishikawa-label down";for([m,y]of e.entries()){let e=f[m],t=b.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=Wrt(t.x0,t.x1,v?(e-t.y0)/v:.5),n=e,a=i-(0<y.childCount?60+5*y.childCount:30),Urt(r,i,e,a,e,"ishikawa-sub-branch",l),l&&$rt(r,i,e,1,0,l),jrt(r,y.text,a,e,"ishikawa-label align","end",o)):(v=t.childrenDrawn++,i=Wrt(t.x0,t.x1,(t.childCount-v)/(t.childCount+1)),n=t.y0,a=i+x*((e-n)/T),Urt(r,i,n,a,e,"ishikawa-sub-branch",l),l&&$rt(r,i,n,i-a,n-e,l),jrt(r,y.text,a,e,k,"end",o)),0<y.childCount&&b.set(m,{x0:i,y0:n,x1:a,y1:e,childCount:y.childCount,childrenDrawn:0})}}},"drawBranch"),zrt=mt(e=>e.split(/<br\s*\/?>|\n/),"splitLines"),qrt=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"),jrt=mt((e,t,r,i,n,a,s)=>{var o,l,t=zrt(t),c=1.05*s,h=e.append("text").attr("class",n).attr("text-anchor",a).attr("x",r).attr("y",i-(t.length-1)*c/2);for([o,l]of t.entries())h.append("tspan").attr("x",r).attr("dy",0===o?0:c).text(l);return h},"drawMultilineText"),Wrt=mt((e,t,r)=>e+(t-e)*r,"lerp"),Urt=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"),Grt={draw:Drt}}),Qrt=r(()=>{Vrt=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"),Yrt=Vrt}),Jrt={};Vat(Jrt,{diagram:()=>eit});var eit,tit,rit,iit=r(()=>{Xrt(),Krt(),Zrt(),Qrt(),eit={parser:Art,get db(){return new Rrt},renderer:Grt,styles:Yrt}}),nit=r(()=>{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],c=[7,8,11,12,17,19,22,24,27],h=[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(c,[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:h,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(c,[2,30]),t(c,[2,31]),t(c,[2,32]),t(c,[2,33],{30:61,16:h,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="",c=0,h=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 b,x,T,k,w,C,S,E={};;){if(T=i[i.length-1],"u"<typeof(k=this.defaultActions[T]||((null===b||"u"<typeof b)&&(b=v()),o[T]&&o[T][b]))||!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 "+(c+1)+`:
|
||
`+g.showPosition()+`
|
||
Expecting `+A.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,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: "+b);switch(k[0]){case 1:i.push(b),a.push(g.yytext),s.push(g.yylloc),i.push(k[1]),b=null,x?(b=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(C=this.productions_[k[1]][1],E.$=a[a.length-C],E._$={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&&(E._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),typeof(S=this.performAction.apply(E,[l,h,c,f.yy,k[1],a,s].concat(p)))<"u")return S;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(E.$),s.push(E._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);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"),(tit=new((e.prototype=r).Parser=e)).parser=tit,rit=tit});function ait(){return lC(Sit,vr().venn)}var sit,oit,lit,cit,hit,uit,dit,pit,git,fit,mit,yit,vit,bit,xit,Tit,kit,wit,Cit,Sit,Eit,_it,Ait,Rit,Lit=r(()=>{zC(),wi(),Wu(),Ti(),sit=[],oit=[],lit=[],cit=new Set,uit=!1,dit=mt((e,t,r)=>{var i=bit(e).sort(),r=r??10/Math.pow(e.length,2);1===(hit=i).length&&cit.add(i[0]),sit.push({sets:i,size:r,label:t?git(t):void 0})},"addSubsetData"),pit=mt(()=>sit,"getSubsetData"),git=mt(e=>2<=(e=e.trim()).length&&e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e,"normalizeText"),fit=mt(e=>e&&git(e),"normalizeStyleValue"),mit=mt((e,t,r)=>{t=git(t),oit.push({sets:bit(e).sort(),id:t,label:r?git(r):void 0})},"addTextData"),yit=mt((e,t)=>{var r,i,e=bit(e).sort(),n={};for([r,i]of t)n[r]=fit(i)??i;lit.push({targets:e,styles:n})},"addStyleData"),vit=mt(()=>lit,"getStyleData"),bit=mt(e=>e.map(e=>git(e)),"normalizeIdentifierList"),xit=mt(e=>{if(0<(e=bit(e).filter(e=>!cit.has(e))).length)throw new Error("unknown set identifier: "+e.join(", "))},"validateUnionIdentifiers"),Tit=mt(()=>oit,"getTextData"),kit=mt(()=>hit,"getCurrentSets"),wit=mt(()=>uit,"getIndentMode"),Cit=mt(e=>{uit=e},"setIndentMode"),Sit=ir.venn,mt(ait,"getConfig"),Eit=mt(()=>{Ph(),sit.length=0,oit.length=0,lit.length=0,cit.clear(),hit=void 0,uit=!1},"customClear"),_it={getConfig:ait,clear:Eit,setAccTitle:Bh,getAccTitle:$h,setDiagramTitle:qh,getDiagramTitle:jh,getAccDescription:zh,setAccDescription:Fh,addSubsetData:dit,getSubsetData:pit,addTextData:mit,addStyleData:yit,validateUnionIdentifiers:xit,getTextData:Tit,getStyleData:vit,getCurrentSets:kit,getIndentMode:wit,setIndentMode:Cit}}),Iit=r(()=>{Ait=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"),Rit=Ait});function Nit(h,e){let t=Mit(h),r=t.filter(e=>Dit(e,h)),i=0,n=0,a=[];if(1<r.length){var s=Fit(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 c=r[r.length-1];for(let e=0;e<r.length;++e){var u=r[e];n+=(c.x+u.x)*(u.y-c.y);let o={x:(u.x+c.x)/2,y:(u.y+c.y)/2},l=null;for(let s=0;s<u.parentIndex.length;++s)if(c.parentIndex.includes(u.parentIndex[s])){let e=h[u.parentIndex[s]],t=Math.atan2(u.x-e.x,u.y-e.y),r=Math.atan2(c.x-e.x,c.y-e.y),i=r-t,n=(i<0&&(i+=2*Math.PI),r-i/2),a=Pit(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:c,large:a>e.radius,sweep:!0})}null!=l&&(a.push(l),i+=Oit(l.circle.radius,l.width),c=u)}}else{let t=h[0];for(let e=1;e<h.length;++e)h[e].radius<t.radius&&(t=h[e]);let r=!1;for(let e=0;e<h.length;++e)if(Pit(h[e],t)>Math.abs(t.radius-h[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 Dit(t,e){return e.every(e=>Pit(t,e)<e.radius+1e-10)}function Mit(r){var i,n=[];for(let t=0;t<r.length;++t)for(let e=t+1;e<r.length;++e)for(i of $it(r[t],r[e]))i.parentIndex=[t,e],n.push(i);return n}function Oit(e,t){return e*e*Math.acos(1-t/e)-(e-t)*Math.sqrt(t*(2*e-t))}function Pit(e,t){return Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))}function Bit(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),Oit(e,e-(r*r-t*t+e*e)/(2*r))+Oit(t,i))}function $it(e,t){var r,i,n=Pit(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 Fit(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 zit(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 c=r+(l/=2),h=t(c);if(0<=h*s&&(r=c),Math.abs(l)<a||0===h)return c}return r+l}function qit(t){var r=new Array(t);for(let e=0;e<t;++e)r[e]=0;return r}function jit(e,t){return qit(e).map(()=>qit(t))}function Wit(t,r){let i=0;for(let e=0;e<t.length;++e)i+=t[e]*r[e];return i}function Uit(e){return Math.sqrt(Wit(e,e))}function Git(t,r,i){for(let e=0;e<r.length;++e)t[e]=r[e]*i}function Vit(t,r,i,n,a){for(let e=0;e<t.length;++e)t[e]=r*i[e]+n*a[e]}function Yit(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,c=void 0!==i.rho?i.rho:1,h=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"),b=r.slice(),x=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=b[t]=0;e<g;++e)b[t]+=f[e][t];b[t]/=g}var w=f[g];if(Vit(x,1+c,b,-c,w),x.fx=t(x),x.fx<f[0].fx)Vit(k,1+h,b,-h,w),k.fx=t(k),k.fx<x.fx?y(k):y(x);else if(x.fx>=f[g-1].fx){let e=!1;if(x.fx>w.fx?(Vit(T,1+u,b,-u,w),T.fx=t(T),T.fx<w.fx?y(T):e=!0):(Vit(T,1-u*c,b,u*c,w),T.fx=t(T),T.fx<x.fx?y(T):e=!0),e){if(1<=d)break;for(let e=1;e<f.length;++e)Vit(f[e],1-d,f[0],d,f[e]),f[e].fx=t(f[e])}}else y(x)}return f.sort(v),{fx:f[0].fx,x:f[0]}}function Hit(n,a,s,o,l,c,h){let u=s.fx,d=Wit(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,Vit(o.x,1,s.x,l,a),p=o.fx=n(o.x,o.fxprime),g=Wit(o.fxprime,a),p>u+c*l*d||p>=i)r=l;else{if(Math.abs(g)<=-h*d)return l;0<=g*(r-t)&&(r=t),t=l,i=p}return 0}l=l||1,c=c||1e-6,h=h||.1,mt(i,"zoom");for(let e=0;e<10;++e){if(Vit(o.x,1,s.x,l,a),p=o.fx=n(o.x,o.fxprime),g=Wit(o.fxprime,a),p>u+c*l*d||e&&p>=t)return i(r,l,t);if(Math.abs(g)<=-h*d)return l;if(0<=g)return i(l,r,p);t=p,r=l,l*=2}return l}function Xit(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,c;c=(r=r||{}).maxIterations||20*e.length,i.fx=t(i.x,i.fxprime),Git(s=i.fxprime.slice(),i.fxprime,-1);for(let e=0;e<c;++e){var h;if(l=Hit(t,s,i,n,l),r.history&&r.history.push({x:i.x.slice(),fx:i.fx,fxprime:i.fxprime.slice(),alpha:l}),l?(Vit(a,1,n.fxprime,-1,i.fxprime),h=Wit(i.fxprime,i.fxprime),Vit(s,Math.max(0,Wit(a,n.fxprime)/h),s,-1,n.fxprime),o=i,i=n,n=o):Git(s,i.fxprime,-1),Uit(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 Kit(e,t={}){t.maxIterations=t.maxIterations||500;let r=t.initialLayout||tnt,n=t.lossFunction||ant,a=Qit(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 c=Yit(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 h=o[e];s[h].x=c[2*e],s[h].y=c[2*e+1]}return s}function Zit(t,r,i){return Math.min(t,r)*Math.min(t,r)*Math.PI<=i+Ent?Math.abs(t-r):zit(e=>Bit(t,r,e)-i,0,t+r)}function Qit(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+";"+(c=String(n.sets[e])),c=c+";"+o;s.set(l,n.size+(s.get(l)||0)),s.set(c,n.size+(s.get(c)||0))}}for(a of r)a.sets.length<3&&(a.size=s.get(i(a.sets)))}var h,u,d,p=[],g=new Set;for(h of r)1===h.sets.length?p.push(h.sets[0]):2===h.sets.length&&(u=h.sets[0],d=h.sets[1],g.add(i(h.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 Jit(e,a,s){let o=jit(a.length,a.length),l=jit(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=Zit(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 ent(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 c=r[2*e],h=r[2*e+1],u=n[t][e],d=a[t][e],p=(c-o)*(c-o)+(h-l)*(h-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-c),i[2*t+1]+=4*p*(l-h),i[2*e]+=4*p*(c-o),i[2*e+1]+=4*p*(h-l))}}return s}function tnt(e,t={}){var r=nnt(e,t),i=t.lossFunction||ant;return 8<=e.length&&i(t=rnt(e,t),e)+1e-8<i(r,e)?t:r}function rnt(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}=Jit(e,n,a),l=Uit(s.map(Uit))/s.length,c=(s=s.map(e=>e.map(e=>e/l)),mt((e,t)=>ent(e,t,s,o),"obj")),h=null;for(let e=0;e<i;++e){var u=Xit(c,qit(2*s.length).map(Math.random),t);(!h||u.fx<h.fx)&&(h=u)}var d=h.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)Git(f.x,l);return p}function nnt(i,e){let n=e&&e.lossFunction?e.lossFunction:ant,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+Ent>=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 c(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(c,"sortOrder"),l.sort(c);let h={};function u(e){return e.set in h}function d(e,t){a[t].x=e.x,a[t].y=e.y,h[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(c),0===g.length)throw"ERROR: missing pairwise overlap information";for(var m,y=[],v=0;v<g.length;++v){var b=a[g[v].set],x=Zit(f.radius,b.radius,g[v].size);y.push({x:b.x+x,y:b.y}),y.push({x:b.x-x,y:b.y}),y.push({y:b.y+x,x:b.x}),y.push({y:b.y-x,x:b.x});for(let e=v+1;e<g.length;++e){var T=a[g[e].set],k=Zit(f.radius,T.radius,g[e].size),T=$it({x:b.x,y:b.y,radius:x},{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 ant(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]],Bit(a.radius,n.radius,Pit(a,n))):Nit(i.sets.map(e=>t[e])),a=null!=i.weight?i.weight:1,r+=a*(n-i.size)*(n-i.size))}return r}function snt(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]],Bit(a.radius,s.radius,Pit(a,s))):Nit(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 ont(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&&Pit(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 c=s.x,h=s.y;s.x=o*c-l*h,s.y=l*c+o*h}}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 lnt(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;Pit(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 cnt(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 hnt(e,t,r){null==t&&(t=Math.PI/2);let o=pnt(e).map(e=>Object.assign({},e)),i=lnt(o);for(var n of i){ont(n,t,r);var a=cnt(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,c=(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+c:(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+c:(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 h=1;for(;h<i.length;)s(i[h],!0,!1),s(i[h+1],!1,!0),s(i[h+2],!0,!0),h+=3,l=cnt(o);return dnt(o)}function unt(e,t,r,i,n){var a=pnt(e);t-=2*i,r-=2*i;let{xRange:s,yRange:o}=cnt(a);if(s.max===s.min||o.max===o.min)return console.log("not scaling solution: zero size detected"),e;let l,c,h=(c=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(c,l)),u=(t-(s.max-s.min)*h)/2,d=(r-(o.max-o.min)*h)/2;return dnt(a.map(e=>({radius:h*e.radius,x:i+u+(e.x-s.min)*h,y:i+d+(e.y-o.min)*h,setid:e.setid})))}function dnt(e){var t,r={};for(t of e)r[t.setid]=t;return r}function pnt(t){return Object.keys(t).map(e=>Object.assign(t[e],{setid:e}))}function gnt(y={}){let v=!1,b=600,x=350,T=15,k=1e3,w=Math.PI/2,C=!0,S=null,E=!0,_=!0,A=null,R=null,L=!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=Kit,O=ant;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:L});C&&(e=hnt(e,w,R)),i=unt(e,b,x,T,S),n=bnt(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 ${b} `+x):o.attr("width",b).attr("height",x);let l={},c=!1;function h(e){return r=>Cnt(e.sets.map(e=>{var t=l[e],e=i[e],t=t||{x:b/2,y:x/2,radius:1},e=e||{x:b/2,y:x/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&&!L&&(c=!0,l[e.sets[0]]=Tnt(t))}),mt(h,"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",b/2).attr("y",x/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;c&&"function"==typeof f.transition?(f=g(e)).selectAll("path").attrTween("d",h):f.selectAll("path").attr("d",e=>Cnt(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=(E&&(c?"on"in d?d.on("end",fnt(i,s)):d.each("end",fnt(i,s)):d.each(fnt(i,s))),g(o.exit()).remove()),m=("function"==typeof o.transition&&e.selectAll("path").attrTween("d",h),e.selectAll("text").attr("x",b/2).attr("y",x/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?(E=e,n):E},n.useViewBox=function(){return v=!0,n},n.width=function(e){return arguments.length?(b=e,n):b},n.height=function(e){return arguments.length?(x=e,n):x},n.padding=function(e){return arguments.length?(T=e,n):T},n.distinct=function(e){return arguments.length?(L=e,n):L},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?(S=e,n):S},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?(R=e,n):R},n.lossFunction=function(e){return arguments.length?(O="default"===e?ant:"logRatio"===e?snt:e,n):O},n}function fnt(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,c=(r.textContent=null,[]);function h(e){var t=r.ownerDocument.createElementNS(r.namespaceURI,"tspan");return t.textContent=e,c.push(t),r.append(t),t}mt(h,"append");let u=h(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=h(s),l++)}let p=.35-1.1*l/2,g=r.getAttribute("x"),f=r.getAttribute("y");c.forEach((e,t)=>{e.setAttribute("x",g),e.setAttribute("y",f),e.setAttribute("dy",p+1.1*t+"em")})}}function mnt(t,r,i){let n=r[0].radius-Pit(r[0],t);for(let e=1;e<r.length;++e){var a=r[e].radius-Pit(r[e],t);a<=n&&(n=a)}for(let e=0;e<i.length;++e){var s=Pit(i[e],t)-i[e].radius;s<=n&&(n=s)}return n}function ynt(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=mnt(s[0],t,r);for(let e=1;e<s.length;++e){var c=mnt(s[e],t,r);c>=l&&(o=s[e],l=c)}let h=Yit(e=>-1*mnt({x:e[0],y:e[1]},t,r),[o.x,o.y],{maxIterations:500,minErrorDelta:1e-10}).x,u={x:e?0:h[0],y:h[1]},d=!0;for(n of t)if(Pit(u,n)>n.radius){d=!1;break}for(a of r)if(Pit(u,a)<a.radius){d=!1;break}return d?u:1==t.length?{x:t[0].x,y:t[0].y}:(Nit(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?ynt(t,[]):Fit(e.arcs.map(e=>e.p1)))}function vnt(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],c=Pit(s,l);c+l.radius<=s.radius+1e-10?i[o].push(a):c+s.radius<=l.radius+1e-10&&i[a].push(o)}}return i}function bnt(t,r,i){var n={},a=vnt(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 c=a[s[e]];for(let e=0;e<c.length;++e)l[c[e]]=!0}var h,u=[],d=[];for(h in t)h in o?u.push(t[h]):h in l||d.push(t[h]);var p=ynt(u,d,i);(n[s]=p).disjoint&&0<r[e].size&&console.log("WARNING: area "+s+" not represented on screen")}return n}function xnt(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 Tnt(e){return e=e.split(" "),{x:Number.parseFloat(e[1]),y:Number.parseFloat(e[2]),radius:-Number.parseFloat(e[4])}}function knt(e){return 0===e.length?[]:(Nit(e,e={}),e.arcs)}function wnt(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,xnt(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 Cnt(e,t){return wnt(knt(e),t)}function Snt(e,t={}){let{lossFunction:r,layoutFunction:i=Kit,normalize:n=!0,orientation:a=Math.PI/2,orientationOrder:s,width:o=600,height:l=350,padding:c=15,scaleToFit:h=!1,symmetricalTextCentre:u=!1,distinct:d,round:p=2}=t,g=i(e,{lossFunction:"default"!==r&&r?"logRatio"===r?snt:r:ant,distinct:d}),f=unt(n?hnt(g,a,s):g,o,l,c,h),m=bnt(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=knt(t);return{circles:t,arcs:r,path:wnt(r,p),area:e,has:new Set(e.sets)}});function b(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(b,"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+b(i.sets)}))}var Ent,_nt=r(()=>{mt(Nit,"intersectionArea"),mt(Dit,"containedInCircles"),mt(Mit,"getIntersectionPoints"),mt(Oit,"circleArea"),mt(Pit,"distance"),mt(Bit,"circleOverlap"),mt($it,"circleCircleIntersection"),mt(Fit,"getCenter"),mt(zit,"bisect"),mt(qit,"zeros"),mt(jit,"zerosM"),mt(Wit,"dot"),mt(Uit,"norm2"),mt(Git,"scale"),mt(Vit,"weightedSum"),mt(Yit,"nelderMead"),mt(Hit,"wolfeLineSearch"),mt(Xit,"conjugateGradient"),mt(Kit,"venn"),Ent=1e-10,mt(Zit,"distanceFromIntersectArea"),mt(Qit,"addMissingAreas"),mt(Jit,"getDistanceMatrices"),mt(ent,"constrainedMDSGradient"),mt(tnt,"bestInitialLayout"),mt(rnt,"constrainedMDSLayout"),mt(nnt,"greedyLayout"),mt(ant,"lossFunction"),mt(snt,"logRatioLossFunction"),mt(ont,"orientateCircles"),mt(lnt,"disjointCluster"),mt(cnt,"getBoundingBox"),mt(hnt,"normalizeSolution"),mt(unt,"scaleSolution"),mt(dnt,"toObjectNotation"),mt(pnt,"fromObjectNotation"),mt(gnt,"VennDiagram"),mt(fnt,"wrapText"),mt(mnt,"circleMargin"),mt(ynt,"computeTextCentre"),mt(vnt,"getOverlappingCircles"),mt(bnt,"computeTextCentres"),mt(xnt,"circlePath"),mt(Tnt,"circleFromPath"),mt(knt,"intersectionAreaArcs"),mt(wnt,"arcsToPath"),mt(Cnt,"intersectionAreaPath"),mt(Snt,"layout")});function Ant(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 Rnt(e){return e.join("|")}function Lnt(e,t,r,i,a,s){var n,o,l,c=e?.useDebugLayout??!1,h=r.select("svg").append("g").attr("class","venn-text-nodes"),u=new Map;for(n of i){var d=Rnt(n.sets),p=u.get(d);p?p.push(n):u.set(d,[n])}for([o,l]of u.entries())if((b=t.get(o))?.text){let t=b.text.x,r=b.text.y,e=Math.min(...b.circles.map(e=>e.radius)),i=Math.min(...b.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=h.append("g").attr("class","venn-text-area").attr("font-size",40*a+"px"),y=(c&&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),b=(b.data.label&&0<b.data.label.length?Math.min(32*a,.25*n):0)+(l.length<=2?30*a:0),x=t-y/2,T=r-v/2+b,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 S=x+w*(.5+(_=g%k)),E=T+C*((A=Math.floor(g/k))+.5),_=(c&&m.append("rect").attr("class","venn-text-debug-cell").attr("x",x+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,S=m.append("foreignObject").attr("class","venn-text-node-fo").attr("width",_).attr("height",A).attr("x",S-_/2).attr("y",E-A/2).attr("overflow","visible"),_=s.get(f.id)?.color,E=S.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);_&&E.style("color",_)}}}var Int,Nnt,Dnt=r(()=>{bk(),ai(),wi(),z$e(),_nt(),Ch(),IA(),mt(Ant,"buildStyleByKey"),Int=mt((e,t,r,i)=>{let n=i.db,a=n.getConfig?.(),{themeVariables:l,look:s,handDrawnSeed:c}=vr(),h="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=Ant(n.getStyleData()),f=a?.width??800,m=a?.height??450,y=f/1600,v=o?48*y:0,b=l.primaryTextColor??l.textColor,x=M$e(t);x.attr("viewBox",`0 0 ${f} `+m),o&&x.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=gnt().width(f).height(m-v);i.datum(d).call(t);let k=h?LA.svg(i.select("svg").node()):void 0,w=Snt(d,{width:f,height:m-v,padding:a?.padding??15}),C=new Map;for(T of w){var S=Rnt([...T.data.sets].sort());C.set(S,T)}0<p.length&&Lnt(a,C,i,p,y,g);let E=pt(l.background||"#f4f4f4");i.selectAll(".venn-circle").each(function(e,t){var r=Q(this),e=Rnt([...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=(h&&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:c,fill:kt(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||(E?R:L)(n,30));r.select("text").style("font-size",48*y+"px").style("fill",t)}),h&&k?i.selectAll(".venn-intersection").each(function(e){var t,r,i=Q(this),e=Rnt([...e.sets].sort()),n=(e=g.get(e))?.fill;n?(r=(t=i.select("path")).attr("d"))&&(r=k.path(r,{roughness:.7,seed:c,fill:kt(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??b)}):(i.selectAll(".venn-intersection text").style("font-size",48*y+"px").style("fill",e=>(e=Rnt([...e.sets].sort()),g.get(e)?.color??l.vennSetTextColor??b)),i.selectAll(".venn-intersection path").style("fill-opacity",e=>(e=Rnt([...e.sets].sort()),g.get(e)?.fill?1:0)).style("fill",e=>(e=Rnt([...e.sets].sort()),g.get(e)?.fill??"transparent")));var _=x.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);yh(x,m,f,a?.useMaxWidth??!0)},"draw"),mt(Rnt,"stableSetsKey"),mt(Lnt,"renderTextNodes"),Nnt={draw:Int}}),Mnt={};Vat(Mnt,{diagram:()=>Ont});var Ont,Pnt,Bnt=r(()=>{nit(),Lit(),Iit(),Dnt(),Ont={parser:rit,db:_it,renderer:Nnt,styles:Rit}}),$nt=r(()=>{Ti(),wi(),zC(),C8(),Wu(),Pnt=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=Bh,this.getAccTitle=$h,this.setDiagramTitle=qh,this.getDiagramTitle=jh,this.getAccDescription=zh,this.setAccDescription=Fh}static{mt(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){var e=ir,t=vr();return lC({...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=>{y8(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(){Ph(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}}});function Fnt(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 znt,qnt,jnt,Wnt,Unt,Gnt,Vnt,Ynt,Hnt,Xnt=r(()=>{mt(Fnt,"buildHierarchy")}),Knt=r(()=>{sOe(),e(),hOe(),Xnt(),$nt(),znt=mt((e,i)=>{oOe(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=qnt(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 c=Fnt(n),h=mt((e,t)=>{for(var r of e)i.addNode(r,t),r.children&&0<r.children.length&&h(r.children,t+1)},"addNodesRecursively");h(c,0)},"populate"),qnt=mt(e=>e.name?String(e.name):"","getItemName"),jnt={parser:{yy:void 0},parse:mt(async e=>{try{var t=await rOe("treemap",e),r=(P.debug("Treemap AST:",t),jnt.parser?.yy);if(!(r instanceof Pnt))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.");znt(t,r)}catch(e){throw P.error("Error parsing treemap:",e),e}},"parse")}}),Znt=r(()=>{z$e(),ede(),Ch(),bk(),C8(),wi(),e(),Wnt=mt((e,a,t,s)=>{let r=s.db,o=r.getConfig(),l=o.padding??10,c=r.getDiagramTitle(),h=r.getRoot(),u=vr().themeVariables;if(h){var s=c?30:0,d=M$e(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),yh(d,m,f,o.useMaxWidth);let r;try{var y=o.valueFormat||",";if("$0,0"===y)r=mt(e=>"$"+wv(",")(e),"valueFormat");else if(y.startsWith("$")&&y.includes(",")){let e=/\.\d+/.exec(y),t=e?e[0]:"";r=mt(e=>"$"+wv(","+t)(e),"valueFormat")}else if(y.startsWith("$")){let t=y.substring(1);r=mt(e=>"$"+wv(t||"")(e),"valueFormat")}else r=wv(y)}catch(e){P.error("Error creating format function:",e),r=wv(",")}let t=$b().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=$b().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=$b().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]);c&&d.append("text").attr("x",f/2).attr("y",s/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(c),m=d.append("g").attr("transform",`translate(0, ${s})`).attr("class","treemapContainer"),y=lb(h).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),s=(f=Ib().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=v8({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;"+v8({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;"+v8({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=>v8({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)+";"+v8({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)+";"+v8({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,$ue(d,s,"flowchart",o?.useMaxWidth||!1)}},"draw"),Unt=mt(function(e,t){return t.db.getClasses()},"getClasses"),Gnt={draw:Wnt,getClasses:Unt}}),Qnt=r(()=>{zC(),hi(),wi(),Vnt={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},Ynt=mt(({treemap:e}={})=>{var t=lC(Ot(),vr().themeVariables),r=(e=lC(Vnt,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"),Hnt=Ynt}),Jnt={};Vat(Jnt,{diagram:()=>eat});var eat,tat,rat,iat,nat,aat,sat,oat,lat=r(()=>{$nt(),Knt(),Znt(),Qnt(),eat={parser:jnt,get db(){return new Pnt},renderer:Gnt,styles:Hnt}}),cat=r(()=>{sOe(),e(),hOe(),tat=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"),rat=mt((e,t,r)=>({x:tat(t,r+" evolution"),y:tat(e,r+" visibility")}),"toCoordinates"),iat=mt(e=>{if(e)return"+<>"===e?"bidirectional":"+<"===e?"backward":"+>"===e?"forward":void 0},"getFlowFromPort"),nat=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"),aat=mt((e,o)=>{var t,r;oOe(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=rat(e.visibility,e.evolution,`Anchor "${e.name}"`);o.addNode(e.name,e.name,t.x,t.y,"anchor")}),e.components.forEach(e=>{var t=rat(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=rat(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=tat(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=iat(e.fromPort)??iat(e.toPort),{flow:i,label:n}=nat(e.arrow);!r&&i&&(r=i);var a=e.linkLabel,a=n??a;o.addLink(o.resolveNodeId(e.from),o.resolveNodeId(e.to),t,a,r)}),e.evolves.forEach(e=>{var t,r=o.getNode(e.component);void 0!==r?.y&&(t=tat(e.target,`Evolve target for "${e.component}"`),o.addTrend(e.component,t,r.y))}),0<e.annotations.length&&(t=e.annotations[0],r=rat(t.x,t.y,"Annotations box"),o.setAnnotationsBox(r.x,r.y)),e.annotation.forEach(e=>{var t=rat(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=rat(e.x,e.y,`Accelerator "${e.name}"`);o.addAccelerator(e.name,t.x,t.y)}),e.deaccelerators.forEach(e=>{var t=rat(e.x,e.y,`Deaccelerator "${e.name}"`);o.addDeaccelerator(e.name,t.x,t.y)})},"populateDb"),sat={parser:{yy:void 0},parse:mt(async e=>{var e=await rOe("wardley",e),t=(P.debug(e),sat.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.");aat(e,t)},"parse")}}),hat=r(()=>{oat=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)}resolveNodeId(e){if(!this.nodes.has(e))for(var[t,r]of this.nodes)if(r.label===e)return t;return 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 uat(){return B()["wardley-beta"]}function dat(e,t,r,i,n,a,s,o,l){Aat.addNode({id:e,label:t,x:r,y:i,className:n,labelOffsetX:a,labelOffsetY:s,inertia:o,sourceStrategy:l})}function pat(e,t,r=!1,i,n){Aat.addLink({source:e,target:t,dashed:r,label:i,flow:n})}function gat(e,t,r){Aat.addTrend({nodeId:e,targetX:t,targetY:r})}function fat(e,t,r){Aat.addAnnotation({number:e,coordinates:t,text:r})}function mat(e,t,r){Aat.addNote({text:e,x:t,y:r})}function yat(e,t,r){Aat.addAccelerator({name:e,x:t,y:r})}function vat(e,t,r){Aat.addDeaccelerator({name:e,x:t,y:r})}function bat(e,t){Aat.setAnnotationsBox(e,t)}function xat(e,t){Aat.setSize(e,t)}function Tat(e){Aat.startPipeline(e)}function kat(e,t){Aat.addPipelineComponent(e,t)}function wat(e){Aat.setAxes(e)}function Cat(e){return Aat.getNode(e)}function Sat(e){return Aat.resolveNodeId(e)}function Eat(){return Aat.build()}function _at(){Aat.clear(),Ph()}var Aat,Rat,Lat,Iat,Nat,Dat,Mat,Oat,Pat=r(()=>{Uu(),Wu(),hat(),Aat=new oat,mt(uat,"getConfig"),mt(dat,"addNode"),mt(pat,"addLink"),mt(gat,"addTrend"),mt(fat,"addAnnotation"),mt(mat,"addNote"),mt(yat,"addAccelerator"),mt(vat,"addDeaccelerator"),mt(bat,"setAnnotationsBox"),mt(xat,"setSize"),mt(Tat,"startPipeline"),mt(kat,"addPipelineComponent"),mt(wat,"updateAxes"),mt(Cat,"getNode"),mt(Sat,"resolveNodeId"),mt(Eat,"getWardleyData"),mt(_at,"clear"),Rat={getConfig:uat,addNode:dat,addLink:pat,addTrend:gat,addAnnotation:fat,addNote:mat,addAccelerator:yat,addDeaccelerator:vat,setAnnotationsBox:bat,setSize:xat,startPipeline:Tat,addPipelineComponent:kat,updateAxes:wat,getNode:Cat,resolveNodeId:Sat,getWardleyData:Eat,clear:_at,setAccTitle:Bh,getAccTitle:$h,setDiagramTitle:qh,getDiagramTitle:jh,getAccDescription:zh,setAccDescription:Fh}}),Bat=r(()=>{Uu(),e(),z$e(),Ch(),Lat=["Genesis","Custom Built","Product","Commodity"],Iat=mt(()=>{var e=B().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"),Nat=mt(()=>{var e=B()["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"),Dat=mt((t,r,e,l)=>{P.debug(`Rendering Wardley map
|
||
`+t);let d=Nat(),p=Iat(),g=1.6*d.nodeRadius,i=l.db,f=i.getWardleyData(),n=i.getDiagramTitle(),c=f.size?.width??d.width,h=f.size?.height??d.height,a=M$e(r),s=(a.selectAll("*").remove(),yh(a,h,c,d.useMaxWidth),a.attr("viewBox",`0 0 ${c} `+h),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",c).attr("height",h).attr("fill",p.backgroundColor),c-2*d.padding),o=h-2*d.padding,u=(n&&t.append("text").attr("class","wardley-title").attr("x",c/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=>h-d.padding-e/100*o,"projectY"),y=t.append("g").attr("class","wardley-axes");y.append("line").attr("x1",d.padding).attr("x2",c-d.padding).attr("y1",h-d.padding).attr("y2",h-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",h-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",h-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:Lat).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",h-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",h-d.padding/1.5).attr("fill",p.axisTextColor).attr("font-size",d.axisFontSize-2).attr("text-anchor","middle").text(e)})}if(d.showGrid){var b=t.append("g").attr("class","wardley-grid");for(let e=1;e<4;e++){var x=e/4,T=d.padding+s*x;b.append("line").attr("x1",T).attr("x2",T).attr("y1",d.padding).attr("y2",h-d.padding).attr("stroke",p.gridColor).attr("stroke-dasharray","2 6"),b.append("line").attr("x1",d.padding).attr("x2",c-d.padding).attr("y1",h-d.padding-o*x).attr("y2",h-d.padding-o*x).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 h=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],c=o[e+1];u.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",l.pos.x).attr("y1",l.pos.y).attr("x2",c.pos.x).attr("y2",c.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),h.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,S=(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,c=-a/o,h=i+8*l,u=n+8*c,d=180*Math.atan2(s,a)/Math.PI;return(90<d||d<-90)&&(d+=180),`rotate(${d} ${h} ${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),E=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-E).attr("x2",e=>k.get(e.id).x-E*Math.cos(Math.PI/6)).attr("y2",e=>k.get(e.id).y+E*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-E*Math.cos(Math.PI/6)).attr("y1",e=>k.get(e.id).y+E*Math.sin(Math.PI/6)).attr("x2",e=>k.get(e.id).x+E*Math.cos(Math.PI/6)).attr("y2",e=>k.get(e.id).y+E*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+E*Math.cos(Math.PI/6)).attr("y1",e=>k.get(e.id).y+E*Math.sin(Math.PI/6)).attr("x2",e=>k.get(e.id).x).attr("y2",e=>k.get(e.id).y-E).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-E).attr("r",S).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-E*Math.cos(Math.PI/6)).attr("cy",e=>k.get(e.id).y+E*Math.sin(Math.PI/6)).attr("r",S).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+E*Math.cos(Math.PI/6)).attr("cy",e=>k.get(e.id).y+E*Math.sin(Math.PI/6)).attr("r",S).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=c-d.padding-v,R=d.padding,L=h-d.padding-l;n=Math.max(_,Math.min(n,A)),a=Math.max(R,Math.min(a,L)),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"),Mat={draw:Dat}}),$at=r(()=>{zC(),hi(),wi(),Oat=mt(({wardley:e}={})=>{var t=lC(Ot(),vr().themeVariables);return`
|
||
.wardley-background {
|
||
fill: ${(t=lC(t.wardley,e)).backgroundColor};
|
||
}
|
||
.wardley-axes line, .wardley-axes path {
|
||
stroke: ${t.axisColor};
|
||
}
|
||
.wardley-axis-label {
|
||
fill: ${t.axisTextColor};
|
||
}
|
||
.wardley-stage-label {
|
||
fill: ${t.axisTextColor};
|
||
}
|
||
.wardley-grid line {
|
||
stroke: ${t.gridColor};
|
||
}
|
||
.wardley-node circle {
|
||
fill: ${t.componentFill};
|
||
stroke: ${t.componentStroke};
|
||
}
|
||
.wardley-node-label {
|
||
fill: ${t.componentLabelColor};
|
||
}
|
||
.wardley-link {
|
||
stroke: ${t.linkStroke};
|
||
}
|
||
.wardley-link--dashed {
|
||
stroke-dasharray: 4 4;
|
||
}
|
||
.wardley-link-label {
|
||
fill: ${t.axisTextColor};
|
||
}
|
||
.wardley-trend line {
|
||
stroke: ${t.evolutionStroke};
|
||
}
|
||
.wardley-annotation-line {
|
||
stroke: ${t.annotationStroke};
|
||
}
|
||
.wardley-annotation circle {
|
||
fill: ${t.annotationFill};
|
||
stroke: ${t.annotationStroke};
|
||
}
|
||
.wardley-annotation text {
|
||
fill: ${t.annotationTextColor};
|
||
}
|
||
.wardley-annotations-box rect {
|
||
fill: ${t.annotationFill};
|
||
stroke: ${t.annotationStroke};
|
||
}
|
||
.wardley-annotations-box text {
|
||
fill: ${t.annotationTextColor};
|
||
}
|
||
.wardley-pipeline-box {
|
||
stroke: ${t.componentStroke};
|
||
}
|
||
.wardley-notes text {
|
||
fill: ${t.axisTextColor};
|
||
}
|
||
`},"styles")}),Fat={};Vat(Fat,{diagram:()=>zat});var zat,qat,jat=r(()=>{cat(),Pat(),Bat(),$at(),zat={parser:sat,db:Rat,renderer:Mat,styles:Oat}}),Wat=(Vat(qat={},{default:()=>dlt}),rh(),bh(),kh(),{id:"c4",detector:mt(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),loader:mt(async()=>({id:"c4",diagram:(await Promise.resolve().then(()=>(p6(),u6))).diagram}),"loader")}),Uat={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(()=>(ude(),sde))).diagram}),"loader")},Gat="flowchart-v2",r=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"),Vat=mt(async()=>{var e=(await Promise.resolve().then(()=>(ude(),sde))).diagram;return{id:Gat,diagram:e}},"loader"),Yat={id:Gat,detector:r,loader:Vat},Hat={id:"er",detector:mt(e=>/^\s*erDiagram/.test(e),"detector"),loader:mt(async()=>({id:"er",diagram:(await Promise.resolve().then(()=>(Sde(),wde))).diagram}),"loader")},Xat={id:"gitGraph",detector:mt(e=>/^\s*gitGraph/.test(e),"detector"),loader:mt(async()=>({id:"gitGraph",diagram:(await Promise.resolve().then(()=>(WPe(),FPe))).diagram}),"loader")},Kat={id:"gantt",detector:mt(e=>/^\s*gantt/.test(e),"detector"),loader:mt(async()=>({id:"gantt",diagram:(await Promise.resolve().then(()=>(B$e(),A$e))).diagram}),"loader")},Zat={id:"info",detector:mt(e=>/^\s*info/.test(e),"detector"),loader:mt(async()=>({id:"info",diagram:(await Promise.resolve().then(()=>(lFe(),j$e))).diagram}),"loader")},Qat={id:"pie",detector:mt(e=>/^\s*pie/.test(e),"detector"),loader:mt(async()=>({id:"pie",diagram:(await Promise.resolve().then(()=>(bFe(),pFe))).diagram}),"loader")},Jat="quadrantChart",r=mt(e=>/^\s*quadrantChart/.test(e),"detector"),Vat=mt(async()=>{var e=(await Promise.resolve().then(()=>(eze(),KFe))).diagram;return{id:Jat,diagram:e}},"loader"),est={id:Jat,detector:r,loader:Vat},tst={id:"xychart",detector:mt(e=>/^\s*xychart(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"xychart",diagram:(await Promise.resolve().then(()=>(vqe(),hqe))).diagram}),"loader")},rst="requirement",r=mt(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),Vat=mt(async()=>{var e=(await Promise.resolve().then(()=>(Aje(),Sqe))).diagram;return{id:rst,diagram:e}},"loader"),ist={id:rst,detector:r,loader:Vat},nst={id:"sequence",detector:mt(e=>/^\s*sequenceDiagram/.test(e),"detector"),loader:mt(async()=>({id:"sequence",diagram:(await Promise.resolve().then(()=>(wWe(),oWe))).diagram}),"loader")},ast={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(()=>(IWe(),RWe))).diagram}),"loader")},sst="classDiagram",r=mt((e,t)=>!(!/^\s*classDiagram/.test(e)||"dagre-wrapper"!==t?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(e),"detector"),Vat=mt(async()=>{var e=(await Promise.resolve().then(()=>(fUe(),NWe))).diagram;return{id:sst,diagram:e}},"loader"),ost={id:sst,detector:r,loader:Vat},lst={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(()=>(pGe(),uGe))).diagram}),"loader")},cst="stateDiagram",r=mt((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&"dagre-wrapper"===t?.state?.defaultRenderer),"detector"),Vat=mt(async()=>{var e=(await Promise.resolve().then(()=>(VGe(),gGe))).diagram;return{id:cst,diagram:e}},"loader"),hst={id:cst,detector:r,loader:Vat},ust={id:"journey",detector:mt(e=>/^\s*journey/.test(e),"detector"),loader:mt(async()=>({id:"journey",diagram:(await Promise.resolve().then(()=>(gVe(),hVe))).diagram}),"loader")},dst=(e(),z$e(),Ch(),r={draw:mt((e,t,r)=>{P.debug(`rendering svg for syntax error
|
||
`);var i=(t=M$e(t)).append("g");t.attr("viewBox","0 0 2412 512"),yh(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")}),pst={db:{},renderer:r,parser:{parse:mt(()=>{},"parse")}},gst="flowchart-elk",Vat=mt((e,t={})=>!!(/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&"elk"===t?.flowchart?.defaultRenderer)&&(t.layout="elk",!0),"detector"),r=mt(async()=>{var e=(await Promise.resolve().then(()=>(ude(),sde))).diagram;return{id:gst,diagram:e}},"loader"),fst={id:gst,detector:Vat,loader:r},mst={id:"timeline",detector:mt(e=>/^\s*timeline/.test(e),"detector"),loader:mt(async()=>({id:"timeline",diagram:(await Promise.resolve().then(()=>(kYe(),yYe))).diagram}),"loader")},yst={id:"mindmap",detector:mt(e=>/^\s*mindmap/.test(e),"detector"),loader:mt(async()=>({id:"mindmap",diagram:(await Promise.resolve().then(()=>(xHe(),HYe))).diagram}),"loader")},vst={id:"kanban",detector:mt(e=>/^\s*kanban/.test(e),"detector"),loader:mt(async()=>({id:"kanban",diagram:(await Promise.resolve().then(()=>(qHe(),SHe))).diagram}),"loader")},bst={id:"sankey",detector:mt(e=>/^\s*sankey(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"sankey",diagram:(await Promise.resolve().then(()=>(gKe(),tKe))).diagram}),"loader")},xst={id:"packet",detector:mt(e=>/^\s*packet(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"packet",diagram:(await Promise.resolve().then(()=>(BKe(),bKe))).diagram}),"loader")},Tst={id:"radar",detector:mt(e=>/^\s*radar-beta/.test(e),"detector"),loader:mt(async()=>({id:"radar",diagram:(await Promise.resolve().then(()=>(nZe(),eZe))).diagram}),"loader")},kst={id:"block",detector:mt(e=>/^\s*block(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"block",diagram:(await Promise.resolve().then(()=>(met(),XJe))).diagram}),"loader")},wst={id:"treeView",detector:mt(e=>/^\s*treeView-beta/.test(e),"detector"),loader:mt(async()=>({id:"treeView",diagram:(await Promise.resolve().then(()=>(ett(),Tet))).diagram}),"loader")},Cst="architecture",Vat=mt(e=>/^\s*architecture/.test(e),"detector"),r=mt(async()=>{var e=(await Promise.resolve().then(()=>(_tt(),Ttt))).diagram;return{id:Cst,diagram:e}},"loader"),Sst={id:Cst,detector:Vat,loader:r},Est="eventmodeling",Vat=mt(e=>/^\s*eventmodeling/.test(e),"detector"),r=mt(async()=>{var e=(await Promise.resolve().then(()=>(Hrt(),Srt))).diagram;return{id:Est,diagram:e}},"loader"),_st={id:Est,detector:Vat,loader:r},Ast={id:"ishikawa",detector:mt(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),loader:mt(async()=>({id:"ishikawa",diagram:(await Promise.resolve().then(()=>(iit(),Jrt))).diagram}),"loader")},Rst={id:"venn",detector:mt(e=>/^\s*venn-beta/.test(e),"detector"),loader:mt(async()=>({id:"venn",diagram:(await Promise.resolve().then(()=>(Bnt(),Mnt))).diagram}),"loader")},Lst=(kh(),Uu(),{id:"treemap",detector:mt(e=>/^\s*treemap/.test(e),"detector"),loader:mt(async()=>({id:"treemap",diagram:(await Promise.resolve().then(()=>(lat(),Jnt))).diagram}),"loader")}),Ist="wardley-beta",Vat=mt(e=>/^\s*wardley-beta/i.test(e),"detector"),r=mt(async()=>{var e=(await Promise.resolve().then(()=>(jat(),Fat))).diagram;return{id:Ist,diagram:e}},"loader"),Nst={id:Ist,detector:Vat,loader:r},Dst=!1,Mst=mt(()=>{Dst||(Dst=!0,Zh("error",pst,e=>"error"===e.toLowerCase().trim()),Zh("---",{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("---")),hh(fst,yst,Sst),hh(Wat,vst,ost,ast,Hat,Kat,Zat,Qat,ist,nst,Yat,Uat,mst,Xat,hst,lst,ust,est,bst,xst,tst,kst,_st,wst,Tst,Ast,Lst,Rst,Nst))},"addDiagrams"),Ost=(e(),kh(),Uu(),mt(async()=>{P.debug("Loading registered diagrams");var e=(await Promise.allSettled(Object.entries(lh).map(async([e,{detector:t,loader:r}])=>{if(r)try{Qh(e)}catch{try{var{diagram:i,id:n}=await r();Zh(n,i,t)}catch(t){throw P.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete lh[e],t}}}))).filter(e=>"rejected"===e.status);if(0<e.length){P.error(`Failed to load ${e.length} external diagrams`);for(var t of e)P.error(t);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams")),Pst=(e(),bk(),"comm"),Bst="rule",$st="decl",Fst="@keyframes",zst=Math.abs,qst=String.fromCharCode;function jst(e){return e.trim()}function Wst(e,t,r){return e.replace(t,r)}function Ust(e,t,r){return e.indexOf(t,r)}function Gst(e,t){return 0|e.charCodeAt(t)}function Vst(e,t,r){return e.slice(t,r)}function Yst(e){return e.length}function Hst(e){return e.length}function Xst(e,t){return t.push(e),e}mt(jst,"trim"),mt(Wst,"replace"),mt(Ust,"indexof"),mt(Gst,"charat"),mt(Vst,"substr"),mt(Yst,"strlen"),mt(Hst,"sizeof"),mt(Xst,"append");var Kst=1,Zst=1,Qst=0,Jst=0,eot=0,tot="";function rot(e,t,r,i,n,a,s,o){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:Kst,column:Zst,length:s,return:"",siblings:o}}function iot(){return eot=0<Jst?Gst(tot,--Jst):0,Zst--,10===eot&&(Zst=1,Kst--),eot}function not(){return eot=Jst<Qst?Gst(tot,Jst++):0,Zst++,10===eot&&(Zst=1,Kst++),eot}function aot(){return Gst(tot,Jst)}function sot(e,t){return Vst(tot,e,t)}function oot(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 lot(e){return Kst=Zst=1,Qst=Yst(tot=e),Jst=0,[]}function cot(e){return tot="",e}function hot(e){return jst(sot(Jst-1,pot(91===e?e+2:40===e?e+1:e)))}function uot(e){for(;(eot=aot())&&eot<33;)not();return 2<oot(e)||3<oot(eot)?"":" "}function dot(e,t){for(;--t&¬()&&!(eot<48||102<eot||57<eot&&eot<65||70<eot&&eot<97););return sot(e,Jst+(t<6&&32==aot()&&32==not()))}function pot(e){for(;not();)switch(eot){case e:return Jst;case 34:case 39:34!==e&&39!==e&&pot(eot);break;case 40:41===e&&pot(e);break;case 92:not()}return Jst}function got(e,t){for(;not()&&e+eot!==57&&(e+eot!==84||47!==aot()););return"/*"+sot(t,Jst-1)+"*"+qst(47===e?e:not())}function fot(e){for(;!oot(aot());)not();return sot(e,Jst)}function mot(e){return cot(yot("",null,null,null,[""],e=lot(e),0,[0],e))}function yot(e,t,r,i,n,a,s,o,l){for(var c,h,u,d=0,p=0,g=s,f=0,m=0,y=1,v=1,b=1,x=0,T="",k=n,w=T;v;)switch(c=x,x=not()){case 40:if(108!=c&&58==Gst(w,g-1)){-1!=Ust(w+=Wst(hot(x),"&","&\f"),"&\f",zst(d?o[d-1]:0))&&(b=-1);break}case 34:case 39:case 91:w+=hot(x);break;case 9:case 10:case 13:case 32:w+=uot(c);break;case 92:w+=dot(Jst-1,7);continue;case 47:switch(aot()){case 42:case 47:Xst(bot(got(not(),Jst),t,r,l),l),5!=oot(c||1)&&5!=oot(aot()||1)||!Yst(w)||" "===Vst(w,-1,void 0)||(w+=" ");break;default:w+="/"}break;case 123*y:o[d++]=Yst(w)*b;case 125*y:case 59:case 0:switch(x){case 0:case 125:v=0;case 59+p:-1==b&&(w=Wst(w,/\f/g,"")),0<m&&(Yst(w)-g||0===y&&47===c)&&Xst(32<m?xot(w+";",i,r,g-1,l):xot(Wst(w," ","")+";",i,r,g-2,l),l);break;case 59:w+=";";default:if(Xst(u=vot(w,t,r,d,p,n,o,T,k=[],h=[],g,a),a),123===x)if(0===p)yot(w,t,u,u,k,a,g,o,h);else{switch(f){case 99:if(110===Gst(w,3))break;case 108:if(97===Gst(w,2))break;default:p=0;case 100:case 109:case 115:}p?yot(e,u,u,i&&Xst(vot(e,u,u,0,0,n,o,T,n,k=[],g,h),h),n,h,g,o,i?k:h):yot(w,u,u,u,[""],h,0,o,h)}}d=p=m=0,y=b=1,T=w="",g=s;break;case 58:g=1+Yst(w),m=c;default:if(y<1)if(123==x)--y;else if(125==x&&0==y++&&125==iot())continue;switch(w+=qst(x),x*y){case 38:b=0<p?1:(w+="\f",-1);break;case 44:o[d++]=(Yst(w)-1)*b,b=1;break;case 64:45===aot()&&(w+=hot(not())),f=aot(),p=g=Yst(T=w+=fot(Jst)),x++;break;case 45:45===c&&2==Yst(w)&&(y=0)}}return a}function vot(e,t,r,i,n,a,s,o,l,c,h,u){for(var d,p=n-1,g=0===n?a:[""],f=Hst(g),m=0,y=0;m<i;++m)for(var v,b=0,x=Vst(e,p+1,p=zst(d=s[m]));b<f;++b)(v=jst(0<d?g[b]+" "+x:Wst(x,/&\f/g,g[b])))&&(l[y++]=v);return rot(e,t,r,0===n?Bst:o,l,c,h,u)}function bot(e,t,r,i){return rot(e,t,r,Pst,qst(eot),Vst(e,2,-2),0,i)}function xot(e,t,r,i,n){return rot(e,t,r,$st,Vst(e,0,i),Vst(e,i+1,-1),i,n)}function Tot(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function kot(e,t,r,i){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case $st:return e.return=e.return||e.value;case Pst:return"";case Fst:return e.return=e.value+"{"+Tot(e.children,i)+"}";case Bst:if(!Yst(e.value=e.props.join(",")))return""}return Yst(r=Tot(e.children,i))?e.return=e.value+"{"+r+"}":""}function wot(s){var o=Hst(s);return function(e,t,r,i){for(var n="",a=0;a<o;a++)n+=s[a](e,t,r,i)||"";return n}}function Cot(e,t){e.attr("role","graphics-document document"),""!==t&&e.attr("aria-roledescription",t)}function Sot(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(rot,"node"),mt(function(){return eot},"char"),mt(iot,"prev"),mt(not,"next"),mt(aot,"peek"),mt(function(){return Jst},"caret"),mt(sot,"slice"),mt(oot,"token"),mt(lot,"alloc"),mt(cot,"dealloc"),mt(hot,"delimit"),mt(uot,"whitespace"),mt(dot,"escaping"),mt(pot,"delimiter"),mt(got,"commenter"),mt(fot,"identifier"),mt(mot,"compile"),mt(yot,"parse"),mt(vot,"ruleset"),mt(bot,"comment"),mt(xot,"declaration"),mt(Tot,"serialize"),mt(kot,"stringify"),mt(wot,"middleware"),An(),Kw(),mt(Cot,"setA11yDiagramInfo"),mt(Sot,"addSVGa11yTitleDescription"),Lr(),wi(),wi(),wi(),Uu(),kh(),Th(),zC();var Eot=class plt{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=vr(),i=ch(e,r);e=BC(e)+`
|
||
`;try{Qh(i)}catch{if(!(n=dh(i)))throw new oh(`Diagram ${i} not found.`);var{id:n,diagram:a}=await n();Zh(n,a)}var{db:n,parser:a,renderer:s,init:o}=Qh(i);return a.parser&&(a.parser.yy=n),n.clear?.(),o?.(r),t.title&&n.setDiagramTitle?.(t.title),await a.parse(e),new plt(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}},_ot=(th(),[]),Aot=mt(()=>{_ot.forEach(e=>{e()}),_ot=[]},"attachFunctions"),Rot=(e(),mt(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments"));function Lot(e){var t,r,i=e.match(nh);return i?(r={},(t="object"!=typeof(t=T_(i[1],{schema:x_})??{})||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:{}}}xh(),k_(),mt(Lot,"extractFrontMatter"),zC();var Iot=mt(e=>e.replace(/\r\n?/g,`
|
||
`).replace(/<(\w+)([^>]*)>/g,(e,t,r)=>"<"+t+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Not=mt(e=>{var{text:e,metadata:t}=Lot(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"),Dot=mt(e=>{var t=PC.detectInit(e)??{},r=PC.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:e})=>"wrap"===e):"wrap"===r?.type&&(t.wrap=!0),{text:yC(e),directive:t}},"processDirectives");function Mot(e){var t=Iot(e),t=Not(t),r=Dot(t.text),i=lC(t.config,r.directive);return{code:e=Rot(r.text),title:t.title,config:i}}function Oot(e){return e=(new TextEncoder).encode(e),e=Array.from(e,e=>String.fromCodePoint(e)).join(""),btoa(e)}mt(Mot,"preprocessDiagram"),Lh(),bi(),zC(),mt(Oot,"toBase64"),ki();var Pot=["foreignobject"],Bot=["dominant-baseline"];function $ot(e){return e=Mot(e),Tr(),xr(e.config??{}),e}async function Fot(e,t){Mst();try{var{code:r,config:i}=$ot(e);return{diagramType:(await Kot(r)).type,config:i}}catch(e){if(t?.suppressErrors)return!1;throw e}}mt($ot,"processAndSetConfigs"),mt(Fot,"parse");var zot=mt((e,t,r=[])=>`.${e} ${t} `+ar(`{ ${r.join(" !important; ")} !important; }`),"cssImportantStyles"),qot=mt((t,r=new Map)=>{let i=new CSSStyleSheet;if(void 0!==t.fontFamily&&i.insertRule(`:root { --mermaid-font-family: ${t.fontFamily}}`,i.cssRules.length),void 0!==t.altFontFamily&&i.insertRule(`:root { --mermaid-alt-font-family: ${t.altFontFamily}}`,i.cssRules.length),r instanceof Map){let e=_r(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];r.forEach(t=>{Hw(t.styles)||e.forEach(e=>{i.insertRule(zot(t.id,e,t.styles),i.cssRules.length)}),Hw(t.textStyles)||i.insertRule(zot(t.id,"tspan",(t?.textStyles||[]).map(e=>e.replace("color","fill"))),i.cssRules.length)})}let e="";return void 0!==t.themeCSS&&("function"==typeof i.replaceSync?((r=new CSSStyleSheet).replaceSync(t.themeCSS),e=Sh(r)+`
|
||
`):e+=t.themeCSS+`
|
||
`),e+Sh(i)},"createCssStyles"),jot=mt((n,e)=>Tot(mot(n+`{${e}}`),wot([mt(function(e,t,r,i){"rule"===e.type&&Array.isArray(e.props)?e.parent&&e.parent.type===Fst||(e.props=e.props.map(e=>e.startsWith(n)?e:n+" "+e)):e.type.startsWith("@")&&!["@media","@supports","@layer","@scope","@container","@starting-style",Fst].includes(e.type)&&(P.warn(`Removing unsupported at-rule ${e.type} from CSS`),e.type=Pst)},"addNamespace"),kot])),"compileCSS"),Wot=mt((e,t,r,i)=>(r=qot(e,r),t=Rh(t,r,{...e.themeVariables,theme:e.theme,look:e.look},i),jot(i,t)),"createUserStyles"),Uot=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=$C(i)).replace(/<br>/g,"<br/>")},"cleanUpSvgCode"),Got=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,${Oot(`<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"),Vot=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 Yot(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}mt(Yot,"sandboxedIframe");var Hot=mt((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),Vat=mt(async function(e,t,r){Mst();var i=$ot(t),n=(t=i.code,vr());P.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,c="#"+l,h=mt(()=>{var e=Q(d?o:c).node();e&&"remove"in e&&e.remove()},"removeTempElements"),u=Q(document.body),d="sandbox"===n.securityLevel,p="loose"===n.securityLevel,g=n.fontFamily;void 0!==r?(r&&(r.innerHTML=""),d?(y=Yot(Q(r),s),(u=Q(y.nodes()[0].contentDocument.body)).node().style.margin="0"):u=Q(r),Vot(u,e,l,"font-family: "+g,"http://www.w3.org/1999/xlink")):(Hot(document,e,l,s),d?(y=Yot(Q(document.body),s),(u=Q(y.nodes()[0].contentDocument.body)).node().style.margin="0"):u=Q("body"),Vot(u,e,l));let f,m;try{f=await Eot.fromText(t,{title:i.title})}catch(r){if(n.suppressErrorRendering)throw h(),r;f=await Eot.fromText("error"),m=r}var r=u.select(c).node(),y=f.type,r=(i=r.firstChild).firstChild,v=f.renderer.getClasses?.(t,f),v=Wot(n,y,v,a),b=document.createElement("style");b.innerHTML=v,i.insertBefore(b,r);try{await f.renderer.draw(t,e,"11.15.0",f)}catch(r){throw n.suppressErrorRendering?h():dst.draw(t,e,"11.15.0"),r}Zot(y,u.select(c+" svg"),f.db.getAccTitle?.(),f.db.getAccDescription?.()),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let x=u.select(c).node().innerHTML;if(P.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),x=Uot(x,d,or(n.arrowMarkerAbsolute)),d?(v=u.select(c+" svg").node(),x=Got(x,v)):p||(x=_n.sanitize(x,{ADD_TAGS:Pot,ADD_ATTR:Bot,HTML_INTEGRATION_POINTS:{foreignobject:!0}})),Aot(),m)throw m;return h(),{diagramType:y,svg:x,bindFunctions:f.db.bindFunctions}},"render");function Xot(e={}){(e=Ee({},e))?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),gr(e),e?.theme&&e.theme in Qt?e.themeVariables=Qt[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=Qt.default.getThemeVariables(e.themeVariables)),e="object"==typeof e?pr(e):mr(),Re(e.logLevel),Mst()}mt(Xot,"initialize");var Kot=mt((e,t={})=>(e=Mot(e).code,Eot.fromText(e,t)),"getDiagramFromText");function Zot(e,t,r,i){Cot(t,e),Sot(t,r,i,t.attr("id"))}mt(Zot,"addA11yInfo");var Qot=Object.freeze({render:Vat,parse:Fot,getDiagramFromText:Kot,initialize:Xot,getConfig:vr,setConfig:yr,getSiteConfig:mr,updateSiteConfig:fr,reset:mt(()=>{Tr()},"reset"),globalReset:mt(()=>{Tr(sr)},"globalReset"),defaultConfig:sr}),Jot=(Re(vr().logLevel),Tr(vr()),Jue(),zC(),mt((e,t,r)=>{P.warn(e),oC(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")),elt=mt(async function(t={querySelector:".mermaid"}){try{await tlt(t)}catch(e){if(oC(e)&&P.error(e.str),ult.parseError&&ult.parseError(e),!t.suppressErrors)throw P.error("Use the suppressErrors option to suppress these errors"),e}},"run"),tlt=mt(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){var i=Qot.getConfig();P.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)}P.debug(`Found ${n.length} diagrams`),void 0!==i?.startOnLoad&&(P.debug("Start On Load: "+i?.startOnLoad),Qot.updateSiteConfig({startOnLoad:i?.startOnLoad}));var a,s=new PC.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed),o=[];for(a of Array.from(n))if(P.info("Rendering diagram: "+a.id),!a.getAttribute("data-processed")){a.setAttribute("data-processed","true");var l="mermaid-"+s.next(),c=a.innerHTML,h=(c=ih(PC.entityDecode(c)).trim().replace(/<br\s*\/?>/gi,"<br/>"),PC.detectInit(c));h&&P.debug("Detected early reinit: ",h);try{var{svg:u,bindFunctions:d}=await clt(l,c,a);a.innerHTML=u,e&&await e(l),d&&d(a)}catch(e){Jot(e,o,ult.parseError)}}if(0<o.length)throw o[0]},"runThrowsErrors"),rlt=mt(function(e){Qot.initialize(e)},"initialize"),r=mt(async function(e,t,r){P.warn("mermaid.init is deprecated. Please use run instead."),e&&rlt(e),e={postRenderCallback:r,querySelector:".mermaid"},"string"==typeof t?e.querySelector=t:t&&(t instanceof HTMLElement?e.nodes=[t]:e.nodes=t),await elt(e)},"init"),Vat=mt(async(e,{lazyLoad:t=!0}={})=>{Mst(),hh(...e),!1===t&&await Ost()},"registerExternalDiagrams"),ilt=mt(function(){ult.startOnLoad&&Qot.getConfig().startOnLoad&&ult.run().catch(e=>P.error("Mermaid failed to initialize",e))},"contentLoaded"),nlt=(typeof document<"u"&&window.addEventListener("load",ilt,!1),mt(function(e){ult.parseError=e},"setParseErrorHandler")),alt=[],slt=!1,olt=mt(async()=>{if(!slt){for(slt=!0;0<alt.length;){var e=alt.shift();if(e)try{await e()}catch(e){P.error("Error executing queue",e)}}slt=!1}},"executeQueue"),llt=mt(async(a,s)=>new Promise((i,n)=>{var e=mt(()=>new Promise((t,r)=>{Qot.parse(a,s).then(e=>{t(e),i(e)},e=>{P.error("Error parsing",e),ult.parseError?.(e),r(e),n(e)})}),"performCall");alt.push(e),olt().catch(n)}),"parse"),clt=mt((a,s,o)=>new Promise((i,n)=>{var e=mt(()=>new Promise((t,r)=>{Qot.render(a,s,o).then(e=>{t(e),i(e)},e=>{P.error("Error parsing",e),ult.parseError?.(e),r(e),n(e)})}),"performCall");alt.push(e),olt().catch(n)}),"render"),hlt=mt(()=>Object.keys(lh).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),ult={startOnLoad:!0,mermaidAPI:Qot,parse:llt,render:clt,init:r,run:elt,registerExternalDiagrams:Vat,registerLayoutLoaders:Oue,initialize:rlt,parseError:void 0,contentLoaded:ilt,setParseErrorHandler:nlt,detectType:ch,registerIconPacks:Zc,getRegisteredDiagramsMetadata:hlt},dlt=ult,llt=qat;return O(_({},"__esModule",{value:!0}),llt)})(),globalThis.mermaid=globalThis.__esbuild_esm_mermaid_nm.mermaid.default;
|